]> jfr.im git - z_archive/twitter.git/commit
Handle API rate limiting
authorBeat Bolli <redacted>
Tue, 16 Sep 2014 17:45:20 +0000 (19:45 +0200)
committerBeat Bolli <redacted>
Tue, 16 Sep 2014 17:45:20 +0000 (19:45 +0200)
commit491792a29a7570ef1691be9d3d86e9523933c76b
tree7709610dbb2347fec97c2948b42ef580340dae76
parent1853cc1be8658060a81ee7ab109e4e620aef2f53
Handle API rate limiting

Pass `retry=True` when creating the Twitter instance to handle these two
cases automatically:

- On HTTP error 429, read the `X-Rate-Limit-Reset` HTTP header and retry
  after the specified time.

- On HTTP errors 502, 503, and 504, retry after 30 seconds.
twitter/api.py