ts-twitch-api 0.2.3 → 0.2.5
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/index.cjs +266 -157
- package/dist/index.d.cts +987 -3241
- package/dist/index.d.ts +987 -3241
- package/dist/index.js +263 -154
- package/package.json +9 -10
package/dist/index.cjs
CHANGED
|
@@ -18,11 +18,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
TwitchApi: () => TwitchApi
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
26
|
|
|
27
27
|
// twitch-api.ts
|
|
28
28
|
var BASE_URL = "https://api.twitch.tv/helix";
|
|
@@ -134,7 +134,7 @@ var TwitchApi = class {
|
|
|
134
134
|
*
|
|
135
135
|
* @see https://dev.twitch.tv/docs/api/reference#start-commercial
|
|
136
136
|
*/
|
|
137
|
-
startCommercial:
|
|
137
|
+
startCommercial: (body, options = {}) => this.callApi({
|
|
138
138
|
path: "/channels/commercial",
|
|
139
139
|
method: "POST",
|
|
140
140
|
body,
|
|
@@ -165,7 +165,7 @@ var TwitchApi = class {
|
|
|
165
165
|
*
|
|
166
166
|
* @see https://dev.twitch.tv/docs/api/reference#get-ad-schedule
|
|
167
167
|
*/
|
|
168
|
-
getAdSchedule:
|
|
168
|
+
getAdSchedule: (params, options = {}) => this.callApi({
|
|
169
169
|
path: "/channels/ads",
|
|
170
170
|
params,
|
|
171
171
|
options
|
|
@@ -201,7 +201,7 @@ var TwitchApi = class {
|
|
|
201
201
|
*
|
|
202
202
|
* @see https://dev.twitch.tv/docs/api/reference#snooze-next-ad
|
|
203
203
|
*/
|
|
204
|
-
snoozeNextAd:
|
|
204
|
+
snoozeNextAd: (params, options = {}) => this.callApi({
|
|
205
205
|
path: "/channels/ads/schedule/snooze",
|
|
206
206
|
method: "POST",
|
|
207
207
|
params,
|
|
@@ -248,7 +248,7 @@ var TwitchApi = class {
|
|
|
248
248
|
*
|
|
249
249
|
* @see https://dev.twitch.tv/docs/api/reference#get-extension-analytics
|
|
250
250
|
*/
|
|
251
|
-
getExtensionAnalytics:
|
|
251
|
+
getExtensionAnalytics: (params = null, options = {}) => this.callApi({
|
|
252
252
|
path: "/analytics/extensions",
|
|
253
253
|
params,
|
|
254
254
|
options
|
|
@@ -292,7 +292,7 @@ var TwitchApi = class {
|
|
|
292
292
|
*
|
|
293
293
|
* @see https://dev.twitch.tv/docs/api/reference#get-game-analytics
|
|
294
294
|
*/
|
|
295
|
-
getGameAnalytics:
|
|
295
|
+
getGameAnalytics: (params = null, options = {}) => this.callApi({
|
|
296
296
|
path: "/analytics/games",
|
|
297
297
|
params,
|
|
298
298
|
options
|
|
@@ -333,7 +333,7 @@ var TwitchApi = class {
|
|
|
333
333
|
*
|
|
334
334
|
* @see https://dev.twitch.tv/docs/api/reference#get-bits-leaderboard
|
|
335
335
|
*/
|
|
336
|
-
getBitsLeaderboard:
|
|
336
|
+
getBitsLeaderboard: (params = null, options = {}) => this.callApi({
|
|
337
337
|
path: "/bits/leaderboard",
|
|
338
338
|
params,
|
|
339
339
|
options
|
|
@@ -362,7 +362,7 @@ var TwitchApi = class {
|
|
|
362
362
|
*
|
|
363
363
|
* @see https://dev.twitch.tv/docs/api/reference#get-cheermotes
|
|
364
364
|
*/
|
|
365
|
-
getCheermotes:
|
|
365
|
+
getCheermotes: (params = null, options = {}) => this.callApi({
|
|
366
366
|
path: "/bits/cheermotes",
|
|
367
367
|
params,
|
|
368
368
|
options
|
|
@@ -403,7 +403,7 @@ var TwitchApi = class {
|
|
|
403
403
|
*
|
|
404
404
|
* @see https://dev.twitch.tv/docs/api/reference#get-extension-transactions
|
|
405
405
|
*/
|
|
406
|
-
getExtensionTransactions:
|
|
406
|
+
getExtensionTransactions: (params, options = {}) => this.callApi({
|
|
407
407
|
path: "/extensions/transactions",
|
|
408
408
|
params,
|
|
409
409
|
options
|
|
@@ -447,7 +447,7 @@ var TwitchApi = class {
|
|
|
447
447
|
*
|
|
448
448
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-information
|
|
449
449
|
*/
|
|
450
|
-
getChannelInformation:
|
|
450
|
+
getChannelInformation: (params, options = {}) => this.callApi({
|
|
451
451
|
path: "/channels",
|
|
452
452
|
params,
|
|
453
453
|
options
|
|
@@ -509,7 +509,7 @@ var TwitchApi = class {
|
|
|
509
509
|
*
|
|
510
510
|
* @see https://dev.twitch.tv/docs/api/reference#modify-channel-information
|
|
511
511
|
*/
|
|
512
|
-
modifyChannelInformation:
|
|
512
|
+
modifyChannelInformation: (params, body = null, options = {}) => this.callApi({
|
|
513
513
|
path: "/channels",
|
|
514
514
|
method: "PATCH",
|
|
515
515
|
params,
|
|
@@ -547,7 +547,7 @@ var TwitchApi = class {
|
|
|
547
547
|
*
|
|
548
548
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-editors
|
|
549
549
|
*/
|
|
550
|
-
getChannelEditors:
|
|
550
|
+
getChannelEditors: (params, options = {}) => this.callApi({
|
|
551
551
|
path: "/channels/editors",
|
|
552
552
|
params,
|
|
553
553
|
options
|
|
@@ -589,7 +589,7 @@ var TwitchApi = class {
|
|
|
589
589
|
*
|
|
590
590
|
* @see https://dev.twitch.tv/docs/api/reference#get-followed-channels
|
|
591
591
|
*/
|
|
592
|
-
getFollowedChannels:
|
|
592
|
+
getFollowedChannels: (params, options = {}) => this.callApi({
|
|
593
593
|
path: "/channels/followed",
|
|
594
594
|
params,
|
|
595
595
|
options
|
|
@@ -634,7 +634,7 @@ var TwitchApi = class {
|
|
|
634
634
|
*
|
|
635
635
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-followers
|
|
636
636
|
*/
|
|
637
|
-
getChannelFollowers:
|
|
637
|
+
getChannelFollowers: (params, options = {}) => this.callApi({
|
|
638
638
|
path: "/channels/followers",
|
|
639
639
|
params,
|
|
640
640
|
options
|
|
@@ -687,7 +687,7 @@ var TwitchApi = class {
|
|
|
687
687
|
*
|
|
688
688
|
* @see https://dev.twitch.tv/docs/api/reference#create-custom-rewards
|
|
689
689
|
*/
|
|
690
|
-
createCustomRewards:
|
|
690
|
+
createCustomRewards: (params, body, options = {}) => this.callApi({
|
|
691
691
|
path: "/channel_points/custom_rewards",
|
|
692
692
|
method: "POST",
|
|
693
693
|
params,
|
|
@@ -738,7 +738,7 @@ var TwitchApi = class {
|
|
|
738
738
|
*
|
|
739
739
|
* @see https://dev.twitch.tv/docs/api/reference#delete-custom-reward
|
|
740
740
|
*/
|
|
741
|
-
deleteCustomReward:
|
|
741
|
+
deleteCustomReward: (params, options = {}) => this.callApi({
|
|
742
742
|
path: "/channel_points/custom_rewards",
|
|
743
743
|
method: "DELETE",
|
|
744
744
|
params,
|
|
@@ -787,7 +787,7 @@ var TwitchApi = class {
|
|
|
787
787
|
*
|
|
788
788
|
* @see https://dev.twitch.tv/docs/api/reference#get-custom-reward
|
|
789
789
|
*/
|
|
790
|
-
getCustomReward:
|
|
790
|
+
getCustomReward: (params, options = {}) => this.callApi({
|
|
791
791
|
path: "/channel_points/custom_rewards",
|
|
792
792
|
params,
|
|
793
793
|
options
|
|
@@ -797,7 +797,7 @@ var TwitchApi = class {
|
|
|
797
797
|
*
|
|
798
798
|
* __Authorization:__
|
|
799
799
|
*
|
|
800
|
-
* Requires a [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens) that includes the **channel:manage:redemptions** scope.
|
|
800
|
+
* Requires a [user access token](https://dev.twitch.tv/docs/api/authentication#user-access-tokens) that includes the **channel:manage:redemptions** scope.
|
|
801
801
|
*
|
|
802
802
|
* __Request Body:__
|
|
803
803
|
*
|
|
@@ -815,6 +815,7 @@ var TwitchApi = class {
|
|
|
815
815
|
*
|
|
816
816
|
* _400 Bad Request_
|
|
817
817
|
*
|
|
818
|
+
* ul>
|
|
818
819
|
* * The _broadcaster\_id_ query parameter is required.
|
|
819
820
|
* * The _id_ query parameter is required.
|
|
820
821
|
* * The `title` must contain a minimum of 1 character and a maximum of 45 characters.
|
|
@@ -845,7 +846,7 @@ var TwitchApi = class {
|
|
|
845
846
|
*
|
|
846
847
|
* @see https://dev.twitch.tv/docs/api/reference#update-custom-reward
|
|
847
848
|
*/
|
|
848
|
-
updateCustomReward:
|
|
849
|
+
updateCustomReward: (params, body = null, options = {}) => this.callApi({
|
|
849
850
|
path: "/channel_points/custom_rewards",
|
|
850
851
|
method: "PATCH",
|
|
851
852
|
params,
|
|
@@ -897,7 +898,7 @@ var TwitchApi = class {
|
|
|
897
898
|
*
|
|
898
899
|
* @see https://dev.twitch.tv/docs/api/reference#get-custom-reward-redemption
|
|
899
900
|
*/
|
|
900
|
-
getCustomRewardRedemption:
|
|
901
|
+
getCustomRewardRedemption: (params, options = {}) => this.callApi({
|
|
901
902
|
path: "/channel_points/custom_rewards/redemptions",
|
|
902
903
|
params,
|
|
903
904
|
options
|
|
@@ -947,7 +948,7 @@ var TwitchApi = class {
|
|
|
947
948
|
*
|
|
948
949
|
* @see https://dev.twitch.tv/docs/api/reference#update-redemption-status
|
|
949
950
|
*/
|
|
950
|
-
updateRedemptionStatus:
|
|
951
|
+
updateRedemptionStatus: (params, body, options = {}) => this.callApi({
|
|
951
952
|
path: "/channel_points/custom_rewards/redemptions",
|
|
952
953
|
method: "PATCH",
|
|
953
954
|
params,
|
|
@@ -994,7 +995,7 @@ var TwitchApi = class {
|
|
|
994
995
|
*
|
|
995
996
|
* @see https://dev.twitch.tv/docs/api/reference#get-charity-campaign
|
|
996
997
|
*/
|
|
997
|
-
getCharityCampaign:
|
|
998
|
+
getCharityCampaign: (params, options = {}) => this.callApi({
|
|
998
999
|
path: "/charity/campaigns",
|
|
999
1000
|
params,
|
|
1000
1001
|
options
|
|
@@ -1037,7 +1038,7 @@ var TwitchApi = class {
|
|
|
1037
1038
|
*
|
|
1038
1039
|
* @see https://dev.twitch.tv/docs/api/reference#get-charity-campaign-donations
|
|
1039
1040
|
*/
|
|
1040
|
-
getCharityCampaignDonations:
|
|
1041
|
+
getCharityCampaignDonations: (params, options = {}) => this.callApi({
|
|
1041
1042
|
path: "/charity/donations",
|
|
1042
1043
|
params,
|
|
1043
1044
|
options
|
|
@@ -1086,7 +1087,7 @@ var TwitchApi = class {
|
|
|
1086
1087
|
*
|
|
1087
1088
|
* @see https://dev.twitch.tv/docs/api/reference#get-chatters
|
|
1088
1089
|
*/
|
|
1089
|
-
getChatters:
|
|
1090
|
+
getChatters: (params, options = {}) => this.callApi({
|
|
1090
1091
|
path: "/chat/chatters",
|
|
1091
1092
|
params,
|
|
1092
1093
|
options
|
|
@@ -1124,7 +1125,7 @@ var TwitchApi = class {
|
|
|
1124
1125
|
*
|
|
1125
1126
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-emotes
|
|
1126
1127
|
*/
|
|
1127
|
-
getChannelEmotes:
|
|
1128
|
+
getChannelEmotes: (params, options = {}) => this.callApi({
|
|
1128
1129
|
path: "/chat/emotes",
|
|
1129
1130
|
params,
|
|
1130
1131
|
options
|
|
@@ -1160,7 +1161,7 @@ var TwitchApi = class {
|
|
|
1160
1161
|
*
|
|
1161
1162
|
* @see https://dev.twitch.tv/docs/api/reference#get-global-emotes
|
|
1162
1163
|
*/
|
|
1163
|
-
getGlobalEmotes:
|
|
1164
|
+
getGlobalEmotes: (options = {}) => this.callApi({
|
|
1164
1165
|
path: "/chat/emotes/global",
|
|
1165
1166
|
options
|
|
1166
1167
|
}),
|
|
@@ -1198,7 +1199,7 @@ var TwitchApi = class {
|
|
|
1198
1199
|
*
|
|
1199
1200
|
* @see https://dev.twitch.tv/docs/api/reference#get-emote-sets
|
|
1200
1201
|
*/
|
|
1201
|
-
getEmoteSets:
|
|
1202
|
+
getEmoteSets: (params, options = {}) => this.callApi({
|
|
1202
1203
|
path: "/chat/emotes/set",
|
|
1203
1204
|
params,
|
|
1204
1205
|
options
|
|
@@ -1232,7 +1233,7 @@ var TwitchApi = class {
|
|
|
1232
1233
|
*
|
|
1233
1234
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-chat-badges
|
|
1234
1235
|
*/
|
|
1235
|
-
getChannelChatBadges:
|
|
1236
|
+
getChannelChatBadges: (params, options = {}) => this.callApi({
|
|
1236
1237
|
path: "/chat/badges",
|
|
1237
1238
|
params,
|
|
1238
1239
|
options
|
|
@@ -1266,7 +1267,7 @@ var TwitchApi = class {
|
|
|
1266
1267
|
*
|
|
1267
1268
|
* @see https://dev.twitch.tv/docs/api/reference#get-global-chat-badges
|
|
1268
1269
|
*/
|
|
1269
|
-
getGlobalChatBadges:
|
|
1270
|
+
getGlobalChatBadges: (options = {}) => this.callApi({
|
|
1270
1271
|
path: "/chat/badges/global",
|
|
1271
1272
|
options
|
|
1272
1273
|
}),
|
|
@@ -1301,7 +1302,7 @@ var TwitchApi = class {
|
|
|
1301
1302
|
*
|
|
1302
1303
|
* @see https://dev.twitch.tv/docs/api/reference#get-chat-settings
|
|
1303
1304
|
*/
|
|
1304
|
-
getChatSettings:
|
|
1305
|
+
getChatSettings: (params, options = {}) => this.callApi({
|
|
1305
1306
|
path: "/chat/settings",
|
|
1306
1307
|
params,
|
|
1307
1308
|
options
|
|
@@ -1355,7 +1356,7 @@ var TwitchApi = class {
|
|
|
1355
1356
|
*
|
|
1356
1357
|
* @see https://dev.twitch.tv/docs/api/reference#update-chat-settings
|
|
1357
1358
|
*/
|
|
1358
|
-
updateChatSettings:
|
|
1359
|
+
updateChatSettings: (params, body = null, options = {}) => this.callApi({
|
|
1359
1360
|
path: "/chat/settings",
|
|
1360
1361
|
method: "PATCH",
|
|
1361
1362
|
params,
|
|
@@ -1363,7 +1364,44 @@ var TwitchApi = class {
|
|
|
1363
1364
|
options
|
|
1364
1365
|
}),
|
|
1365
1366
|
/**
|
|
1366
|
-
*
|
|
1367
|
+
* NEW Retrieves the active shared chat session for a channel.
|
|
1368
|
+
*
|
|
1369
|
+
* __Authorization:__
|
|
1370
|
+
*
|
|
1371
|
+
* Requires an [app access token](https://dev.twitch.tv/docs/cli/token-command/#app-access-token) or [user access token](https://dev.twitch.tv/docs/authentication/#user-access-tokens).
|
|
1372
|
+
*
|
|
1373
|
+
* __URL:__
|
|
1374
|
+
*
|
|
1375
|
+
* `GET https://api.twitch.tv/helix/shared_chat/session`
|
|
1376
|
+
*
|
|
1377
|
+
* __Response Codes:__
|
|
1378
|
+
*
|
|
1379
|
+
* _200 OK_
|
|
1380
|
+
*
|
|
1381
|
+
* Successfully retrieved the shared chat session. Returns an empty array if the broadcaster\_id in the request isn’t in a shared chat session.
|
|
1382
|
+
*
|
|
1383
|
+
* _400 Bad Request_
|
|
1384
|
+
*
|
|
1385
|
+
* The ID in the `broadcaster_id` query parameter is not valid.
|
|
1386
|
+
*
|
|
1387
|
+
* _401 Unauthorized_
|
|
1388
|
+
*
|
|
1389
|
+
* * The OAuth token is not valid.
|
|
1390
|
+
* * The Authorization header is required and must contain a user access token.
|
|
1391
|
+
*
|
|
1392
|
+
* _500 Internal Server Error_
|
|
1393
|
+
*
|
|
1394
|
+
* Internal Server Error.
|
|
1395
|
+
*
|
|
1396
|
+
* @see https://dev.twitch.tv/docs/api/reference#get-shared-chat-session
|
|
1397
|
+
*/
|
|
1398
|
+
getSharedChatSession: (params, options = {}) => this.callApi({
|
|
1399
|
+
path: "/shared_chat/session",
|
|
1400
|
+
params,
|
|
1401
|
+
options
|
|
1402
|
+
}),
|
|
1403
|
+
/**
|
|
1404
|
+
* NEW Retrieves emotes available to the user across all channels.
|
|
1367
1405
|
*
|
|
1368
1406
|
* __Authorization:__
|
|
1369
1407
|
*
|
|
@@ -1395,7 +1433,7 @@ var TwitchApi = class {
|
|
|
1395
1433
|
*
|
|
1396
1434
|
* @see https://dev.twitch.tv/docs/api/reference#get-user-emotes
|
|
1397
1435
|
*/
|
|
1398
|
-
getUserEmotes:
|
|
1436
|
+
getUserEmotes: (params, options = {}) => this.callApi({
|
|
1399
1437
|
path: "/chat/emotes/user",
|
|
1400
1438
|
params,
|
|
1401
1439
|
options
|
|
@@ -1403,6 +1441,8 @@ var TwitchApi = class {
|
|
|
1403
1441
|
/**
|
|
1404
1442
|
* Sends an announcement to the broadcaster’s chat room.
|
|
1405
1443
|
*
|
|
1444
|
+
* **Rate Limits**: One announcement may be sent every 2 seconds.
|
|
1445
|
+
*
|
|
1406
1446
|
* __Authorization:__
|
|
1407
1447
|
*
|
|
1408
1448
|
* Requires a [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens) that includes the **moderator:manage:announcements** scope.
|
|
@@ -1431,9 +1471,13 @@ var TwitchApi = class {
|
|
|
1431
1471
|
* * The OAuth token is not valid.
|
|
1432
1472
|
* * The client ID specified in the Client-Id header does not match the client ID specified in the OAuth token.
|
|
1433
1473
|
*
|
|
1474
|
+
* _429 Too Many Requests_
|
|
1475
|
+
*
|
|
1476
|
+
* The sender has exceeded the number of announcements they may send to this **broadcaster\_id** within a given window.
|
|
1477
|
+
*
|
|
1434
1478
|
* @see https://dev.twitch.tv/docs/api/reference#send-chat-announcement
|
|
1435
1479
|
*/
|
|
1436
|
-
sendChatAnnouncement:
|
|
1480
|
+
sendChatAnnouncement: (params, body, options = {}) => this.callApi({
|
|
1437
1481
|
path: "/chat/announcements",
|
|
1438
1482
|
method: "POST",
|
|
1439
1483
|
params,
|
|
@@ -1445,7 +1489,7 @@ var TwitchApi = class {
|
|
|
1445
1489
|
*
|
|
1446
1490
|
* Twitch’s Shoutout feature is a great way for you to show support for other broadcasters and help them grow. Viewers who do not follow the other broadcaster will see a pop-up Follow button in your chat that they can click to follow the other broadcaster. [Learn More](https://help.twitch.tv/s/article/shoutouts)
|
|
1447
1491
|
*
|
|
1448
|
-
* **Rate Limits
|
|
1492
|
+
* **Rate Limits**: The broadcaster may send a Shoutout once every 2 minutes. They may send the same broadcaster a Shoutout once every 60 minutes.
|
|
1449
1493
|
*
|
|
1450
1494
|
* To receive notifications when a Shoutout is sent or received, subscribe to the [channel.shoutout.create](https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types#channelshoutoutcreate) and [channel.shoutout.receive](https://dev.twitch.tv/docs/eventsub/eventsub-subscription-types#channelshoutoutreceive) subscription types. The **channel.shoutout.create** event includes cooldown periods that indicate when the broadcaster may send another Shoutout without exceeding the endpoint’s rate limit.
|
|
1451
1495
|
*
|
|
@@ -1492,7 +1536,7 @@ var TwitchApi = class {
|
|
|
1492
1536
|
*
|
|
1493
1537
|
* @see https://dev.twitch.tv/docs/api/reference#send-a-shoutout
|
|
1494
1538
|
*/
|
|
1495
|
-
sendShoutout:
|
|
1539
|
+
sendShoutout: (params, options = {}) => this.callApi({
|
|
1496
1540
|
path: "/chat/shoutouts",
|
|
1497
1541
|
method: "POST",
|
|
1498
1542
|
params,
|
|
@@ -1542,7 +1586,7 @@ var TwitchApi = class {
|
|
|
1542
1586
|
*
|
|
1543
1587
|
* @see https://dev.twitch.tv/docs/api/reference#send-chat-message
|
|
1544
1588
|
*/
|
|
1545
|
-
sendChatMessage:
|
|
1589
|
+
sendChatMessage: (body, options = {}) => this.callApi({
|
|
1546
1590
|
path: "/chat/messages",
|
|
1547
1591
|
method: "POST",
|
|
1548
1592
|
body,
|
|
@@ -1577,7 +1621,7 @@ var TwitchApi = class {
|
|
|
1577
1621
|
*
|
|
1578
1622
|
* @see https://dev.twitch.tv/docs/api/reference#get-user-chat-color
|
|
1579
1623
|
*/
|
|
1580
|
-
getUserChatColor:
|
|
1624
|
+
getUserChatColor: (params, options = {}) => this.callApi({
|
|
1581
1625
|
path: "/chat/color",
|
|
1582
1626
|
params,
|
|
1583
1627
|
options
|
|
@@ -1616,7 +1660,7 @@ var TwitchApi = class {
|
|
|
1616
1660
|
*
|
|
1617
1661
|
* @see https://dev.twitch.tv/docs/api/reference#update-user-chat-color
|
|
1618
1662
|
*/
|
|
1619
|
-
updateUserChatColor:
|
|
1663
|
+
updateUserChatColor: (params, options = {}) => this.callApi({
|
|
1620
1664
|
path: "/chat/color",
|
|
1621
1665
|
method: "PUT",
|
|
1622
1666
|
params,
|
|
@@ -1670,7 +1714,7 @@ var TwitchApi = class {
|
|
|
1670
1714
|
*
|
|
1671
1715
|
* @see https://dev.twitch.tv/docs/api/reference#create-clip
|
|
1672
1716
|
*/
|
|
1673
|
-
createClip:
|
|
1717
|
+
createClip: (params, options = {}) => this.callApi({
|
|
1674
1718
|
path: "/clips",
|
|
1675
1719
|
method: "POST",
|
|
1676
1720
|
params,
|
|
@@ -1679,6 +1723,8 @@ var TwitchApi = class {
|
|
|
1679
1723
|
/**
|
|
1680
1724
|
* Gets one or more video clips that were captured from streams. For information about clips, see [How to use clips](https://help.twitch.tv/s/article/how-to-use-clips).
|
|
1681
1725
|
*
|
|
1726
|
+
* When using pagination for clips, note that the maximum number of results returned over multiple requests will be approximately 1,000\. If additional results are necessary, paginate over different query parameters such as multiple `started_at` and `ended_at` timeframes to refine the search.
|
|
1727
|
+
*
|
|
1682
1728
|
* __Authorization:__
|
|
1683
1729
|
*
|
|
1684
1730
|
* Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens) or [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens).
|
|
@@ -1714,7 +1760,7 @@ var TwitchApi = class {
|
|
|
1714
1760
|
*
|
|
1715
1761
|
* @see https://dev.twitch.tv/docs/api/reference#get-clips
|
|
1716
1762
|
*/
|
|
1717
|
-
getClips:
|
|
1763
|
+
getClips: (params = null, options = {}) => this.callApi({
|
|
1718
1764
|
path: "/clips",
|
|
1719
1765
|
params,
|
|
1720
1766
|
options
|
|
@@ -1722,7 +1768,7 @@ var TwitchApi = class {
|
|
|
1722
1768
|
};
|
|
1723
1769
|
conduits = {
|
|
1724
1770
|
/**
|
|
1725
|
-
* NEW Gets the [conduits](https://dev.twitch.tv/docs/eventsub/handling-conduit-events) for a client ID.
|
|
1771
|
+
* NEW Gets the [conduits](https://dev.twitch.tv/docs/eventsub/handling-conduit-events/) for a client ID.
|
|
1726
1772
|
*
|
|
1727
1773
|
* __Authorization:__
|
|
1728
1774
|
*
|
|
@@ -1744,12 +1790,12 @@ var TwitchApi = class {
|
|
|
1744
1790
|
*
|
|
1745
1791
|
* @see https://dev.twitch.tv/docs/api/reference#get-conduits
|
|
1746
1792
|
*/
|
|
1747
|
-
getConduits:
|
|
1793
|
+
getConduits: (options = {}) => this.callApi({
|
|
1748
1794
|
path: "/eventsub/conduits",
|
|
1749
1795
|
options
|
|
1750
1796
|
}),
|
|
1751
1797
|
/**
|
|
1752
|
-
* NEW Creates a new [conduit](https://dev.twitch.tv/docs/eventsub/handling-conduit-events).
|
|
1798
|
+
* NEW Creates a new [conduit](https://dev.twitch.tv/docs/eventsub/handling-conduit-events/).
|
|
1753
1799
|
*
|
|
1754
1800
|
* __Authorization:__
|
|
1755
1801
|
*
|
|
@@ -1779,14 +1825,14 @@ var TwitchApi = class {
|
|
|
1779
1825
|
*
|
|
1780
1826
|
* @see https://dev.twitch.tv/docs/api/reference#create-conduits
|
|
1781
1827
|
*/
|
|
1782
|
-
createConduits:
|
|
1828
|
+
createConduits: (body, options = {}) => this.callApi({
|
|
1783
1829
|
path: "/eventsub/conduits",
|
|
1784
1830
|
method: "POST",
|
|
1785
1831
|
body,
|
|
1786
1832
|
options
|
|
1787
1833
|
}),
|
|
1788
1834
|
/**
|
|
1789
|
-
* NEW Updates a [conduit’s](https://dev.twitch.tv/docs/eventsub/handling-conduit-events) shard count. To delete shards, update the count to a lower number, and the shards above the count will be deleted. For example, if the existing shard count is 100, by resetting shard count to 50, shards 50-99 are disabled.
|
|
1835
|
+
* NEW Updates a [conduit’s](https://dev.twitch.tv/docs/eventsub/handling-conduit-events/) shard count. To delete shards, update the count to a lower number, and the shards above the count will be deleted. For example, if the existing shard count is 100, by resetting shard count to 50, shards 50-99 are disabled.
|
|
1790
1836
|
*
|
|
1791
1837
|
* __Authorization:__
|
|
1792
1838
|
*
|
|
@@ -1818,14 +1864,14 @@ var TwitchApi = class {
|
|
|
1818
1864
|
*
|
|
1819
1865
|
* @see https://dev.twitch.tv/docs/api/reference#update-conduits
|
|
1820
1866
|
*/
|
|
1821
|
-
updateConduits:
|
|
1867
|
+
updateConduits: (body, options = {}) => this.callApi({
|
|
1822
1868
|
path: "/eventsub/conduits",
|
|
1823
1869
|
method: "PATCH",
|
|
1824
1870
|
body,
|
|
1825
1871
|
options
|
|
1826
1872
|
}),
|
|
1827
1873
|
/**
|
|
1828
|
-
* NEW Deletes a specified [conduit](https://dev.twitch.tv/docs/eventsub/handling-conduit-events/). Note that it may take some time for Eventsub subscriptions on a deleted [conduit](https://dev.twitch.tv/docs/eventsub/handling-conduit-events) to show as disabled when calling [Get Eventsub Subscriptions](https://dev.twitch.tv/docs/api/reference/#get-eventsub-subscriptions).
|
|
1874
|
+
* NEW Deletes a specified [conduit](https://dev.twitch.tv/docs/eventsub/handling-conduit-events/). Note that it may take some time for Eventsub subscriptions on a deleted [conduit](https://dev.twitch.tv/docs/eventsub/handling-conduit-events/) to show as disabled when calling [Get Eventsub Subscriptions](https://dev.twitch.tv/docs/api/reference/#get-eventsub-subscriptions).
|
|
1829
1875
|
*
|
|
1830
1876
|
* __Authorization:__
|
|
1831
1877
|
*
|
|
@@ -1856,14 +1902,14 @@ var TwitchApi = class {
|
|
|
1856
1902
|
*
|
|
1857
1903
|
* @see https://dev.twitch.tv/docs/api/reference#delete-conduit
|
|
1858
1904
|
*/
|
|
1859
|
-
deleteConduit:
|
|
1905
|
+
deleteConduit: (params, options = {}) => this.callApi({
|
|
1860
1906
|
path: "/eventsub/conduits",
|
|
1861
1907
|
method: "DELETE",
|
|
1862
1908
|
params,
|
|
1863
1909
|
options
|
|
1864
1910
|
}),
|
|
1865
1911
|
/**
|
|
1866
|
-
* NEW Gets a lists of all shards for a [conduit](https://dev.twitch.tv/docs/eventsub/handling-conduit-events).
|
|
1912
|
+
* NEW Gets a lists of all shards for a [conduit](https://dev.twitch.tv/docs/eventsub/handling-conduit-events/).
|
|
1867
1913
|
*
|
|
1868
1914
|
* __Authorization:__
|
|
1869
1915
|
*
|
|
@@ -1894,13 +1940,13 @@ var TwitchApi = class {
|
|
|
1894
1940
|
*
|
|
1895
1941
|
* @see https://dev.twitch.tv/docs/api/reference#get-conduit-shards
|
|
1896
1942
|
*/
|
|
1897
|
-
getConduitShards:
|
|
1943
|
+
getConduitShards: (params, options = {}) => this.callApi({
|
|
1898
1944
|
path: "/eventsub/conduits/shards",
|
|
1899
1945
|
params,
|
|
1900
1946
|
options
|
|
1901
1947
|
}),
|
|
1902
1948
|
/**
|
|
1903
|
-
* NEW Updates shard(s) for a [conduit](https://dev.twitch.tv/docs/eventsub/handling-conduit-events).
|
|
1949
|
+
* NEW Updates shard(s) for a [conduit](https://dev.twitch.tv/docs/eventsub/handling-conduit-events/).
|
|
1904
1950
|
*
|
|
1905
1951
|
* **NOTE:** Shard IDs are indexed starting at 0, so a conduit with a `shard_count` of 5 will have shards with IDs 0 through 4.
|
|
1906
1952
|
*
|
|
@@ -1933,7 +1979,7 @@ var TwitchApi = class {
|
|
|
1933
1979
|
*
|
|
1934
1980
|
* @see https://dev.twitch.tv/docs/api/reference#update-conduit-shards
|
|
1935
1981
|
*/
|
|
1936
|
-
updateConduitShards:
|
|
1982
|
+
updateConduitShards: (body, options = {}) => this.callApi({
|
|
1937
1983
|
path: "/eventsub/conduits/shards",
|
|
1938
1984
|
method: "PATCH",
|
|
1939
1985
|
body,
|
|
@@ -1966,7 +2012,7 @@ var TwitchApi = class {
|
|
|
1966
2012
|
*
|
|
1967
2013
|
* @see https://dev.twitch.tv/docs/api/reference#get-content-classification-labels
|
|
1968
2014
|
*/
|
|
1969
|
-
getContentClassificationLabels:
|
|
2015
|
+
getContentClassificationLabels: (params = null, options = {}) => this.callApi({
|
|
1970
2016
|
path: "/content_classification_labels",
|
|
1971
2017
|
params,
|
|
1972
2018
|
options
|
|
@@ -2028,7 +2074,7 @@ var TwitchApi = class {
|
|
|
2028
2074
|
*
|
|
2029
2075
|
* @see https://dev.twitch.tv/docs/api/reference#get-drops-entitlements
|
|
2030
2076
|
*/
|
|
2031
|
-
getDropsEntitlements:
|
|
2077
|
+
getDropsEntitlements: (params = null, options = {}) => this.callApi({
|
|
2032
2078
|
path: "/entitlements/drops",
|
|
2033
2079
|
params,
|
|
2034
2080
|
options
|
|
@@ -2074,7 +2120,7 @@ var TwitchApi = class {
|
|
|
2074
2120
|
*
|
|
2075
2121
|
* @see https://dev.twitch.tv/docs/api/reference#update-drops-entitlements
|
|
2076
2122
|
*/
|
|
2077
|
-
updateDropsEntitlements:
|
|
2123
|
+
updateDropsEntitlements: (body = null, options = {}) => this.callApi({
|
|
2078
2124
|
path: "/entitlements/drops",
|
|
2079
2125
|
method: "PATCH",
|
|
2080
2126
|
body,
|
|
@@ -2119,7 +2165,7 @@ var TwitchApi = class {
|
|
|
2119
2165
|
*
|
|
2120
2166
|
* @see https://dev.twitch.tv/docs/api/reference#get-extension-configuration-segment
|
|
2121
2167
|
*/
|
|
2122
|
-
getExtensionConfigurationSegment:
|
|
2168
|
+
getExtensionConfigurationSegment: (params, options = {}) => this.callApi({
|
|
2123
2169
|
path: "/extensions/configurations",
|
|
2124
2170
|
params,
|
|
2125
2171
|
options
|
|
@@ -2155,7 +2201,7 @@ var TwitchApi = class {
|
|
|
2155
2201
|
*
|
|
2156
2202
|
* @see https://dev.twitch.tv/docs/api/reference#set-extension-configuration-segment
|
|
2157
2203
|
*/
|
|
2158
|
-
setExtensionConfigurationSegment:
|
|
2204
|
+
setExtensionConfigurationSegment: (body, options = {}) => this.callApi({
|
|
2159
2205
|
path: "/extensions/configurations",
|
|
2160
2206
|
method: "PUT",
|
|
2161
2207
|
body,
|
|
@@ -2193,7 +2239,7 @@ var TwitchApi = class {
|
|
|
2193
2239
|
*
|
|
2194
2240
|
* @see https://dev.twitch.tv/docs/api/reference#set-extension-required-configuration
|
|
2195
2241
|
*/
|
|
2196
|
-
setExtensionRequiredConfiguration:
|
|
2242
|
+
setExtensionRequiredConfiguration: (params, body, options = {}) => this.callApi({
|
|
2197
2243
|
path: "/extensions/required_configuration",
|
|
2198
2244
|
method: "PUT",
|
|
2199
2245
|
params,
|
|
@@ -2269,7 +2315,7 @@ var TwitchApi = class {
|
|
|
2269
2315
|
*
|
|
2270
2316
|
* @see https://dev.twitch.tv/docs/api/reference#send-extension-pubsub-message
|
|
2271
2317
|
*/
|
|
2272
|
-
sendExtensionPubSubMessage:
|
|
2318
|
+
sendExtensionPubSubMessage: (body, options = {}) => this.callApi({
|
|
2273
2319
|
path: "/extensions/pubsub",
|
|
2274
2320
|
method: "POST",
|
|
2275
2321
|
body,
|
|
@@ -2311,7 +2357,7 @@ var TwitchApi = class {
|
|
|
2311
2357
|
*
|
|
2312
2358
|
* @see https://dev.twitch.tv/docs/api/reference#get-extension-live-channels
|
|
2313
2359
|
*/
|
|
2314
|
-
getExtensionLiveChannels:
|
|
2360
|
+
getExtensionLiveChannels: (params, options = {}) => this.callApi({
|
|
2315
2361
|
path: "/extensions/live",
|
|
2316
2362
|
params,
|
|
2317
2363
|
options
|
|
@@ -2345,7 +2391,7 @@ var TwitchApi = class {
|
|
|
2345
2391
|
*
|
|
2346
2392
|
* @see https://dev.twitch.tv/docs/api/reference#get-extension-secrets
|
|
2347
2393
|
*/
|
|
2348
|
-
getExtensionSecrets:
|
|
2394
|
+
getExtensionSecrets: (options = {}) => this.callApi({
|
|
2349
2395
|
path: "/extensions/jwt/secrets",
|
|
2350
2396
|
options
|
|
2351
2397
|
}),
|
|
@@ -2379,7 +2425,7 @@ var TwitchApi = class {
|
|
|
2379
2425
|
*
|
|
2380
2426
|
* @see https://dev.twitch.tv/docs/api/reference#create-extension-secret
|
|
2381
2427
|
*/
|
|
2382
|
-
createExtensionSecret:
|
|
2428
|
+
createExtensionSecret: (params, options = {}) => this.callApi({
|
|
2383
2429
|
path: "/extensions/jwt/secrets",
|
|
2384
2430
|
method: "POST",
|
|
2385
2431
|
params,
|
|
@@ -2421,7 +2467,7 @@ var TwitchApi = class {
|
|
|
2421
2467
|
*
|
|
2422
2468
|
* @see https://dev.twitch.tv/docs/api/reference#send-extension-chat-message
|
|
2423
2469
|
*/
|
|
2424
|
-
sendExtensionChatMessage:
|
|
2470
|
+
sendExtensionChatMessage: (params, body, options = {}) => this.callApi({
|
|
2425
2471
|
path: "/extensions/chat",
|
|
2426
2472
|
method: "POST",
|
|
2427
2473
|
params,
|
|
@@ -2462,7 +2508,7 @@ var TwitchApi = class {
|
|
|
2462
2508
|
*
|
|
2463
2509
|
* @see https://dev.twitch.tv/docs/api/reference#get-extensions
|
|
2464
2510
|
*/
|
|
2465
|
-
getExtensions:
|
|
2511
|
+
getExtensions: (params, options = {}) => this.callApi({
|
|
2466
2512
|
path: "/extensions",
|
|
2467
2513
|
params,
|
|
2468
2514
|
options
|
|
@@ -2500,7 +2546,7 @@ var TwitchApi = class {
|
|
|
2500
2546
|
*
|
|
2501
2547
|
* @see https://dev.twitch.tv/docs/api/reference#get-released-extensions
|
|
2502
2548
|
*/
|
|
2503
|
-
getReleasedExtensions:
|
|
2549
|
+
getReleasedExtensions: (params, options = {}) => this.callApi({
|
|
2504
2550
|
path: "/extensions/released",
|
|
2505
2551
|
params,
|
|
2506
2552
|
options
|
|
@@ -2534,7 +2580,7 @@ var TwitchApi = class {
|
|
|
2534
2580
|
*
|
|
2535
2581
|
* @see https://dev.twitch.tv/docs/api/reference#get-extension-bits-products
|
|
2536
2582
|
*/
|
|
2537
|
-
getExtensionBitsProducts:
|
|
2583
|
+
getExtensionBitsProducts: (params = null, options = {}) => this.callApi({
|
|
2538
2584
|
path: "/bits/extensions",
|
|
2539
2585
|
params,
|
|
2540
2586
|
options
|
|
@@ -2575,7 +2621,7 @@ var TwitchApi = class {
|
|
|
2575
2621
|
*
|
|
2576
2622
|
* @see https://dev.twitch.tv/docs/api/reference#update-extension-bits-product
|
|
2577
2623
|
*/
|
|
2578
|
-
updateExtensionBitsProduct:
|
|
2624
|
+
updateExtensionBitsProduct: (body, options = {}) => this.callApi({
|
|
2579
2625
|
path: "/bits/extensions",
|
|
2580
2626
|
method: "PUT",
|
|
2581
2627
|
body,
|
|
@@ -2592,7 +2638,7 @@ var TwitchApi = class {
|
|
|
2592
2638
|
*
|
|
2593
2639
|
* If you use [WebSockets to receive events](https://dev.twitch.tv/docs/eventsub/handling-websocket-events), the request must specify a user access token. The request will fail if you use an app access token. If the subscription type requires user authorization, the token must include the required scope. However, if the subscription type doesn’t include user authorization, the token may include any scopes or no scopes.
|
|
2594
2640
|
*
|
|
2595
|
-
* If you use [Conduits](https://dev.twitch.tv/docs/eventsub/handling-conduit-events) to receive events, the request must specify an app access token. The request will fail if you use a user access token.
|
|
2641
|
+
* If you use [Conduits](https://dev.twitch.tv/docs/eventsub/handling-conduit-events/) to receive events, the request must specify an app access token. The request will fail if you use a user access token.
|
|
2596
2642
|
*
|
|
2597
2643
|
* __URL:__
|
|
2598
2644
|
*
|
|
@@ -2639,7 +2685,7 @@ var TwitchApi = class {
|
|
|
2639
2685
|
*
|
|
2640
2686
|
* @see https://dev.twitch.tv/docs/api/reference#create-eventsub-subscription
|
|
2641
2687
|
*/
|
|
2642
|
-
createEventSubSubscription:
|
|
2688
|
+
createEventSubSubscription: (body, options = {}) => this.callApi({
|
|
2643
2689
|
path: "/eventsub/subscriptions",
|
|
2644
2690
|
method: "POST",
|
|
2645
2691
|
body,
|
|
@@ -2680,7 +2726,7 @@ var TwitchApi = class {
|
|
|
2680
2726
|
*
|
|
2681
2727
|
* @see https://dev.twitch.tv/docs/api/reference#delete-eventsub-subscription
|
|
2682
2728
|
*/
|
|
2683
|
-
deleteEventSubSubscription:
|
|
2729
|
+
deleteEventSubSubscription: (params, options = {}) => this.callApi({
|
|
2684
2730
|
path: "/eventsub/subscriptions",
|
|
2685
2731
|
method: "DELETE",
|
|
2686
2732
|
params,
|
|
@@ -2691,7 +2737,7 @@ var TwitchApi = class {
|
|
|
2691
2737
|
*
|
|
2692
2738
|
* __Authorization:__
|
|
2693
2739
|
*
|
|
2694
|
-
* If you use [Webhooks](https://dev.twitch.tv/docs/eventsub/handling-webhook-events) or [Conduits](https://dev.twitch.tv/docs/eventsub/handling-conduit-events) to receive events, the request must specify an app access token. The request will fail if you use a user access token.
|
|
2740
|
+
* If you use [Webhooks](https://dev.twitch.tv/docs/eventsub/handling-webhook-events) or [Conduits](https://dev.twitch.tv/docs/eventsub/handling-conduit-events/) to receive events, the request must specify an app access token. The request will fail if you use a user access token.
|
|
2695
2741
|
*
|
|
2696
2742
|
* If you use [WebSockets to receive events](https://dev.twitch.tv/docs/eventsub/handling-websocket-events), the request must specify a user access token. The request will fail if you use an app access token. The token may include any scopes.
|
|
2697
2743
|
*
|
|
@@ -2724,7 +2770,7 @@ var TwitchApi = class {
|
|
|
2724
2770
|
*
|
|
2725
2771
|
* @see https://dev.twitch.tv/docs/api/reference#get-eventsub-subscriptions
|
|
2726
2772
|
*/
|
|
2727
|
-
getEventSubSubscriptions:
|
|
2773
|
+
getEventSubSubscriptions: (params = null, options = {}) => this.callApi({
|
|
2728
2774
|
path: "/eventsub/subscriptions",
|
|
2729
2775
|
params,
|
|
2730
2776
|
options
|
|
@@ -2761,7 +2807,7 @@ var TwitchApi = class {
|
|
|
2761
2807
|
*
|
|
2762
2808
|
* @see https://dev.twitch.tv/docs/api/reference#get-top-games
|
|
2763
2809
|
*/
|
|
2764
|
-
getTopGames:
|
|
2810
|
+
getTopGames: (params = null, options = {}) => this.callApi({
|
|
2765
2811
|
path: "/games/top",
|
|
2766
2812
|
params,
|
|
2767
2813
|
options
|
|
@@ -2798,7 +2844,7 @@ var TwitchApi = class {
|
|
|
2798
2844
|
*
|
|
2799
2845
|
* @see https://dev.twitch.tv/docs/api/reference#get-games
|
|
2800
2846
|
*/
|
|
2801
|
-
getGames:
|
|
2847
|
+
getGames: (params = null, options = {}) => this.callApi({
|
|
2802
2848
|
path: "/games",
|
|
2803
2849
|
params,
|
|
2804
2850
|
options
|
|
@@ -2838,7 +2884,7 @@ var TwitchApi = class {
|
|
|
2838
2884
|
*
|
|
2839
2885
|
* @see https://dev.twitch.tv/docs/api/reference#get-creator-goals
|
|
2840
2886
|
*/
|
|
2841
|
-
getCreatorGoals:
|
|
2887
|
+
getCreatorGoals: (params, options = {}) => this.callApi({
|
|
2842
2888
|
path: "/goals",
|
|
2843
2889
|
params,
|
|
2844
2890
|
options
|
|
@@ -2872,7 +2918,7 @@ var TwitchApi = class {
|
|
|
2872
2918
|
*
|
|
2873
2919
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-guest-star-settings
|
|
2874
2920
|
*/
|
|
2875
|
-
getChannelGuestStarSettings:
|
|
2921
|
+
getChannelGuestStarSettings: (params, options = {}) => this.callApi({
|
|
2876
2922
|
path: "/guest_star/channel_settings",
|
|
2877
2923
|
params,
|
|
2878
2924
|
options
|
|
@@ -2903,7 +2949,7 @@ var TwitchApi = class {
|
|
|
2903
2949
|
*
|
|
2904
2950
|
* @see https://dev.twitch.tv/docs/api/reference#update-channel-guest-star-settings
|
|
2905
2951
|
*/
|
|
2906
|
-
updateChannelGuestStarSettings:
|
|
2952
|
+
updateChannelGuestStarSettings: (params, body = null, options = {}) => this.callApi({
|
|
2907
2953
|
path: "/guest_star/channel_settings",
|
|
2908
2954
|
method: "PUT",
|
|
2909
2955
|
params,
|
|
@@ -2937,7 +2983,7 @@ var TwitchApi = class {
|
|
|
2937
2983
|
*
|
|
2938
2984
|
* @see https://dev.twitch.tv/docs/api/reference#get-guest-star-session
|
|
2939
2985
|
*/
|
|
2940
|
-
getGuestStarSession:
|
|
2986
|
+
getGuestStarSession: (params, options = {}) => this.callApi({
|
|
2941
2987
|
path: "/guest_star/session",
|
|
2942
2988
|
params,
|
|
2943
2989
|
options
|
|
@@ -2973,7 +3019,7 @@ var TwitchApi = class {
|
|
|
2973
3019
|
*
|
|
2974
3020
|
* @see https://dev.twitch.tv/docs/api/reference#create-guest-star-session
|
|
2975
3021
|
*/
|
|
2976
|
-
createGuestStarSession:
|
|
3022
|
+
createGuestStarSession: (params, options = {}) => this.callApi({
|
|
2977
3023
|
path: "/guest_star/session",
|
|
2978
3024
|
method: "POST",
|
|
2979
3025
|
params,
|
|
@@ -3007,7 +3053,7 @@ var TwitchApi = class {
|
|
|
3007
3053
|
*
|
|
3008
3054
|
* @see https://dev.twitch.tv/docs/api/reference#end-guest-star-session
|
|
3009
3055
|
*/
|
|
3010
|
-
endGuestStarSession:
|
|
3056
|
+
endGuestStarSession: (params, options = {}) => this.callApi({
|
|
3011
3057
|
path: "/guest_star/session",
|
|
3012
3058
|
method: "DELETE",
|
|
3013
3059
|
params,
|
|
@@ -3036,7 +3082,7 @@ var TwitchApi = class {
|
|
|
3036
3082
|
*
|
|
3037
3083
|
* @see https://dev.twitch.tv/docs/api/reference#get-guest-star-invites
|
|
3038
3084
|
*/
|
|
3039
|
-
getGuestStarInvites:
|
|
3085
|
+
getGuestStarInvites: (params, options = {}) => this.callApi({
|
|
3040
3086
|
path: "/guest_star/invites",
|
|
3041
3087
|
params,
|
|
3042
3088
|
options
|
|
@@ -3072,7 +3118,7 @@ var TwitchApi = class {
|
|
|
3072
3118
|
*
|
|
3073
3119
|
* @see https://dev.twitch.tv/docs/api/reference#send-guest-star-invite
|
|
3074
3120
|
*/
|
|
3075
|
-
sendGuestStarInvite:
|
|
3121
|
+
sendGuestStarInvite: (params, options = {}) => this.callApi({
|
|
3076
3122
|
path: "/guest_star/invites",
|
|
3077
3123
|
method: "POST",
|
|
3078
3124
|
params,
|
|
@@ -3107,7 +3153,7 @@ var TwitchApi = class {
|
|
|
3107
3153
|
*
|
|
3108
3154
|
* @see https://dev.twitch.tv/docs/api/reference#delete-guest-star-invite
|
|
3109
3155
|
*/
|
|
3110
|
-
deleteGuestStarInvite:
|
|
3156
|
+
deleteGuestStarInvite: (params, options = {}) => this.callApi({
|
|
3111
3157
|
path: "/guest_star/invites",
|
|
3112
3158
|
method: "DELETE",
|
|
3113
3159
|
params,
|
|
@@ -3152,7 +3198,7 @@ var TwitchApi = class {
|
|
|
3152
3198
|
*
|
|
3153
3199
|
* @see https://dev.twitch.tv/docs/api/reference#assign-guest-star-slot
|
|
3154
3200
|
*/
|
|
3155
|
-
assignGuestStarSlot:
|
|
3201
|
+
assignGuestStarSlot: (params, options = {}) => this.callApi({
|
|
3156
3202
|
path: "/guest_star/slot",
|
|
3157
3203
|
method: "POST",
|
|
3158
3204
|
params,
|
|
@@ -3184,7 +3230,7 @@ var TwitchApi = class {
|
|
|
3184
3230
|
*
|
|
3185
3231
|
* @see https://dev.twitch.tv/docs/api/reference#update-guest-star-slot
|
|
3186
3232
|
*/
|
|
3187
|
-
updateGuestStarSlot:
|
|
3233
|
+
updateGuestStarSlot: (params, options = {}) => this.callApi({
|
|
3188
3234
|
path: "/guest_star/slot",
|
|
3189
3235
|
method: "PATCH",
|
|
3190
3236
|
params,
|
|
@@ -3226,7 +3272,7 @@ var TwitchApi = class {
|
|
|
3226
3272
|
*
|
|
3227
3273
|
* @see https://dev.twitch.tv/docs/api/reference#delete-guest-star-slot
|
|
3228
3274
|
*/
|
|
3229
|
-
deleteGuestStarSlot:
|
|
3275
|
+
deleteGuestStarSlot: (params, options = {}) => this.callApi({
|
|
3230
3276
|
path: "/guest_star/slot",
|
|
3231
3277
|
method: "DELETE",
|
|
3232
3278
|
params,
|
|
@@ -3264,7 +3310,7 @@ var TwitchApi = class {
|
|
|
3264
3310
|
*
|
|
3265
3311
|
* @see https://dev.twitch.tv/docs/api/reference#update-guest-star-slot-settings
|
|
3266
3312
|
*/
|
|
3267
|
-
updateGuestStarSlotSettings:
|
|
3313
|
+
updateGuestStarSlotSettings: (params, options = {}) => this.callApi({
|
|
3268
3314
|
path: "/guest_star/slot_settings",
|
|
3269
3315
|
method: "PATCH",
|
|
3270
3316
|
params,
|
|
@@ -3301,7 +3347,7 @@ var TwitchApi = class {
|
|
|
3301
3347
|
*
|
|
3302
3348
|
* @see https://dev.twitch.tv/docs/api/reference#get-hype-train-events
|
|
3303
3349
|
*/
|
|
3304
|
-
getHypeTrainEvents:
|
|
3350
|
+
getHypeTrainEvents: (params, options = {}) => this.callApi({
|
|
3305
3351
|
path: "/hypetrain/events",
|
|
3306
3352
|
params,
|
|
3307
3353
|
options
|
|
@@ -3362,7 +3408,7 @@ var TwitchApi = class {
|
|
|
3362
3408
|
*
|
|
3363
3409
|
* @see https://dev.twitch.tv/docs/api/reference#check-automod-status
|
|
3364
3410
|
*/
|
|
3365
|
-
checkAutoModStatus:
|
|
3411
|
+
checkAutoModStatus: (params, body, options = {}) => this.callApi({
|
|
3366
3412
|
path: "/moderation/enforcements/status",
|
|
3367
3413
|
method: "POST",
|
|
3368
3414
|
params,
|
|
@@ -3413,7 +3459,7 @@ var TwitchApi = class {
|
|
|
3413
3459
|
*
|
|
3414
3460
|
* @see https://dev.twitch.tv/docs/api/reference#manage-held-automod-messages
|
|
3415
3461
|
*/
|
|
3416
|
-
manageHeldAutoModMessages:
|
|
3462
|
+
manageHeldAutoModMessages: (body, options = {}) => this.callApi({
|
|
3417
3463
|
path: "/moderation/automod/message",
|
|
3418
3464
|
method: "POST",
|
|
3419
3465
|
body,
|
|
@@ -3455,7 +3501,7 @@ var TwitchApi = class {
|
|
|
3455
3501
|
*
|
|
3456
3502
|
* @see https://dev.twitch.tv/docs/api/reference#get-automod-settings
|
|
3457
3503
|
*/
|
|
3458
|
-
getAutoModSettings:
|
|
3504
|
+
getAutoModSettings: (params, options = {}) => this.callApi({
|
|
3459
3505
|
path: "/moderation/automod/settings",
|
|
3460
3506
|
params,
|
|
3461
3507
|
options
|
|
@@ -3512,7 +3558,7 @@ var TwitchApi = class {
|
|
|
3512
3558
|
*
|
|
3513
3559
|
* @see https://dev.twitch.tv/docs/api/reference#update-automod-settings
|
|
3514
3560
|
*/
|
|
3515
|
-
updateAutoModSettings:
|
|
3561
|
+
updateAutoModSettings: (params, body = null, options = {}) => this.callApi({
|
|
3516
3562
|
path: "/moderation/automod/settings",
|
|
3517
3563
|
method: "PUT",
|
|
3518
3564
|
params,
|
|
@@ -3550,7 +3596,7 @@ var TwitchApi = class {
|
|
|
3550
3596
|
*
|
|
3551
3597
|
* @see https://dev.twitch.tv/docs/api/reference#get-banned-users
|
|
3552
3598
|
*/
|
|
3553
|
-
getBannedUsers:
|
|
3599
|
+
getBannedUsers: (params, options = {}) => this.callApi({
|
|
3554
3600
|
path: "/moderation/banned",
|
|
3555
3601
|
params,
|
|
3556
3602
|
options
|
|
@@ -3611,7 +3657,7 @@ var TwitchApi = class {
|
|
|
3611
3657
|
*
|
|
3612
3658
|
* @see https://dev.twitch.tv/docs/api/reference#ban-user
|
|
3613
3659
|
*/
|
|
3614
|
-
banUser:
|
|
3660
|
+
banUser: (params, body, options = {}) => this.callApi({
|
|
3615
3661
|
path: "/moderation/bans",
|
|
3616
3662
|
method: "POST",
|
|
3617
3663
|
params,
|
|
@@ -3666,14 +3712,14 @@ var TwitchApi = class {
|
|
|
3666
3712
|
*
|
|
3667
3713
|
* @see https://dev.twitch.tv/docs/api/reference#unban-user
|
|
3668
3714
|
*/
|
|
3669
|
-
unbanUser:
|
|
3715
|
+
unbanUser: (params, options = {}) => this.callApi({
|
|
3670
3716
|
path: "/moderation/bans",
|
|
3671
3717
|
method: "DELETE",
|
|
3672
3718
|
params,
|
|
3673
3719
|
options
|
|
3674
3720
|
}),
|
|
3675
3721
|
/**
|
|
3676
|
-
*
|
|
3722
|
+
* NEW Gets a list of unban requests for a broadcaster’s channel.
|
|
3677
3723
|
*
|
|
3678
3724
|
* __Authorization:__
|
|
3679
3725
|
*
|
|
@@ -3708,18 +3754,18 @@ var TwitchApi = class {
|
|
|
3708
3754
|
*
|
|
3709
3755
|
* @see https://dev.twitch.tv/docs/api/reference#get-unban-requests
|
|
3710
3756
|
*/
|
|
3711
|
-
getUnbanRequests:
|
|
3757
|
+
getUnbanRequests: (params, options = {}) => this.callApi({
|
|
3712
3758
|
path: "/moderation/unban_requests",
|
|
3713
3759
|
params,
|
|
3714
3760
|
options
|
|
3715
3761
|
}),
|
|
3716
3762
|
/**
|
|
3717
|
-
*
|
|
3763
|
+
* NEW Resolves an unban request by approving or denying it.
|
|
3718
3764
|
*
|
|
3719
3765
|
* __Authorization:__
|
|
3720
3766
|
*
|
|
3721
3767
|
* * Requires a user access token that includes the **moderator:manage:unban\_requests** scope.
|
|
3722
|
-
* * Query parameter `moderator_id` must match the `user_id` in the
|
|
3768
|
+
* * Query parameter `moderator_id` must match the `user_id` in the[user access token](https://dev.twitch.tv/docs/authentication/#user-access-tokens).
|
|
3723
3769
|
*
|
|
3724
3770
|
* __URL:__
|
|
3725
3771
|
*
|
|
@@ -3755,7 +3801,7 @@ var TwitchApi = class {
|
|
|
3755
3801
|
*
|
|
3756
3802
|
* @see https://dev.twitch.tv/docs/api/reference#resolve-unban-requests
|
|
3757
3803
|
*/
|
|
3758
|
-
resolveUnbanRequests:
|
|
3804
|
+
resolveUnbanRequests: (params, options = {}) => this.callApi({
|
|
3759
3805
|
path: "/moderation/unban_requests",
|
|
3760
3806
|
method: "PATCH",
|
|
3761
3807
|
params,
|
|
@@ -3797,7 +3843,7 @@ var TwitchApi = class {
|
|
|
3797
3843
|
*
|
|
3798
3844
|
* @see https://dev.twitch.tv/docs/api/reference#get-blocked-terms
|
|
3799
3845
|
*/
|
|
3800
|
-
getBlockedTerms:
|
|
3846
|
+
getBlockedTerms: (params, options = {}) => this.callApi({
|
|
3801
3847
|
path: "/moderation/blocked_terms",
|
|
3802
3848
|
params,
|
|
3803
3849
|
options
|
|
@@ -3840,7 +3886,7 @@ var TwitchApi = class {
|
|
|
3840
3886
|
*
|
|
3841
3887
|
* @see https://dev.twitch.tv/docs/api/reference#add-blocked-term
|
|
3842
3888
|
*/
|
|
3843
|
-
addBlockedTerm:
|
|
3889
|
+
addBlockedTerm: (params, body, options = {}) => this.callApi({
|
|
3844
3890
|
path: "/moderation/blocked_terms",
|
|
3845
3891
|
method: "POST",
|
|
3846
3892
|
params,
|
|
@@ -3884,7 +3930,7 @@ var TwitchApi = class {
|
|
|
3884
3930
|
*
|
|
3885
3931
|
* @see https://dev.twitch.tv/docs/api/reference#remove-blocked-term
|
|
3886
3932
|
*/
|
|
3887
|
-
removeBlockedTerm:
|
|
3933
|
+
removeBlockedTerm: (params, options = {}) => this.callApi({
|
|
3888
3934
|
path: "/moderation/blocked_terms",
|
|
3889
3935
|
method: "DELETE",
|
|
3890
3936
|
params,
|
|
@@ -3930,7 +3976,7 @@ var TwitchApi = class {
|
|
|
3930
3976
|
*
|
|
3931
3977
|
* @see https://dev.twitch.tv/docs/api/reference#delete-chat-messages
|
|
3932
3978
|
*/
|
|
3933
|
-
deleteChatMessages:
|
|
3979
|
+
deleteChatMessages: (params, options = {}) => this.callApi({
|
|
3934
3980
|
path: "/moderation/chat",
|
|
3935
3981
|
method: "DELETE",
|
|
3936
3982
|
params,
|
|
@@ -3962,7 +4008,7 @@ var TwitchApi = class {
|
|
|
3962
4008
|
*
|
|
3963
4009
|
* @see https://dev.twitch.tv/docs/api/reference#get-moderated-channels
|
|
3964
4010
|
*/
|
|
3965
|
-
getModeratedChannels:
|
|
4011
|
+
getModeratedChannels: (params, options = {}) => this.callApi({
|
|
3966
4012
|
path: "/moderation/channels",
|
|
3967
4013
|
params,
|
|
3968
4014
|
options
|
|
@@ -3998,7 +4044,7 @@ var TwitchApi = class {
|
|
|
3998
4044
|
*
|
|
3999
4045
|
* @see https://dev.twitch.tv/docs/api/reference#get-moderators
|
|
4000
4046
|
*/
|
|
4001
|
-
getModerators:
|
|
4047
|
+
getModerators: (params, options = {}) => this.callApi({
|
|
4002
4048
|
path: "/moderation/moderators",
|
|
4003
4049
|
params,
|
|
4004
4050
|
options
|
|
@@ -4047,7 +4093,7 @@ var TwitchApi = class {
|
|
|
4047
4093
|
*
|
|
4048
4094
|
* @see https://dev.twitch.tv/docs/api/reference#add-channel-moderator
|
|
4049
4095
|
*/
|
|
4050
|
-
addChannelModerator:
|
|
4096
|
+
addChannelModerator: (params, options = {}) => this.callApi({
|
|
4051
4097
|
path: "/moderation/moderators",
|
|
4052
4098
|
method: "POST",
|
|
4053
4099
|
params,
|
|
@@ -4092,7 +4138,7 @@ var TwitchApi = class {
|
|
|
4092
4138
|
*
|
|
4093
4139
|
* @see https://dev.twitch.tv/docs/api/reference#remove-channel-moderator
|
|
4094
4140
|
*/
|
|
4095
|
-
removeChannelModerator:
|
|
4141
|
+
removeChannelModerator: (params, options = {}) => this.callApi({
|
|
4096
4142
|
path: "/moderation/moderators",
|
|
4097
4143
|
method: "DELETE",
|
|
4098
4144
|
params,
|
|
@@ -4131,7 +4177,7 @@ var TwitchApi = class {
|
|
|
4131
4177
|
*
|
|
4132
4178
|
* @see https://dev.twitch.tv/docs/api/reference#get-vips
|
|
4133
4179
|
*/
|
|
4134
|
-
getVIPs:
|
|
4180
|
+
getVIPs: (params, options = {}) => this.callApi({
|
|
4135
4181
|
path: "/channels/vips",
|
|
4136
4182
|
params,
|
|
4137
4183
|
options
|
|
@@ -4197,7 +4243,7 @@ var TwitchApi = class {
|
|
|
4197
4243
|
*
|
|
4198
4244
|
* @see https://dev.twitch.tv/docs/api/reference#add-channel-vip
|
|
4199
4245
|
*/
|
|
4200
|
-
addChannelVIP:
|
|
4246
|
+
addChannelVIP: (params, options = {}) => this.callApi({
|
|
4201
4247
|
path: "/channels/vips",
|
|
4202
4248
|
method: "POST",
|
|
4203
4249
|
params,
|
|
@@ -4256,7 +4302,7 @@ var TwitchApi = class {
|
|
|
4256
4302
|
*
|
|
4257
4303
|
* @see https://dev.twitch.tv/docs/api/reference#remove-channel-vip
|
|
4258
4304
|
*/
|
|
4259
|
-
removeChannelVIP:
|
|
4305
|
+
removeChannelVIP: (params, options = {}) => this.callApi({
|
|
4260
4306
|
path: "/channels/vips",
|
|
4261
4307
|
method: "DELETE",
|
|
4262
4308
|
params,
|
|
@@ -4302,7 +4348,7 @@ var TwitchApi = class {
|
|
|
4302
4348
|
*
|
|
4303
4349
|
* @see https://dev.twitch.tv/docs/api/reference#update-shield-mode-status
|
|
4304
4350
|
*/
|
|
4305
|
-
updateShieldModeStatus:
|
|
4351
|
+
updateShieldModeStatus: (params, body, options = {}) => this.callApi({
|
|
4306
4352
|
path: "/moderation/shield_mode",
|
|
4307
4353
|
method: "PUT",
|
|
4308
4354
|
params,
|
|
@@ -4347,10 +4393,69 @@ var TwitchApi = class {
|
|
|
4347
4393
|
*
|
|
4348
4394
|
* @see https://dev.twitch.tv/docs/api/reference#get-shield-mode-status
|
|
4349
4395
|
*/
|
|
4350
|
-
getShieldModeStatus:
|
|
4396
|
+
getShieldModeStatus: (params, options = {}) => this.callApi({
|
|
4351
4397
|
path: "/moderation/shield_mode",
|
|
4352
4398
|
params,
|
|
4353
4399
|
options
|
|
4400
|
+
}),
|
|
4401
|
+
/**
|
|
4402
|
+
* NEW Warns a user in the specified broadcaster’s chat room, preventing them from chat interaction until the warning is acknowledged. New warnings can be issued to a user when they already have a warning in the channel (new warning will replace old warning).
|
|
4403
|
+
*
|
|
4404
|
+
* __Authorization:__
|
|
4405
|
+
*
|
|
4406
|
+
* Requires a user access token that includes the **moderator:manage:warnings** scope. Query parameter `moderator_id` must match the `user_id` in the [user access token](https://dev.twitch.tv/docs/authentication/#user-access-tokens).
|
|
4407
|
+
*
|
|
4408
|
+
* __URL:__
|
|
4409
|
+
*
|
|
4410
|
+
* `POST https://api.twitch.tv/helix/moderation/warnings`
|
|
4411
|
+
*
|
|
4412
|
+
* __Response Codes:__
|
|
4413
|
+
*
|
|
4414
|
+
* _200 OK_
|
|
4415
|
+
*
|
|
4416
|
+
* Successfully warn a user.
|
|
4417
|
+
*
|
|
4418
|
+
* _400 Bad Request_
|
|
4419
|
+
*
|
|
4420
|
+
* * The _broadcaster\_id_ query parameter is required.
|
|
4421
|
+
* * The _moderator\_id_ query parameter is required.
|
|
4422
|
+
* * The _user\_id_ query parameter is required.
|
|
4423
|
+
* * The _reason_ query parameter is required.
|
|
4424
|
+
* * The text in the _reason_ field is too long.
|
|
4425
|
+
* * The user specified in the _user\_id_ may not be warned.
|
|
4426
|
+
*
|
|
4427
|
+
* _401 Unauthorized_
|
|
4428
|
+
*
|
|
4429
|
+
* * The ID in _moderator\_id_ must match the user ID in the user access token.
|
|
4430
|
+
* * The Authorization header is required and must contain a user access token.
|
|
4431
|
+
* * The user access token must include the **moderator:manage:warnings** scope.
|
|
4432
|
+
* * The access token is not valid.
|
|
4433
|
+
* * The client ID specified in the Client-Id header does not match the client ID specified in the access token.
|
|
4434
|
+
*
|
|
4435
|
+
* _403 Forbidden_
|
|
4436
|
+
*
|
|
4437
|
+
* The user in _moderator\_id_ is not one of the broadcaster’s moderators.
|
|
4438
|
+
*
|
|
4439
|
+
* _409 Conflict_
|
|
4440
|
+
*
|
|
4441
|
+
* You may not update the user’s warning state while someone else is updating the state. For example, someone else is currently warning the user or the user is acknowledging an existing warning. Please retry your request.
|
|
4442
|
+
*
|
|
4443
|
+
* _429 Too Many Requests_
|
|
4444
|
+
*
|
|
4445
|
+
* The app has exceeded the number of requests it may make per minute for this broadcaster.
|
|
4446
|
+
*
|
|
4447
|
+
* _500 Internal Server Error_
|
|
4448
|
+
*
|
|
4449
|
+
* Internal Server Error.
|
|
4450
|
+
*
|
|
4451
|
+
* @see https://dev.twitch.tv/docs/api/reference#warn-chat-user
|
|
4452
|
+
*/
|
|
4453
|
+
warnChatUser: (params, body, options = {}) => this.callApi({
|
|
4454
|
+
path: "/moderation/warnings",
|
|
4455
|
+
method: "POST",
|
|
4456
|
+
params,
|
|
4457
|
+
body,
|
|
4458
|
+
options
|
|
4354
4459
|
})
|
|
4355
4460
|
};
|
|
4356
4461
|
polls = {
|
|
@@ -4391,7 +4496,7 @@ var TwitchApi = class {
|
|
|
4391
4496
|
*
|
|
4392
4497
|
* @see https://dev.twitch.tv/docs/api/reference#get-polls
|
|
4393
4498
|
*/
|
|
4394
|
-
getPolls:
|
|
4499
|
+
getPolls: (params, options = {}) => this.callApi({
|
|
4395
4500
|
path: "/polls",
|
|
4396
4501
|
params,
|
|
4397
4502
|
options
|
|
@@ -4440,7 +4545,7 @@ var TwitchApi = class {
|
|
|
4440
4545
|
*
|
|
4441
4546
|
* @see https://dev.twitch.tv/docs/api/reference#create-poll
|
|
4442
4547
|
*/
|
|
4443
|
-
createPoll:
|
|
4548
|
+
createPoll: (body, options = {}) => this.callApi({
|
|
4444
4549
|
path: "/polls",
|
|
4445
4550
|
method: "POST",
|
|
4446
4551
|
body,
|
|
@@ -4481,7 +4586,7 @@ var TwitchApi = class {
|
|
|
4481
4586
|
*
|
|
4482
4587
|
* @see https://dev.twitch.tv/docs/api/reference#end-poll
|
|
4483
4588
|
*/
|
|
4484
|
-
endPoll:
|
|
4589
|
+
endPoll: (body, options = {}) => this.callApi({
|
|
4485
4590
|
path: "/polls",
|
|
4486
4591
|
method: "PATCH",
|
|
4487
4592
|
body,
|
|
@@ -4520,7 +4625,7 @@ var TwitchApi = class {
|
|
|
4520
4625
|
*
|
|
4521
4626
|
* @see https://dev.twitch.tv/docs/api/reference#get-predictions
|
|
4522
4627
|
*/
|
|
4523
|
-
getPredictions:
|
|
4628
|
+
getPredictions: (params, options = {}) => this.callApi({
|
|
4524
4629
|
path: "/predictions",
|
|
4525
4630
|
params,
|
|
4526
4631
|
options
|
|
@@ -4569,7 +4674,7 @@ var TwitchApi = class {
|
|
|
4569
4674
|
*
|
|
4570
4675
|
* @see https://dev.twitch.tv/docs/api/reference#create-prediction
|
|
4571
4676
|
*/
|
|
4572
|
-
createPrediction:
|
|
4677
|
+
createPrediction: (body, options = {}) => this.callApi({
|
|
4573
4678
|
path: "/predictions",
|
|
4574
4679
|
method: "POST",
|
|
4575
4680
|
body,
|
|
@@ -4617,7 +4722,7 @@ var TwitchApi = class {
|
|
|
4617
4722
|
*
|
|
4618
4723
|
* @see https://dev.twitch.tv/docs/api/reference#end-prediction
|
|
4619
4724
|
*/
|
|
4620
|
-
endPrediction:
|
|
4725
|
+
endPrediction: (body, options = {}) => this.callApi({
|
|
4621
4726
|
path: "/predictions",
|
|
4622
4727
|
method: "PATCH",
|
|
4623
4728
|
body,
|
|
@@ -4681,7 +4786,7 @@ var TwitchApi = class {
|
|
|
4681
4786
|
*
|
|
4682
4787
|
* @see https://dev.twitch.tv/docs/api/reference#start-a-raid
|
|
4683
4788
|
*/
|
|
4684
|
-
startRaid:
|
|
4789
|
+
startRaid: (params = null, options = {}) => this.callApi({
|
|
4685
4790
|
path: "/raids",
|
|
4686
4791
|
method: "POST",
|
|
4687
4792
|
params,
|
|
@@ -4730,7 +4835,7 @@ var TwitchApi = class {
|
|
|
4730
4835
|
*
|
|
4731
4836
|
* @see https://dev.twitch.tv/docs/api/reference#cancel-a-raid
|
|
4732
4837
|
*/
|
|
4733
|
-
cancelRaid:
|
|
4838
|
+
cancelRaid: (params, options = {}) => this.callApi({
|
|
4734
4839
|
path: "/raids",
|
|
4735
4840
|
method: "DELETE",
|
|
4736
4841
|
params,
|
|
@@ -4778,7 +4883,7 @@ var TwitchApi = class {
|
|
|
4778
4883
|
*
|
|
4779
4884
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-stream-schedule
|
|
4780
4885
|
*/
|
|
4781
|
-
getChannelStreamSchedule:
|
|
4886
|
+
getChannelStreamSchedule: (params, options = {}) => this.callApi({
|
|
4782
4887
|
path: "/schedule",
|
|
4783
4888
|
params,
|
|
4784
4889
|
options
|
|
@@ -4813,7 +4918,7 @@ var TwitchApi = class {
|
|
|
4813
4918
|
*
|
|
4814
4919
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-icalendar
|
|
4815
4920
|
*/
|
|
4816
|
-
getChannelICalendar:
|
|
4921
|
+
getChannelICalendar: (params, options = {}) => this.callApi({
|
|
4817
4922
|
path: "/schedule/icalendar",
|
|
4818
4923
|
params,
|
|
4819
4924
|
options
|
|
@@ -4857,7 +4962,7 @@ var TwitchApi = class {
|
|
|
4857
4962
|
*
|
|
4858
4963
|
* @see https://dev.twitch.tv/docs/api/reference#update-channel-stream-schedule
|
|
4859
4964
|
*/
|
|
4860
|
-
updateChannelStreamSchedule:
|
|
4965
|
+
updateChannelStreamSchedule: (params, options = {}) => this.callApi({
|
|
4861
4966
|
path: "/schedule/settings",
|
|
4862
4967
|
method: "PATCH",
|
|
4863
4968
|
params,
|
|
@@ -4904,7 +5009,7 @@ var TwitchApi = class {
|
|
|
4904
5009
|
*
|
|
4905
5010
|
* @see https://dev.twitch.tv/docs/api/reference#create-channel-stream-schedule-segment
|
|
4906
5011
|
*/
|
|
4907
|
-
createChannelStreamScheduleSegment:
|
|
5012
|
+
createChannelStreamScheduleSegment: (params, body, options = {}) => this.callApi({
|
|
4908
5013
|
path: "/schedule/segment",
|
|
4909
5014
|
method: "POST",
|
|
4910
5015
|
params,
|
|
@@ -4956,7 +5061,7 @@ var TwitchApi = class {
|
|
|
4956
5061
|
*
|
|
4957
5062
|
* @see https://dev.twitch.tv/docs/api/reference#update-channel-stream-schedule-segment
|
|
4958
5063
|
*/
|
|
4959
|
-
updateChannelStreamScheduleSegment:
|
|
5064
|
+
updateChannelStreamScheduleSegment: (params, body = null, options = {}) => this.callApi({
|
|
4960
5065
|
path: "/schedule/segment",
|
|
4961
5066
|
method: "PATCH",
|
|
4962
5067
|
params,
|
|
@@ -4999,7 +5104,7 @@ var TwitchApi = class {
|
|
|
4999
5104
|
*
|
|
5000
5105
|
* @see https://dev.twitch.tv/docs/api/reference#delete-channel-stream-schedule-segment
|
|
5001
5106
|
*/
|
|
5002
|
-
deleteChannelStreamScheduleSegment:
|
|
5107
|
+
deleteChannelStreamScheduleSegment: (params, options = {}) => this.callApi({
|
|
5003
5108
|
path: "/schedule/segment",
|
|
5004
5109
|
method: "DELETE",
|
|
5005
5110
|
params,
|
|
@@ -5038,7 +5143,7 @@ var TwitchApi = class {
|
|
|
5038
5143
|
*
|
|
5039
5144
|
* @see https://dev.twitch.tv/docs/api/reference#search-categories
|
|
5040
5145
|
*/
|
|
5041
|
-
searchCategories:
|
|
5146
|
+
searchCategories: (params, options = {}) => this.callApi({
|
|
5042
5147
|
path: "/search/categories",
|
|
5043
5148
|
params,
|
|
5044
5149
|
options
|
|
@@ -5078,7 +5183,7 @@ var TwitchApi = class {
|
|
|
5078
5183
|
*
|
|
5079
5184
|
* @see https://dev.twitch.tv/docs/api/reference#search-channels
|
|
5080
5185
|
*/
|
|
5081
|
-
searchChannels:
|
|
5186
|
+
searchChannels: (params, options = {}) => this.callApi({
|
|
5082
5187
|
path: "/search/channels",
|
|
5083
5188
|
params,
|
|
5084
5189
|
options
|
|
@@ -5115,9 +5220,13 @@ var TwitchApi = class {
|
|
|
5115
5220
|
* * The access token is not valid.
|
|
5116
5221
|
* * The client ID specified in the Client-Id header must match the client ID specified in the access token.
|
|
5117
5222
|
*
|
|
5223
|
+
* _403 Forbidden_
|
|
5224
|
+
*
|
|
5225
|
+
* The user must complete additional steps in order to stream. Present the user with the returned error message.
|
|
5226
|
+
*
|
|
5118
5227
|
* @see https://dev.twitch.tv/docs/api/reference#get-stream-key
|
|
5119
5228
|
*/
|
|
5120
|
-
getStreamKey:
|
|
5229
|
+
getStreamKey: (params, options = {}) => this.callApi({
|
|
5121
5230
|
path: "/streams/key",
|
|
5122
5231
|
params,
|
|
5123
5232
|
options
|
|
@@ -5151,7 +5260,7 @@ var TwitchApi = class {
|
|
|
5151
5260
|
*
|
|
5152
5261
|
* @see https://dev.twitch.tv/docs/api/reference#get-streams
|
|
5153
5262
|
*/
|
|
5154
|
-
getStreams:
|
|
5263
|
+
getStreams: (params = null, options = {}) => this.callApi({
|
|
5155
5264
|
path: "/streams",
|
|
5156
5265
|
params,
|
|
5157
5266
|
options
|
|
@@ -5187,7 +5296,7 @@ var TwitchApi = class {
|
|
|
5187
5296
|
*
|
|
5188
5297
|
* @see https://dev.twitch.tv/docs/api/reference#get-followed-streams
|
|
5189
5298
|
*/
|
|
5190
|
-
getFollowedStreams:
|
|
5299
|
+
getFollowedStreams: (params, options = {}) => this.callApi({
|
|
5191
5300
|
path: "/streams/followed",
|
|
5192
5301
|
params,
|
|
5193
5302
|
options
|
|
@@ -5240,7 +5349,7 @@ var TwitchApi = class {
|
|
|
5240
5349
|
*
|
|
5241
5350
|
* @see https://dev.twitch.tv/docs/api/reference#create-stream-marker
|
|
5242
5351
|
*/
|
|
5243
|
-
createStreamMarker:
|
|
5352
|
+
createStreamMarker: (body, options = {}) => this.callApi({
|
|
5244
5353
|
path: "/streams/markers",
|
|
5245
5354
|
method: "POST",
|
|
5246
5355
|
body,
|
|
@@ -5284,7 +5393,7 @@ var TwitchApi = class {
|
|
|
5284
5393
|
*
|
|
5285
5394
|
* @see https://dev.twitch.tv/docs/api/reference#get-stream-markers
|
|
5286
5395
|
*/
|
|
5287
|
-
getStreamMarkers:
|
|
5396
|
+
getStreamMarkers: (params = null, options = {}) => this.callApi({
|
|
5288
5397
|
path: "/streams/markers",
|
|
5289
5398
|
params,
|
|
5290
5399
|
options
|
|
@@ -5324,7 +5433,7 @@ var TwitchApi = class {
|
|
|
5324
5433
|
*
|
|
5325
5434
|
* @see https://dev.twitch.tv/docs/api/reference#get-broadcaster-subscriptions
|
|
5326
5435
|
*/
|
|
5327
|
-
getBroadcasterSubscriptions:
|
|
5436
|
+
getBroadcasterSubscriptions: (params, options = {}) => this.callApi({
|
|
5328
5437
|
path: "/subscriptions",
|
|
5329
5438
|
params,
|
|
5330
5439
|
options
|
|
@@ -5367,7 +5476,7 @@ var TwitchApi = class {
|
|
|
5367
5476
|
*
|
|
5368
5477
|
* @see https://dev.twitch.tv/docs/api/reference#check-user-subscription
|
|
5369
5478
|
*/
|
|
5370
|
-
checkUserSubscription:
|
|
5479
|
+
checkUserSubscription: (params, options = {}) => this.callApi({
|
|
5371
5480
|
path: "/subscriptions/user",
|
|
5372
5481
|
params,
|
|
5373
5482
|
options
|
|
@@ -5406,7 +5515,7 @@ var TwitchApi = class {
|
|
|
5406
5515
|
*
|
|
5407
5516
|
* @see https://dev.twitch.tv/docs/api/reference#get-all-stream-tags
|
|
5408
5517
|
*/
|
|
5409
|
-
getAllStreamTags:
|
|
5518
|
+
getAllStreamTags: (params = null, options = {}) => this.callApi({
|
|
5410
5519
|
path: "/tags/streams",
|
|
5411
5520
|
params,
|
|
5412
5521
|
options
|
|
@@ -5443,7 +5552,7 @@ var TwitchApi = class {
|
|
|
5443
5552
|
*
|
|
5444
5553
|
* @see https://dev.twitch.tv/docs/api/reference#get-stream-tags
|
|
5445
5554
|
*/
|
|
5446
|
-
getStreamTags:
|
|
5555
|
+
getStreamTags: (params, options = {}) => this.callApi({
|
|
5447
5556
|
path: "/streams/tags",
|
|
5448
5557
|
params,
|
|
5449
5558
|
options
|
|
@@ -5483,7 +5592,7 @@ var TwitchApi = class {
|
|
|
5483
5592
|
*
|
|
5484
5593
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-teams
|
|
5485
5594
|
*/
|
|
5486
|
-
getChannelTeams:
|
|
5595
|
+
getChannelTeams: (params, options = {}) => this.callApi({
|
|
5487
5596
|
path: "/teams/channel",
|
|
5488
5597
|
params,
|
|
5489
5598
|
options
|
|
@@ -5523,7 +5632,7 @@ var TwitchApi = class {
|
|
|
5523
5632
|
*
|
|
5524
5633
|
* @see https://dev.twitch.tv/docs/api/reference#get-teams
|
|
5525
5634
|
*/
|
|
5526
|
-
getTeams:
|
|
5635
|
+
getTeams: (params = null, options = {}) => this.callApi({
|
|
5527
5636
|
path: "/teams",
|
|
5528
5637
|
params,
|
|
5529
5638
|
options
|
|
@@ -5551,12 +5660,12 @@ var TwitchApi = class {
|
|
|
5551
5660
|
*
|
|
5552
5661
|
* _200 OK_
|
|
5553
5662
|
*
|
|
5554
|
-
* Successfully retrieved the specified users
|
|
5663
|
+
* Successfully retrieved the specified users’ information.
|
|
5555
5664
|
*
|
|
5556
5665
|
* _400 Bad Request_
|
|
5557
5666
|
*
|
|
5558
|
-
* * The
|
|
5559
|
-
* * The request exceeded the maximum allowed number of
|
|
5667
|
+
* * The \*id\* or \*login\* query parameter is required unless the request uses a user access token.
|
|
5668
|
+
* * The request exceeded the maximum allowed number of \*id\* and/or \*login\* query parameters.
|
|
5560
5669
|
*
|
|
5561
5670
|
* _401 Unauthorized_
|
|
5562
5671
|
*
|
|
@@ -5566,7 +5675,7 @@ var TwitchApi = class {
|
|
|
5566
5675
|
*
|
|
5567
5676
|
* @see https://dev.twitch.tv/docs/api/reference#get-users
|
|
5568
5677
|
*/
|
|
5569
|
-
getUsers:
|
|
5678
|
+
getUsers: (params = null, options = {}) => this.callApi({
|
|
5570
5679
|
path: "/users",
|
|
5571
5680
|
params,
|
|
5572
5681
|
options
|
|
@@ -5603,7 +5712,7 @@ var TwitchApi = class {
|
|
|
5603
5712
|
*
|
|
5604
5713
|
* @see https://dev.twitch.tv/docs/api/reference#update-user
|
|
5605
5714
|
*/
|
|
5606
|
-
updateUser:
|
|
5715
|
+
updateUser: (params = null, options = {}) => this.callApi({
|
|
5607
5716
|
path: "/users",
|
|
5608
5717
|
method: "PUT",
|
|
5609
5718
|
params,
|
|
@@ -5640,7 +5749,7 @@ var TwitchApi = class {
|
|
|
5640
5749
|
*
|
|
5641
5750
|
* @see https://dev.twitch.tv/docs/api/reference#get-user-block-list
|
|
5642
5751
|
*/
|
|
5643
|
-
getUserBlockList:
|
|
5752
|
+
getUserBlockList: (params, options = {}) => this.callApi({
|
|
5644
5753
|
path: "/users/blocks",
|
|
5645
5754
|
params,
|
|
5646
5755
|
options
|
|
@@ -5680,7 +5789,7 @@ var TwitchApi = class {
|
|
|
5680
5789
|
*
|
|
5681
5790
|
* @see https://dev.twitch.tv/docs/api/reference#block-user
|
|
5682
5791
|
*/
|
|
5683
|
-
blockUser:
|
|
5792
|
+
blockUser: (params, options = {}) => this.callApi({
|
|
5684
5793
|
path: "/users/blocks",
|
|
5685
5794
|
method: "PUT",
|
|
5686
5795
|
params,
|
|
@@ -5716,7 +5825,7 @@ var TwitchApi = class {
|
|
|
5716
5825
|
*
|
|
5717
5826
|
* @see https://dev.twitch.tv/docs/api/reference#unblock-user
|
|
5718
5827
|
*/
|
|
5719
|
-
unblockUser:
|
|
5828
|
+
unblockUser: (params, options = {}) => this.callApi({
|
|
5720
5829
|
path: "/users/blocks",
|
|
5721
5830
|
method: "DELETE",
|
|
5722
5831
|
params,
|
|
@@ -5748,7 +5857,7 @@ var TwitchApi = class {
|
|
|
5748
5857
|
*
|
|
5749
5858
|
* @see https://dev.twitch.tv/docs/api/reference#get-user-extensions
|
|
5750
5859
|
*/
|
|
5751
|
-
getUserExtensions:
|
|
5860
|
+
getUserExtensions: (options = {}) => this.callApi({
|
|
5752
5861
|
path: "/users/extensions/list",
|
|
5753
5862
|
options
|
|
5754
5863
|
}),
|
|
@@ -5783,7 +5892,7 @@ var TwitchApi = class {
|
|
|
5783
5892
|
*
|
|
5784
5893
|
* @see https://dev.twitch.tv/docs/api/reference#get-user-active-extensions
|
|
5785
5894
|
*/
|
|
5786
|
-
getUserActiveExtensions:
|
|
5895
|
+
getUserActiveExtensions: (params = null, options = {}) => this.callApi({
|
|
5787
5896
|
path: "/users/extensions",
|
|
5788
5897
|
params,
|
|
5789
5898
|
options
|
|
@@ -5824,7 +5933,7 @@ var TwitchApi = class {
|
|
|
5824
5933
|
*
|
|
5825
5934
|
* @see https://dev.twitch.tv/docs/api/reference#update-user-extensions
|
|
5826
5935
|
*/
|
|
5827
|
-
updateUserExtensions:
|
|
5936
|
+
updateUserExtensions: (body, options = {}) => this.callApi({
|
|
5828
5937
|
path: "/users/extensions",
|
|
5829
5938
|
method: "PUT",
|
|
5830
5939
|
body,
|
|
@@ -5874,7 +5983,7 @@ var TwitchApi = class {
|
|
|
5874
5983
|
*
|
|
5875
5984
|
* @see https://dev.twitch.tv/docs/api/reference#get-videos
|
|
5876
5985
|
*/
|
|
5877
|
-
getVideos:
|
|
5986
|
+
getVideos: (params = null, options = {}) => this.callApi({
|
|
5878
5987
|
path: "/videos",
|
|
5879
5988
|
params,
|
|
5880
5989
|
options
|
|
@@ -5911,7 +6020,7 @@ var TwitchApi = class {
|
|
|
5911
6020
|
*
|
|
5912
6021
|
* @see https://dev.twitch.tv/docs/api/reference#delete-videos
|
|
5913
6022
|
*/
|
|
5914
|
-
deleteVideos:
|
|
6023
|
+
deleteVideos: (params, options = {}) => this.callApi({
|
|
5915
6024
|
path: "/videos",
|
|
5916
6025
|
method: "DELETE",
|
|
5917
6026
|
params,
|
|
@@ -5975,7 +6084,7 @@ var TwitchApi = class {
|
|
|
5975
6084
|
*
|
|
5976
6085
|
* @see https://dev.twitch.tv/docs/api/reference#send-whisper
|
|
5977
6086
|
*/
|
|
5978
|
-
sendWhisper:
|
|
6087
|
+
sendWhisper: (params, body, options = {}) => this.callApi({
|
|
5979
6088
|
path: "/whispers",
|
|
5980
6089
|
method: "POST",
|
|
5981
6090
|
params,
|