Created
April 29, 2017 11:41
-
-
Save peterc/d2cfa896c39512889bdef27639110075 to your computer and use it in GitHub Desktop.
Get rate limit info from Ruby Twitter gem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I wanted to get rate limit info from Twitter without there being an error condition | |
# I can't find a nice way to do this with the Ruby twitter gem, other than this.. | |
rate_limits = Twitter::REST::Request.new(client, :get, '/1.1/application/rate_limit_status.json').perform |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment