Module: Instagram::Client::Locations
- Included in:
- Instagram::Client
- Defined in:
- lib/instagram/client/locations.rb
Overview
Defines methods related to media items
Instance Method Summary collapse
-
#location(id) ⇒ Hashie::Mash
Returns extended information of a given Instagram location.
-
#location_recent_media(id, options = {}) ⇒ Hashie::Mash
Returns a list of recent media items for a given Instagram location.
-
#location_search(lat, lng, options = {}) ⇒ Array
Returns Instagram locations within proximity of given lat,lng.
Instance Method Details
#location(id) ⇒ Hashie::Mash
Returns extended information of a given Instagram location
16 17 18 19 |
# File 'lib/instagram/client/locations.rb', line 16 def location(id, *args) response = get("locations/#{id}") response["data"] end |
#location_recent_media(id, options = {}) ⇒ Hashie::Mash
Returns a list of recent media items for a given Instagram location
35 36 37 38 39 |
# File 'lib/instagram/client/locations.rb', line 35 def location_recent_media(id, *args) = args.last.is_a?(Hash) ? args.pop : {} response = get("locations/#{id}/media/recent", ) response end |
#location_search(lat, lng, options = {}) ⇒ Array
Returns Instagram locations within proximity of given lat,lng
53 54 55 56 |
# File 'lib/instagram/client/locations.rb', line 53 def location_search(lat, lng, ={}) response = get('locations/search', .merge(:lat => lat, :lng => lng)) response["data"] end |