Class: GettyUp::Client

Inherits:
Object
  • Object
show all
Includes:
API::CreateSession, API::RenewSession, API::SearchForImages, Configurable
Defined in:
lib/getty_up/client.rb

Constant Summary

Constants included from API::RenewSession

API::RenewSession::ENDPOINT

Constants included from API::SearchForImages

API::SearchForImages::ENDPOINT

Constants included from API::CreateSession

API::CreateSession::ENDPOINT

Instance Attribute Summary

Attributes included from Configurable

#api_password, #api_username, #secret_token, #status, #system_id, #system_password, #token, #token_duration, #token_expiration

Instance Method Summary collapse

Methods included from API::RenewSession

#renew_session

Methods included from API::Util

#post_json

Methods included from API::SearchForImages

#search_for_images

Methods included from API::CreateSession

#create_session, #session_valid?

Methods included from Configurable

#configure, #credentials, keys

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



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

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