UNPKG

instagram-graph-api

Version:

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

79 lines (78 loc) 1.59 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AbstractMetric = void 0; /** * Abstract class to represent a metric. * * @param T the type of the 'values' object. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.1.0 */ class AbstractMetric { /** * The constructor. * * @param metricData the metric data. */ constructor(metricData) { this.metricData = metricData; } /** * Gets the metric data. * * @returns the metric data. */ getMetricData() { return this.metricData; } /** * Gets the metric name. * * @returns the metric name. */ getMetricName() { return this.metricData.name; } /** * Gets the metric period. * * @returns the metric period. */ getMetricPeriod() { return this.metricData.period; } /** * Gets the metric title. * * @returns the metric title. */ getMetricTitle() { return this.metricData.title; } /** * Gets the metric description. * * @returns the metric description. */ getMetricDescription() { return this.metricData.description; } /** * Gets the metric id. * * @returns the metric id. */ getMetricId() { return this.metricData.id; } /** * Gets the metric values. * * @returns the metric values. */ getMetricValues() { return this.metricData.values; } } exports.AbstractMetric = AbstractMetric;