Class: Shutterstock::Client

Inherits:
Object
  • Object
show all
Includes:
API::Auth, API::Images, API::Subscriptions, Configurable
Defined in:
lib/shutterstock/client.rb

Constant Summary

Constants included from API::Auth

API::Auth::BASE_PATH

Constants included from API::Util

API::Util::ENDPOINT, API::Util::FORMAT

Constants included from API::Subscriptions

API::Subscriptions::FORMAT, API::Subscriptions::SIZE

Constants included from API::Images

API::Images::BASE_PATH

Instance Attribute Summary

Attributes included from Configurable

#api_key, #api_username, #email, #password, #username

Instance Method Summary collapse

Methods included from API::Auth

#customer

Methods included from Configurable

#configure, #credentials, keys

Methods included from API::Util

#call, #call_with_auth_token

Methods included from API::Subscriptions

#subscriptions

Methods included from API::Images

#search

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



13
14
15
16
17
# File 'lib/shutterstock/client.rb', line 13

def initialize(options={})
  Shutterstock::Configurable.keys.each do |key|
    instance_variable_set(:"@#{key}", options[key] || Shutterstock.instance_variable_get(:"@#{key}"))
  end
end