Sha256: b521a41fc1a3176f015b78cb9d99ef5e5495732d25d0d22da97eb574a3410146
Contents?: true
Size: 772 Bytes
Versions: 24
Compression:
Stored size: 772 Bytes
Contents
module Twitter class Trends include HTTParty base_uri 'search.twitter.com/trends' format :json # :exclude => 'hashtags' to exclude hashtags def self.current(options={}) mashup(get('/current.json', :query => options)) end # :exclude => 'hashtags' to exclude hashtags # :date => yyyy-mm-dd for specific date def self.daily(options={}) mashup(get('/daily.json', :query => options)) end # :exclude => 'hashtags' to exclude hashtags # :date => yyyy-mm-dd for specific date def self.weekly(options={}) mashup(get('/weekly.json', :query => options)) end private def self.mashup(response) response['trends'].values.flatten.map { |t| Mash.new(t) } end end end
Version data entries
24 entries across 24 versions & 13 rubygems