UNPKG

instagram-graph-api

Version:

A library to help perform requests to the Instagram Graph API.

223 lines (222 loc) 9.51 kB
import { AbstractResponse } from '../../AbstractResponse'; import { MediaData } from '../../data/MediaData'; import { Paging, PagingData } from '../../data/Paging'; /** * Class that represents a response from a Page Media request. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.1.0 */ export declare class GetPageMediaResponse extends AbstractResponse<MediaData[]> { /** * The paging of the response. */ private paging; /** * The constructor. * * @param body the body of the response */ constructor(body: { data: MediaData[]; paging: PagingData; }); /** * Gets the paging of the response. * * @returns the paging of the response. */ getPaging(): Paging; /** * Gets an array with the ids of all the media objects. * * @returns an array with the ids of all the media objects. */ getIds(): string[]; /** * Gets an array with the caption of the all the media objects. * If a media object does not have the 'caption' field, 'undefined' is returned for that object. * * @returns an array with the caption of the all the media objects. */ getCaptions(): (string | undefined)[]; /** * Gets a map from the id of the media objects to their caption. * If a media object does have not a the 'caption' field, 'undefined' is returned for that object. * * @returns a map from the id of the media objects to their 'caption'. */ getCaptionsMap(): Map<string, string | undefined>; /** * Gets an array with the comments count of the all the media objects. * If a media object does not have the 'comments_count' field, 'undefined' is returned for that object. * * @returns an array with the 'comments_count' of the all the media objects. */ getCommentsCount(): (number | undefined)[]; /** * Gets a map from the id of the media objects to their comments count. * If a media object does have not a the 'comments_count' field, 'undefined' is returned for that object. * * @returns a map from the id of the media objects to whether their 'comments_count'. */ getCommentsCountMap(): Map<string, number | undefined>; /** * Gets an array with the ig_id of the all the media objects. * If a media object does not have the 'like_count' field, 'undefined' is returned for that object. * * @returns an array with the ig_id of the all the media objects. */ getIgIds(): (string | undefined)[]; /** * Gets a map from the id of the media objects to their ig_id. * If a media object does not have the 'like_count' field, 'undefined' is returned for that object. * * @returns a map from the ig of the media objects to their 'ig_id'. */ getIgIdsMap(): Map<string, string | undefined>; /** * Gets an array with the 'is_comment_enabled' of the all the media objects. * If a media object does not have the 'is_comment_enabled' field, 'undefined' is returned for that object. * * @returns an array with the 'is_comment_enabled' of the all the media objects. */ getCommentsEnabled(): (boolean | undefined)[]; /** * Gets a map from the id of the media objects to whether they have comments enabled. * If a media object does have not a the 'is_comment_enabled' field, 'undefined' is returned for that object. * * @returns a map from the id of the media objects to whether they have comments enabled. */ getCommentsEnabledMap(): Map<string, boolean | undefined>; /** * Gets an array with the like counts of the all the media objects. * If a media object does not have the 'like_count' field, 'undefined' is returned for that object. * * @returns an array with the like counts of the all the media objects. */ getLikes(): (number | undefined)[]; /** * Gets a map from the id of the media objects to their like count. * If a media object does have not a the 'like_count' field, 'undefined' is returned for that object. * * @returns a map from the id of the media objects to their 'like_count'. */ getLikesMap(): Map<string, number | undefined>; /** * Gets an array with the media types of the all the media objects. * If a media object does not have the 'media_type' field, 'undefined' is returned for that object. * * @returns an array with the media types of the all the media objects. */ getMediaTypes(): (string | undefined)[]; /** * Gets a map from the id of the media objects to their media type. * If a media object does have not a the 'media_type' field, 'undefined' is returned for that object. * * @returns a map from the id of the media objects to their 'media_type'. */ getMediaTypesMap(): Map<string, string | undefined>; /** * Gets an array with the media URLs of the all the media object. * If a media object does not have the 'media_url' field, 'undefined' is returned for that object. * * @returns an array with the media URLs of the all the media objects. */ getMediaUrls(): (string | undefined)[]; /** * Gets a map from the id of the media objects to their media URL. * If a media object does have not a the 'media_url' field, 'undefined' is returned for that object. * * @returns a map from the id of the media objects to their 'media_url'. */ getMediaUrlsMap(): Map<string, string | undefined>; /** * Gets an array with the media owner of the all the media object. * If a media object does not have the 'owner' field, 'undefined' is returned for that object. * * @returns an array with the media owner of the all the media objects. */ getMediaOwners(): ({ id: string; } | undefined)[]; /** * Gets a map from the id of the media objects to their media owner. * If a media object does have not a the 'owner' field, 'undefined' is returned for that object. * * @returns a map from the id of the media objects to their 'owner'. */ getMediaOwnersMap(): Map<string, { id: string; } | undefined>; /** * Gets an array with the id of media owner of the all the media object. * If a media object does not have the 'owner' field, 'undefined' is returned for that object. * * @returns an array with the id of media owner of the all the media objects. */ getMediaOwnerIds(): (string | undefined)[]; /** * Gets a map from the id of the media objects to the id of their media owner. * If a media object does have not a the 'owner' field, 'undefined' is returned for that object. * * @returns a map from the id of the media objects to their 'owner.id'. */ getMediaOwnerIdsMap(): Map<string, string | undefined>; /** * Gets an array with the media owner of the all the permalinks. * If a media object does not have the 'permalink' field, 'undefined' is returned for that object. * * @returns an array with the permalinks of the all the media objects. */ getPermalinks(): (string | undefined)[]; /** * Gets a map from the id of the media objects to their permalink. * If a media object does have not a the 'permalink' field, 'undefined' is returned for that object. * * @returns a map from the id of the media objects to their 'permalink'. */ getPermalinksMap(): Map<string, string | undefined>; /** * Gets an array with the media owner of the all the shortcodes. * If a media object does not have the 'shortcode' field, 'undefined' is returned for that object. * * @returns an array with the shortcodes of the all the media objects. */ getShortcodes(): (string | undefined)[]; /** * Gets a map from the id of the media objects to their shortcode. * If a media object does have not a the 'shortcode' field, 'undefined' is returned for that object. * * @returns a map from the id of the media objects to their 'shortcode'. */ getShortcodesMap(): Map<string, string | undefined>; /** * Gets an array with the media owner of the all the timestamps. * If a media object does not have the 'timestamp' field, 'undefined' is returned for that object. * * @returns an array with the timestamps of the all the media objects. */ getTimestamps(): (Date | undefined)[]; /** * Gets a map from the id of the media objects to their timestamp. * If a media object does have not a the 'timestamp' field, 'undefined' is returned for that object. * * @returns a map from the id of the media objects to their 'timestamp'. */ getTimestampsMap(): Map<string, Date | undefined>; /** * Gets an array with the media owner of the all the usernames. * If a media object does not have the 'username' field, 'undefined' is returned for that object. * * @returns an array with the usernames of the all the media objects. */ getUsernames(): (string | undefined)[]; /** * Gets a map from the id of the media objects to their username. * If a media object does have not a the 'username' field, 'undefined' is returned for that object. * * @returns a map from the id of the media objects to their 'username'. */ getUsernamesMap(): Map<string, string | undefined>; }