glitch-javascript-sdk 1.0.5 → 1.0.7
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 +23 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +17 -1
- package/dist/esm/index.js +23 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +17 -1
- package/package.json +1 -1
- package/src/api/Campaigns.ts +23 -1
- package/src/routes/CampaignsRoute.ts +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -2457,6 +2457,22 @@ declare class Campaigns {
|
|
|
2457
2457
|
* @returns promise
|
|
2458
2458
|
*/
|
|
2459
2459
|
static getLedger<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2460
|
+
/**
|
|
2461
|
+
* Get the post associated with the campaign.
|
|
2462
|
+
*
|
|
2463
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignLedger
|
|
2464
|
+
*
|
|
2465
|
+
* @returns promise
|
|
2466
|
+
*/
|
|
2467
|
+
static getPosts<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2468
|
+
/**
|
|
2469
|
+
* Retrieve recommended influencers for a campaign.
|
|
2470
|
+
*
|
|
2471
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/recommendInfluencers
|
|
2472
|
+
*
|
|
2473
|
+
* @returns promise
|
|
2474
|
+
*/
|
|
2475
|
+
static getRecommendedInfluencers<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2460
2476
|
/**
|
|
2461
2477
|
* List all the campaign links.
|
|
2462
2478
|
*
|
|
@@ -2739,7 +2755,7 @@ declare class Campaigns {
|
|
|
2739
2755
|
*
|
|
2740
2756
|
* @returns promise
|
|
2741
2757
|
*/
|
|
2742
|
-
static updateInfluencerInvite<T>(campaign_id: string,
|
|
2758
|
+
static updateInfluencerInvite<T>(campaign_id: string, influencer_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
2743
2759
|
/**
|
|
2744
2760
|
* The route for an influencer to accept an invite.
|
|
2745
2761
|
*
|
package/package.json
CHANGED
package/src/api/Campaigns.ts
CHANGED
|
@@ -83,6 +83,28 @@ class Campaigns {
|
|
|
83
83
|
return Requests.processRoute(CampaignsRoute.routes.getLedger, undefined, { campaign_id: campaign_id }, params);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
/**
|
|
87
|
+
* Get the post associated with the campaign.
|
|
88
|
+
*
|
|
89
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/getCampaignLedger
|
|
90
|
+
*
|
|
91
|
+
* @returns promise
|
|
92
|
+
*/
|
|
93
|
+
public static getPosts<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
94
|
+
return Requests.processRoute(CampaignsRoute.routes.getPosts, undefined, { campaign_id: campaign_id }, params);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Retrieve recommended influencers for a campaign.
|
|
99
|
+
*
|
|
100
|
+
* @see https://api.glitch.fun/api/documentation#/Campaigns/recommendInfluencers
|
|
101
|
+
*
|
|
102
|
+
* @returns promise
|
|
103
|
+
*/
|
|
104
|
+
public static getRecommendedInfluencers<T>(campaign_id: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
105
|
+
return Requests.processRoute(CampaignsRoute.routes.getRecommendedInfluencers, undefined, { campaign_id: campaign_id }, params);
|
|
106
|
+
}
|
|
107
|
+
|
|
86
108
|
|
|
87
109
|
/**
|
|
88
110
|
* List all the campaign links.
|
|
@@ -482,7 +504,7 @@ class Campaigns {
|
|
|
482
504
|
*
|
|
483
505
|
* @returns promise
|
|
484
506
|
*/
|
|
485
|
-
public static updateInfluencerInvite<T>(campaign_id: string,
|
|
507
|
+
public static updateInfluencerInvite<T>(campaign_id: string,influencer_id: string, data: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
486
508
|
|
|
487
509
|
|
|
488
510
|
return Requests.processRoute(CampaignsRoute.routes.updateInfluencerInvite, data, { campaign_id: campaign_id, influencer_id: influencer_id }, params);
|
|
@@ -10,6 +10,7 @@ class CampaignsRoute {
|
|
|
10
10
|
updateCampaign :{ url: '/campaigns/{campaign_id}', method: HTTP_METHODS.PUT },
|
|
11
11
|
deleteCampaign :{ url: '/campaigns/{campaign_id}', method: HTTP_METHODS.DELETE },
|
|
12
12
|
getLedger : { url: '/campaigns/{campaign_id}/ledger', method: HTTP_METHODS.GET },
|
|
13
|
+
getPosts : { url: '/campaigns/{campaign_id}/posts', method: HTTP_METHODS.GET },
|
|
13
14
|
listCampaignLinks :{ url: '/campaigns/{campaign_id}/links', method: HTTP_METHODS.GET },
|
|
14
15
|
createCampaignLink :{ url: '/campaigns/{campaign_id}/links', method: HTTP_METHODS.POST },
|
|
15
16
|
getCampaignLink :{ url: '/campaigns/{campaign_id}/links/{link_id}', method: HTTP_METHODS.GET },
|
|
@@ -45,7 +46,8 @@ class CampaignsRoute {
|
|
|
45
46
|
widthdrawInfluencerInvite : { url: '/campaigns/{campaign_id}/influencers/invites/{influencer_id}/withdraw', method: HTTP_METHODS.POST },
|
|
46
47
|
acceptInfluencerRequest : { url: '/campaigns/{campaign_id}/influencers/{user_id}/accept', method: HTTP_METHODS.POST },
|
|
47
48
|
declineInfluencerRequest : { url: '/campaigns/{campaign_id}/influencers/{user_id}/deny', method: HTTP_METHODS.POST },
|
|
48
|
-
reviewInfluencerRequest : { url: '/campaigns/{campaign_id}/influencers/{user_id}/review', method: HTTP_METHODS.POST },
|
|
49
|
+
reviewInfluencerRequest : { url: '/campaigns/{campaign_id}/influencers/{user_id}/review', method: HTTP_METHODS.POST },
|
|
50
|
+
getRecommendedInfluencers : { url: '/campaigns/{campaign_id}/recommendInfluencers', method: HTTP_METHODS.GET },
|
|
49
51
|
};
|
|
50
52
|
|
|
51
53
|
}
|