Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (17 sloc) 457 Bytes
module Twitter
class LocalTrends
include HTTParty
base_uri "api.twitter.com/#{Twitter.api_version}/trends"
def self.available(query={})
query.delete(:api_endpoint)
mashup(get("/available.json", :query => query))
end
def self.for_location(woeid, options = {})
mashup(get("/#{woeid}.json"))
end
private
def self.mashup(response)
Twitter.parse(response).map{|t| Twitter.mash(t)}
end
end
end
Jump to Line
Something went wrong with that request. Please try again.