glitch-javascript-sdk 1.0.8 → 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.
package/dist/index.d.ts CHANGED
@@ -1601,6 +1601,22 @@ declare class Events {
1601
1601
  * @returns promise
1602
1602
  */
1603
1603
  static setAIAvatarRespondToMe<T>(event_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
1604
+ /**
1605
+ * Get the associated statistics for the campaign.
1606
+ *
1607
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/getStreamStatistics
1608
+ *
1609
+ * @returns promise
1610
+ */
1611
+ static statistics<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1612
+ /**
1613
+ * Get the stream view counts for the campaign.
1614
+ *
1615
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/getEventStreamViewCounts
1616
+ *
1617
+ * @returns promise
1618
+ */
1619
+ static getStreamViewCounts<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
1604
1620
  }
1605
1621
 
1606
1622
  declare class Teams {
@@ -2263,6 +2279,16 @@ declare class SocialPosts {
2263
2279
  * @returns promise
2264
2280
  */
2265
2281
  static view<T>(post_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2282
+ /**
2283
+ * Dispute a post as being fraudulent.,s
2284
+ *
2285
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/disputePost
2286
+ *
2287
+ * @param post_id The id fo the post to retrieve.
2288
+ *
2289
+ * @returns promise
2290
+ */
2291
+ static dispute<T>(post_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
2266
2292
  }
2267
2293
 
2268
2294
  declare class Titles {
@@ -2465,6 +2491,22 @@ declare class Campaigns {
2465
2491
  * @returns promise
2466
2492
  */
2467
2493
  static getPosts<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2494
+ /**
2495
+ * Get the associated statistics for the campaign.
2496
+ *
2497
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/campaignStatistics
2498
+ *
2499
+ * @returns promise
2500
+ */
2501
+ static statistics<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2502
+ /**
2503
+ * Get the stream view counts for the campaign.
2504
+ *
2505
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignStreamViewCounts
2506
+ *
2507
+ * @returns promise
2508
+ */
2509
+ static getStreamViewCounts<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
2468
2510
  /**
2469
2511
  * Retrieve recommended influencers for a campaign.
2470
2512
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "1.0.8",
3
+ "version": "1.1.0",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -94,6 +94,28 @@ class Campaigns {
94
94
  return Requests.processRoute(CampaignsRoute.routes.getPosts, undefined, { campaign_id: campaign_id }, params);
95
95
  }
96
96
 
97
+ /**
98
+ * Get the associated statistics for the campaign.
99
+ *
100
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/campaignStatistics
101
+ *
102
+ * @returns promise
103
+ */
104
+ public static statistics<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
105
+ return Requests.processRoute(CampaignsRoute.routes.statistics, undefined, { campaign_id: campaign_id }, params);
106
+ }
107
+
108
+ /**
109
+ * Get the stream view counts for the campaign.
110
+ *
111
+ * @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignStreamViewCounts
112
+ *
113
+ * @returns promise
114
+ */
115
+ public static getStreamViewCounts<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
116
+ return Requests.processRoute(CampaignsRoute.routes.getStreamViewCounts, undefined, { campaign_id: campaign_id }, params);
117
+ }
118
+
97
119
  /**
98
120
  * Retrieve recommended influencers for a campaign.
99
121
  *
package/src/api/Events.ts CHANGED
@@ -552,6 +552,28 @@ class Events {
552
552
  return Requests.processRoute(EventsRoutes.routes.setAIAvatarRespondToMe, data, { event_id: event_id }, params);
553
553
  }
554
554
 
555
+ /**
556
+ * Get the associated statistics for the campaign.
557
+ *
558
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/getStreamStatistics
559
+ *
560
+ * @returns promise
561
+ */
562
+ public static statistics<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
563
+ return Requests.processRoute(EventsRoutes.routes.statistics, undefined, { event_id: event_id }, params);
564
+ }
565
+
566
+ /**
567
+ * Get the stream view counts for the campaign.
568
+ *
569
+ * @see https://api.glitch.fun/api/documentation#/Event%20Route/getEventStreamViewCounts
570
+ *
571
+ * @returns promise
572
+ */
573
+ public static getStreamViewCounts<T>(event_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
574
+ return Requests.processRoute(EventsRoutes.routes.getStreamViewCounts, undefined, { event_id: event_id }, params);
575
+ }
576
+
555
577
 
556
578
  }
557
579
 
@@ -41,6 +41,20 @@ class SocialPosts {
41
41
  return Requests.processRoute(SocialPostsRoute.routes.retrievePost, {}, { post_id: post_id }, params);
42
42
  }
43
43
 
44
+ /**
45
+ * Dispute a post as being fraudulent.,s
46
+ *
47
+ * @see https://api.glitch.fun/api/documentation#/Social%20Media%20Posts/disputePost
48
+ *
49
+ * @param post_id The id fo the post to retrieve.
50
+ *
51
+ * @returns promise
52
+ */
53
+ public static dispute<T>(post_id: string, data? : object, params?: Record<string, any>): AxiosPromise<Response<T>> {
54
+
55
+ return Requests.processRoute(SocialPostsRoute.routes.dispute, data, { post_id: post_id }, params);
56
+ }
57
+
44
58
  }
45
59
 
46
60
  export default SocialPosts;
@@ -11,6 +11,8 @@ class CampaignsRoute {
11
11
  deleteCampaign :{ url: '/campaigns/{campaign_id}', method: HTTP_METHODS.DELETE },
12
12
  getLedger : { url: '/campaigns/{campaign_id}/ledger', method: HTTP_METHODS.GET },
13
13
  getPosts : { url: '/campaigns/{campaign_id}/posts', method: HTTP_METHODS.GET },
14
+ statistics : { url: '/campaigns/{campaign_id}/statistics', method: HTTP_METHODS.GET },
15
+ streamViewCounts : { url: '/campaigns/{campaign_id}/streamViewCounts', method: HTTP_METHODS.GET },
14
16
  listCampaignLinks :{ url: '/campaigns/{campaign_id}/links', method: HTTP_METHODS.GET },
15
17
  createCampaignLink :{ url: '/campaigns/{campaign_id}/links', method: HTTP_METHODS.POST },
16
18
  getCampaignLink :{ url: '/campaigns/{campaign_id}/links/{link_id}', method: HTTP_METHODS.GET },
@@ -38,6 +38,8 @@ class EventsRoutes {
38
38
  setAIAccent : {url : '/events/{event_id}/setAIAccent', method : HTTP_METHODS.POST},
39
39
  setAIAvatarRespondToChat : {url : '/events/{event_id}/setAIAvatarRespondToChat', method : HTTP_METHODS.POST},
40
40
  setAIAvatarRespondToMe : {url : '/events/{event_id}/setAIAvatarRespondToMe', method : HTTP_METHODS.POST},
41
+ statistics : { url: '/events/{event_id}/statistics', method: HTTP_METHODS.GET },
42
+ streamViewCounts : { url: '/events/{event_id}/streamViewCounts', method: HTTP_METHODS.GET },
41
43
  };
42
44
 
43
45
  }
@@ -7,6 +7,7 @@ class SocialPostsRoute {
7
7
  getPosts: { url: '/socialposts', method: HTTP_METHODS.GET },
8
8
  createPost: { url: '/socialposts', method: HTTP_METHODS.POST },
9
9
  retrievePost : { url: '/socialposts/{post_id}', method: HTTP_METHODS.GET },
10
+ dispute: { url: '/social/{post_id}/dispute', method: HTTP_METHODS.POST },
10
11
  };
11
12
 
12
13
  }