Module: Instagram::Client::Media
- Included in:
- Instagram::Client
- Defined in:
- lib/instagram/client/media.rb
Overview
Defines methods related to media items
Instance Method Summary collapse
-
#media_item(id) ⇒ Hashie::Mash
Returns extended information of a given media item.
-
#media_popular(options = {}) ⇒ Hashie::Mash
Returns a list of the overall most popular media.
-
#media_search(lat, lng, options = {}) ⇒ Hashie::Mash
Returns media items within proximity of given lat,lng.
Instance Method Details
#media_item(id) ⇒ Hashie::Mash
Returns extended information of a given media item
18 19 20 21 22 |
# File 'lib/instagram/client/media.rb', line 18 def media_item(*args) id = args.first || 'self' response = get("media/#{id}") response end |
#media_popular(options = {}) ⇒ Hashie::Mash
Returns a list of the overall most popular media
37 38 39 40 41 42 |
# File 'lib/instagram/client/media.rb', line 37 def media_popular(*args) = args.last.is_a?(Hash) ? args.pop : {} id = args.first || "self" response = get("media/popular", ) response end |
#media_search(lat, lng, options = {}) ⇒ Hashie::Mash
Returns media items within proximity of given lat,lng
57 58 59 60 |
# File 'lib/instagram/client/media.rb', line 57 def media_search(lat, lng, ={}) response = get('media/search', .merge(:lat => lat, :lng => lng)) response end |