instagram-graph-api
Version:
A library to help perform requests to the Instagram Graph API.
71 lines (70 loc) • 1.67 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Paging = void 0;
/**
* Class to represent the Paging of a paged response.
*
* @author Tiago Grosso <tiagogrosso99@gmail.com>
* @since 0.1.0
*/
class Paging {
/**
* The constructor.
*
* @param pagingData the paging data.
*/
constructor(pagingData) {
this.pagingData = pagingData;
}
/**
* Gets the paging of the response.
*
* @returns the paging of the response.
*/
getPaging() {
return this.pagingData;
}
/**
* Gets the cursors of the response.
*
* @returns the cursors of the response.
*/
getCursors() {
return this.pagingData.cursors;
}
/**
* Gets the previous page of the response.
*
* @returns the previous page of the response.
*/
getPrevious() {
return this.pagingData.previous;
}
/**
* Gets the next page of the response.
*
* @returns the next page of the response.
*/
getNext() {
return this.pagingData.next;
}
/**
* Gets the object before the one in the response.
*
* @returns the object before the one in the response.
*/
getBefore() {
var _a;
return (_a = this.pagingData.cursors) === null || _a === void 0 ? void 0 : _a.before;
}
/**
* Gets the object after the one in the response.
*
* @returns the object after the one in the response.
*/
getAfter() {
var _a;
return (_a = this.pagingData.cursors) === null || _a === void 0 ? void 0 : _a.after;
}
}
exports.Paging = Paging;