UNPKG

@agility/content-fetch

Version:
36 lines (35 loc) 1.28 kB
import { Gallery } from '../types/Gallery'; import { ApiClientInstance } from '../types/Client'; /** * Gets the details of a gallery by their Gallery ID. * @memberof AgilityFetch.Client.Pages * @param {Object} requestParams - The parameters for the API request. * @param {Date} [requestParams.lastAccessDate] - A Date object representing the last access date and time for the URL Redirections list. This value should be pulled from a previous request. * @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', * }); * * let dateObj = null; * * api.getUrlRedirections({ * lastAccessDate: dateObj * }) * .then(function({urlRedirections, lastAccessDate}) { * console.log(urlRedirections.length, lastAccessDate); * }) * .catch(function(error) { * console.log(error); * }); * */ export interface UrlRedirectionsRequestParams { lastAccessDate?: Date | null; } declare function getUrlRedirections(this: ApiClientInstance, requestParams: UrlRedirectionsRequestParams): Promise<Gallery>; export default getUrlRedirections;