Skip to content

gettyimages/gettyimages-api_nodejs_sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Sample app for testing out the NodeJS SDK package

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published