Module: GettyUp::API::RenewSession

Includes:
Util
Included in:
Client
Defined in:
lib/getty_up/api/renew_session.rb

Constant Summary collapse

ENDPOINT =
"https://connect.gettyimages.com/v1/session/RenewSession"

Instance Method Summary collapse

Methods included from Util

#post_json

Instance Method Details

#renew_sessionObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/getty_up/api/renew_session.rb', line 10

def renew_session
  request = {
    :RequestHeader =>
    {
      :Token => @secure_token
    },
    :RenewSessionRequestBody =>
    {
      :SystemId => @system_id,
      :SystemPassword => @system_password
    }
  }
  response = post_json(request, ENDPOINT)

  @status = response["ResponseHeader"]["Status"]
  @token = response["RenewSessionResult"]["Token"]
  @secure_token = response["RenewSessionResult"]["SecureToken"]
end