Created
November 25, 2015 03:44
-
-
Save maruware/77cd0bdc3824344ebc5c to your computer and use it in GitHub Desktop.
fetch "rate_limit_status" with 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
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] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks man, looking for this in the gem was starting to consume my afternoon!