glitch-javascript-sdk 1.0.9 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -65,6 +65,22 @@ declare class Campaigns {
65
65
  * @returns promise
66
66
  */
67
67
  static getPosts<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
68
+ /**
69
+ * Get the associated statistics for the campaign.
70
+ *
71
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/campaignStatistics
72
+ *
73
+ * @returns promise
74
+ */
75
+ static statistics<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
76
+ /**
77
+ * Get the stream view counts for the campaign.
78
+ *
79
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignStreamViewCounts
80
+ *
81
+ * @returns promise
82
+ */
83
+ static getStreamViewCounts<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
68
84
  /**
69
85
  * Retrieve recommended influencers for a campaign.
70
86
  *
@@ -382,5 +382,21 @@ declare class Events {
382
382
  * @returns promise
383
383
  */
384
384
  static setAIAvatarRespondToMe<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
385
+ /**
386
+ * Get the associated statistics for the campaign.
387
+ *
388
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/getStreamStatistics
389
+ *
390
+ * @returns promise
391
+ */
392
+ static statistics<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
393
+ /**
394
+ * Get the stream view counts for the campaign.
395
+ *
396
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/getEventStreamViewCounts
397
+ *
398
+ * @returns promise
399
+ */
400
+ static getStreamViewCounts<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
385
401
  }
386
402
  export default Events;
package/dist/esm/index.js CHANGED
@@ -7362,6 +7362,8 @@ var EventsRoutes = /** @class */ (function () {
7362
7362
  setAIAccent: { url: '/events/{event_id}/setAIAccent', method: HTTP_METHODS.POST },
7363
7363
  setAIAvatarRespondToChat: { url: '/events/{event_id}/setAIAvatarRespondToChat', method: HTTP_METHODS.POST },
7364
7364
  setAIAvatarRespondToMe: { url: '/events/{event_id}/setAIAvatarRespondToMe', method: HTTP_METHODS.POST },
7365
+ statistics: { url: '/events/{event_id}/statistics', method: HTTP_METHODS.GET },
7366
+ streamViewCounts: { url: '/events/{event_id}/streamViewCounts', method: HTTP_METHODS.GET },
7365
7367
  };
7366
7368
  return EventsRoutes;
7367
7369
  }());
@@ -7841,6 +7843,26 @@ var Events = /** @class */ (function () {
7841
7843
  Events.setAIAvatarRespondToMe = function (event_id, data, params) {
7842
7844
  return Requests.processRoute(EventsRoutes.routes.setAIAvatarRespondToMe, data, { event_id: event_id }, params);
7843
7845
  };
7846
+ /**
7847
+ * Get the associated statistics for the campaign.
7848
+ *
7849
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/getStreamStatistics
7850
+ *
7851
+ * @returns promise
7852
+ */
7853
+ Events.statistics = function (event_id, params) {
7854
+ return Requests.processRoute(EventsRoutes.routes.statistics, undefined, { event_id: event_id }, params);
7855
+ };
7856
+ /**
7857
+ * Get the stream view counts for the campaign.
7858
+ *
7859
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/getEventStreamViewCounts
7860
+ *
7861
+ * @returns promise
7862
+ */
7863
+ Events.getStreamViewCounts = function (event_id, params) {
7864
+ return Requests.processRoute(EventsRoutes.routes.getStreamViewCounts, undefined, { event_id: event_id }, params);
7865
+ };
7844
7866
  return Events;
7845
7867
  }());
7846
7868
 
@@ -9085,6 +9107,8 @@ var CampaignsRoute = /** @class */ (function () {
9085
9107
  deleteCampaign: { url: '/campaigns/{campaign_id}', method: HTTP_METHODS.DELETE },
9086
9108
  getLedger: { url: '/campaigns/{campaign_id}/ledger', method: HTTP_METHODS.GET },
9087
9109
  getPosts: { url: '/campaigns/{campaign_id}/posts', method: HTTP_METHODS.GET },
9110
+ statistics: { url: '/campaigns/{campaign_id}/statistics', method: HTTP_METHODS.GET },
9111
+ streamViewCounts: { url: '/campaigns/{campaign_id}/streamViewCounts', method: HTTP_METHODS.GET },
9088
9112
  listCampaignLinks: { url: '/campaigns/{campaign_id}/links', method: HTTP_METHODS.GET },
9089
9113
  createCampaignLink: { url: '/campaigns/{campaign_id}/links', method: HTTP_METHODS.POST },
9090
9114
  getCampaignLink: { url: '/campaigns/{campaign_id}/links/{link_id}', method: HTTP_METHODS.GET },
@@ -9208,6 +9232,26 @@ var Campaigns = /** @class */ (function () {
9208
9232
  Campaigns.getPosts = function (campaign_id, params) {
9209
9233
  return Requests.processRoute(CampaignsRoute.routes.getPosts, undefined, { campaign_id: campaign_id }, params);
9210
9234
  };
9235
+ /**
9236
+ * Get the associated statistics for the campaign.
9237
+ *
9238
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/campaignStatistics
9239
+ *
9240
+ * @returns promise
9241
+ */
9242
+ Campaigns.statistics = function (campaign_id, params) {
9243
+ return Requests.processRoute(CampaignsRoute.routes.statistics, undefined, { campaign_id: campaign_id }, params);
9244
+ };
9245
+ /**
9246
+ * Get the stream view counts for the campaign.
9247
+ *
9248
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignStreamViewCounts
9249
+ *
9250
+ * @returns promise
9251
+ */
9252
+ Campaigns.getStreamViewCounts = function (campaign_id, params) {
9253
+ return Requests.processRoute(CampaignsRoute.routes.getStreamViewCounts, undefined, { campaign_id: campaign_id }, params);
9254
+ };
9211
9255
  /**
9212
9256
  * Retrieve recommended influencers for a campaign.
9213
9257
  *