UNPKG

instagram-graph-api

Version:

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

140 lines (139 loc) 5.81 kB
import { AbstractResponse } from '../AbstractResponse'; import { CommentData, CommentReplyData } from '../data/CommentData'; import { InnerId } from '../data/Common'; /** * Class that represents a response from requests to get the comments on an object. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.7.0 */ export declare class GetObjectCommentsResponse extends AbstractResponse<CommentData[]> { /** * The constructor. * * @param body the body of the response. */ constructor(body: { data: CommentData[]; }); /** * Gets an array with the ids of all the comments. * * @returns an array with the ids of all the comments. */ getIds(): string[]; /** * Gets an array with the text of the all the comments. * If a comment object does not have the 'text' field, 'undefined' is returned for that object. * * @returns an array with the text of the all the comments. */ getTexts(): (string | undefined)[]; /** * Gets a map from the id of the comments to their text. * If a comment object does not have the 'text' field, 'undefined' is returned for that object. * * @returns a map from the id of the comments to their 'text'. */ getTextsMap(): Map<string, string | undefined>; /** * Gets an array with the timestamp of the all the comments. * If a comment object does not have the 'timestamp' field, 'undefined' is returned for that object. * * @returns an array with the timestamp of the all the comments. */ getTimestamps(): (string | undefined)[]; /** * Gets a map from the id of the comments to their timestamp. * If a comment object does not have the 'timestamp' field, 'undefined' is returned for that object. * * @returns a map from the id of the comments to their 'timestamp'. */ getTimestampsMap(): Map<string, string | undefined>; /** * Gets an array with whether each of the comments is hidden. * If a comment object does not have the 'hidden' field, 'undefined' is returned for that object. * * @returns an array with whether each of the comments is hidden. */ getHidden(): (boolean | undefined)[]; /** * Gets a map from the id of the comments to whether they are hidden. * If a comment object does not have the 'hidden' field, 'undefined' is returned for that object. * * @returns a map from the id of the comments to whether it is hidden. */ getHiddenMap(): Map<string, boolean | undefined>; /** * Gets an array with the like_count of the all the comments. * If a comment object does not have the 'like_count' field, 'undefined' is returned for that object. * * @returns an array with the like_count of the all the comments. */ getLikeCounts(): (number | undefined)[]; /** * Gets a map from the id of the comments to their like_count. * If a comment object does not have the 'like_count' field, 'undefined' is returned for that object. * * @returns a map from the id of the comments to their 'like_count'. */ getLikeCountsMap(): Map<string, number | undefined>; /** * Gets an array with the media of the all the comments. * If a comment object does not have the 'media' field, 'undefined' is returned for that object. * * @returns an array with the media of the all the comments. */ getMediaObjects(): (InnerId | undefined)[]; /** * Gets a map from the id of the comments to their media. * If a comment object does not have the 'media' field, 'undefined' is returned for that object. * * @returns a map from the id of the comments to their 'media'. */ getMediaObjectsMap(): Map<string, InnerId | undefined>; /** * Gets an array with the replies of the all the comments. * If a comment object does not have the 'replies' field, 'undefined' is returned for that object. * The replies field can only be returned for top level comments. * * @returns an array with the replies of the all the comments. */ getReplies(): (CommentReplyData[] | undefined)[]; /** * Gets a map from the id of the comments to their replies. * If a comment object does not have the 'replies' field, 'undefined' is returned for that object. * The replies field can only be returned for top level comments. * * @returns a map from the id of the comments to their 'replies'. */ getRepliesMap(): Map<string, CommentReplyData[] | undefined>; /** * Gets an array with the user of the all the comments. * If a media object does not have the 'user' field, 'undefined' is returned for that object. * * @returns an array with the user of the all the comments. */ getUsers(): (InnerId | undefined)[]; /** * Gets a map from the id of the comments to their user. * If a media object does not have the 'user' field, 'undefined' is returned for that object. * * @returns a map from the id of the comments to their 'user'. */ getUsersMap(): Map<string, InnerId | undefined>; /** * Gets an array with the username of the all the comments. * If a media object does not have the 'username' field, 'undefined' is returned for that object. * * @returns an array with the username of the all the comments. */ getUsernames(): (string | undefined)[]; /** * Gets a map from the id of the comments to their username. * If a media object does not have the 'username' field, 'undefined' is returned for that object. * * @returns a map from the id of the comments to their 'username'. */ getUsernamesMap(): Map<string, string | undefined>; }