UNPKG

instagram-graph-api

Version:

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

399 lines (398 loc) 12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CommentField = exports.HashtagMediaField = exports.PageOption = exports.AlbumMetric = exports.StoryMetric = exports.SimplePostMetric = exports.MediaField = exports.MetricPeriod = exports.LifetimeMetric = exports.WeekAndMonthMetric = exports.DayMetric = exports.PageField = void 0; /** * Page info fields. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.1.0 */ var PageField; (function (PageField) { /** * The biography of the page. */ PageField["BIOGRAPHY"] = "biography"; /** * The id of the page. */ PageField["ID"] = "id"; /** * The instagram of the page. */ PageField["IG_ID"] = "ig_id"; /** * The number of followers of the page. */ PageField["FOLLOWERS_COUNT"] = "followers_count"; /** * The number of follows of the page. */ PageField["FOLLOWS_COUNT"] = "follows_count"; /** * The number of media objects of the page. */ PageField["MEDIA_COUNT"] = "media_count"; /** * The name of the page. */ PageField["NAME"] = "name"; /** * The URL of the profile picture of the page. */ PageField["PROFILE_PICTURE_URL"] = "profile_picture_url"; /** * The username of the page. */ PageField["USERNAME"] = "username"; })(PageField = exports.PageField || (exports.PageField = {})); /** * Page insights day metrics. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.1.0 */ var DayMetric; (function (DayMetric) { /** * Total number of taps on the email link in the IG User's profile. */ DayMetric["EMAIL_CONTACTS"] = "email_contacts"; /** * Total number of new followers each day within the specified range. */ DayMetric["FOLLOWER_COUNT"] = "follower_count"; /** * Total number of taps on the directions link in the IG User's profile. */ DayMetric["GET_DIRECTIONS_CLICKS"] = "get_directions_clicks"; /** * Total number of times the IG User's IG Media objects have been viewed. */ DayMetric["IMPRESSIONS"] = "impressions"; /** * Total number of taps on the call link in the IG User's profile. */ DayMetric["PHONE_CALL_CLICKS"] = "phone_call_clicks"; /** * Total number of users who have viewed the IG User's profile. */ DayMetric["PROFILE_VIEWS"] = "profile_views"; /** * Total number of unique users who have viewed at least one of the IG User's IG Media. */ DayMetric["REACH"] = "reach"; /** * Total number of taps on the text message link in the IG User's profile. */ DayMetric["TEXT_MESSAGE_CLICKS"] = "text_message_clicks"; /** * Total number of taps on the website link in the IG User's profile. */ DayMetric["WEBSITE_CLICKS"] = "website_clicks"; })(DayMetric = exports.DayMetric || (exports.DayMetric = {})); /** * Page insights week and month metrics. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.1.0 */ var WeekAndMonthMetric; (function (WeekAndMonthMetric) { /** * Total number of times the IG User's IG Media objects have been viewed. */ WeekAndMonthMetric["IMPRESSIONS"] = "impressions"; /** * Total number of unique users who have viewed at least one of the IG User's IG Media. */ WeekAndMonthMetric["REACH"] = "reach"; })(WeekAndMonthMetric = exports.WeekAndMonthMetric || (exports.WeekAndMonthMetric = {})); /** * Page insights lifetime metrics. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.1.0 */ var LifetimeMetric; (function (LifetimeMetric) { /** * The cities of the IG User's followers */ LifetimeMetric["AUDIENCE_CITY"] = "audience_city"; /** * The country of the IG User's followers */ LifetimeMetric["AUDIENCE_COUNTRY"] = "audience_country"; /** * The gender and age distribution of the IG User's followers. */ LifetimeMetric["AUDIENCE_GENDER_AGE"] = "audience_gender_age"; /** * The locales by country codes of the IG User's followers */ LifetimeMetric["AUDIENCE_LOCALE"] = "audience_locale"; /** * Total number of the IG User's followers who were online during the specified range. */ LifetimeMetric["ONLINE_FOLLOWERS"] = "online_followers"; })(LifetimeMetric = exports.LifetimeMetric || (exports.LifetimeMetric = {})); /** * Page insights metric periods. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.1.0 */ var MetricPeriod; (function (MetricPeriod) { MetricPeriod["DAY"] = "day"; MetricPeriod["WEEK"] = "week"; MetricPeriod["MONTH"] = "days_28"; MetricPeriod["LIFETIME"] = "lifetime"; })(MetricPeriod = exports.MetricPeriod || (exports.MetricPeriod = {})); /** * Media info fields. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.1.0 */ var MediaField; (function (MediaField) { MediaField["CAPTION"] = "caption"; /** * The number of comments on the media object. */ MediaField["COMMENTS_COUNT"] = "comments_count"; /** * The id of the media object. */ MediaField["ID"] = "id"; /** * The Instagram id of the media object. */ MediaField["IG_ID"] = "ig_id"; /** * Whether comments are enabled on the media object. */ MediaField["IS_COMMENT_ENABLED"] = "is_comment_enabled"; /** * The number of likes on the media object. */ MediaField["LIKE_COUNT"] = "like_count"; /** * The type of media object. */ MediaField["MEDIA_TYPE"] = "media_type"; /** * The URL of the media object. */ MediaField["MEDIA_URL"] = "media_url"; /** * The owner of the media object. */ MediaField["OWNER"] = "owner"; /** * The permalink of the media object. */ MediaField["PERMALINK"] = "permalink"; /** * The shortcode of the media object. */ MediaField["SHORTCODE"] = "shortcode"; /** * The URL of thumbnail of the media object. */ MediaField["THUMBNAIL_URL"] = "thumbnail_url"; /** * The ISO 8601 formatted creation date in UTC (default is UTC ±00:00) */ MediaField["TIMESTAMP"] = "timestamp"; /** * The username of the media object owner. */ MediaField["USERNAME"] = "username"; })(MediaField = exports.MediaField || (exports.MediaField = {})); /** * Post insights metrics. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.1.0 */ var SimplePostMetric; (function (SimplePostMetric) { /** * Total number of likes and IG Comments on the IG Media object. */ SimplePostMetric["ENGAGEMENT"] = "engagement"; /** * Total number of times the IG Media object has been seen. */ SimplePostMetric["IMPRESSIONS"] = "impressions"; /** * Total number of unique Instagram accounts that have seen the IG Media object. */ SimplePostMetric["REACH"] = "reach"; /** * Total number of unique Instagram accounts that have saved the IG Media object. */ SimplePostMetric["SAVED"] = "saved"; })(SimplePostMetric = exports.SimplePostMetric || (exports.SimplePostMetric = {})); /** * Story insights metrics. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.1.0 */ var StoryMetric; (function (StoryMetric) { /** * Number of times someone exited the story IG Media object. */ StoryMetric["EXITS"] = "exits"; /** * Total number of times the story IG Media object has been seen. */ StoryMetric["IMPRESSIONS"] = "impressions"; /** * Total number of unique Instagram accounts that have seen the story IG Media object. */ StoryMetric["REACH"] = "reach"; /** * Total number of replies (IG Comments) on the story IG Media object. */ StoryMetric["REPLIES"] = "replies"; /** * Total number of taps to see this story IG Media object's next photo or video. */ StoryMetric["TAPS_FORWARD"] = "taps_forward"; /** * Total number of taps to see this story IG Media object's previous photo or video. */ StoryMetric["TAPS_BACK"] = "taps_back"; })(StoryMetric = exports.StoryMetric || (exports.StoryMetric = {})); /** * Album insights metrics. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.2.0 */ var AlbumMetric; (function (AlbumMetric) { /** * Number of times someone exited the story IG Media object. */ AlbumMetric["CAROUSEL_ALBUM_ENGAGEMENT"] = "carousel_album_engagement"; /** * Total number of times the story IG Media object has been seen. */ AlbumMetric["CAROUSEL_ALBUM_IMPRESSIONS"] = "carousel_album_impressions"; /** * Total number of unique Instagram accounts that have seen the album IG Media object. */ AlbumMetric["CAROUSEL_ALBUM_REACH"] = "carousel_album_reach"; /** * Total number of unique Instagram accounts that have saved the album IG Media object. */ AlbumMetric["CAROUSEL_ALBUM_SAVED"] = "carousel_album_saved"; })(AlbumMetric = exports.AlbumMetric || (exports.AlbumMetric = {})); /** * Page options. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.1.0 */ var PageOption; (function (PageOption) { PageOption["BEFORE"] = "before"; PageOption["AFTER"] = "after"; })(PageOption = exports.PageOption || (exports.PageOption = {})); /** * Media fields that can be retrieved on Get Hashtag Media requests. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.5.0 */ var HashtagMediaField; (function (HashtagMediaField) { /** * The caption of the media object. */ HashtagMediaField["CAPTION"] = "caption"; /** * The children of the media object. Only returned for Album IG Media. */ HashtagMediaField["CHILDREN"] = "children"; /** * The number of comments on the media object. */ HashtagMediaField["COMMENTS_COUNT"] = "comments_count"; /** * The id of the media object. */ HashtagMediaField["ID"] = "id"; /** * The number of likes on the media object. */ HashtagMediaField["LIKE_COUNT"] = "like_count"; /** * The type of media object. */ HashtagMediaField["MEDIA_TYPE"] = "media_type"; /** * The url of the media object. Not returned for Album IG Media */ HashtagMediaField["MEDIA_URL"] = "media_url"; /** * The permalink of the media object. */ HashtagMediaField["PERMALINK"] = "permalink"; /** * The ISO 8601 formatted creation date in UTC (default is UTC ±00:00) */ HashtagMediaField["TIMESTAMP"] = "timestamp"; })(HashtagMediaField = exports.HashtagMediaField || (exports.HashtagMediaField = {})); /** * Comment fields that can be retrieved on Get Comment requests. * * @author Tiago Grosso <tiagogrosso99@gmail.com> * @since 0.5.1 */ var CommentField; (function (CommentField) { /** * Whether the comment is hidden. */ CommentField["HIDDEN"] = "hidden"; /** * The id of the comment. */ CommentField["ID"] = "id"; /** * The number of likes on the comment. */ CommentField["LIKE_COUNT"] = "like_count"; /** * The media object that contains the comment. */ CommentField["MEDIA"] = "media"; /** * The number of replies on the comment. */ CommentField["REPLIES"] = "replies"; /** * The text of the comment. */ CommentField["TEXT"] = "text"; /** * The timestamp of the comment. */ CommentField["TIMESTAMP"] = "timestamp"; /** * The user that made the comment. Only returned if the user making the query also owns the comment, otherwise, the username field will be included */ CommentField["USER"] = "user"; /** * The username of the user who made the comment. */ CommentField["USERNAME"] = "username"; })(CommentField = exports.CommentField || (exports.CommentField = {}));