module Instagram::Client::Locations

Defines methods related to media items

Public Instance Methods

location(id, *args) click to toggle source

Returns extended information of a given Instagram location

@overload location(id)

@param location [Integer] An Instagram location ID
@return [Hashie::Mash] The requested location.
@example Return extended information for the Instagram office
  Instagram.location(514276)

@format :json @authenticated false @rate_limited true @see instagram.com/developer/endpoints/locations/#get_locations

# File lib/instagram/client/locations.rb, line 16
def location(id, *args)
  response = get("locations/#{id}")
  response
end
location_recent_media(id, *args) click to toggle source

Returns a list of recent media items for a given Instagram location

@overload location_recent_media(id, options={})

@param user [Integer] An Instagram location ID.
@param options [Hash] A customizable set of options.
@option options [Integer] :max_timestamp (nil) Return media before this UNIX timestamp
@option options [Integer] :max_id (nil) Returns results with an ID less than (that is, older than) or equal to the specified ID.
@option options [Integer] :count (nil) Limits the number of results returned per page.
@return [Hashie::Mash]
@example Return a list of the most recent media items taken at the Instagram office
  Instagram.location_recent_media(514276)

@see instagram.com/developer/endpoints/locations/#get_locations_media_recent @format :json @authenticated false @rate_limited true

# File lib/instagram/client/locations.rb, line 36
def location_recent_media(id, *args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  response = get("locations/#{id}/media/recent", options)
  response
end