Module: Instagram::Client::Geographies

Included in:
Instagram::Client
Defined in:
lib/instagram/client/geographies.rb

Overview

Defines methods related to real-time geographies

Instance Method Summary collapse

Instance Method Details

#geography_recent_media(id, options = {}) ⇒ Hashie::Mash

Returns a list of recent media items for a given real-time geography

Examples:

Return a list of the most recent media items taken within a specific geography

Instagram.geography_recent_media(514276)

Parameters:

  • user (Integer)

    A geography ID from a real-time subscription.

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :count (Integer) — default: nil

    Limit the number of results returned

  • :min_id (Integer) — default: nil

    Return media before this min_id

  • :max_id (Integer) — default: nil

    Return media after this max_id

  • :min_timestamp (Integer) — default: nil

    Return media after this UNIX timestamp

  • :max_timestamp (Integer) — default: nil

    Return media before this UNIX timestamp

Returns:

  • (Hashie::Mash)

See Also:

Supported formats:

  • :json

Requires Authentication:

  • false

Rate Limited:

  • true



22
23
24
25
26
# File 'lib/instagram/client/geographies.rb', line 22

def geography_recent_media(id, *args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  response = get("geographies/#{id}/media/recent", options)
  response["data"]
end