5

In reading about the API rate limiting, the documentation talks about a method responding with an ominous backoff field, and states that the client should cease from calling that method for that many seconds.

Is there a dummy method that always returns a backoff that I can test against? Otherwise, what does the backoff field come back in the form of?

Regular int?

{ ... "backoff": 20}

a string to be parsed?

{ ... "backoff": "20"}
Brock Adams
  • 12,901
  • 5
  • 38
  • 64
Conrad.Dean
  • 153
  • 4

1 Answers1

3

The documentation for the response wrapper defines the backoff field as an integer, so you can expect it to come back in the first form.

I don't believe there's any way to graciously test a backoff response short of actually angering the API (which I'd recommend against).

Tim Stone
  • 4,686
  • 3
  • 22
  • 32