Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (19 sloc) 0.575 kB
module Twitter
class Geo
include HTTParty
base_uri "api.twitter.com/#{Twitter.api_version}/geo"
def self.place(place_id, query={})
Twitter.mash(Twitter.parse(get("/id/#{place_id}.json", :query => query)))
end
def self.search(query={})
mashup(get("/search.json", :query => query))
end
def self.reverse_geocode(query={})
mashup(get("/reverse_geocode.json", :query => query))
end
private
def self.mashup(response)
Twitter.parse(response)["result"].values.flatten.map{|t| Twitter.mash(t)}
end
end
end
Jump to Line
Something went wrong with that request. Please try again.