Example for checking rate limits

This commit is contained in:
Ryan McGrath 2009-07-01 05:16:22 -04:00
parent 860563b9f9
commit ecee9a438a

View file

@ -0,0 +1,10 @@
import tango
# Instantiate with Basic (HTTP) Authentication
twitter = tango.setup(authtype="Basic", username="example", password="example")
# This returns the rate limit for the requesting IP
rateLimit = twitter.getRateLimitStatus()
# This returns the rate limit for the requesting authenticated user
rateLimit = twitter.getRateLimitStatus(rate_for="user")