lib/twitter/rest/places_and_geo.rb in twitter-7.0.0 vs lib/twitter/rest/places_and_geo.rb in twitter-8.0.0.rc.1

- old
+ new

@@ -1,8 +1,8 @@ -require 'twitter/geo_results' -require 'twitter/place' -require 'twitter/rest/utils' +require "twitter/geo_results" +require "twitter/place" +require "twitter/rest/utils" module Twitter module REST module PlacesAndGeo include Twitter::REST::Utils @@ -33,11 +33,11 @@ # @option options [String] :accuracy ('0m') A hint on the "region" in which to search. If a number, then this is a radius in meters, but it can also take a string that is suffixed with ft to specify feet. If coming from a device, in practice, this value is whatever accuracy the device has measuring its location (whether it be coming from a GPS, WiFi triangulation, etc.). # @option options [String] :granularity ('neighborhood') This is the minimal granularity of place types to return and must be one of: 'poi', 'neighborhood', 'city', 'admin' or 'country'. # @option options [Integer] :max_results A hint as to the number of results to return. This does not guarantee that the number of results returned will equal max_results, but instead informs how many "nearby" results to return. Ideally, only pass in the number of places you intend to display to the user here. # @return [Array<Twitter::Place>] def reverse_geocode(options = {}) - perform_get_with_object('/1.1/geo/reverse_geocode.json', options, Twitter::GeoResults) + perform_get_with_object("/1.1/geo/reverse_geocode.json", options, Twitter::GeoResults) end # Search for places that can be attached to a {Twitter::REST::Tweets#update} # # @see https://dev.twitter.com/rest/reference/get/geo/search @@ -54,11 +54,11 @@ # @option options [Integer] :max_results A hint as to the number of results to return. This does not guarantee that the number of results returned will equal max_results, but instead informs how many "nearby" results to return. Ideally, only pass in the number of places you intend to display to the user here. # @option options [String] :contained_within This is the place_id which you would like to restrict the search results to. Setting this value means only places within the given place_id will be found. # @option options [String] :"attribute:street_address" This option searches for places which have this given street address. There are other well-known and application-specific attributes available. Custom attributes are also permitted. # @return [Array<Twitter::Place>] def geo_search(options = {}) - perform_get_with_object('/1.1/geo/search.json', options, Twitter::GeoResults) + perform_get_with_object("/1.1/geo/search.json", options, Twitter::GeoResults) end alias places_nearby geo_search # Locates places near the given coordinates which are similar in name # @@ -73,10 +73,10 @@ # @option options [String] :name The name a place is known as. # @option options [String] :contained_within This is the place_id which you would like to restrict the search results to. Setting this value means only places within the given place_id will be found. # @option options [String] :"attribute:street_address" This option searches for places which have this given street address. There are other well-known and application-specific attributes available. Custom attributes are also permitted. # @return [Array<Twitter::Place>] def similar_places(options = {}) - perform_get_with_object('/1.1/geo/similar_places.json', options, Twitter::GeoResults) + perform_get_with_object("/1.1/geo/similar_places.json", options, Twitter::GeoResults) end alias places_similar similar_places end end end