UNPKG

instagram-graph-api

Version:

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

38 lines (37 loc) 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PostHideCommentRequest = void 0; const AbstractCommentRequest_1 = require("./AbstractCommentRequest"); const CommentUpdateResponse_1 = require("./CommentUpdateResponse"); /** * Request to toggle whether a comment is hidden. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.6.0 */ class PostHideCommentRequest extends AbstractCommentRequest_1.AbstractCommentRequest { /** * The constructor. * * @param accessToken the access token. * @param commentId the id of the comment. * @param hide whether to hide or show the comment (default: true). */ constructor(accessToken, commentId, hide = true) { super(accessToken, commentId); this.params.hide = hide; } /** * @inheritdoc */ parseResponse(response) { return new CommentUpdateResponse_1.CommentUpdateResponse(response.data); } /** * @inheritdoc */ method() { return 'POST'; } } exports.PostHideCommentRequest = PostHideCommentRequest;