Skip to content

Instantly share code, notes, and snippets.

@kwilczynski
Last active March 21, 2021 23:32
Show Gist options
  • Save kwilczynski/548197 to your computer and use it in GitHub Desktop.
Save kwilczynski/548197 to your computer and use it in GitHub Desktop.
Get Twitter timeline in Ruby
module Twitter
def self.get_timeline(screen_name, query = {})
response = HTTParty.get(
"http://api.twitter.com/1/statuses/user_timeline.json?screen_name=#{screen_name}",
:query => query,
:format => :json
)
response.collect { |t| Hashie::Mash.new(t) }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment