glitch-javascript-sdk 2.2.5 → 2.2.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 +126 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Campaigns.d.ts +12 -0
- package/dist/esm/api/TwitchReporting.d.ts +66 -0
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +126 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/TwitchReportingRoute.d.ts +7 -0
- package/dist/index.d.ts +77 -0
- package/package.json +1 -1
- package/src/api/Campaigns.ts +13 -0
- package/src/api/TwitchReporting.ts +89 -0
- package/src/api/index.ts +3 -1
- package/src/index.ts +3 -1
- package/src/routes/CampaignsRoute.ts +2 -0
- package/src/routes/TwitchReportingRoute.ts +35 -0
package/dist/cjs/index.js
CHANGED
|
@@ -25184,6 +25184,7 @@ var CampaignsRoute = /** @class */ (function () {
|
|
|
25184
25184
|
updateCustomRanking: { url: '/campaigns/{campaign_id}/sourcing/custom-ranking', method: HTTP_METHODS.PUT },
|
|
25185
25185
|
updateCreatorBucket: { url: '/campaigns/{campaign_id}/sourcing/creators/{creator_id}/bucket', method: HTTP_METHODS.PUT },
|
|
25186
25186
|
reRankSourcedCreators: { url: '/campaigns/{campaign_id}/sourcing/re-rank', method: HTTP_METHODS.POST },
|
|
25187
|
+
bulkEnrichSourcedCreators: { url: '/campaigns/{campaign_id}/sourcing/creators/bulk-enrich', method: HTTP_METHODS.POST },
|
|
25187
25188
|
};
|
|
25188
25189
|
return CampaignsRoute;
|
|
25189
25190
|
}());
|
|
@@ -26017,6 +26018,18 @@ var Campaigns = /** @class */ (function () {
|
|
|
26017
26018
|
Campaigns.reRankSourcedCreators = function (campaign_id, data) {
|
|
26018
26019
|
return Requests.processRoute(CampaignsRoute.routes.reRankSourcedCreators, data, { campaign_id: campaign_id });
|
|
26019
26020
|
};
|
|
26021
|
+
/**
|
|
26022
|
+
* Queue multiple sourced creators for profile enrichment.
|
|
26023
|
+
* This dispatches a background job for each creator to find their social media profiles and contact information.
|
|
26024
|
+
*
|
|
26025
|
+
* @param campaign_id The UUID of the campaign.
|
|
26026
|
+
* @param data An object containing the array of SourcedCreator IDs to enrich.
|
|
26027
|
+
* @param data.creator_ids An array of SourcedCreator UUIDs.
|
|
26028
|
+
* @returns A promise that resolves with a confirmation message and the count of queued jobs.
|
|
26029
|
+
*/
|
|
26030
|
+
Campaigns.bulkEnrichSourcedCreators = function (campaign_id, data) {
|
|
26031
|
+
return Requests.processRoute(CampaignsRoute.routes.bulkEnrichSourcedCreators, data, { campaign_id: campaign_id });
|
|
26032
|
+
};
|
|
26020
26033
|
return Campaigns;
|
|
26021
26034
|
}());
|
|
26022
26035
|
|
|
@@ -28776,6 +28789,117 @@ var MarketingAgencies = /** @class */ (function () {
|
|
|
28776
28789
|
return MarketingAgencies;
|
|
28777
28790
|
}());
|
|
28778
28791
|
|
|
28792
|
+
var TwitchReportingRoute = /** @class */ (function () {
|
|
28793
|
+
function TwitchReportingRoute() {
|
|
28794
|
+
}
|
|
28795
|
+
TwitchReportingRoute.routes = {
|
|
28796
|
+
getCreatorCcvHistory: {
|
|
28797
|
+
url: '/reporting/twitch/streamers/{twitch_streamer_id}/ccv-history',
|
|
28798
|
+
method: HTTP_METHODS.GET
|
|
28799
|
+
},
|
|
28800
|
+
getGamesSummary: {
|
|
28801
|
+
url: '/reporting/twitch/games/summary',
|
|
28802
|
+
method: HTTP_METHODS.GET
|
|
28803
|
+
},
|
|
28804
|
+
getMostActiveStreamers: {
|
|
28805
|
+
url: '/reporting/twitch/streamers/most-active',
|
|
28806
|
+
method: HTTP_METHODS.GET
|
|
28807
|
+
},
|
|
28808
|
+
getMostActiveGames: {
|
|
28809
|
+
url: '/reporting/twitch/games/most-active',
|
|
28810
|
+
method: HTTP_METHODS.GET
|
|
28811
|
+
},
|
|
28812
|
+
getTopStreamers: {
|
|
28813
|
+
url: '/reporting/twitch/streamers/top',
|
|
28814
|
+
method: HTTP_METHODS.GET
|
|
28815
|
+
},
|
|
28816
|
+
getCreatorStreamingSchedule: {
|
|
28817
|
+
url: '/reporting/twitch/streamers/{twitch_streamer_id}/streaming-schedule',
|
|
28818
|
+
method: HTTP_METHODS.GET
|
|
28819
|
+
},
|
|
28820
|
+
};
|
|
28821
|
+
return TwitchReportingRoute;
|
|
28822
|
+
}());
|
|
28823
|
+
|
|
28824
|
+
var TwitchReporting = /** @class */ (function () {
|
|
28825
|
+
function TwitchReporting() {
|
|
28826
|
+
}
|
|
28827
|
+
/**
|
|
28828
|
+
* Get a streamer's Concurrent Viewership (CCV) history.
|
|
28829
|
+
*
|
|
28830
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getCreatorCcvHistory
|
|
28831
|
+
*
|
|
28832
|
+
* @param twitch_streamer_id The ID of the Twitch streamer.
|
|
28833
|
+
* @param params Optional query parameters for filtering (e.g., start_date, end_date, per_page).
|
|
28834
|
+
*
|
|
28835
|
+
* @returns promise
|
|
28836
|
+
*/
|
|
28837
|
+
TwitchReporting.getCreatorCcvHistory = function (twitch_streamer_id, params) {
|
|
28838
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getCreatorCcvHistory, undefined, { twitch_streamer_id: twitch_streamer_id }, params);
|
|
28839
|
+
};
|
|
28840
|
+
/**
|
|
28841
|
+
* Get a summary of game performance metrics.
|
|
28842
|
+
*
|
|
28843
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getGamesSummary
|
|
28844
|
+
*
|
|
28845
|
+
* @param params Optional query parameters for filtering and sorting (e.g., start_date, end_date, sort_by, limit).
|
|
28846
|
+
*
|
|
28847
|
+
* @returns promise
|
|
28848
|
+
*/
|
|
28849
|
+
TwitchReporting.getGamesSummary = function (params) {
|
|
28850
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getGamesSummary, undefined, undefined, params);
|
|
28851
|
+
};
|
|
28852
|
+
/**
|
|
28853
|
+
* Get most recently active streamers.
|
|
28854
|
+
*
|
|
28855
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getMostActiveStreamers
|
|
28856
|
+
*
|
|
28857
|
+
* @param params Optional query parameters (e.g., limit).
|
|
28858
|
+
*
|
|
28859
|
+
* @returns promise
|
|
28860
|
+
*/
|
|
28861
|
+
TwitchReporting.getMostActiveStreamers = function (params) {
|
|
28862
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getMostActiveStreamers, undefined, undefined, params);
|
|
28863
|
+
};
|
|
28864
|
+
/**
|
|
28865
|
+
* Get most recently streamed games.
|
|
28866
|
+
*
|
|
28867
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getMostActiveGames
|
|
28868
|
+
*
|
|
28869
|
+
* @param params Optional query parameters (e.g., limit).
|
|
28870
|
+
*
|
|
28871
|
+
* @returns promise
|
|
28872
|
+
*/
|
|
28873
|
+
TwitchReporting.getMostActiveGames = function (params) {
|
|
28874
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getMostActiveGames, undefined, undefined, params);
|
|
28875
|
+
};
|
|
28876
|
+
/**
|
|
28877
|
+
* Get top streamers by performance (average or peak CCV).
|
|
28878
|
+
*
|
|
28879
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getTopStreamers
|
|
28880
|
+
*
|
|
28881
|
+
* @param params Optional query parameters for filtering and sorting (e.g., sort_by, start_date, limit).
|
|
28882
|
+
*
|
|
28883
|
+
* @returns promise
|
|
28884
|
+
*/
|
|
28885
|
+
TwitchReporting.getTopStreamers = function (params) {
|
|
28886
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getTopStreamers, undefined, undefined, params);
|
|
28887
|
+
};
|
|
28888
|
+
/**
|
|
28889
|
+
* Get a streamer's typical streaming schedule as a heatmap.
|
|
28890
|
+
*
|
|
28891
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getCreatorStreamingSchedule
|
|
28892
|
+
*
|
|
28893
|
+
* @param twitch_streamer_id The ID of the Twitch streamer.
|
|
28894
|
+
*
|
|
28895
|
+
* @returns promise
|
|
28896
|
+
*/
|
|
28897
|
+
TwitchReporting.getCreatorStreamingSchedule = function (twitch_streamer_id) {
|
|
28898
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getCreatorStreamingSchedule, undefined, { twitch_streamer_id: twitch_streamer_id });
|
|
28899
|
+
};
|
|
28900
|
+
return TwitchReporting;
|
|
28901
|
+
}());
|
|
28902
|
+
|
|
28779
28903
|
var Parser = /** @class */ (function () {
|
|
28780
28904
|
function Parser() {
|
|
28781
28905
|
}
|
|
@@ -29302,7 +29426,8 @@ var Glitch = /** @class */ (function () {
|
|
|
29302
29426
|
Fingerprinting: Fingerprinting,
|
|
29303
29427
|
ShortLinks: ShortLinks,
|
|
29304
29428
|
AIUsage: AIUsage,
|
|
29305
|
-
MarketingAgencies: MarketingAgencies
|
|
29429
|
+
MarketingAgencies: MarketingAgencies,
|
|
29430
|
+
TwitchReporting: TwitchReporting,
|
|
29306
29431
|
};
|
|
29307
29432
|
Glitch.util = {
|
|
29308
29433
|
Requests: Requests,
|