Module: GettyUp::API::GetImageDetails

Includes:
Util
Defined in:
lib/getty_up/api/get_image_details.rb

Constant Summary collapse

ENDPOINT =
"https://connect.gettyimages.com/v1/search/GetImageDetails"

Instance Method Summary collapse

Methods included from Util

#post_json

Instance Method Details

#get_image_details(asset_ids) ⇒ Object



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

def get_image_details(asset_ids)

  request = {
    :RequestHeader => {
      :Token => @token,
      :CoordinationId => "MyUniqueId"
    },
    :GetImageDetailsRequestBody => {
      :CountryCode => "USA",
      :ImageIds => asset_ids,
      :Language => "en-us"
    }
  }

  response = post_json(request, ENDPOINT)

  # status = response["ResponseHeader"]["Status"]
  # images = response["GetImageDetailsResult"]["Images"]
end