Class: RubyInstagram::API

Inherits:
Object
  • Object
show all
Includes:
Connection, OAuth, Request
Defined in:
lib/ruby_instagram/api.rb

Direct Known Subclasses

Client

Constant Summary

Constants included from OAuth

OAuth::OAUTH_ENDPOINT

Instance Method Summary collapse

Methods included from OAuth

#authorize_url, #get_access_token

Methods included from Request

#get, #post

Constructor Details

#initialize(options = {}) ⇒ API

Creates a new API



12
13
14
15
16
17
# File 'lib/ruby_instagram/api.rb', line 12

def initialize(options = {})
  options = RubyInstagram.options.merge(options)
  Configuration::VALID_OPTIONS_KEYS.each do |key|
    send("#{key}=", options[key])
  end
end

Instance Method Details

#configObject



19
20
21
22
23
24
25
# File 'lib/ruby_instagram/api.rb', line 19

def config
  {}.tap do |conf|
    Configuration::VALID_OPTIONS_KEYS.each do |key|
      conf[key] = send(key)
    end
  end
end