instagram-graph-api
Version:
A library to help perform requests to the Instagram Graph API.
33 lines (32 loc) • 1.05 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetPageTimedInsightsResponse = void 0;
const AbstractGetInsightsResponse_1 = require("../../AbstractGetInsightsResponse");
const SimpleMetric_1 = require("../../data/insights/SimpleMetric");
const Paging_1 = require("../../data/Paging");
/**
* Class that represents a response from a Page Insights request for Day, Week or Month metrics.
*
* @author Tiago Grosso <tiagogrosso99@gmail.com>
* @since 0.1.0
*/
class GetPageTimedInsightsResponse extends AbstractGetInsightsResponse_1.AbstractGetInsightsResponse {
/**
* The constructor.
*
* @param body the body of the response.
*/
constructor(body) {
super(body.data.map((elem) => new SimpleMetric_1.SimpleMetric(elem)));
this.paging = new Paging_1.Paging(body.paging);
}
/**
* Gets the paging.
*
* @returns the paging.
*/
getPaging() {
return this.paging;
}
}
exports.GetPageTimedInsightsResponse = GetPageTimedInsightsResponse;