Module: Instagram::Client::Embedding

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

Overview

Defines methods related to embedding

Instance Method Summary collapse

Instance Method Details

#oembed(url = nil, options = {}) ⇒ Object

Returns information about the media associated with the given short link

Examples:

Return information about the media associated with http://instagr.am/p/BUG/

Instagram.oembed(http://instagr.am/p/BUG/)

Parameters:

  • url (String) (defaults to: nil)

    An instagram short link @param options [Hash] A customizable set of options @option options [Integer] :maxheight Maximum height of returned media @option options [Integer] :maxwidth Maximum width of returned media @option options [Integer] :callback A JSON callback to be invoked @return [Hashie::Mash] Information about the media associated with given short link

See Also:

Rate Limited:

  • true

Supported formats:

  • :json

Requires Authentication:

  • false



21
22
23
24
25
# File 'lib/instagram/client/embedding.rb', line 21

def oembed(*args)
  url = args.first
  return nil unless url
  get("oembed?url=#{url}", {}, false, false, true)
end