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.
- package/dist/cjs/index.js +44 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +16 -0
- package/dist/esm/api/Events.d.ts +16 -0
- package/dist/esm/index.js +44 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +32 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +22 -0
- package/src/api/Events.ts +22 -0
- package/src/routes/CampaignsRoute.ts +2 -0
- package/src/routes/EventsRoute.ts +2 -0
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 {
|
|
@@ -2475,6 +2491,22 @@ declare class Campaigns {
|
|
|
2475
2491
|
* @returns promise
|
|
2476
2492
|
*/
|
|
2477
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>>;
|
|
2478
2510
|
/**
|
|
2479
2511
|
* Retrieve recommended influencers for a campaign.
|
|
2480
2512
|
*
|
package/package.json
CHANGED
package/src/api/Campaigns.ts
CHANGED
|
@@ -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
|
|
|
@@ -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
|
}
|