ts-twitch-api 0.2.0 → 0.2.2
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 +279 -150
- package/dist/index.d.cts +990 -460
- package/dist/index.d.ts +990 -460
- package/dist/index.js +279 -150
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26,10 +26,10 @@ var TwitchApi = class {
|
|
|
26
26
|
body,
|
|
27
27
|
requiresAuth = true,
|
|
28
28
|
options: {
|
|
29
|
-
clientId
|
|
30
|
-
accessToken
|
|
29
|
+
clientId,
|
|
30
|
+
accessToken,
|
|
31
31
|
requestInit = {}
|
|
32
|
-
}
|
|
32
|
+
} = {}
|
|
33
33
|
}) {
|
|
34
34
|
const url = params ? `${BASE_URL}${path}?${getSearchParams(params)}` : `${BASE_URL}${path}`;
|
|
35
35
|
const options = { ...requestInit, method };
|
|
@@ -101,7 +101,7 @@ var TwitchApi = class {
|
|
|
101
101
|
*
|
|
102
102
|
* @see https://dev.twitch.tv/docs/api/reference#start-commercial
|
|
103
103
|
*/
|
|
104
|
-
startCommercial: async (body, options) => this.callApi({
|
|
104
|
+
startCommercial: async (body, options = {}) => this.callApi({
|
|
105
105
|
path: "/channels/commercial",
|
|
106
106
|
method: "POST",
|
|
107
107
|
body,
|
|
@@ -132,7 +132,7 @@ var TwitchApi = class {
|
|
|
132
132
|
*
|
|
133
133
|
* @see https://dev.twitch.tv/docs/api/reference#get-ad-schedule
|
|
134
134
|
*/
|
|
135
|
-
getAdSchedule: async (params, options) => this.callApi({
|
|
135
|
+
getAdSchedule: async (params, options = {}) => this.callApi({
|
|
136
136
|
path: "/channels/ads",
|
|
137
137
|
params,
|
|
138
138
|
options
|
|
@@ -168,7 +168,7 @@ var TwitchApi = class {
|
|
|
168
168
|
*
|
|
169
169
|
* @see https://dev.twitch.tv/docs/api/reference#snooze-next-ad
|
|
170
170
|
*/
|
|
171
|
-
snoozeNextAd: async (params, options) => this.callApi({
|
|
171
|
+
snoozeNextAd: async (params, options = {}) => this.callApi({
|
|
172
172
|
path: "/channels/ads/schedule/snooze",
|
|
173
173
|
method: "POST",
|
|
174
174
|
params,
|
|
@@ -215,7 +215,7 @@ var TwitchApi = class {
|
|
|
215
215
|
*
|
|
216
216
|
* @see https://dev.twitch.tv/docs/api/reference#get-extension-analytics
|
|
217
217
|
*/
|
|
218
|
-
getExtensionAnalytics: async (params = null, options) => this.callApi({
|
|
218
|
+
getExtensionAnalytics: async (params = null, options = {}) => this.callApi({
|
|
219
219
|
path: "/analytics/extensions",
|
|
220
220
|
params,
|
|
221
221
|
options
|
|
@@ -259,7 +259,7 @@ var TwitchApi = class {
|
|
|
259
259
|
*
|
|
260
260
|
* @see https://dev.twitch.tv/docs/api/reference#get-game-analytics
|
|
261
261
|
*/
|
|
262
|
-
getGameAnalytics: async (params = null, options) => this.callApi({
|
|
262
|
+
getGameAnalytics: async (params = null, options = {}) => this.callApi({
|
|
263
263
|
path: "/analytics/games",
|
|
264
264
|
params,
|
|
265
265
|
options
|
|
@@ -300,7 +300,7 @@ var TwitchApi = class {
|
|
|
300
300
|
*
|
|
301
301
|
* @see https://dev.twitch.tv/docs/api/reference#get-bits-leaderboard
|
|
302
302
|
*/
|
|
303
|
-
getBitsLeaderboard: async (params = null, options) => this.callApi({
|
|
303
|
+
getBitsLeaderboard: async (params = null, options = {}) => this.callApi({
|
|
304
304
|
path: "/bits/leaderboard",
|
|
305
305
|
params,
|
|
306
306
|
options
|
|
@@ -329,7 +329,7 @@ var TwitchApi = class {
|
|
|
329
329
|
*
|
|
330
330
|
* @see https://dev.twitch.tv/docs/api/reference#get-cheermotes
|
|
331
331
|
*/
|
|
332
|
-
getCheermotes: async (params = null, options) => this.callApi({
|
|
332
|
+
getCheermotes: async (params = null, options = {}) => this.callApi({
|
|
333
333
|
path: "/bits/cheermotes",
|
|
334
334
|
params,
|
|
335
335
|
options
|
|
@@ -370,7 +370,7 @@ var TwitchApi = class {
|
|
|
370
370
|
*
|
|
371
371
|
* @see https://dev.twitch.tv/docs/api/reference#get-extension-transactions
|
|
372
372
|
*/
|
|
373
|
-
getExtensionTransactions: async (params, options) => this.callApi({
|
|
373
|
+
getExtensionTransactions: async (params, options = {}) => this.callApi({
|
|
374
374
|
path: "/extensions/transactions",
|
|
375
375
|
params,
|
|
376
376
|
options
|
|
@@ -414,7 +414,7 @@ var TwitchApi = class {
|
|
|
414
414
|
*
|
|
415
415
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-information
|
|
416
416
|
*/
|
|
417
|
-
getChannelInformation: async (params, options) => this.callApi({
|
|
417
|
+
getChannelInformation: async (params, options = {}) => this.callApi({
|
|
418
418
|
path: "/channels",
|
|
419
419
|
params,
|
|
420
420
|
options
|
|
@@ -476,7 +476,7 @@ var TwitchApi = class {
|
|
|
476
476
|
*
|
|
477
477
|
* @see https://dev.twitch.tv/docs/api/reference#modify-channel-information
|
|
478
478
|
*/
|
|
479
|
-
modifyChannelInformation: async (params, body = null, options) => this.callApi({
|
|
479
|
+
modifyChannelInformation: async (params, body = null, options = {}) => this.callApi({
|
|
480
480
|
path: "/channels",
|
|
481
481
|
method: "PATCH",
|
|
482
482
|
params,
|
|
@@ -498,7 +498,7 @@ var TwitchApi = class {
|
|
|
498
498
|
*
|
|
499
499
|
* _200 OK_
|
|
500
500
|
*
|
|
501
|
-
* Successfully retrieved the broadcaster
|
|
501
|
+
* Successfully retrieved the broadcaster's list of editors.
|
|
502
502
|
*
|
|
503
503
|
* _400 Bad Request_
|
|
504
504
|
*
|
|
@@ -514,7 +514,7 @@ var TwitchApi = class {
|
|
|
514
514
|
*
|
|
515
515
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-editors
|
|
516
516
|
*/
|
|
517
|
-
getChannelEditors: async (params, options) => this.callApi({
|
|
517
|
+
getChannelEditors: async (params, options = {}) => this.callApi({
|
|
518
518
|
path: "/channels/editors",
|
|
519
519
|
params,
|
|
520
520
|
options
|
|
@@ -534,7 +534,7 @@ var TwitchApi = class {
|
|
|
534
534
|
*
|
|
535
535
|
* _200 OK_
|
|
536
536
|
*
|
|
537
|
-
* Successfully retrieved the broadcaster
|
|
537
|
+
* Successfully retrieved the broadcaster's list of followers.
|
|
538
538
|
*
|
|
539
539
|
* _400 Bad Request_
|
|
540
540
|
*
|
|
@@ -556,7 +556,7 @@ var TwitchApi = class {
|
|
|
556
556
|
*
|
|
557
557
|
* @see https://dev.twitch.tv/docs/api/reference#get-followed-channels
|
|
558
558
|
*/
|
|
559
|
-
getFollowedChannels: async (params, options) => this.callApi({
|
|
559
|
+
getFollowedChannels: async (params, options = {}) => this.callApi({
|
|
560
560
|
path: "/channels/followed",
|
|
561
561
|
params,
|
|
562
562
|
options
|
|
@@ -601,7 +601,7 @@ var TwitchApi = class {
|
|
|
601
601
|
*
|
|
602
602
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-followers
|
|
603
603
|
*/
|
|
604
|
-
getChannelFollowers: async (params, options) => this.callApi({
|
|
604
|
+
getChannelFollowers: async (params, options = {}) => this.callApi({
|
|
605
605
|
path: "/channels/followers",
|
|
606
606
|
params,
|
|
607
607
|
options
|
|
@@ -654,7 +654,7 @@ var TwitchApi = class {
|
|
|
654
654
|
*
|
|
655
655
|
* @see https://dev.twitch.tv/docs/api/reference#create-custom-rewards
|
|
656
656
|
*/
|
|
657
|
-
createCustomRewards: async (params, body, options) => this.callApi({
|
|
657
|
+
createCustomRewards: async (params, body, options = {}) => this.callApi({
|
|
658
658
|
path: "/channel_points/custom_rewards",
|
|
659
659
|
method: "POST",
|
|
660
660
|
params,
|
|
@@ -705,7 +705,7 @@ var TwitchApi = class {
|
|
|
705
705
|
*
|
|
706
706
|
* @see https://dev.twitch.tv/docs/api/reference#delete-custom-reward
|
|
707
707
|
*/
|
|
708
|
-
deleteCustomReward: async (params, options) => this.callApi({
|
|
708
|
+
deleteCustomReward: async (params, options = {}) => this.callApi({
|
|
709
709
|
path: "/channel_points/custom_rewards",
|
|
710
710
|
method: "DELETE",
|
|
711
711
|
params,
|
|
@@ -754,7 +754,7 @@ var TwitchApi = class {
|
|
|
754
754
|
*
|
|
755
755
|
* @see https://dev.twitch.tv/docs/api/reference#get-custom-reward
|
|
756
756
|
*/
|
|
757
|
-
getCustomReward: async (params, options) => this.callApi({
|
|
757
|
+
getCustomReward: async (params, options = {}) => this.callApi({
|
|
758
758
|
path: "/channel_points/custom_rewards",
|
|
759
759
|
params,
|
|
760
760
|
options
|
|
@@ -812,7 +812,7 @@ var TwitchApi = class {
|
|
|
812
812
|
*
|
|
813
813
|
* @see https://dev.twitch.tv/docs/api/reference#update-custom-reward
|
|
814
814
|
*/
|
|
815
|
-
updateCustomReward: async (params, body = null, options) => this.callApi({
|
|
815
|
+
updateCustomReward: async (params, body = null, options = {}) => this.callApi({
|
|
816
816
|
path: "/channel_points/custom_rewards",
|
|
817
817
|
method: "PATCH",
|
|
818
818
|
params,
|
|
@@ -864,7 +864,7 @@ var TwitchApi = class {
|
|
|
864
864
|
*
|
|
865
865
|
* @see https://dev.twitch.tv/docs/api/reference#get-custom-reward-redemption
|
|
866
866
|
*/
|
|
867
|
-
getCustomRewardRedemption: async (params, options) => this.callApi({
|
|
867
|
+
getCustomRewardRedemption: async (params, options = {}) => this.callApi({
|
|
868
868
|
path: "/channel_points/custom_rewards/redemptions",
|
|
869
869
|
params,
|
|
870
870
|
options
|
|
@@ -914,7 +914,7 @@ var TwitchApi = class {
|
|
|
914
914
|
*
|
|
915
915
|
* @see https://dev.twitch.tv/docs/api/reference#update-redemption-status
|
|
916
916
|
*/
|
|
917
|
-
updateRedemptionStatus: async (params, body, options) => this.callApi({
|
|
917
|
+
updateRedemptionStatus: async (params, body, options = {}) => this.callApi({
|
|
918
918
|
path: "/channel_points/custom_rewards/redemptions",
|
|
919
919
|
method: "PATCH",
|
|
920
920
|
params,
|
|
@@ -961,7 +961,7 @@ var TwitchApi = class {
|
|
|
961
961
|
*
|
|
962
962
|
* @see https://dev.twitch.tv/docs/api/reference#get-charity-campaign
|
|
963
963
|
*/
|
|
964
|
-
getCharityCampaign: async (params, options) => this.callApi({
|
|
964
|
+
getCharityCampaign: async (params, options = {}) => this.callApi({
|
|
965
965
|
path: "/charity/campaigns",
|
|
966
966
|
params,
|
|
967
967
|
options
|
|
@@ -1004,7 +1004,7 @@ var TwitchApi = class {
|
|
|
1004
1004
|
*
|
|
1005
1005
|
* @see https://dev.twitch.tv/docs/api/reference#get-charity-campaign-donations
|
|
1006
1006
|
*/
|
|
1007
|
-
getCharityCampaignDonations: async (params, options) => this.callApi({
|
|
1007
|
+
getCharityCampaignDonations: async (params, options = {}) => this.callApi({
|
|
1008
1008
|
path: "/charity/donations",
|
|
1009
1009
|
params,
|
|
1010
1010
|
options
|
|
@@ -1053,7 +1053,7 @@ var TwitchApi = class {
|
|
|
1053
1053
|
*
|
|
1054
1054
|
* @see https://dev.twitch.tv/docs/api/reference#get-chatters
|
|
1055
1055
|
*/
|
|
1056
|
-
getChatters: async (params, options) => this.callApi({
|
|
1056
|
+
getChatters: async (params, options = {}) => this.callApi({
|
|
1057
1057
|
path: "/chat/chatters",
|
|
1058
1058
|
params,
|
|
1059
1059
|
options
|
|
@@ -1077,7 +1077,7 @@ var TwitchApi = class {
|
|
|
1077
1077
|
*
|
|
1078
1078
|
* _200 OK_
|
|
1079
1079
|
*
|
|
1080
|
-
* Successfully retrieved broadcaster
|
|
1080
|
+
* Successfully retrieved broadcaster's list of custom emotes.
|
|
1081
1081
|
*
|
|
1082
1082
|
* _400 Bad Request_
|
|
1083
1083
|
*
|
|
@@ -1091,7 +1091,7 @@ var TwitchApi = class {
|
|
|
1091
1091
|
*
|
|
1092
1092
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-emotes
|
|
1093
1093
|
*/
|
|
1094
|
-
getChannelEmotes: async (params, options) => this.callApi({
|
|
1094
|
+
getChannelEmotes: async (params, options = {}) => this.callApi({
|
|
1095
1095
|
path: "/chat/emotes",
|
|
1096
1096
|
params,
|
|
1097
1097
|
options
|
|
@@ -1117,7 +1117,7 @@ var TwitchApi = class {
|
|
|
1117
1117
|
*
|
|
1118
1118
|
* _200 OK_
|
|
1119
1119
|
*
|
|
1120
|
-
* Successfully retrieved Twitch
|
|
1120
|
+
* Successfully retrieved Twitch's list of global emotes.
|
|
1121
1121
|
*
|
|
1122
1122
|
* _401 Unauthorized_
|
|
1123
1123
|
*
|
|
@@ -1127,7 +1127,7 @@ var TwitchApi = class {
|
|
|
1127
1127
|
*
|
|
1128
1128
|
* @see https://dev.twitch.tv/docs/api/reference#get-global-emotes
|
|
1129
1129
|
*/
|
|
1130
|
-
getGlobalEmotes: async (options) => this.callApi({
|
|
1130
|
+
getGlobalEmotes: async (options = {}) => this.callApi({
|
|
1131
1131
|
path: "/chat/emotes/global",
|
|
1132
1132
|
options
|
|
1133
1133
|
}),
|
|
@@ -1165,7 +1165,7 @@ var TwitchApi = class {
|
|
|
1165
1165
|
*
|
|
1166
1166
|
* @see https://dev.twitch.tv/docs/api/reference#get-emote-sets
|
|
1167
1167
|
*/
|
|
1168
|
-
getEmoteSets: async (params, options) => this.callApi({
|
|
1168
|
+
getEmoteSets: async (params, options = {}) => this.callApi({
|
|
1169
1169
|
path: "/chat/emotes/set",
|
|
1170
1170
|
params,
|
|
1171
1171
|
options
|
|
@@ -1199,7 +1199,7 @@ var TwitchApi = class {
|
|
|
1199
1199
|
*
|
|
1200
1200
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-chat-badges
|
|
1201
1201
|
*/
|
|
1202
|
-
getChannelChatBadges: async (params, options) => this.callApi({
|
|
1202
|
+
getChannelChatBadges: async (params, options = {}) => this.callApi({
|
|
1203
1203
|
path: "/chat/badges",
|
|
1204
1204
|
params,
|
|
1205
1205
|
options
|
|
@@ -1233,7 +1233,7 @@ var TwitchApi = class {
|
|
|
1233
1233
|
*
|
|
1234
1234
|
* @see https://dev.twitch.tv/docs/api/reference#get-global-chat-badges
|
|
1235
1235
|
*/
|
|
1236
|
-
getGlobalChatBadges: async (options) => this.callApi({
|
|
1236
|
+
getGlobalChatBadges: async (options = {}) => this.callApi({
|
|
1237
1237
|
path: "/chat/badges/global",
|
|
1238
1238
|
options
|
|
1239
1239
|
}),
|
|
@@ -1268,7 +1268,7 @@ var TwitchApi = class {
|
|
|
1268
1268
|
*
|
|
1269
1269
|
* @see https://dev.twitch.tv/docs/api/reference#get-chat-settings
|
|
1270
1270
|
*/
|
|
1271
|
-
getChatSettings: async (params, options) => this.callApi({
|
|
1271
|
+
getChatSettings: async (params, options = {}) => this.callApi({
|
|
1272
1272
|
path: "/chat/settings",
|
|
1273
1273
|
params,
|
|
1274
1274
|
options
|
|
@@ -1322,13 +1322,51 @@ var TwitchApi = class {
|
|
|
1322
1322
|
*
|
|
1323
1323
|
* @see https://dev.twitch.tv/docs/api/reference#update-chat-settings
|
|
1324
1324
|
*/
|
|
1325
|
-
updateChatSettings: async (params, body = null, options) => this.callApi({
|
|
1325
|
+
updateChatSettings: async (params, body = null, options = {}) => this.callApi({
|
|
1326
1326
|
path: "/chat/settings",
|
|
1327
1327
|
method: "PATCH",
|
|
1328
1328
|
params,
|
|
1329
1329
|
body,
|
|
1330
1330
|
options
|
|
1331
1331
|
}),
|
|
1332
|
+
/**
|
|
1333
|
+
* BETA Retrieves emotes available to the user across all channels.
|
|
1334
|
+
*
|
|
1335
|
+
* __Authorization:__
|
|
1336
|
+
*
|
|
1337
|
+
* * Requires a user access token that includes the **user:read:emotes** scope.
|
|
1338
|
+
* * Query parameter `user_id` must match the `user_id` in the user access token.
|
|
1339
|
+
*
|
|
1340
|
+
* __URL:__
|
|
1341
|
+
*
|
|
1342
|
+
* `GET https://api.twitch.tv/helix/chat/emotes/user`
|
|
1343
|
+
*
|
|
1344
|
+
* __Response Codes:__
|
|
1345
|
+
*
|
|
1346
|
+
* _200 OK_
|
|
1347
|
+
*
|
|
1348
|
+
* Successfully retrieved the emotes.
|
|
1349
|
+
*
|
|
1350
|
+
* _400 Bad Request_
|
|
1351
|
+
*
|
|
1352
|
+
* * The _user\_id_ query parameter is required.
|
|
1353
|
+
* * The ID in the _user\_id_ query parameter is not valid.
|
|
1354
|
+
*
|
|
1355
|
+
* _401 Unauthorized_
|
|
1356
|
+
*
|
|
1357
|
+
* * The ID in _user\_id_ must match the user ID in the user access token.
|
|
1358
|
+
* * The Authorization header is required and must contain a user access token.
|
|
1359
|
+
* * The user access token must include the **user:read:emotes** scope.
|
|
1360
|
+
* * The access token is not valid.
|
|
1361
|
+
* * The client ID specified in the Client-Id header does not match the client ID specified in the access token.
|
|
1362
|
+
*
|
|
1363
|
+
* @see https://dev.twitch.tv/docs/api/reference#get-user-emotes
|
|
1364
|
+
*/
|
|
1365
|
+
getUserEmotes: async (params, options = {}) => this.callApi({
|
|
1366
|
+
path: "/chat/emotes/user",
|
|
1367
|
+
params,
|
|
1368
|
+
options
|
|
1369
|
+
}),
|
|
1332
1370
|
/**
|
|
1333
1371
|
* Sends an announcement to the broadcaster’s chat room.
|
|
1334
1372
|
*
|
|
@@ -1362,7 +1400,7 @@ var TwitchApi = class {
|
|
|
1362
1400
|
*
|
|
1363
1401
|
* @see https://dev.twitch.tv/docs/api/reference#send-chat-announcement
|
|
1364
1402
|
*/
|
|
1365
|
-
sendChatAnnouncement: async (params, body, options) => this.callApi({
|
|
1403
|
+
sendChatAnnouncement: async (params, body, options = {}) => this.callApi({
|
|
1366
1404
|
path: "/chat/announcements",
|
|
1367
1405
|
method: "POST",
|
|
1368
1406
|
params,
|
|
@@ -1421,7 +1459,7 @@ var TwitchApi = class {
|
|
|
1421
1459
|
*
|
|
1422
1460
|
* @see https://dev.twitch.tv/docs/api/reference#send-a-shoutout
|
|
1423
1461
|
*/
|
|
1424
|
-
sendShoutout: async (params, options) => this.callApi({
|
|
1462
|
+
sendShoutout: async (params, options = {}) => this.callApi({
|
|
1425
1463
|
path: "/chat/shoutouts",
|
|
1426
1464
|
method: "POST",
|
|
1427
1465
|
params,
|
|
@@ -1471,7 +1509,7 @@ var TwitchApi = class {
|
|
|
1471
1509
|
*
|
|
1472
1510
|
* @see https://dev.twitch.tv/docs/api/reference#send-chat-message
|
|
1473
1511
|
*/
|
|
1474
|
-
sendChatMessage: async (body, options) => this.callApi({
|
|
1512
|
+
sendChatMessage: async (body, options = {}) => this.callApi({
|
|
1475
1513
|
path: "/chat/messages",
|
|
1476
1514
|
method: "POST",
|
|
1477
1515
|
body,
|
|
@@ -1506,7 +1544,7 @@ var TwitchApi = class {
|
|
|
1506
1544
|
*
|
|
1507
1545
|
* @see https://dev.twitch.tv/docs/api/reference#get-user-chat-color
|
|
1508
1546
|
*/
|
|
1509
|
-
getUserChatColor: async (params, options) => this.callApi({
|
|
1547
|
+
getUserChatColor: async (params, options = {}) => this.callApi({
|
|
1510
1548
|
path: "/chat/color",
|
|
1511
1549
|
params,
|
|
1512
1550
|
options
|
|
@@ -1545,7 +1583,7 @@ var TwitchApi = class {
|
|
|
1545
1583
|
*
|
|
1546
1584
|
* @see https://dev.twitch.tv/docs/api/reference#update-user-chat-color
|
|
1547
1585
|
*/
|
|
1548
|
-
updateUserChatColor: async (params, options) => this.callApi({
|
|
1586
|
+
updateUserChatColor: async (params, options = {}) => this.callApi({
|
|
1549
1587
|
path: "/chat/color",
|
|
1550
1588
|
method: "PUT",
|
|
1551
1589
|
params,
|
|
@@ -1599,7 +1637,7 @@ var TwitchApi = class {
|
|
|
1599
1637
|
*
|
|
1600
1638
|
* @see https://dev.twitch.tv/docs/api/reference#create-clip
|
|
1601
1639
|
*/
|
|
1602
|
-
createClip: async (params, options) => this.callApi({
|
|
1640
|
+
createClip: async (params, options = {}) => this.callApi({
|
|
1603
1641
|
path: "/clips",
|
|
1604
1642
|
method: "POST",
|
|
1605
1643
|
params,
|
|
@@ -1643,7 +1681,7 @@ var TwitchApi = class {
|
|
|
1643
1681
|
*
|
|
1644
1682
|
* @see https://dev.twitch.tv/docs/api/reference#get-clips
|
|
1645
1683
|
*/
|
|
1646
|
-
getClips: async (params = null, options) => this.callApi({
|
|
1684
|
+
getClips: async (params = null, options = {}) => this.callApi({
|
|
1647
1685
|
path: "/clips",
|
|
1648
1686
|
params,
|
|
1649
1687
|
options
|
|
@@ -1673,7 +1711,7 @@ var TwitchApi = class {
|
|
|
1673
1711
|
*
|
|
1674
1712
|
* @see https://dev.twitch.tv/docs/api/reference#get-conduits
|
|
1675
1713
|
*/
|
|
1676
|
-
getConduits: async (options) => this.callApi({
|
|
1714
|
+
getConduits: async (options = {}) => this.callApi({
|
|
1677
1715
|
path: "/eventsub/conduits",
|
|
1678
1716
|
options
|
|
1679
1717
|
}),
|
|
@@ -1708,7 +1746,7 @@ var TwitchApi = class {
|
|
|
1708
1746
|
*
|
|
1709
1747
|
* @see https://dev.twitch.tv/docs/api/reference#create-conduits
|
|
1710
1748
|
*/
|
|
1711
|
-
createConduits: async (body, options) => this.callApi({
|
|
1749
|
+
createConduits: async (body, options = {}) => this.callApi({
|
|
1712
1750
|
path: "/eventsub/conduits",
|
|
1713
1751
|
method: "POST",
|
|
1714
1752
|
body,
|
|
@@ -1747,7 +1785,7 @@ var TwitchApi = class {
|
|
|
1747
1785
|
*
|
|
1748
1786
|
* @see https://dev.twitch.tv/docs/api/reference#update-conduits
|
|
1749
1787
|
*/
|
|
1750
|
-
updateConduits: async (body, options) => this.callApi({
|
|
1788
|
+
updateConduits: async (body, options = {}) => this.callApi({
|
|
1751
1789
|
path: "/eventsub/conduits",
|
|
1752
1790
|
method: "PATCH",
|
|
1753
1791
|
body,
|
|
@@ -1785,7 +1823,7 @@ var TwitchApi = class {
|
|
|
1785
1823
|
*
|
|
1786
1824
|
* @see https://dev.twitch.tv/docs/api/reference#delete-conduit
|
|
1787
1825
|
*/
|
|
1788
|
-
deleteConduit: async (params, options) => this.callApi({
|
|
1826
|
+
deleteConduit: async (params, options = {}) => this.callApi({
|
|
1789
1827
|
path: "/eventsub/conduits",
|
|
1790
1828
|
method: "DELETE",
|
|
1791
1829
|
params,
|
|
@@ -1823,7 +1861,7 @@ var TwitchApi = class {
|
|
|
1823
1861
|
*
|
|
1824
1862
|
* @see https://dev.twitch.tv/docs/api/reference#get-conduit-shards
|
|
1825
1863
|
*/
|
|
1826
|
-
getConduitShards: async (params, options) => this.callApi({
|
|
1864
|
+
getConduitShards: async (params, options = {}) => this.callApi({
|
|
1827
1865
|
path: "/eventsub/conduits/shards",
|
|
1828
1866
|
params,
|
|
1829
1867
|
options
|
|
@@ -1862,7 +1900,7 @@ var TwitchApi = class {
|
|
|
1862
1900
|
*
|
|
1863
1901
|
* @see https://dev.twitch.tv/docs/api/reference#update-conduit-shards
|
|
1864
1902
|
*/
|
|
1865
|
-
updateConduitShards: async (body, options) => this.callApi({
|
|
1903
|
+
updateConduitShards: async (body, options = {}) => this.callApi({
|
|
1866
1904
|
path: "/eventsub/conduits/shards",
|
|
1867
1905
|
method: "PATCH",
|
|
1868
1906
|
body,
|
|
@@ -1895,7 +1933,7 @@ var TwitchApi = class {
|
|
|
1895
1933
|
*
|
|
1896
1934
|
* @see https://dev.twitch.tv/docs/api/reference#get-content-classification-labels
|
|
1897
1935
|
*/
|
|
1898
|
-
getContentClassificationLabels: async (params = null, options) => this.callApi({
|
|
1936
|
+
getContentClassificationLabels: async (params = null, options = {}) => this.callApi({
|
|
1899
1937
|
path: "/content_classification_labels",
|
|
1900
1938
|
params,
|
|
1901
1939
|
options
|
|
@@ -1905,6 +1943,8 @@ var TwitchApi = class {
|
|
|
1905
1943
|
/**
|
|
1906
1944
|
* Gets an organization’s list of entitlements that have been granted to a game, a user, or both.
|
|
1907
1945
|
*
|
|
1946
|
+
* **NOTE:** Entitlements returned in the response body data are not guaranteed to be sorted by any field returned by the API. To retrieve **CLAIMED** or **FULFILLED** entitlements, use the `fulfillment_status` query parameter to filter results. To retrieve entitlements for a specific game, use the `game_id` query parameter to filter results.
|
|
1947
|
+
*
|
|
1908
1948
|
* The following table identifies the request parameters that you may specify based on the type of access token used.
|
|
1909
1949
|
*
|
|
1910
1950
|
* | Access token type | Parameter | Description |
|
|
@@ -1955,7 +1995,7 @@ var TwitchApi = class {
|
|
|
1955
1995
|
*
|
|
1956
1996
|
* @see https://dev.twitch.tv/docs/api/reference#get-drops-entitlements
|
|
1957
1997
|
*/
|
|
1958
|
-
getDropsEntitlements: async (params = null, options) => this.callApi({
|
|
1998
|
+
getDropsEntitlements: async (params = null, options = {}) => this.callApi({
|
|
1959
1999
|
path: "/entitlements/drops",
|
|
1960
2000
|
params,
|
|
1961
2001
|
options
|
|
@@ -2001,7 +2041,7 @@ var TwitchApi = class {
|
|
|
2001
2041
|
*
|
|
2002
2042
|
* @see https://dev.twitch.tv/docs/api/reference#update-drops-entitlements
|
|
2003
2043
|
*/
|
|
2004
|
-
updateDropsEntitlements: async (body = null, options) => this.callApi({
|
|
2044
|
+
updateDropsEntitlements: async (body = null, options = {}) => this.callApi({
|
|
2005
2045
|
path: "/entitlements/drops",
|
|
2006
2046
|
method: "PATCH",
|
|
2007
2047
|
body,
|
|
@@ -2046,7 +2086,7 @@ var TwitchApi = class {
|
|
|
2046
2086
|
*
|
|
2047
2087
|
* @see https://dev.twitch.tv/docs/api/reference#get-extension-configuration-segment
|
|
2048
2088
|
*/
|
|
2049
|
-
getExtensionConfigurationSegment: async (params, options) => this.callApi({
|
|
2089
|
+
getExtensionConfigurationSegment: async (params, options = {}) => this.callApi({
|
|
2050
2090
|
path: "/extensions/configurations",
|
|
2051
2091
|
params,
|
|
2052
2092
|
options
|
|
@@ -2082,7 +2122,7 @@ var TwitchApi = class {
|
|
|
2082
2122
|
*
|
|
2083
2123
|
* @see https://dev.twitch.tv/docs/api/reference#set-extension-configuration-segment
|
|
2084
2124
|
*/
|
|
2085
|
-
setExtensionConfigurationSegment: async (body, options) => this.callApi({
|
|
2125
|
+
setExtensionConfigurationSegment: async (body, options = {}) => this.callApi({
|
|
2086
2126
|
path: "/extensions/configurations",
|
|
2087
2127
|
method: "PUT",
|
|
2088
2128
|
body,
|
|
@@ -2120,7 +2160,7 @@ var TwitchApi = class {
|
|
|
2120
2160
|
*
|
|
2121
2161
|
* @see https://dev.twitch.tv/docs/api/reference#set-extension-required-configuration
|
|
2122
2162
|
*/
|
|
2123
|
-
setExtensionRequiredConfiguration: async (params, body, options) => this.callApi({
|
|
2163
|
+
setExtensionRequiredConfiguration: async (params, body, options = {}) => this.callApi({
|
|
2124
2164
|
path: "/extensions/required_configuration",
|
|
2125
2165
|
method: "PUT",
|
|
2126
2166
|
params,
|
|
@@ -2196,7 +2236,7 @@ var TwitchApi = class {
|
|
|
2196
2236
|
*
|
|
2197
2237
|
* @see https://dev.twitch.tv/docs/api/reference#send-extension-pubsub-message
|
|
2198
2238
|
*/
|
|
2199
|
-
sendExtensionPubSubMessage: async (body, options) => this.callApi({
|
|
2239
|
+
sendExtensionPubSubMessage: async (body, options = {}) => this.callApi({
|
|
2200
2240
|
path: "/extensions/pubsub",
|
|
2201
2241
|
method: "POST",
|
|
2202
2242
|
body,
|
|
@@ -2238,7 +2278,7 @@ var TwitchApi = class {
|
|
|
2238
2278
|
*
|
|
2239
2279
|
* @see https://dev.twitch.tv/docs/api/reference#get-extension-live-channels
|
|
2240
2280
|
*/
|
|
2241
|
-
getExtensionLiveChannels: async (params, options) => this.callApi({
|
|
2281
|
+
getExtensionLiveChannels: async (params, options = {}) => this.callApi({
|
|
2242
2282
|
path: "/extensions/live",
|
|
2243
2283
|
params,
|
|
2244
2284
|
options
|
|
@@ -2272,7 +2312,7 @@ var TwitchApi = class {
|
|
|
2272
2312
|
*
|
|
2273
2313
|
* @see https://dev.twitch.tv/docs/api/reference#get-extension-secrets
|
|
2274
2314
|
*/
|
|
2275
|
-
getExtensionSecrets: async (options) => this.callApi({
|
|
2315
|
+
getExtensionSecrets: async (options = {}) => this.callApi({
|
|
2276
2316
|
path: "/extensions/jwt/secrets",
|
|
2277
2317
|
options
|
|
2278
2318
|
}),
|
|
@@ -2306,7 +2346,7 @@ var TwitchApi = class {
|
|
|
2306
2346
|
*
|
|
2307
2347
|
* @see https://dev.twitch.tv/docs/api/reference#create-extension-secret
|
|
2308
2348
|
*/
|
|
2309
|
-
createExtensionSecret: async (params, options) => this.callApi({
|
|
2349
|
+
createExtensionSecret: async (params, options = {}) => this.callApi({
|
|
2310
2350
|
path: "/extensions/jwt/secrets",
|
|
2311
2351
|
method: "POST",
|
|
2312
2352
|
params,
|
|
@@ -2348,7 +2388,7 @@ var TwitchApi = class {
|
|
|
2348
2388
|
*
|
|
2349
2389
|
* @see https://dev.twitch.tv/docs/api/reference#send-extension-chat-message
|
|
2350
2390
|
*/
|
|
2351
|
-
sendExtensionChatMessage: async (params, body, options) => this.callApi({
|
|
2391
|
+
sendExtensionChatMessage: async (params, body, options = {}) => this.callApi({
|
|
2352
2392
|
path: "/extensions/chat",
|
|
2353
2393
|
method: "POST",
|
|
2354
2394
|
params,
|
|
@@ -2389,7 +2429,7 @@ var TwitchApi = class {
|
|
|
2389
2429
|
*
|
|
2390
2430
|
* @see https://dev.twitch.tv/docs/api/reference#get-extensions
|
|
2391
2431
|
*/
|
|
2392
|
-
getExtensions: async (params, options) => this.callApi({
|
|
2432
|
+
getExtensions: async (params, options = {}) => this.callApi({
|
|
2393
2433
|
path: "/extensions",
|
|
2394
2434
|
params,
|
|
2395
2435
|
options
|
|
@@ -2427,7 +2467,7 @@ var TwitchApi = class {
|
|
|
2427
2467
|
*
|
|
2428
2468
|
* @see https://dev.twitch.tv/docs/api/reference#get-released-extensions
|
|
2429
2469
|
*/
|
|
2430
|
-
getReleasedExtensions: async (params, options) => this.callApi({
|
|
2470
|
+
getReleasedExtensions: async (params, options = {}) => this.callApi({
|
|
2431
2471
|
path: "/extensions/released",
|
|
2432
2472
|
params,
|
|
2433
2473
|
options
|
|
@@ -2461,7 +2501,7 @@ var TwitchApi = class {
|
|
|
2461
2501
|
*
|
|
2462
2502
|
* @see https://dev.twitch.tv/docs/api/reference#get-extension-bits-products
|
|
2463
2503
|
*/
|
|
2464
|
-
getExtensionBitsProducts: async (params = null, options) => this.callApi({
|
|
2504
|
+
getExtensionBitsProducts: async (params = null, options = {}) => this.callApi({
|
|
2465
2505
|
path: "/bits/extensions",
|
|
2466
2506
|
params,
|
|
2467
2507
|
options
|
|
@@ -2502,7 +2542,7 @@ var TwitchApi = class {
|
|
|
2502
2542
|
*
|
|
2503
2543
|
* @see https://dev.twitch.tv/docs/api/reference#update-extension-bits-product
|
|
2504
2544
|
*/
|
|
2505
|
-
updateExtensionBitsProduct: async (body, options) => this.callApi({
|
|
2545
|
+
updateExtensionBitsProduct: async (body, options = {}) => this.callApi({
|
|
2506
2546
|
path: "/bits/extensions",
|
|
2507
2547
|
method: "PUT",
|
|
2508
2548
|
body,
|
|
@@ -2566,7 +2606,7 @@ var TwitchApi = class {
|
|
|
2566
2606
|
*
|
|
2567
2607
|
* @see https://dev.twitch.tv/docs/api/reference#create-eventsub-subscription
|
|
2568
2608
|
*/
|
|
2569
|
-
createEventSubSubscription: async (body, options) => this.callApi({
|
|
2609
|
+
createEventSubSubscription: async (body, options = {}) => this.callApi({
|
|
2570
2610
|
path: "/eventsub/subscriptions",
|
|
2571
2611
|
method: "POST",
|
|
2572
2612
|
body,
|
|
@@ -2607,7 +2647,7 @@ var TwitchApi = class {
|
|
|
2607
2647
|
*
|
|
2608
2648
|
* @see https://dev.twitch.tv/docs/api/reference#delete-eventsub-subscription
|
|
2609
2649
|
*/
|
|
2610
|
-
deleteEventSubSubscription: async (params, options) => this.callApi({
|
|
2650
|
+
deleteEventSubSubscription: async (params, options = {}) => this.callApi({
|
|
2611
2651
|
path: "/eventsub/subscriptions",
|
|
2612
2652
|
method: "DELETE",
|
|
2613
2653
|
params,
|
|
@@ -2618,7 +2658,7 @@ var TwitchApi = class {
|
|
|
2618
2658
|
*
|
|
2619
2659
|
* __Authorization:__
|
|
2620
2660
|
*
|
|
2621
|
-
* If you use [
|
|
2661
|
+
* 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.
|
|
2622
2662
|
*
|
|
2623
2663
|
* 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.
|
|
2624
2664
|
*
|
|
@@ -2651,7 +2691,7 @@ var TwitchApi = class {
|
|
|
2651
2691
|
*
|
|
2652
2692
|
* @see https://dev.twitch.tv/docs/api/reference#get-eventsub-subscriptions
|
|
2653
2693
|
*/
|
|
2654
|
-
getEventSubSubscriptions: async (params = null, options) => this.callApi({
|
|
2694
|
+
getEventSubSubscriptions: async (params = null, options = {}) => this.callApi({
|
|
2655
2695
|
path: "/eventsub/subscriptions",
|
|
2656
2696
|
params,
|
|
2657
2697
|
options
|
|
@@ -2688,7 +2728,7 @@ var TwitchApi = class {
|
|
|
2688
2728
|
*
|
|
2689
2729
|
* @see https://dev.twitch.tv/docs/api/reference#get-top-games
|
|
2690
2730
|
*/
|
|
2691
|
-
getTopGames: async (params = null, options) => this.callApi({
|
|
2731
|
+
getTopGames: async (params = null, options = {}) => this.callApi({
|
|
2692
2732
|
path: "/games/top",
|
|
2693
2733
|
params,
|
|
2694
2734
|
options
|
|
@@ -2725,7 +2765,7 @@ var TwitchApi = class {
|
|
|
2725
2765
|
*
|
|
2726
2766
|
* @see https://dev.twitch.tv/docs/api/reference#get-games
|
|
2727
2767
|
*/
|
|
2728
|
-
getGames: async (params = null, options) => this.callApi({
|
|
2768
|
+
getGames: async (params = null, options = {}) => this.callApi({
|
|
2729
2769
|
path: "/games",
|
|
2730
2770
|
params,
|
|
2731
2771
|
options
|
|
@@ -2765,7 +2805,7 @@ var TwitchApi = class {
|
|
|
2765
2805
|
*
|
|
2766
2806
|
* @see https://dev.twitch.tv/docs/api/reference#get-creator-goals
|
|
2767
2807
|
*/
|
|
2768
|
-
getCreatorGoals: async (params, options) => this.callApi({
|
|
2808
|
+
getCreatorGoals: async (params, options = {}) => this.callApi({
|
|
2769
2809
|
path: "/goals",
|
|
2770
2810
|
params,
|
|
2771
2811
|
options
|
|
@@ -2799,7 +2839,7 @@ var TwitchApi = class {
|
|
|
2799
2839
|
*
|
|
2800
2840
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-guest-star-settings
|
|
2801
2841
|
*/
|
|
2802
|
-
getChannelGuestStarSettings: async (params, options) => this.callApi({
|
|
2842
|
+
getChannelGuestStarSettings: async (params, options = {}) => this.callApi({
|
|
2803
2843
|
path: "/guest_star/channel_settings",
|
|
2804
2844
|
params,
|
|
2805
2845
|
options
|
|
@@ -2830,7 +2870,7 @@ var TwitchApi = class {
|
|
|
2830
2870
|
*
|
|
2831
2871
|
* @see https://dev.twitch.tv/docs/api/reference#update-channel-guest-star-settings
|
|
2832
2872
|
*/
|
|
2833
|
-
updateChannelGuestStarSettings: async (params, body = null, options) => this.callApi({
|
|
2873
|
+
updateChannelGuestStarSettings: async (params, body = null, options = {}) => this.callApi({
|
|
2834
2874
|
path: "/guest_star/channel_settings",
|
|
2835
2875
|
method: "PUT",
|
|
2836
2876
|
params,
|
|
@@ -2864,7 +2904,7 @@ var TwitchApi = class {
|
|
|
2864
2904
|
*
|
|
2865
2905
|
* @see https://dev.twitch.tv/docs/api/reference#get-guest-star-session
|
|
2866
2906
|
*/
|
|
2867
|
-
getGuestStarSession: async (params, options) => this.callApi({
|
|
2907
|
+
getGuestStarSession: async (params, options = {}) => this.callApi({
|
|
2868
2908
|
path: "/guest_star/session",
|
|
2869
2909
|
params,
|
|
2870
2910
|
options
|
|
@@ -2900,7 +2940,7 @@ var TwitchApi = class {
|
|
|
2900
2940
|
*
|
|
2901
2941
|
* @see https://dev.twitch.tv/docs/api/reference#create-guest-star-session
|
|
2902
2942
|
*/
|
|
2903
|
-
createGuestStarSession: async (params, options) => this.callApi({
|
|
2943
|
+
createGuestStarSession: async (params, options = {}) => this.callApi({
|
|
2904
2944
|
path: "/guest_star/session",
|
|
2905
2945
|
method: "POST",
|
|
2906
2946
|
params,
|
|
@@ -2934,7 +2974,7 @@ var TwitchApi = class {
|
|
|
2934
2974
|
*
|
|
2935
2975
|
* @see https://dev.twitch.tv/docs/api/reference#end-guest-star-session
|
|
2936
2976
|
*/
|
|
2937
|
-
endGuestStarSession: async (params, options) => this.callApi({
|
|
2977
|
+
endGuestStarSession: async (params, options = {}) => this.callApi({
|
|
2938
2978
|
path: "/guest_star/session",
|
|
2939
2979
|
method: "DELETE",
|
|
2940
2980
|
params,
|
|
@@ -2963,7 +3003,7 @@ var TwitchApi = class {
|
|
|
2963
3003
|
*
|
|
2964
3004
|
* @see https://dev.twitch.tv/docs/api/reference#get-guest-star-invites
|
|
2965
3005
|
*/
|
|
2966
|
-
getGuestStarInvites: async (params, options) => this.callApi({
|
|
3006
|
+
getGuestStarInvites: async (params, options = {}) => this.callApi({
|
|
2967
3007
|
path: "/guest_star/invites",
|
|
2968
3008
|
params,
|
|
2969
3009
|
options
|
|
@@ -2999,7 +3039,7 @@ var TwitchApi = class {
|
|
|
2999
3039
|
*
|
|
3000
3040
|
* @see https://dev.twitch.tv/docs/api/reference#send-guest-star-invite
|
|
3001
3041
|
*/
|
|
3002
|
-
sendGuestStarInvite: async (params, options) => this.callApi({
|
|
3042
|
+
sendGuestStarInvite: async (params, options = {}) => this.callApi({
|
|
3003
3043
|
path: "/guest_star/invites",
|
|
3004
3044
|
method: "POST",
|
|
3005
3045
|
params,
|
|
@@ -3034,7 +3074,7 @@ var TwitchApi = class {
|
|
|
3034
3074
|
*
|
|
3035
3075
|
* @see https://dev.twitch.tv/docs/api/reference#delete-guest-star-invite
|
|
3036
3076
|
*/
|
|
3037
|
-
deleteGuestStarInvite: async (params, options) => this.callApi({
|
|
3077
|
+
deleteGuestStarInvite: async (params, options = {}) => this.callApi({
|
|
3038
3078
|
path: "/guest_star/invites",
|
|
3039
3079
|
method: "DELETE",
|
|
3040
3080
|
params,
|
|
@@ -3079,7 +3119,7 @@ var TwitchApi = class {
|
|
|
3079
3119
|
*
|
|
3080
3120
|
* @see https://dev.twitch.tv/docs/api/reference#assign-guest-star-slot
|
|
3081
3121
|
*/
|
|
3082
|
-
assignGuestStarSlot: async (params, options) => this.callApi({
|
|
3122
|
+
assignGuestStarSlot: async (params, options = {}) => this.callApi({
|
|
3083
3123
|
path: "/guest_star/slot",
|
|
3084
3124
|
method: "POST",
|
|
3085
3125
|
params,
|
|
@@ -3111,7 +3151,7 @@ var TwitchApi = class {
|
|
|
3111
3151
|
*
|
|
3112
3152
|
* @see https://dev.twitch.tv/docs/api/reference#update-guest-star-slot
|
|
3113
3153
|
*/
|
|
3114
|
-
updateGuestStarSlot: async (params, options) => this.callApi({
|
|
3154
|
+
updateGuestStarSlot: async (params, options = {}) => this.callApi({
|
|
3115
3155
|
path: "/guest_star/slot",
|
|
3116
3156
|
method: "PATCH",
|
|
3117
3157
|
params,
|
|
@@ -3153,7 +3193,7 @@ var TwitchApi = class {
|
|
|
3153
3193
|
*
|
|
3154
3194
|
* @see https://dev.twitch.tv/docs/api/reference#delete-guest-star-slot
|
|
3155
3195
|
*/
|
|
3156
|
-
deleteGuestStarSlot: async (params, options) => this.callApi({
|
|
3196
|
+
deleteGuestStarSlot: async (params, options = {}) => this.callApi({
|
|
3157
3197
|
path: "/guest_star/slot",
|
|
3158
3198
|
method: "DELETE",
|
|
3159
3199
|
params,
|
|
@@ -3191,7 +3231,7 @@ var TwitchApi = class {
|
|
|
3191
3231
|
*
|
|
3192
3232
|
* @see https://dev.twitch.tv/docs/api/reference#update-guest-star-slot-settings
|
|
3193
3233
|
*/
|
|
3194
|
-
updateGuestStarSlotSettings: async (params, options) => this.callApi({
|
|
3234
|
+
updateGuestStarSlotSettings: async (params, options = {}) => this.callApi({
|
|
3195
3235
|
path: "/guest_star/slot_settings",
|
|
3196
3236
|
method: "PATCH",
|
|
3197
3237
|
params,
|
|
@@ -3228,7 +3268,7 @@ var TwitchApi = class {
|
|
|
3228
3268
|
*
|
|
3229
3269
|
* @see https://dev.twitch.tv/docs/api/reference#get-hype-train-events
|
|
3230
3270
|
*/
|
|
3231
|
-
getHypeTrainEvents: async (params, options) => this.callApi({
|
|
3271
|
+
getHypeTrainEvents: async (params, options = {}) => this.callApi({
|
|
3232
3272
|
path: "/hypetrain/events",
|
|
3233
3273
|
params,
|
|
3234
3274
|
options
|
|
@@ -3289,7 +3329,7 @@ var TwitchApi = class {
|
|
|
3289
3329
|
*
|
|
3290
3330
|
* @see https://dev.twitch.tv/docs/api/reference#check-automod-status
|
|
3291
3331
|
*/
|
|
3292
|
-
checkAutoModStatus: async (params, body, options) => this.callApi({
|
|
3332
|
+
checkAutoModStatus: async (params, body, options = {}) => this.callApi({
|
|
3293
3333
|
path: "/moderation/enforcements/status",
|
|
3294
3334
|
method: "POST",
|
|
3295
3335
|
params,
|
|
@@ -3340,7 +3380,7 @@ var TwitchApi = class {
|
|
|
3340
3380
|
*
|
|
3341
3381
|
* @see https://dev.twitch.tv/docs/api/reference#manage-held-automod-messages
|
|
3342
3382
|
*/
|
|
3343
|
-
manageHeldAutoModMessages: async (body, options) => this.callApi({
|
|
3383
|
+
manageHeldAutoModMessages: async (body, options = {}) => this.callApi({
|
|
3344
3384
|
path: "/moderation/automod/message",
|
|
3345
3385
|
method: "POST",
|
|
3346
3386
|
body,
|
|
@@ -3382,7 +3422,7 @@ var TwitchApi = class {
|
|
|
3382
3422
|
*
|
|
3383
3423
|
* @see https://dev.twitch.tv/docs/api/reference#get-automod-settings
|
|
3384
3424
|
*/
|
|
3385
|
-
getAutoModSettings: async (params, options) => this.callApi({
|
|
3425
|
+
getAutoModSettings: async (params, options = {}) => this.callApi({
|
|
3386
3426
|
path: "/moderation/automod/settings",
|
|
3387
3427
|
params,
|
|
3388
3428
|
options
|
|
@@ -3439,7 +3479,7 @@ var TwitchApi = class {
|
|
|
3439
3479
|
*
|
|
3440
3480
|
* @see https://dev.twitch.tv/docs/api/reference#update-automod-settings
|
|
3441
3481
|
*/
|
|
3442
|
-
updateAutoModSettings: async (params, body = null, options) => this.callApi({
|
|
3482
|
+
updateAutoModSettings: async (params, body = null, options = {}) => this.callApi({
|
|
3443
3483
|
path: "/moderation/automod/settings",
|
|
3444
3484
|
method: "PUT",
|
|
3445
3485
|
params,
|
|
@@ -3477,7 +3517,7 @@ var TwitchApi = class {
|
|
|
3477
3517
|
*
|
|
3478
3518
|
* @see https://dev.twitch.tv/docs/api/reference#get-banned-users
|
|
3479
3519
|
*/
|
|
3480
|
-
getBannedUsers: async (params, options) => this.callApi({
|
|
3520
|
+
getBannedUsers: async (params, options = {}) => this.callApi({
|
|
3481
3521
|
path: "/moderation/banned",
|
|
3482
3522
|
params,
|
|
3483
3523
|
options
|
|
@@ -3538,7 +3578,7 @@ var TwitchApi = class {
|
|
|
3538
3578
|
*
|
|
3539
3579
|
* @see https://dev.twitch.tv/docs/api/reference#ban-user
|
|
3540
3580
|
*/
|
|
3541
|
-
banUser: async (params, body, options) => this.callApi({
|
|
3581
|
+
banUser: async (params, body, options = {}) => this.callApi({
|
|
3542
3582
|
path: "/moderation/bans",
|
|
3543
3583
|
method: "POST",
|
|
3544
3584
|
params,
|
|
@@ -3593,12 +3633,101 @@ var TwitchApi = class {
|
|
|
3593
3633
|
*
|
|
3594
3634
|
* @see https://dev.twitch.tv/docs/api/reference#unban-user
|
|
3595
3635
|
*/
|
|
3596
|
-
unbanUser: async (params, options) => this.callApi({
|
|
3636
|
+
unbanUser: async (params, options = {}) => this.callApi({
|
|
3597
3637
|
path: "/moderation/bans",
|
|
3598
3638
|
method: "DELETE",
|
|
3599
3639
|
params,
|
|
3600
3640
|
options
|
|
3601
3641
|
}),
|
|
3642
|
+
/**
|
|
3643
|
+
* BETA Gets a list of unban requests for a broadcaster’s channel.
|
|
3644
|
+
*
|
|
3645
|
+
* __Authorization:__
|
|
3646
|
+
*
|
|
3647
|
+
* * Requires a user access token that includes the **moderator:read:unban\_requests** or **moderator:manage:unban\_requests** scope.
|
|
3648
|
+
* * Query parameter `moderator_id` must match the `user_id` in the [user access token](https://dev.twitch.tv/docs/authentication/#user-access-tokens).
|
|
3649
|
+
*
|
|
3650
|
+
* __URL:__
|
|
3651
|
+
*
|
|
3652
|
+
* `GET https://api.twitch.tv/helix/moderation/unban_requests`
|
|
3653
|
+
*
|
|
3654
|
+
* __Response Codes:__
|
|
3655
|
+
*
|
|
3656
|
+
* _200 OK_
|
|
3657
|
+
*
|
|
3658
|
+
* Successfully retrieved the list of unban requests.
|
|
3659
|
+
*
|
|
3660
|
+
* _400 Bad Request_
|
|
3661
|
+
*
|
|
3662
|
+
* * The _broadcaster\_id_ query parameter is required.
|
|
3663
|
+
* * The ID in the _broadcaster\_id_ query parameter is not valid.
|
|
3664
|
+
* * The _moderator\_id_ query parameter is required.
|
|
3665
|
+
* * The ID in the _moderator\_id_ query parameter is not valid.
|
|
3666
|
+
* * The pagination cursor is not valid.
|
|
3667
|
+
*
|
|
3668
|
+
* _401 Unauthorized_
|
|
3669
|
+
*
|
|
3670
|
+
* * The ID in _moderator\_id_ must match the user ID in the user access token.
|
|
3671
|
+
* * The Authorization header is required and must contain a user access token.
|
|
3672
|
+
* * The user access token must include the **moderator:read:unban\_requests** or **moderator:manage:unban\_requests** scope.
|
|
3673
|
+
* * The access token is not valid.
|
|
3674
|
+
* * The client ID specified in the Client-Id header does not match the client ID specified in the access token.
|
|
3675
|
+
*
|
|
3676
|
+
* @see https://dev.twitch.tv/docs/api/reference#get-unban-requests
|
|
3677
|
+
*/
|
|
3678
|
+
getUnbanRequests: async (params, options = {}) => this.callApi({
|
|
3679
|
+
path: "/moderation/unban_requests",
|
|
3680
|
+
params,
|
|
3681
|
+
options
|
|
3682
|
+
}),
|
|
3683
|
+
/**
|
|
3684
|
+
* BETA Resolves an unban request by approving or denying it.
|
|
3685
|
+
*
|
|
3686
|
+
* __Authorization:__
|
|
3687
|
+
*
|
|
3688
|
+
* * Requires a user access token that includes the **moderator:manage:unban\_requests** scope.
|
|
3689
|
+
* * Query parameter `moderator_id` must match the `user_id` in the [user access token](https://dev.twitch.tv/docs/authentication/#user-access-tokens).
|
|
3690
|
+
*
|
|
3691
|
+
* __URL:__
|
|
3692
|
+
*
|
|
3693
|
+
* `PATCH https://api.twitch.tv/helix/moderation/unban_requests`
|
|
3694
|
+
*
|
|
3695
|
+
* __Response Codes:__
|
|
3696
|
+
*
|
|
3697
|
+
* _200 OK_
|
|
3698
|
+
*
|
|
3699
|
+
* Successfully resolved the unban request.
|
|
3700
|
+
*
|
|
3701
|
+
* _400 Bad Request_
|
|
3702
|
+
*
|
|
3703
|
+
* * The _broadcaster\_id_ query parameter is required.
|
|
3704
|
+
* * The ID in the _broadcaster\_id_ query parameter is not valid.
|
|
3705
|
+
* * The _moderator\_id_ query parameter is required.
|
|
3706
|
+
* * The ID in the _moderator\_id_ query parameter is not valid.
|
|
3707
|
+
* * The pagination cursor is not valid.
|
|
3708
|
+
* * The broadcaster is not receiving unban requests
|
|
3709
|
+
* * Invalid requested update
|
|
3710
|
+
*
|
|
3711
|
+
* _401 Unauthorized_
|
|
3712
|
+
*
|
|
3713
|
+
* * The ID in _moderator\_id_ must match the user ID in the user access token.
|
|
3714
|
+
* * The Authorization header is required and must contain a user access token.
|
|
3715
|
+
* * The user access token must include the **moderator:manage:unban\_requests** scope.
|
|
3716
|
+
* * The access token is not valid.
|
|
3717
|
+
* * The client ID specified in the Client-Id header does not match the client ID specified in the access token.
|
|
3718
|
+
*
|
|
3719
|
+
* _404 Not Found_
|
|
3720
|
+
*
|
|
3721
|
+
* The unban request ID was not found.
|
|
3722
|
+
*
|
|
3723
|
+
* @see https://dev.twitch.tv/docs/api/reference#resolve-unban-requests
|
|
3724
|
+
*/
|
|
3725
|
+
resolveUnbanRequests: async (params, options = {}) => this.callApi({
|
|
3726
|
+
path: "/moderation/unban_requests",
|
|
3727
|
+
method: "PATCH",
|
|
3728
|
+
params,
|
|
3729
|
+
options
|
|
3730
|
+
}),
|
|
3602
3731
|
/**
|
|
3603
3732
|
* Gets the broadcaster’s list of non-private, blocked words or phrases. These are the terms that the broadcaster or moderator added manually or that were denied by AutoMod.
|
|
3604
3733
|
*
|
|
@@ -3635,7 +3764,7 @@ var TwitchApi = class {
|
|
|
3635
3764
|
*
|
|
3636
3765
|
* @see https://dev.twitch.tv/docs/api/reference#get-blocked-terms
|
|
3637
3766
|
*/
|
|
3638
|
-
getBlockedTerms: async (params, options) => this.callApi({
|
|
3767
|
+
getBlockedTerms: async (params, options = {}) => this.callApi({
|
|
3639
3768
|
path: "/moderation/blocked_terms",
|
|
3640
3769
|
params,
|
|
3641
3770
|
options
|
|
@@ -3678,7 +3807,7 @@ var TwitchApi = class {
|
|
|
3678
3807
|
*
|
|
3679
3808
|
* @see https://dev.twitch.tv/docs/api/reference#add-blocked-term
|
|
3680
3809
|
*/
|
|
3681
|
-
addBlockedTerm: async (params, body, options) => this.callApi({
|
|
3810
|
+
addBlockedTerm: async (params, body, options = {}) => this.callApi({
|
|
3682
3811
|
path: "/moderation/blocked_terms",
|
|
3683
3812
|
method: "POST",
|
|
3684
3813
|
params,
|
|
@@ -3722,7 +3851,7 @@ var TwitchApi = class {
|
|
|
3722
3851
|
*
|
|
3723
3852
|
* @see https://dev.twitch.tv/docs/api/reference#remove-blocked-term
|
|
3724
3853
|
*/
|
|
3725
|
-
removeBlockedTerm: async (params, options) => this.callApi({
|
|
3854
|
+
removeBlockedTerm: async (params, options = {}) => this.callApi({
|
|
3726
3855
|
path: "/moderation/blocked_terms",
|
|
3727
3856
|
method: "DELETE",
|
|
3728
3857
|
params,
|
|
@@ -3768,14 +3897,14 @@ var TwitchApi = class {
|
|
|
3768
3897
|
*
|
|
3769
3898
|
* @see https://dev.twitch.tv/docs/api/reference#delete-chat-messages
|
|
3770
3899
|
*/
|
|
3771
|
-
deleteChatMessages: async (params, options) => this.callApi({
|
|
3900
|
+
deleteChatMessages: async (params, options = {}) => this.callApi({
|
|
3772
3901
|
path: "/moderation/chat",
|
|
3773
3902
|
method: "DELETE",
|
|
3774
3903
|
params,
|
|
3775
3904
|
options
|
|
3776
3905
|
}),
|
|
3777
3906
|
/**
|
|
3778
|
-
*
|
|
3907
|
+
* Gets a list of channels that the specified user has moderator privileges in.
|
|
3779
3908
|
*
|
|
3780
3909
|
* __Authorization:__
|
|
3781
3910
|
*
|
|
@@ -3800,7 +3929,7 @@ var TwitchApi = class {
|
|
|
3800
3929
|
*
|
|
3801
3930
|
* @see https://dev.twitch.tv/docs/api/reference#get-moderated-channels
|
|
3802
3931
|
*/
|
|
3803
|
-
getModeratedChannels: async (params, options) => this.callApi({
|
|
3932
|
+
getModeratedChannels: async (params, options = {}) => this.callApi({
|
|
3804
3933
|
path: "/moderation/channels",
|
|
3805
3934
|
params,
|
|
3806
3935
|
options
|
|
@@ -3836,7 +3965,7 @@ var TwitchApi = class {
|
|
|
3836
3965
|
*
|
|
3837
3966
|
* @see https://dev.twitch.tv/docs/api/reference#get-moderators
|
|
3838
3967
|
*/
|
|
3839
|
-
getModerators: async (params, options) => this.callApi({
|
|
3968
|
+
getModerators: async (params, options = {}) => this.callApi({
|
|
3840
3969
|
path: "/moderation/moderators",
|
|
3841
3970
|
params,
|
|
3842
3971
|
options
|
|
@@ -3885,7 +4014,7 @@ var TwitchApi = class {
|
|
|
3885
4014
|
*
|
|
3886
4015
|
* @see https://dev.twitch.tv/docs/api/reference#add-channel-moderator
|
|
3887
4016
|
*/
|
|
3888
|
-
addChannelModerator: async (params, options) => this.callApi({
|
|
4017
|
+
addChannelModerator: async (params, options = {}) => this.callApi({
|
|
3889
4018
|
path: "/moderation/moderators",
|
|
3890
4019
|
method: "POST",
|
|
3891
4020
|
params,
|
|
@@ -3930,7 +4059,7 @@ var TwitchApi = class {
|
|
|
3930
4059
|
*
|
|
3931
4060
|
* @see https://dev.twitch.tv/docs/api/reference#remove-channel-moderator
|
|
3932
4061
|
*/
|
|
3933
|
-
removeChannelModerator: async (params, options) => this.callApi({
|
|
4062
|
+
removeChannelModerator: async (params, options = {}) => this.callApi({
|
|
3934
4063
|
path: "/moderation/moderators",
|
|
3935
4064
|
method: "DELETE",
|
|
3936
4065
|
params,
|
|
@@ -3969,7 +4098,7 @@ var TwitchApi = class {
|
|
|
3969
4098
|
*
|
|
3970
4099
|
* @see https://dev.twitch.tv/docs/api/reference#get-vips
|
|
3971
4100
|
*/
|
|
3972
|
-
getVIPs: async (params, options) => this.callApi({
|
|
4101
|
+
getVIPs: async (params, options = {}) => this.callApi({
|
|
3973
4102
|
path: "/channels/vips",
|
|
3974
4103
|
params,
|
|
3975
4104
|
options
|
|
@@ -4035,7 +4164,7 @@ var TwitchApi = class {
|
|
|
4035
4164
|
*
|
|
4036
4165
|
* @see https://dev.twitch.tv/docs/api/reference#add-channel-vip
|
|
4037
4166
|
*/
|
|
4038
|
-
addChannelVIP: async (params, options) => this.callApi({
|
|
4167
|
+
addChannelVIP: async (params, options = {}) => this.callApi({
|
|
4039
4168
|
path: "/channels/vips",
|
|
4040
4169
|
method: "POST",
|
|
4041
4170
|
params,
|
|
@@ -4094,7 +4223,7 @@ var TwitchApi = class {
|
|
|
4094
4223
|
*
|
|
4095
4224
|
* @see https://dev.twitch.tv/docs/api/reference#remove-channel-vip
|
|
4096
4225
|
*/
|
|
4097
|
-
removeChannelVIP: async (params, options) => this.callApi({
|
|
4226
|
+
removeChannelVIP: async (params, options = {}) => this.callApi({
|
|
4098
4227
|
path: "/channels/vips",
|
|
4099
4228
|
method: "DELETE",
|
|
4100
4229
|
params,
|
|
@@ -4140,7 +4269,7 @@ var TwitchApi = class {
|
|
|
4140
4269
|
*
|
|
4141
4270
|
* @see https://dev.twitch.tv/docs/api/reference#update-shield-mode-status
|
|
4142
4271
|
*/
|
|
4143
|
-
updateShieldModeStatus: async (params, body, options) => this.callApi({
|
|
4272
|
+
updateShieldModeStatus: async (params, body, options = {}) => this.callApi({
|
|
4144
4273
|
path: "/moderation/shield_mode",
|
|
4145
4274
|
method: "PUT",
|
|
4146
4275
|
params,
|
|
@@ -4185,7 +4314,7 @@ var TwitchApi = class {
|
|
|
4185
4314
|
*
|
|
4186
4315
|
* @see https://dev.twitch.tv/docs/api/reference#get-shield-mode-status
|
|
4187
4316
|
*/
|
|
4188
|
-
getShieldModeStatus: async (params, options) => this.callApi({
|
|
4317
|
+
getShieldModeStatus: async (params, options = {}) => this.callApi({
|
|
4189
4318
|
path: "/moderation/shield_mode",
|
|
4190
4319
|
params,
|
|
4191
4320
|
options
|
|
@@ -4209,7 +4338,7 @@ var TwitchApi = class {
|
|
|
4209
4338
|
*
|
|
4210
4339
|
* _200 OK_
|
|
4211
4340
|
*
|
|
4212
|
-
* Successfully retrieved the broadcaster
|
|
4341
|
+
* Successfully retrieved the broadcaster's polls.
|
|
4213
4342
|
*
|
|
4214
4343
|
* _400 Bad Request_
|
|
4215
4344
|
*
|
|
@@ -4229,7 +4358,7 @@ var TwitchApi = class {
|
|
|
4229
4358
|
*
|
|
4230
4359
|
* @see https://dev.twitch.tv/docs/api/reference#get-polls
|
|
4231
4360
|
*/
|
|
4232
|
-
getPolls: async (params, options) => this.callApi({
|
|
4361
|
+
getPolls: async (params, options = {}) => this.callApi({
|
|
4233
4362
|
path: "/polls",
|
|
4234
4363
|
params,
|
|
4235
4364
|
options
|
|
@@ -4278,7 +4407,7 @@ var TwitchApi = class {
|
|
|
4278
4407
|
*
|
|
4279
4408
|
* @see https://dev.twitch.tv/docs/api/reference#create-poll
|
|
4280
4409
|
*/
|
|
4281
|
-
createPoll: async (body, options) => this.callApi({
|
|
4410
|
+
createPoll: async (body, options = {}) => this.callApi({
|
|
4282
4411
|
path: "/polls",
|
|
4283
4412
|
method: "POST",
|
|
4284
4413
|
body,
|
|
@@ -4319,7 +4448,7 @@ var TwitchApi = class {
|
|
|
4319
4448
|
*
|
|
4320
4449
|
* @see https://dev.twitch.tv/docs/api/reference#end-poll
|
|
4321
4450
|
*/
|
|
4322
|
-
endPoll: async (body, options) => this.callApi({
|
|
4451
|
+
endPoll: async (body, options = {}) => this.callApi({
|
|
4323
4452
|
path: "/polls",
|
|
4324
4453
|
method: "PATCH",
|
|
4325
4454
|
body,
|
|
@@ -4358,7 +4487,7 @@ var TwitchApi = class {
|
|
|
4358
4487
|
*
|
|
4359
4488
|
* @see https://dev.twitch.tv/docs/api/reference#get-predictions
|
|
4360
4489
|
*/
|
|
4361
|
-
getPredictions: async (params, options) => this.callApi({
|
|
4490
|
+
getPredictions: async (params, options = {}) => this.callApi({
|
|
4362
4491
|
path: "/predictions",
|
|
4363
4492
|
params,
|
|
4364
4493
|
options
|
|
@@ -4407,7 +4536,7 @@ var TwitchApi = class {
|
|
|
4407
4536
|
*
|
|
4408
4537
|
* @see https://dev.twitch.tv/docs/api/reference#create-prediction
|
|
4409
4538
|
*/
|
|
4410
|
-
createPrediction: async (body, options) => this.callApi({
|
|
4539
|
+
createPrediction: async (body, options = {}) => this.callApi({
|
|
4411
4540
|
path: "/predictions",
|
|
4412
4541
|
method: "POST",
|
|
4413
4542
|
body,
|
|
@@ -4455,7 +4584,7 @@ var TwitchApi = class {
|
|
|
4455
4584
|
*
|
|
4456
4585
|
* @see https://dev.twitch.tv/docs/api/reference#end-prediction
|
|
4457
4586
|
*/
|
|
4458
|
-
endPrediction: async (body, options) => this.callApi({
|
|
4587
|
+
endPrediction: async (body, options = {}) => this.callApi({
|
|
4459
4588
|
path: "/predictions",
|
|
4460
4589
|
method: "PATCH",
|
|
4461
4590
|
body,
|
|
@@ -4519,7 +4648,7 @@ var TwitchApi = class {
|
|
|
4519
4648
|
*
|
|
4520
4649
|
* @see https://dev.twitch.tv/docs/api/reference#start-a-raid
|
|
4521
4650
|
*/
|
|
4522
|
-
startRaid: async (params = null, options) => this.callApi({
|
|
4651
|
+
startRaid: async (params = null, options = {}) => this.callApi({
|
|
4523
4652
|
path: "/raids",
|
|
4524
4653
|
method: "POST",
|
|
4525
4654
|
params,
|
|
@@ -4568,7 +4697,7 @@ var TwitchApi = class {
|
|
|
4568
4697
|
*
|
|
4569
4698
|
* @see https://dev.twitch.tv/docs/api/reference#cancel-a-raid
|
|
4570
4699
|
*/
|
|
4571
|
-
cancelRaid: async (params, options) => this.callApi({
|
|
4700
|
+
cancelRaid: async (params, options = {}) => this.callApi({
|
|
4572
4701
|
path: "/raids",
|
|
4573
4702
|
method: "DELETE",
|
|
4574
4703
|
params,
|
|
@@ -4616,7 +4745,7 @@ var TwitchApi = class {
|
|
|
4616
4745
|
*
|
|
4617
4746
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-stream-schedule
|
|
4618
4747
|
*/
|
|
4619
|
-
getChannelStreamSchedule: async (params, options) => this.callApi({
|
|
4748
|
+
getChannelStreamSchedule: async (params, options = {}) => this.callApi({
|
|
4620
4749
|
path: "/schedule",
|
|
4621
4750
|
params,
|
|
4622
4751
|
options
|
|
@@ -4651,7 +4780,7 @@ var TwitchApi = class {
|
|
|
4651
4780
|
*
|
|
4652
4781
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-icalendar
|
|
4653
4782
|
*/
|
|
4654
|
-
getChannelICalendar: async (params, options) => this.callApi({
|
|
4783
|
+
getChannelICalendar: async (params, options = {}) => this.callApi({
|
|
4655
4784
|
path: "/schedule/icalendar",
|
|
4656
4785
|
params,
|
|
4657
4786
|
options
|
|
@@ -4695,7 +4824,7 @@ var TwitchApi = class {
|
|
|
4695
4824
|
*
|
|
4696
4825
|
* @see https://dev.twitch.tv/docs/api/reference#update-channel-stream-schedule
|
|
4697
4826
|
*/
|
|
4698
|
-
updateChannelStreamSchedule: async (params, options) => this.callApi({
|
|
4827
|
+
updateChannelStreamSchedule: async (params, options = {}) => this.callApi({
|
|
4699
4828
|
path: "/schedule/settings",
|
|
4700
4829
|
method: "PATCH",
|
|
4701
4830
|
params,
|
|
@@ -4742,7 +4871,7 @@ var TwitchApi = class {
|
|
|
4742
4871
|
*
|
|
4743
4872
|
* @see https://dev.twitch.tv/docs/api/reference#create-channel-stream-schedule-segment
|
|
4744
4873
|
*/
|
|
4745
|
-
createChannelStreamScheduleSegment: async (params, body, options) => this.callApi({
|
|
4874
|
+
createChannelStreamScheduleSegment: async (params, body, options = {}) => this.callApi({
|
|
4746
4875
|
path: "/schedule/segment",
|
|
4747
4876
|
method: "POST",
|
|
4748
4877
|
params,
|
|
@@ -4794,7 +4923,7 @@ var TwitchApi = class {
|
|
|
4794
4923
|
*
|
|
4795
4924
|
* @see https://dev.twitch.tv/docs/api/reference#update-channel-stream-schedule-segment
|
|
4796
4925
|
*/
|
|
4797
|
-
updateChannelStreamScheduleSegment: async (params, body = null, options) => this.callApi({
|
|
4926
|
+
updateChannelStreamScheduleSegment: async (params, body = null, options = {}) => this.callApi({
|
|
4798
4927
|
path: "/schedule/segment",
|
|
4799
4928
|
method: "PATCH",
|
|
4800
4929
|
params,
|
|
@@ -4837,7 +4966,7 @@ var TwitchApi = class {
|
|
|
4837
4966
|
*
|
|
4838
4967
|
* @see https://dev.twitch.tv/docs/api/reference#delete-channel-stream-schedule-segment
|
|
4839
4968
|
*/
|
|
4840
|
-
deleteChannelStreamScheduleSegment: async (params, options) => this.callApi({
|
|
4969
|
+
deleteChannelStreamScheduleSegment: async (params, options = {}) => this.callApi({
|
|
4841
4970
|
path: "/schedule/segment",
|
|
4842
4971
|
method: "DELETE",
|
|
4843
4972
|
params,
|
|
@@ -4876,7 +5005,7 @@ var TwitchApi = class {
|
|
|
4876
5005
|
*
|
|
4877
5006
|
* @see https://dev.twitch.tv/docs/api/reference#search-categories
|
|
4878
5007
|
*/
|
|
4879
|
-
searchCategories: async (params, options) => this.callApi({
|
|
5008
|
+
searchCategories: async (params, options = {}) => this.callApi({
|
|
4880
5009
|
path: "/search/categories",
|
|
4881
5010
|
params,
|
|
4882
5011
|
options
|
|
@@ -4916,7 +5045,7 @@ var TwitchApi = class {
|
|
|
4916
5045
|
*
|
|
4917
5046
|
* @see https://dev.twitch.tv/docs/api/reference#search-channels
|
|
4918
5047
|
*/
|
|
4919
|
-
searchChannels: async (params, options) => this.callApi({
|
|
5048
|
+
searchChannels: async (params, options = {}) => this.callApi({
|
|
4920
5049
|
path: "/search/channels",
|
|
4921
5050
|
params,
|
|
4922
5051
|
options
|
|
@@ -4955,7 +5084,7 @@ var TwitchApi = class {
|
|
|
4955
5084
|
*
|
|
4956
5085
|
* @see https://dev.twitch.tv/docs/api/reference#get-stream-key
|
|
4957
5086
|
*/
|
|
4958
|
-
getStreamKey: async (params, options) => this.callApi({
|
|
5087
|
+
getStreamKey: async (params, options = {}) => this.callApi({
|
|
4959
5088
|
path: "/streams/key",
|
|
4960
5089
|
params,
|
|
4961
5090
|
options
|
|
@@ -4989,7 +5118,7 @@ var TwitchApi = class {
|
|
|
4989
5118
|
*
|
|
4990
5119
|
* @see https://dev.twitch.tv/docs/api/reference#get-streams
|
|
4991
5120
|
*/
|
|
4992
|
-
getStreams: async (params = null, options) => this.callApi({
|
|
5121
|
+
getStreams: async (params = null, options = {}) => this.callApi({
|
|
4993
5122
|
path: "/streams",
|
|
4994
5123
|
params,
|
|
4995
5124
|
options
|
|
@@ -5025,7 +5154,7 @@ var TwitchApi = class {
|
|
|
5025
5154
|
*
|
|
5026
5155
|
* @see https://dev.twitch.tv/docs/api/reference#get-followed-streams
|
|
5027
5156
|
*/
|
|
5028
|
-
getFollowedStreams: async (params, options) => this.callApi({
|
|
5157
|
+
getFollowedStreams: async (params, options = {}) => this.callApi({
|
|
5029
5158
|
path: "/streams/followed",
|
|
5030
5159
|
params,
|
|
5031
5160
|
options
|
|
@@ -5078,7 +5207,7 @@ var TwitchApi = class {
|
|
|
5078
5207
|
*
|
|
5079
5208
|
* @see https://dev.twitch.tv/docs/api/reference#create-stream-marker
|
|
5080
5209
|
*/
|
|
5081
|
-
createStreamMarker: async (body, options) => this.callApi({
|
|
5210
|
+
createStreamMarker: async (body, options = {}) => this.callApi({
|
|
5082
5211
|
path: "/streams/markers",
|
|
5083
5212
|
method: "POST",
|
|
5084
5213
|
body,
|
|
@@ -5122,7 +5251,7 @@ var TwitchApi = class {
|
|
|
5122
5251
|
*
|
|
5123
5252
|
* @see https://dev.twitch.tv/docs/api/reference#get-stream-markers
|
|
5124
5253
|
*/
|
|
5125
|
-
getStreamMarkers: async (params = null, options) => this.callApi({
|
|
5254
|
+
getStreamMarkers: async (params = null, options = {}) => this.callApi({
|
|
5126
5255
|
path: "/streams/markers",
|
|
5127
5256
|
params,
|
|
5128
5257
|
options
|
|
@@ -5162,7 +5291,7 @@ var TwitchApi = class {
|
|
|
5162
5291
|
*
|
|
5163
5292
|
* @see https://dev.twitch.tv/docs/api/reference#get-broadcaster-subscriptions
|
|
5164
5293
|
*/
|
|
5165
|
-
getBroadcasterSubscriptions: async (params, options) => this.callApi({
|
|
5294
|
+
getBroadcasterSubscriptions: async (params, options = {}) => this.callApi({
|
|
5166
5295
|
path: "/subscriptions",
|
|
5167
5296
|
params,
|
|
5168
5297
|
options
|
|
@@ -5205,7 +5334,7 @@ var TwitchApi = class {
|
|
|
5205
5334
|
*
|
|
5206
5335
|
* @see https://dev.twitch.tv/docs/api/reference#check-user-subscription
|
|
5207
5336
|
*/
|
|
5208
|
-
checkUserSubscription: async (params, options) => this.callApi({
|
|
5337
|
+
checkUserSubscription: async (params, options = {}) => this.callApi({
|
|
5209
5338
|
path: "/subscriptions/user",
|
|
5210
5339
|
params,
|
|
5211
5340
|
options
|
|
@@ -5244,7 +5373,7 @@ var TwitchApi = class {
|
|
|
5244
5373
|
*
|
|
5245
5374
|
* @see https://dev.twitch.tv/docs/api/reference#get-all-stream-tags
|
|
5246
5375
|
*/
|
|
5247
|
-
getAllStreamTags: async (params = null, options) => this.callApi({
|
|
5376
|
+
getAllStreamTags: async (params = null, options = {}) => this.callApi({
|
|
5248
5377
|
path: "/tags/streams",
|
|
5249
5378
|
params,
|
|
5250
5379
|
options
|
|
@@ -5281,7 +5410,7 @@ var TwitchApi = class {
|
|
|
5281
5410
|
*
|
|
5282
5411
|
* @see https://dev.twitch.tv/docs/api/reference#get-stream-tags
|
|
5283
5412
|
*/
|
|
5284
|
-
getStreamTags: async (params, options) => this.callApi({
|
|
5413
|
+
getStreamTags: async (params, options = {}) => this.callApi({
|
|
5285
5414
|
path: "/streams/tags",
|
|
5286
5415
|
params,
|
|
5287
5416
|
options
|
|
@@ -5321,7 +5450,7 @@ var TwitchApi = class {
|
|
|
5321
5450
|
*
|
|
5322
5451
|
* @see https://dev.twitch.tv/docs/api/reference#get-channel-teams
|
|
5323
5452
|
*/
|
|
5324
|
-
getChannelTeams: async (params, options) => this.callApi({
|
|
5453
|
+
getChannelTeams: async (params, options = {}) => this.callApi({
|
|
5325
5454
|
path: "/teams/channel",
|
|
5326
5455
|
params,
|
|
5327
5456
|
options
|
|
@@ -5341,7 +5470,7 @@ var TwitchApi = class {
|
|
|
5341
5470
|
*
|
|
5342
5471
|
* _200 OK_
|
|
5343
5472
|
*
|
|
5344
|
-
* Successfully retrieved the team
|
|
5473
|
+
* Successfully retrieved the team's information.
|
|
5345
5474
|
*
|
|
5346
5475
|
* _400 Bad Request_
|
|
5347
5476
|
*
|
|
@@ -5361,7 +5490,7 @@ var TwitchApi = class {
|
|
|
5361
5490
|
*
|
|
5362
5491
|
* @see https://dev.twitch.tv/docs/api/reference#get-teams
|
|
5363
5492
|
*/
|
|
5364
|
-
getTeams: async (params = null, options) => this.callApi({
|
|
5493
|
+
getTeams: async (params = null, options = {}) => this.callApi({
|
|
5365
5494
|
path: "/teams",
|
|
5366
5495
|
params,
|
|
5367
5496
|
options
|
|
@@ -5389,7 +5518,7 @@ var TwitchApi = class {
|
|
|
5389
5518
|
*
|
|
5390
5519
|
* _200 OK_
|
|
5391
5520
|
*
|
|
5392
|
-
* Successfully retrieved the specified users
|
|
5521
|
+
* Successfully retrieved the specified users' information.
|
|
5393
5522
|
*
|
|
5394
5523
|
* _400 Bad Request_
|
|
5395
5524
|
*
|
|
@@ -5404,7 +5533,7 @@ var TwitchApi = class {
|
|
|
5404
5533
|
*
|
|
5405
5534
|
* @see https://dev.twitch.tv/docs/api/reference#get-users
|
|
5406
5535
|
*/
|
|
5407
|
-
getUsers: async (params = null, options) => this.callApi({
|
|
5536
|
+
getUsers: async (params = null, options = {}) => this.callApi({
|
|
5408
5537
|
path: "/users",
|
|
5409
5538
|
params,
|
|
5410
5539
|
options
|
|
@@ -5426,7 +5555,7 @@ var TwitchApi = class {
|
|
|
5426
5555
|
*
|
|
5427
5556
|
* _200 OK_
|
|
5428
5557
|
*
|
|
5429
|
-
* Successfully updated the specified user
|
|
5558
|
+
* Successfully updated the specified user's information.
|
|
5430
5559
|
*
|
|
5431
5560
|
* _400 Bad Request_
|
|
5432
5561
|
*
|
|
@@ -5441,7 +5570,7 @@ var TwitchApi = class {
|
|
|
5441
5570
|
*
|
|
5442
5571
|
* @see https://dev.twitch.tv/docs/api/reference#update-user
|
|
5443
5572
|
*/
|
|
5444
|
-
updateUser: async (params = null, options) => this.callApi({
|
|
5573
|
+
updateUser: async (params = null, options = {}) => this.callApi({
|
|
5445
5574
|
path: "/users",
|
|
5446
5575
|
method: "PUT",
|
|
5447
5576
|
params,
|
|
@@ -5462,7 +5591,7 @@ var TwitchApi = class {
|
|
|
5462
5591
|
*
|
|
5463
5592
|
* _200 OK_
|
|
5464
5593
|
*
|
|
5465
|
-
* Successfully retrieved the broadcaster
|
|
5594
|
+
* Successfully retrieved the broadcaster's list of blocked users.
|
|
5466
5595
|
*
|
|
5467
5596
|
* _400 Bad Request_
|
|
5468
5597
|
*
|
|
@@ -5478,7 +5607,7 @@ var TwitchApi = class {
|
|
|
5478
5607
|
*
|
|
5479
5608
|
* @see https://dev.twitch.tv/docs/api/reference#get-user-block-list
|
|
5480
5609
|
*/
|
|
5481
|
-
getUserBlockList: async (params, options) => this.callApi({
|
|
5610
|
+
getUserBlockList: async (params, options = {}) => this.callApi({
|
|
5482
5611
|
path: "/users/blocks",
|
|
5483
5612
|
params,
|
|
5484
5613
|
options
|
|
@@ -5518,7 +5647,7 @@ var TwitchApi = class {
|
|
|
5518
5647
|
*
|
|
5519
5648
|
* @see https://dev.twitch.tv/docs/api/reference#block-user
|
|
5520
5649
|
*/
|
|
5521
|
-
blockUser: async (params, options) => this.callApi({
|
|
5650
|
+
blockUser: async (params, options = {}) => this.callApi({
|
|
5522
5651
|
path: "/users/blocks",
|
|
5523
5652
|
method: "PUT",
|
|
5524
5653
|
params,
|
|
@@ -5554,7 +5683,7 @@ var TwitchApi = class {
|
|
|
5554
5683
|
*
|
|
5555
5684
|
* @see https://dev.twitch.tv/docs/api/reference#unblock-user
|
|
5556
5685
|
*/
|
|
5557
|
-
unblockUser: async (params, options) => this.callApi({
|
|
5686
|
+
unblockUser: async (params, options = {}) => this.callApi({
|
|
5558
5687
|
path: "/users/blocks",
|
|
5559
5688
|
method: "DELETE",
|
|
5560
5689
|
params,
|
|
@@ -5575,7 +5704,7 @@ var TwitchApi = class {
|
|
|
5575
5704
|
*
|
|
5576
5705
|
* _200 OK_
|
|
5577
5706
|
*
|
|
5578
|
-
* Successfully retrieved the user
|
|
5707
|
+
* Successfully retrieved the user's installed extensions.
|
|
5579
5708
|
*
|
|
5580
5709
|
* _401 Unauthorized_
|
|
5581
5710
|
*
|
|
@@ -5586,7 +5715,7 @@ var TwitchApi = class {
|
|
|
5586
5715
|
*
|
|
5587
5716
|
* @see https://dev.twitch.tv/docs/api/reference#get-user-extensions
|
|
5588
5717
|
*/
|
|
5589
|
-
getUserExtensions: async (options) => this.callApi({
|
|
5718
|
+
getUserExtensions: async (options = {}) => this.callApi({
|
|
5590
5719
|
path: "/users/extensions/list",
|
|
5591
5720
|
options
|
|
5592
5721
|
}),
|
|
@@ -5607,7 +5736,7 @@ var TwitchApi = class {
|
|
|
5607
5736
|
*
|
|
5608
5737
|
* _200 OK_
|
|
5609
5738
|
*
|
|
5610
|
-
* Successfully retrieved the user
|
|
5739
|
+
* Successfully retrieved the user's active extensions.
|
|
5611
5740
|
*
|
|
5612
5741
|
* _400 Bad Request_
|
|
5613
5742
|
*
|
|
@@ -5621,7 +5750,7 @@ var TwitchApi = class {
|
|
|
5621
5750
|
*
|
|
5622
5751
|
* @see https://dev.twitch.tv/docs/api/reference#get-user-active-extensions
|
|
5623
5752
|
*/
|
|
5624
|
-
getUserActiveExtensions: async (params = null, options) => this.callApi({
|
|
5753
|
+
getUserActiveExtensions: async (params = null, options = {}) => this.callApi({
|
|
5625
5754
|
path: "/users/extensions",
|
|
5626
5755
|
params,
|
|
5627
5756
|
options
|
|
@@ -5662,7 +5791,7 @@ var TwitchApi = class {
|
|
|
5662
5791
|
*
|
|
5663
5792
|
* @see https://dev.twitch.tv/docs/api/reference#update-user-extensions
|
|
5664
5793
|
*/
|
|
5665
|
-
updateUserExtensions: async (body, options) => this.callApi({
|
|
5794
|
+
updateUserExtensions: async (body, options = {}) => this.callApi({
|
|
5666
5795
|
path: "/users/extensions",
|
|
5667
5796
|
method: "PUT",
|
|
5668
5797
|
body,
|
|
@@ -5712,7 +5841,7 @@ var TwitchApi = class {
|
|
|
5712
5841
|
*
|
|
5713
5842
|
* @see https://dev.twitch.tv/docs/api/reference#get-videos
|
|
5714
5843
|
*/
|
|
5715
|
-
getVideos: async (params = null, options) => this.callApi({
|
|
5844
|
+
getVideos: async (params = null, options = {}) => this.callApi({
|
|
5716
5845
|
path: "/videos",
|
|
5717
5846
|
params,
|
|
5718
5847
|
options
|
|
@@ -5749,7 +5878,7 @@ var TwitchApi = class {
|
|
|
5749
5878
|
*
|
|
5750
5879
|
* @see https://dev.twitch.tv/docs/api/reference#delete-videos
|
|
5751
5880
|
*/
|
|
5752
|
-
deleteVideos: async (params, options) => this.callApi({
|
|
5881
|
+
deleteVideos: async (params, options = {}) => this.callApi({
|
|
5753
5882
|
path: "/videos",
|
|
5754
5883
|
method: "DELETE",
|
|
5755
5884
|
params,
|
|
@@ -5813,7 +5942,7 @@ var TwitchApi = class {
|
|
|
5813
5942
|
*
|
|
5814
5943
|
* @see https://dev.twitch.tv/docs/api/reference#send-whisper
|
|
5815
5944
|
*/
|
|
5816
|
-
sendWhisper: async (params, body, options) => this.callApi({
|
|
5945
|
+
sendWhisper: async (params, body, options = {}) => this.callApi({
|
|
5817
5946
|
path: "/whispers",
|
|
5818
5947
|
method: "POST",
|
|
5819
5948
|
params,
|