glitch-javascript-sdk 2.2.6 → 2.2.8
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 +140 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/TwitchReporting.d.ts +81 -0
- package/dist/esm/api/index.d.ts +2 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +140 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/TwitchReportingRoute.d.ts +7 -0
- package/dist/index.d.ts +80 -0
- package/package.json +1 -1
- package/src/api/TwitchReporting.ts +110 -0
- package/src/api/index.ts +3 -1
- package/src/index.ts +3 -1
- package/src/routes/TwitchReportingRoute.ts +43 -0
package/dist/cjs/index.js
CHANGED
|
@@ -28789,6 +28789,144 @@ var MarketingAgencies = /** @class */ (function () {
|
|
|
28789
28789
|
return MarketingAgencies;
|
|
28790
28790
|
}());
|
|
28791
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
|
+
getStreamerGameHistory: {
|
|
28821
|
+
url: '/reporting/twitch/streamers/{twitch_streamer_id}/games',
|
|
28822
|
+
method: HTTP_METHODS.GET
|
|
28823
|
+
},
|
|
28824
|
+
getStreamersForGame: {
|
|
28825
|
+
url: '/reporting/twitch/games/{game_name}/streamers',
|
|
28826
|
+
method: HTTP_METHODS.GET
|
|
28827
|
+
},
|
|
28828
|
+
};
|
|
28829
|
+
return TwitchReportingRoute;
|
|
28830
|
+
}());
|
|
28831
|
+
|
|
28832
|
+
var TwitchReporting = /** @class */ (function () {
|
|
28833
|
+
function TwitchReporting() {
|
|
28834
|
+
}
|
|
28835
|
+
/**
|
|
28836
|
+
* Get a streamer's Concurrent Viewership (CCV) history.
|
|
28837
|
+
*
|
|
28838
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getCreatorCcvHistory
|
|
28839
|
+
*
|
|
28840
|
+
* @param twitch_streamer_id The ID of the Twitch streamer.
|
|
28841
|
+
* @param params Optional query parameters for filtering (e.g., start_date, end_date, per_page).
|
|
28842
|
+
*
|
|
28843
|
+
* @returns promise
|
|
28844
|
+
*/
|
|
28845
|
+
TwitchReporting.getCreatorCcvHistory = function (twitch_streamer_id, params) {
|
|
28846
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getCreatorCcvHistory, undefined, { twitch_streamer_id: twitch_streamer_id }, params);
|
|
28847
|
+
};
|
|
28848
|
+
/**
|
|
28849
|
+
* Get a summary of game performance metrics.
|
|
28850
|
+
*
|
|
28851
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getGamesSummary
|
|
28852
|
+
*
|
|
28853
|
+
* @param params Optional query parameters for filtering and sorting (e.g., start_date, end_date, sort_by, limit).
|
|
28854
|
+
*
|
|
28855
|
+
* @returns promise
|
|
28856
|
+
*/
|
|
28857
|
+
TwitchReporting.getGamesSummary = function (params) {
|
|
28858
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getGamesSummary, undefined, undefined, params);
|
|
28859
|
+
};
|
|
28860
|
+
/**
|
|
28861
|
+
* Get most recently active streamers.
|
|
28862
|
+
*
|
|
28863
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getMostActiveStreamers
|
|
28864
|
+
*
|
|
28865
|
+
* @param params Optional query parameters (e.g., limit).
|
|
28866
|
+
*
|
|
28867
|
+
* @returns promise
|
|
28868
|
+
*/
|
|
28869
|
+
TwitchReporting.getMostActiveStreamers = function (params) {
|
|
28870
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getMostActiveStreamers, undefined, undefined, params);
|
|
28871
|
+
};
|
|
28872
|
+
/**
|
|
28873
|
+
* Get most recently streamed games.
|
|
28874
|
+
*
|
|
28875
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getMostActiveGames
|
|
28876
|
+
*
|
|
28877
|
+
* @param params Optional query parameters (e.g., limit).
|
|
28878
|
+
*
|
|
28879
|
+
* @returns promise
|
|
28880
|
+
*/
|
|
28881
|
+
TwitchReporting.getMostActiveGames = function (params) {
|
|
28882
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getMostActiveGames, undefined, undefined, params);
|
|
28883
|
+
};
|
|
28884
|
+
/**
|
|
28885
|
+
* Get top streamers by performance (average or peak CCV).
|
|
28886
|
+
*
|
|
28887
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getTopStreamers
|
|
28888
|
+
*
|
|
28889
|
+
* @param params Optional query parameters for filtering and sorting (e.g., sort_by, start_date, limit).
|
|
28890
|
+
*
|
|
28891
|
+
* @returns promise
|
|
28892
|
+
*/
|
|
28893
|
+
TwitchReporting.getTopStreamers = function (params) {
|
|
28894
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getTopStreamers, undefined, undefined, params);
|
|
28895
|
+
};
|
|
28896
|
+
/**
|
|
28897
|
+
* Get a streamer's typical streaming schedule as a heatmap.
|
|
28898
|
+
*
|
|
28899
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getCreatorStreamingSchedule
|
|
28900
|
+
*
|
|
28901
|
+
* @param twitch_streamer_id The ID of the Twitch streamer.
|
|
28902
|
+
*
|
|
28903
|
+
* @returns promise
|
|
28904
|
+
*/
|
|
28905
|
+
TwitchReporting.getCreatorStreamingSchedule = function (twitch_streamer_id) {
|
|
28906
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getCreatorStreamingSchedule, undefined, { twitch_streamer_id: twitch_streamer_id });
|
|
28907
|
+
};
|
|
28908
|
+
/**
|
|
28909
|
+
* Get a list of games played by a specific streamer.
|
|
28910
|
+
*
|
|
28911
|
+
* @param twitch_streamer_id The ID of the Twitch streamer.
|
|
28912
|
+
* @returns promise
|
|
28913
|
+
*/
|
|
28914
|
+
TwitchReporting.getStreamerGameHistory = function (twitch_streamer_id) {
|
|
28915
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getStreamerGameHistory, undefined, { twitch_streamer_id: twitch_streamer_id });
|
|
28916
|
+
};
|
|
28917
|
+
/**
|
|
28918
|
+
* Get a paginated list of streamers who played a specific game.
|
|
28919
|
+
*
|
|
28920
|
+
* @param game_name The URL-encoded name of the game.
|
|
28921
|
+
* @param params Optional query parameters for pagination (e.g., page, per_page).
|
|
28922
|
+
* @returns promise
|
|
28923
|
+
*/
|
|
28924
|
+
TwitchReporting.getStreamersForGame = function (game_name, params) {
|
|
28925
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getStreamersForGame, undefined, { game_name: encodeURIComponent(game_name) }, params);
|
|
28926
|
+
};
|
|
28927
|
+
return TwitchReporting;
|
|
28928
|
+
}());
|
|
28929
|
+
|
|
28792
28930
|
var Parser = /** @class */ (function () {
|
|
28793
28931
|
function Parser() {
|
|
28794
28932
|
}
|
|
@@ -29315,7 +29453,8 @@ var Glitch = /** @class */ (function () {
|
|
|
29315
29453
|
Fingerprinting: Fingerprinting,
|
|
29316
29454
|
ShortLinks: ShortLinks,
|
|
29317
29455
|
AIUsage: AIUsage,
|
|
29318
|
-
MarketingAgencies: MarketingAgencies
|
|
29456
|
+
MarketingAgencies: MarketingAgencies,
|
|
29457
|
+
TwitchReporting: TwitchReporting,
|
|
29319
29458
|
};
|
|
29320
29459
|
Glitch.util = {
|
|
29321
29460
|
Requests: Requests,
|