instagram-graph-api
Version:
A library to help perform requests to the Instagram Graph API.
38 lines (37 loc) • 1.08 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PostReplyRequest = void 0;
const CreatedObjectIdResponse_1 = require("../../common/CreatedObjectIdResponse");
const AbstractRepliesRequest_1 = require("./AbstractRepliesRequest");
/**
* Request that creates a reply to a comment.
*
* @author Tiago Grosso <tiagogrosso99@gmail.com>
* @since `next.release`
*/
class PostReplyRequest extends AbstractRepliesRequest_1.AbstractRepliesRequest {
/**
* The constructor.
*
* @param accessToken The access token.
* @param commentId the id of the comment object.
* @param text the text of the reply.
*/
constructor(accessToken, commentId, text) {
super(accessToken, commentId);
this.params.message = text;
}
/**
* @inheritdoc
*/
parseResponse(response) {
return new CreatedObjectIdResponse_1.CreatedObjectIdResponse(response.data);
}
/**
* @inheritdoc
*/
method() {
return 'POST';
}
}
exports.PostReplyRequest = PostReplyRequest;