Class: RubyInstagram::Client

Inherits:
API
  • Object
show all
Includes:
Users
Defined in:
lib/ruby_instagram/client.rb,
lib/ruby_instagram/client/users.rb

Overview

Note:

All methods have been separated into modules and follow the same grouping used in developers.facebook.com/docs/instagram-basic-display-api/reference

Wrapper for the Instagram REST API

Defined Under Namespace

Modules: Users

Constant Summary

Constants included from OAuth

OAuth::OAUTH_ENDPOINT

Instance Method Summary collapse

Methods included from Users

#user

Methods inherited from API

#config, #initialize

Methods included from OAuth

#authorize_url, #get_access_token

Methods included from Request

#get, #post

Constructor Details

This class inherits a constructor from RubyInstagram::API

Instance Method Details

#user_recent_media(options = {}) ⇒ Hashie::Mash

Returns a list of recent media items for a given user

For getting this data, you must authenticate (and be allowed to see that user).

Examples:

Returns a list of user media items for the currently authenticated user

RubyInstagram.user_media

Parameters:

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

    A customizable set of options.

Returns:

  • (Hashie::Mash)

See Also:



35
36
37
38
39
# File 'lib/ruby_instagram/client/users.rb', line 35

def user_media(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  id = args.first || 'me'
  get("#{id}/media", options)
end