Skip to content

Instantly share code, notes, and snippets.

@maruware
Created November 25, 2015 03:44
Show Gist options
  • Save maruware/77cd0bdc3824344ebc5c to your computer and use it in GitHub Desktop.
Save maruware/77cd0bdc3824344ebc5c to your computer and use it in GitHub Desktop.
fetch "rate_limit_status" with twitter gem
client = Twitter::REST::Client.new do |config|
config.consumer_key = "..."
config.consumer_secret = "..."
end
res = Twitter::REST::Request.new(client, :get, '/1.1/application/rate_limit_status.json').perform
#ex.
p res[:resources][:search][:'/search/tweets'][:remaining]
@juddey
Copy link

juddey commented Dec 12, 2015

Thanks man, looking for this in the gem was starting to consume my afternoon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment