@agility/content-fetch
Version:
JS/TS library for the Agility Fetch API
34 lines (33 loc) • 1.05 kB
TypeScript
import { Gallery } from '../types/Gallery';
import { ApiClientInstance } from '../types/Client';
/**
* Gets the details of a gallery by their Gallery ID.
* @memberof AgilityFetch.Client.Media
* @param {Object} requestParams - The parameters for the API request.
* @param {number} requestParams.galleryID - The galleryID of the requested item in this language.
* @returns {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);
* });
*
*/
export interface GalleryRequestParams {
galleryID: number;
}
declare function getGallery(this: ApiClientInstance, requestParams: GalleryRequestParams): Promise<Gallery>;
export default getGallery;