Class: GettyConnect::Client

Inherits:
Object
  • Object
show all
Includes:
Image, Session, Connection, Request
Defined in:
lib/getty_connect/client.rb,
lib/getty_connect/client/image.rb,
lib/getty_connect/client/session.rb

Defined Under Namespace

Modules: Image, Session

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Image

#download, #get_details, #get_download_token, #get_largest_download_auth, #get_preview, #search

Methods included from Session

#renew_token, #request_token

Methods included from Request

#delete, #get, #patch, #post, #put

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



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

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

Instance Attribute Details

#secure_tokenObject

Returns the value of attribute secure_token.



10
11
12
# File 'lib/getty_connect/client.rb', line 10

def secure_token
  @secure_token
end

#tokenObject

Returns the value of attribute token.



10
11
12
# File 'lib/getty_connect/client.rb', line 10

def token
  @token
end

#token_durationObject

Returns the value of attribute token_duration.



10
11
12
# File 'lib/getty_connect/client.rb', line 10

def token_duration
  @token_duration
end

#token_issued_atObject

Returns the value of attribute token_issued_at.



10
11
12
# File 'lib/getty_connect/client.rb', line 10

def token_issued_at
  @token_issued_at
end

#token_renewed_atObject

Returns the value of attribute token_renewed_at.



10
11
12
# File 'lib/getty_connect/client.rb', line 10

def token_renewed_at
  @token_renewed_at
end