Skip to content

Instantly share code, notes, and snippets.

@peterc
Created April 29, 2017 11:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterc/d2cfa896c39512889bdef27639110075 to your computer and use it in GitHub Desktop.
Save peterc/d2cfa896c39512889bdef27639110075 to your computer and use it in GitHub Desktop.
Get rate limit info from Ruby Twitter gem
# 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