Media

AgilityFetch.Client. Media

Agility Fetch API JS SDK for retrieving media from the Agility CMS

Source:

Methods

(static) getGallery(requestParams) → {Promise.<AgilityFetch.Types.Gallery>}

Gets the details of a gallery by their Gallery ID.

Source:
Parameters:
Name Type Description
requestParams Object

The parameters for the API request.

Name Type Description
galleryID number

The galleryID of the requested item in this language.

Returns:
Type:
Promise.<AgilityFetch.Types.Gallery>
  • Returns a gallery object.
Example
import agility from '@agility/content-fetch'

const api = agility.getApi({
  guid: 'ade6cf3c',
  apiKey: 'defaultlive.201ffdd0841cacad5bb647e76547e918b0c9ecdb8b5ddb3cf92e9a79b03623cb',
});

api.getGallery({
    galleryID: 22
})
.then(function(gallery) {
    console.log(gallery);
})
.catch(function(error) {
    console.log(error);
});