All Projects → gettyimages → gettyimages-api_nodejs

gettyimages / gettyimages-api_nodejs

Licence: MIT License
Getty Images API SDK for Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to gettyimages-api nodejs

RAImagePicker
📸 iMessage-like, Image Picker Controller Provides custom features.
Stars: ✭ 14 (-17.65%)
Mutual labels:  images, videos
Vanilla Lazyload
LazyLoad is a lightweight, flexible script that speeds up your website by deferring the loading of your below-the-fold images, backgrounds, videos, iframes and scripts to when they will enter the viewport. Written in plain "vanilla" JavaScript, it leverages IntersectionObserver, supports responsive images and enables native lazy loading.
Stars: ✭ 6,596 (+38700%)
Mutual labels:  images, videos
Lassi-Android
All in 1 picker library for android.
Stars: ✭ 108 (+535.29%)
Mutual labels:  images, videos
Exiftool Vendored.js
Fast, cross-platform Node.js access to ExifTool
Stars: ✭ 200 (+1076.47%)
Mutual labels:  images, videos
MediaSliderView
Pure java based, highly customizable media slider gallery supporting both images and videos for android.
Stars: ✭ 85 (+400%)
Mutual labels:  images, videos
Awesome Deepfakes Materials
A curated list of awesome Deepfakes materials
Stars: ✭ 219 (+1188.24%)
Mutual labels:  images, videos
Contentmanager
Android library for getting photo or video from a device gallery, cloud or camera. Working with samsung devices. Made by Stfalcon
Stars: ✭ 108 (+535.29%)
Mutual labels:  images, videos
cloudinary-api
Shorter and lighter APIs for Cloudinary
Stars: ✭ 41 (+141.18%)
Mutual labels:  images, videos
android-doc-picker
A simple and easy to use documents Picker android library. Choose any documents like pdf, ppt, text, word or media files from your device
Stars: ✭ 37 (+117.65%)
Mutual labels:  images, videos
droste-creator
Create recursive images with the droste effect.
Stars: ✭ 27 (+58.82%)
Mutual labels:  images
coronavirus-mask-image-dataset
Image dataset from Instagram of people wearing medical masks, no mask, or a non-medical (DIY) mask
Stars: ✭ 57 (+235.29%)
Mutual labels:  images
KGySoft.Drawing
KGy SOFT Drawing is a library for advanced image, icon and graphics handling.
Stars: ✭ 27 (+58.82%)
Mutual labels:  images
AutoVideoPlayer
Easily Play/Pause videos in any UIView subclass especially UITableViewCell subclass
Stars: ✭ 88 (+417.65%)
Mutual labels:  videos
diorama
An image layout algorithm
Stars: ✭ 17 (+0%)
Mutual labels:  images
imgix-java
A Java client library for generating URLs with imgix
Stars: ✭ 17 (+0%)
Mutual labels:  images
go2tv
Cast media files to UPnP/DLNA Media Renderers and Smart TVs.
Stars: ✭ 99 (+482.35%)
Mutual labels:  videos
aart
Convert images and video to ascii art!
Stars: ✭ 18 (+5.88%)
Mutual labels:  images
w0bm.com
Moved to https://git.lat/w0bm/w0bm/
Stars: ✭ 27 (+58.82%)
Mutual labels:  videos
hakyll-images
Hakyll utilities to work with images
Stars: ✭ 13 (-23.53%)
Mutual labels:  images
jekyll-imgix
A plugin for integrating imgix into Jekyll sites
Stars: ✭ 49 (+188.24%)
Mutual labels:  images

Getty Images API Node.js SDK

npm version Downloads Coverage Status Code Climate Open Hub

Introduction

This SDK makes using the Getty Images API easy. It handles credential management, makes HTTP requests and is written with a fluent style in mind. For more info about the API, see the Documentation.

  • Search for images and videos from our extensive creative and editorial catalogs.
  • Get image, video, and event metadata.
  • Download files using your Getty Images products (e.g., Editorial subscriptions, Easy Access, Thinkstock Subscriptions, and Image Packs).
  • Custom Request functionality that allows user to call any endpoint.

Help & Support

Prerequesites

Getting Started

Obtain an API Key

If you don't already have an API key, fill out and submit the contact form to be connected to our Sales team.

Installing the package

The SDK is available as an npm package. Install in your workspace with:

npm install --save gettyimages-api

Examples

Search for one or more images

var api = require("gettyimages-api");
var creds = { apiKey: "your_api_key", apiSecret: "your_api_secret", username: "your_username", password: "your_password" };
var client = new api (creds);
client.searchimages().withPage(1).withPageSize(1).withPhrase('beach')
    .execute().then(response => {
        console.log(JSON.stringify(response.images[0]));
    }, err => {
        throw err;
    });

Get detailed information for one or more images

var api = require("gettyimages-api");
var creds = { apiKey: "your_api_key", apiSecret: "your_api_secret", username: "your_username", password: "your_password" };
var client = new api (creds);
client.images().withId('200261415-001')
    .execute().then(response => {
        console.log(JSON.stringify(response.images[0]));
    }, err => {
        throw err;
    });

Download an image

var api = require("gettyimages-api");
var creds = { apiKey: "your_api_key", apiSecret: "your_api_secret", username: "your_username", password: "your_password" };
var client = new api (creds);
client.downloadsimages().withId('503928206')
    .execute().then(response => {
        console.log(response.uri);
    }, err => {
        throw err;
    });

Get details and download a video

// Gets some info about a video and then downloads the NTSC SD version

var api = require("gettyimages-api");
var https = require("https");
var fs = require("fs");

var creds =
    {
        apiKey: "your api key",
        apiSecret: "your api secret",
        username: "username",
        password: "password"
    };
var client = new api(creds);
var videoId = "459425248";
client.videos().withResponseField(["summary_set", "downloads"]).withId(videoId).execute().then(response => {
        console.log("Title: " + response.title);
        console.log("Sizes: ");
        response.download_sizes.forEach((current, index, arr) => {
            console.log(current.name + " - " + current.description);
        })
        client.downloadsvideos().withId(videoId).withSize("ntsccm").execute().then(response => {
            var downloadUri = response.uri;

            https.get(downloadUri, (res) => {
                if (res.statusCode === 200) {
                    var header = res.headers["content-disposition"];
                    var filename = header.split("filename=")[1];
                    console.log(filename);
                    var file = fs.createWriteStream("./" + filename);
                    res.on("data", (chunk) => {
                        file.write(chunk);
                    }).on("end", () => {
                        file.end();
                    });
                }
            });
        }, err => {
            throw err;
        });
    }, err => {
        throw err;
    });

Get an access token for use with the Getty Images Connect API

var api = require("gettyimages-api");
var creds = { apiKey: "your_api_key", apiSecret: "your_api_secret", username: "your_username", password: "your_password" };
var client = new api (creds);
client.getAccessToken().then(response => {
        console.log(response.access_token);
    }, err => {
        throw err;
    });

Use the custom request functionality

var api = require("gettyimages-api");
var creds = { apiKey: "your_api_key", apiSecret: "your_api_secret", username: "your_username", password: "your_password" };
var client = new api (creds);
client.customrequest().withRoute("search/images").withMethod("get").withQueryParameters({"phrase": "cat", "file_types": "eps"})
    .execute().then(response => {
        console.log(JSON.stringify(response.images[0]));
    }, err => {
        throw err;
    });
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].