I am trying to use the JSON type provider to access StackOverflow / StackExchange data via the API. It works great, with one caveat. The API has a throttle, which is signaled by a field "backoff" that contains the number of seconds you are supposed to back off until your next request. As a result, I can't just point the JSON TP to the url, because by default the backoff field is not present. This is how the response typically looks:
{
"items": [
{
"has_synonyms": true,
"user_id": 1144035,
"is_moderator_only": false,
"is_required": false,
"count": 7054,
"name": "sql"
},
{
"has_synonyms": true,
"user_id": 1144035,
"is_moderator_only": false,
"is_required": false,
"count": 16,
"name": "algorithm"
}
],
"has_more": true,
"quota_max": 10000,
"quota_remaining": 9693
}
I assumed what I needed to do was to supply a sample which contains both an example without backoff (as above), and one along the lines of this:
"has_more": true,
"quota_max": 10000,
"quota_remaining": 9693,
"backoff": 10
}
... so that I get a Backoff Option. However, I am not sure how to structure / prepare the sample to that effect. Help would be much appreciated!