instagram-graph-api
Version:
A library to help perform requests to the Instagram Graph API.
105 lines (104 loc) • 2.54 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetCommentResponse = void 0;
const AbstractResponse_1 = require("../AbstractResponse");
/**
* Class that represents a response from the Get Comment Request.
*
* @author Tiago Grosso <tiagogrosso99@gmail.com>
* @since 0.6.0
*/
class GetCommentResponse extends AbstractResponse_1.AbstractResponse {
/**
* Gets the id of the comment.
*
* @returns the id of the comment.
*/
getId() {
return this.data.id;
}
/**
* Gets whether the comment is hidden.
*
* @returns whether the comment is hidden.
*/
isHidden() {
return this.data.hidden;
}
/**
* Gets the number of likes in the comment.
*
* @returns the number of likes in the comment.
*/
getLikeCount() {
return this.data.like_count;
}
/**
* Gets the parent media of the comment.
*
* @returns the parent media of the comment.
*/
getParentMedia() {
return this.data.media;
}
/**
* Gets the parent media id of the comment.
*
* @returns the parent media id of the comment.
*/
getParentMediaId() {
var _a;
return (_a = this.data.media) === null || _a === void 0 ? void 0 : _a.id;
}
/**
* Gets the replies to the comment.
*
* @returns the replies to the comment.
*/
getReplies() {
var _a;
return (_a = this.data.replies) === null || _a === void 0 ? void 0 : _a.data;
}
/**
* Gets the text of the comment.
*
* @returns the text of the comment.
*/
getText() {
return this.data.text;
}
/**
* Gets the timestamp of the comment.
*
* @returns the timestamp of the comment.
*/
getTimestamp() {
return this.data.timestamp;
}
/**
* Gets the user that owns the comment.
*
* @returns the user that owns the comment.
*/
getUser() {
return this.data.user;
}
/**
* Gets the id user that owns the comment.
*
* @returns the id user that owns the comment.
*/
getUserId() {
var _a;
return (_a = this.data.user) === null || _a === void 0 ? void 0 : _a.id;
}
/**
* Gets the username of the owner of the comment.
*
* @returns the username of the owner of the comment.
*/
getUsername() {
return this.data.username;
}
}
exports.GetCommentResponse = GetCommentResponse;