Module: Twitter::REST::PlacesAndGeo
Overview
Methods for working with places and geo data
Constant Summary
Constants included from Utils
Instance Method Summary collapse
-
#geo_search(options = {}) ⇒ Array<Twitter::Place>
(also: #places_nearby)
Searches for places that can be attached to a tweet.
-
#place(place_id, options = {}) ⇒ Twitter::Place
Returns all the information about a known place.
-
#reverse_geocode(options = {}) ⇒ Array<Twitter::Place>
Searches for up to 20 places that can be used as a place_id.
-
#similar_places(options = {}) ⇒ Array<Twitter::Place>
(also: #places_similar)
Locates places near the given coordinates which are similar in name.
Methods included from Utils
Instance Method Details
#geo_search(options = {}) ⇒ Array<Twitter::Place> Also known as: places_nearby
Searches for places that can be attached to a tweet
67 68 69 |
# File 'lib/twitter/rest/places_and_geo.rb', line 67 def geo_search( = {}) perform_get_with_object("/1.1/geo/search.json", , GeoResults) end |
#place(place_id, options = {}) ⇒ Twitter::Place
Returns all the information about a known place
23 24 25 |
# File 'lib/twitter/rest/places_and_geo.rb', line 23 def place(place_id, = {}) perform_get_with_object("/1.1/geo/id/#{place_id}.json", , Place) end |
#reverse_geocode(options = {}) ⇒ Array<Twitter::Place>
Note:
Delivers generalized results about geography.
Searches for up to 20 places that can be used as a place_id
44 45 46 |
# File 'lib/twitter/rest/places_and_geo.rb', line 44 def reverse_geocode( = {}) perform_get_with_object("/1.1/geo/reverse_geocode.json", , GeoResults) end |
#similar_places(options = {}) ⇒ Array<Twitter::Place> Also known as: places_similar
Locates places near the given coordinates which are similar in name
90 91 92 |
# File 'lib/twitter/rest/places_and_geo.rb', line 90 def similar_places( = {}) perform_get_with_object("/1.1/geo/similar_places.json", , GeoResults) end |