gfcapalbo / python-twitter

Automatically exported from code.google.com/p/python-twitter
Apache License 2.0
0 stars 0 forks source link

Retrieve rate_limit_status for authenticated user (patch) #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm working on a desktop application for Twitter, and I wanted to be able
to get information about a user's rate_limit (see
http://apiwiki.twitter.com/REST-API-Documentation?SearchFor=rate+limit&sp=1#Rate
Limiting
and
http://apiwiki.twitter.com/REST-API-Documentation?SearchFor=rate+limit&sp=1#rate
limitstatus).

The following patch seems to offer the functionality that I need.  I
created two methods in the Api class: GetRateLimitStatus and
MaximumHitFrequency.  The former retrieves the dictionary from Twitter and
the latter offers the number of seconds that can be used as a regular
interval for checking Twitter without exceeding the user's rate_limit.

There's a good chance that I will have further modifications pertaining to
the rate_limit business, but I wanted to contribute this back as soon as I
could.

Original issue reported on code.google.com by wheaties...@gmail.com on 10 Mar 2009 at 8:17

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by dclinton on 10 Mar 2009 at 8:49

GoogleCodeExporter commented 9 years ago
Looks like they recently made a modification to the way the reset time works.  
Now, 
instead of being the time that the rate limits will be reset, it's the time at 
which 
the rate limits take effect.  I modified the patch to add an hour to the new 
reset 
time behavior.

Original comment by wheaties...@gmail.com on 19 Mar 2009 at 3:50

Attachments:

GoogleCodeExporter commented 9 years ago
Here is a similar patch to provide access to the rate limit status.

Original comment by gue...@gmail.com on 17 Apr 2009 at 12:10

Attachments:

GoogleCodeExporter commented 9 years ago
Yet another rate limit status patch.

Original comment by kouneri...@gmail.com on 9 Aug 2009 at 6:37

Attachments:

GoogleCodeExporter commented 9 years ago
implement the first patch given in changeset

http://code.google.com/p/python-twitter/source/detail?r=7bf4f7799cbaa0cde5b0f26d
1715ddcd13de37aa

Original comment by bear42 on 17 May 2010 at 4:47

GoogleCodeExporter commented 9 years ago
Issue 95 has been merged into this issue.

Original comment by bear42 on 17 May 2010 at 5:55