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.
-
#media_shortcode(shortcode) ⇒ Hashie::Mash
Returns extended information of a given media item.
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
56 57 58 59 60 61 |
# File 'lib/instagram/client/media.rb', line 56 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
76 77 78 79 |
# File 'lib/instagram/client/media.rb', line 76 def media_search(lat, lng, = {}) response = get("media/search", .merge(lat: lat, lng: lng)) response end |
#media_shortcode(shortcode) ⇒ Hashie::Mash
Returns extended information of a given media item
37 38 39 40 41 |
# File 'lib/instagram/client/media.rb', line 37 def media_shortcode(*args) shortcode = args.first response = get("media/shortcode/#{shortcode}", {}, false, false, true) response end |