glitch-javascript-sdk 2.2.7 → 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 +27 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/TwitchReporting.d.ts +15 -0
- package/dist/esm/index.js +27 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +15 -0
- package/package.json +1 -1
- package/src/api/TwitchReporting.ts +21 -0
- package/src/routes/TwitchReportingRoute.ts +8 -0
package/dist/index.d.ts
CHANGED
|
@@ -6657,6 +6657,21 @@ declare class TwitchReporting {
|
|
|
6657
6657
|
* @returns promise
|
|
6658
6658
|
*/
|
|
6659
6659
|
static getCreatorStreamingSchedule<T>(twitch_streamer_id: string): AxiosPromise<Response<T>>;
|
|
6660
|
+
/**
|
|
6661
|
+
* Get a list of games played by a specific streamer.
|
|
6662
|
+
*
|
|
6663
|
+
* @param twitch_streamer_id The ID of the Twitch streamer.
|
|
6664
|
+
* @returns promise
|
|
6665
|
+
*/
|
|
6666
|
+
static getStreamerGameHistory<T>(twitch_streamer_id: string): AxiosPromise<Response<T>>;
|
|
6667
|
+
/**
|
|
6668
|
+
* Get a paginated list of streamers who played a specific game.
|
|
6669
|
+
*
|
|
6670
|
+
* @param game_name The URL-encoded name of the game.
|
|
6671
|
+
* @param params Optional query parameters for pagination (e.g., page, per_page).
|
|
6672
|
+
* @returns promise
|
|
6673
|
+
*/
|
|
6674
|
+
static getStreamersForGame<T>(game_name: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
6660
6675
|
}
|
|
6661
6676
|
|
|
6662
6677
|
interface Route {
|
package/package.json
CHANGED
|
@@ -84,6 +84,27 @@ class TwitchReporting {
|
|
|
84
84
|
return Requests.processRoute(TwitchReportingRoute.routes.getCreatorStreamingSchedule, undefined, { twitch_streamer_id });
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
/**
|
|
88
|
+
* Get a list of games played by a specific streamer.
|
|
89
|
+
*
|
|
90
|
+
* @param twitch_streamer_id The ID of the Twitch streamer.
|
|
91
|
+
* @returns promise
|
|
92
|
+
*/
|
|
93
|
+
public static getStreamerGameHistory<T>(twitch_streamer_id: string): AxiosPromise<Response<T>> {
|
|
94
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getStreamerGameHistory, undefined, { twitch_streamer_id });
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Get a paginated list of streamers who played a specific game.
|
|
99
|
+
*
|
|
100
|
+
* @param game_name The URL-encoded name of the game.
|
|
101
|
+
* @param params Optional query parameters for pagination (e.g., page, per_page).
|
|
102
|
+
* @returns promise
|
|
103
|
+
*/
|
|
104
|
+
public static getStreamersForGame<T>(game_name: string, params?: Record<string, any>): AxiosPromise<Response<T>> {
|
|
105
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getStreamersForGame, undefined, { game_name: encodeURIComponent(game_name) }, params);
|
|
106
|
+
}
|
|
107
|
+
|
|
87
108
|
}
|
|
88
109
|
|
|
89
110
|
export default TwitchReporting;
|
|
@@ -28,6 +28,14 @@ class TwitchReportingRoute {
|
|
|
28
28
|
url: '/reporting/twitch/streamers/{twitch_streamer_id}/streaming-schedule',
|
|
29
29
|
method: HTTP_METHODS.GET
|
|
30
30
|
},
|
|
31
|
+
getStreamerGameHistory: {
|
|
32
|
+
url: '/reporting/twitch/streamers/{twitch_streamer_id}/games',
|
|
33
|
+
method: HTTP_METHODS.GET
|
|
34
|
+
},
|
|
35
|
+
getStreamersForGame: {
|
|
36
|
+
url: '/reporting/twitch/games/{game_name}/streamers',
|
|
37
|
+
method: HTTP_METHODS.GET
|
|
38
|
+
},
|
|
31
39
|
};
|
|
32
40
|
|
|
33
41
|
}
|