Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 1.07 KB

README.md

File metadata and controls

55 lines (36 loc) · 1.07 KB

Getty Images API NodeJS SDK Sample App

An executable code sample to demonstrate use of the Getty Images NodeJS SDK.

  • Search for beach. Everyone likes a beach 🏖, right? (Well, except for this guy.)
  • Get details for the first image that is returned.

Getting Started

Requirements

  • NodeJS - We recommend the current LTS release which at this time is 16.14.2
  • Environment variables with API Key and Secret set

Setting Environment Variables

macOS/Linux

export GETTY_API_KEY=MYAPIKEY
export GETTY_API_SECRET=MYAPISECRET

Windows

Command Prompt
SET GETTY_API_KEY=MYAPIKEY
SET GETTY_API_SECRET=MYAPISECRET
Powershell
$env:GETTY_API_KEY=MYAPIKEY
$env:GETTY_API_SECRET=MYAPISECRET
Bash or WSL

See macOS/Linux

Install Dependencies

npm install

Execute the Sample Code

node index.js

You should see some JSON with information about a nice beach photo dumped out to your console.