glitch-javascript-sdk 2.2.6 → 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 +113 -1
- package/dist/cjs/index.js.map +1 -1
- 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 +113 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/routes/TwitchReportingRoute.d.ts +7 -0
- package/dist/index.d.ts +65 -0
- package/package.json +1 -1
- package/src/api/TwitchReporting.ts +89 -0
- package/src/api/index.ts +3 -1
- package/src/index.ts +3 -1
- package/src/routes/TwitchReportingRoute.ts +35 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import Response from "../util/Response";
|
|
2
|
+
import { AxiosPromise } from "axios";
|
|
3
|
+
declare class TwitchReporting {
|
|
4
|
+
/**
|
|
5
|
+
* Get a streamer's Concurrent Viewership (CCV) history.
|
|
6
|
+
*
|
|
7
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getCreatorCcvHistory
|
|
8
|
+
*
|
|
9
|
+
* @param twitch_streamer_id The ID of the Twitch streamer.
|
|
10
|
+
* @param params Optional query parameters for filtering (e.g., start_date, end_date, per_page).
|
|
11
|
+
*
|
|
12
|
+
* @returns promise
|
|
13
|
+
*/
|
|
14
|
+
static getCreatorCcvHistory<T>(twitch_streamer_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
15
|
+
/**
|
|
16
|
+
* Get a summary of game performance metrics.
|
|
17
|
+
*
|
|
18
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getGamesSummary
|
|
19
|
+
*
|
|
20
|
+
* @param params Optional query parameters for filtering and sorting (e.g., start_date, end_date, sort_by, limit).
|
|
21
|
+
*
|
|
22
|
+
* @returns promise
|
|
23
|
+
*/
|
|
24
|
+
static getGamesSummary<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
25
|
+
/**
|
|
26
|
+
* Get most recently active streamers.
|
|
27
|
+
*
|
|
28
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getMostActiveStreamers
|
|
29
|
+
*
|
|
30
|
+
* @param params Optional query parameters (e.g., limit).
|
|
31
|
+
*
|
|
32
|
+
* @returns promise
|
|
33
|
+
*/
|
|
34
|
+
static getMostActiveStreamers<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
35
|
+
/**
|
|
36
|
+
* Get most recently streamed games.
|
|
37
|
+
*
|
|
38
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getMostActiveGames
|
|
39
|
+
*
|
|
40
|
+
* @param params Optional query parameters (e.g., limit).
|
|
41
|
+
*
|
|
42
|
+
* @returns promise
|
|
43
|
+
*/
|
|
44
|
+
static getMostActiveGames<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
45
|
+
/**
|
|
46
|
+
* Get top streamers by performance (average or peak CCV).
|
|
47
|
+
*
|
|
48
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getTopStreamers
|
|
49
|
+
*
|
|
50
|
+
* @param params Optional query parameters for filtering and sorting (e.g., sort_by, start_date, limit).
|
|
51
|
+
*
|
|
52
|
+
* @returns promise
|
|
53
|
+
*/
|
|
54
|
+
static getTopStreamers<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
|
|
55
|
+
/**
|
|
56
|
+
* Get a streamer's typical streaming schedule as a heatmap.
|
|
57
|
+
*
|
|
58
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getCreatorStreamingSchedule
|
|
59
|
+
*
|
|
60
|
+
* @param twitch_streamer_id The ID of the Twitch streamer.
|
|
61
|
+
*
|
|
62
|
+
* @returns promise
|
|
63
|
+
*/
|
|
64
|
+
static getCreatorStreamingSchedule<T>(twitch_streamer_id: string): AxiosPromise<Response<T>>;
|
|
65
|
+
}
|
|
66
|
+
export default TwitchReporting;
|
package/dist/esm/api/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ import WebsiteAnalytics from "./WebsiteAnalytics";
|
|
|
37
37
|
import ShortLinks from "./ShortLinks";
|
|
38
38
|
import AIUsage from "./AIUsage";
|
|
39
39
|
import MarketingAgencies from "./MarketingAgencies";
|
|
40
|
+
import TwitchReporting from "./TwitchReporting";
|
|
40
41
|
export { Ads };
|
|
41
42
|
export { AccessKeys };
|
|
42
43
|
export { Auth };
|
|
@@ -76,3 +77,4 @@ export { Fingerprinting };
|
|
|
76
77
|
export { ShortLinks };
|
|
77
78
|
export { AIUsage };
|
|
78
79
|
export { MarketingAgencies };
|
|
80
|
+
export { TwitchReporting };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ import { Fingerprinting } from "./api";
|
|
|
37
37
|
import { ShortLinks } from "./api";
|
|
38
38
|
import { AIUsage } from "./api";
|
|
39
39
|
import { MarketingAgencies } from "./api";
|
|
40
|
+
import { TwitchReporting } from './api';
|
|
40
41
|
import Requests from "./util/Requests";
|
|
41
42
|
import Parser from "./util/Parser";
|
|
42
43
|
import Session from "./util/Session";
|
|
@@ -95,6 +96,7 @@ declare class Glitch {
|
|
|
95
96
|
ShortLinks: typeof ShortLinks;
|
|
96
97
|
AIUsage: typeof AIUsage;
|
|
97
98
|
MarketingAgencies: typeof MarketingAgencies;
|
|
99
|
+
TwitchReporting: typeof TwitchReporting;
|
|
98
100
|
};
|
|
99
101
|
static util: {
|
|
100
102
|
Requests: typeof Requests;
|
package/dist/esm/index.js
CHANGED
|
@@ -15605,6 +15605,117 @@ var MarketingAgencies = /** @class */ (function () {
|
|
|
15605
15605
|
return MarketingAgencies;
|
|
15606
15606
|
}());
|
|
15607
15607
|
|
|
15608
|
+
var TwitchReportingRoute = /** @class */ (function () {
|
|
15609
|
+
function TwitchReportingRoute() {
|
|
15610
|
+
}
|
|
15611
|
+
TwitchReportingRoute.routes = {
|
|
15612
|
+
getCreatorCcvHistory: {
|
|
15613
|
+
url: '/reporting/twitch/streamers/{twitch_streamer_id}/ccv-history',
|
|
15614
|
+
method: HTTP_METHODS.GET
|
|
15615
|
+
},
|
|
15616
|
+
getGamesSummary: {
|
|
15617
|
+
url: '/reporting/twitch/games/summary',
|
|
15618
|
+
method: HTTP_METHODS.GET
|
|
15619
|
+
},
|
|
15620
|
+
getMostActiveStreamers: {
|
|
15621
|
+
url: '/reporting/twitch/streamers/most-active',
|
|
15622
|
+
method: HTTP_METHODS.GET
|
|
15623
|
+
},
|
|
15624
|
+
getMostActiveGames: {
|
|
15625
|
+
url: '/reporting/twitch/games/most-active',
|
|
15626
|
+
method: HTTP_METHODS.GET
|
|
15627
|
+
},
|
|
15628
|
+
getTopStreamers: {
|
|
15629
|
+
url: '/reporting/twitch/streamers/top',
|
|
15630
|
+
method: HTTP_METHODS.GET
|
|
15631
|
+
},
|
|
15632
|
+
getCreatorStreamingSchedule: {
|
|
15633
|
+
url: '/reporting/twitch/streamers/{twitch_streamer_id}/streaming-schedule',
|
|
15634
|
+
method: HTTP_METHODS.GET
|
|
15635
|
+
},
|
|
15636
|
+
};
|
|
15637
|
+
return TwitchReportingRoute;
|
|
15638
|
+
}());
|
|
15639
|
+
|
|
15640
|
+
var TwitchReporting = /** @class */ (function () {
|
|
15641
|
+
function TwitchReporting() {
|
|
15642
|
+
}
|
|
15643
|
+
/**
|
|
15644
|
+
* Get a streamer's Concurrent Viewership (CCV) history.
|
|
15645
|
+
*
|
|
15646
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getCreatorCcvHistory
|
|
15647
|
+
*
|
|
15648
|
+
* @param twitch_streamer_id The ID of the Twitch streamer.
|
|
15649
|
+
* @param params Optional query parameters for filtering (e.g., start_date, end_date, per_page).
|
|
15650
|
+
*
|
|
15651
|
+
* @returns promise
|
|
15652
|
+
*/
|
|
15653
|
+
TwitchReporting.getCreatorCcvHistory = function (twitch_streamer_id, params) {
|
|
15654
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getCreatorCcvHistory, undefined, { twitch_streamer_id: twitch_streamer_id }, params);
|
|
15655
|
+
};
|
|
15656
|
+
/**
|
|
15657
|
+
* Get a summary of game performance metrics.
|
|
15658
|
+
*
|
|
15659
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getGamesSummary
|
|
15660
|
+
*
|
|
15661
|
+
* @param params Optional query parameters for filtering and sorting (e.g., start_date, end_date, sort_by, limit).
|
|
15662
|
+
*
|
|
15663
|
+
* @returns promise
|
|
15664
|
+
*/
|
|
15665
|
+
TwitchReporting.getGamesSummary = function (params) {
|
|
15666
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getGamesSummary, undefined, undefined, params);
|
|
15667
|
+
};
|
|
15668
|
+
/**
|
|
15669
|
+
* Get most recently active streamers.
|
|
15670
|
+
*
|
|
15671
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getMostActiveStreamers
|
|
15672
|
+
*
|
|
15673
|
+
* @param params Optional query parameters (e.g., limit).
|
|
15674
|
+
*
|
|
15675
|
+
* @returns promise
|
|
15676
|
+
*/
|
|
15677
|
+
TwitchReporting.getMostActiveStreamers = function (params) {
|
|
15678
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getMostActiveStreamers, undefined, undefined, params);
|
|
15679
|
+
};
|
|
15680
|
+
/**
|
|
15681
|
+
* Get most recently streamed games.
|
|
15682
|
+
*
|
|
15683
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getMostActiveGames
|
|
15684
|
+
*
|
|
15685
|
+
* @param params Optional query parameters (e.g., limit).
|
|
15686
|
+
*
|
|
15687
|
+
* @returns promise
|
|
15688
|
+
*/
|
|
15689
|
+
TwitchReporting.getMostActiveGames = function (params) {
|
|
15690
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getMostActiveGames, undefined, undefined, params);
|
|
15691
|
+
};
|
|
15692
|
+
/**
|
|
15693
|
+
* Get top streamers by performance (average or peak CCV).
|
|
15694
|
+
*
|
|
15695
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getTopStreamers
|
|
15696
|
+
*
|
|
15697
|
+
* @param params Optional query parameters for filtering and sorting (e.g., sort_by, start_date, limit).
|
|
15698
|
+
*
|
|
15699
|
+
* @returns promise
|
|
15700
|
+
*/
|
|
15701
|
+
TwitchReporting.getTopStreamers = function (params) {
|
|
15702
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getTopStreamers, undefined, undefined, params);
|
|
15703
|
+
};
|
|
15704
|
+
/**
|
|
15705
|
+
* Get a streamer's typical streaming schedule as a heatmap.
|
|
15706
|
+
*
|
|
15707
|
+
* @see https://api.glitch.fun/api/documentation#/Twitch%20Reporting/getCreatorStreamingSchedule
|
|
15708
|
+
*
|
|
15709
|
+
* @param twitch_streamer_id The ID of the Twitch streamer.
|
|
15710
|
+
*
|
|
15711
|
+
* @returns promise
|
|
15712
|
+
*/
|
|
15713
|
+
TwitchReporting.getCreatorStreamingSchedule = function (twitch_streamer_id) {
|
|
15714
|
+
return Requests.processRoute(TwitchReportingRoute.routes.getCreatorStreamingSchedule, undefined, { twitch_streamer_id: twitch_streamer_id });
|
|
15715
|
+
};
|
|
15716
|
+
return TwitchReporting;
|
|
15717
|
+
}());
|
|
15718
|
+
|
|
15608
15719
|
var Parser = /** @class */ (function () {
|
|
15609
15720
|
function Parser() {
|
|
15610
15721
|
}
|
|
@@ -16131,7 +16242,8 @@ var Glitch = /** @class */ (function () {
|
|
|
16131
16242
|
Fingerprinting: Fingerprinting,
|
|
16132
16243
|
ShortLinks: ShortLinks,
|
|
16133
16244
|
AIUsage: AIUsage,
|
|
16134
|
-
MarketingAgencies: MarketingAgencies
|
|
16245
|
+
MarketingAgencies: MarketingAgencies,
|
|
16246
|
+
TwitchReporting: TwitchReporting,
|
|
16135
16247
|
};
|
|
16136
16248
|
Glitch.util = {
|
|
16137
16249
|
Requests: Requests,
|