ts-twitch-api 0.1.0 → 0.1.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/README.md +11 -4
- package/package.json +6 -6
- package/twitch-api.generated.ts +628 -52
- package/twitch-api.ts +840 -772
package/twitch-api.ts
CHANGED
|
@@ -38,6 +38,8 @@ export type GetUserChatColorParams = ParamsSchema<'get-user-chat-color'>;
|
|
|
38
38
|
export type UpdateUserChatColorParams = ParamsSchema<'update-user-chat-color'>;
|
|
39
39
|
export type CreateClipParams = ParamsSchema<'create-clip'>;
|
|
40
40
|
export type GetClipsParams = ParamsSchema<'get-clips'>;
|
|
41
|
+
export type DeleteConduitParams = ParamsSchema<'delete-conduit'>;
|
|
42
|
+
export type GetConduitShardsParams = ParamsSchema<'get-conduit-shards'>;
|
|
41
43
|
export type GetContentClassificationLabelsParams = ParamsSchema<'get-content-classification-labels'>;
|
|
42
44
|
export type GetDropsEntitlementsParams = ParamsSchema<'get-drops-entitlements'>;
|
|
43
45
|
export type GetExtensionConfigurationSegmentParams = ParamsSchema<'get-extension-configuration-segment'>;
|
|
@@ -171,11 +173,21 @@ export type UpdateChatSettingsBody = Schema<'UpdateChatSettingsBody'>;
|
|
|
171
173
|
export type ChatSettingsUpdated = Schema<'ChatSettingsUpdated'>;
|
|
172
174
|
export type UpdateChatSettingsResponse = Schema<'UpdateChatSettingsResponse'>;
|
|
173
175
|
export type SendChatAnnouncementBody = Schema<'SendChatAnnouncementBody'>;
|
|
176
|
+
export type SendChatMessageBody = Schema<'SendChatMessageBody'>;
|
|
177
|
+
export type SendChatMessageResponse = Schema<'SendChatMessageResponse'>;
|
|
174
178
|
export type UserChatColor = Schema<'UserChatColor'>;
|
|
175
179
|
export type GetUserChatColorResponse = Schema<'GetUserChatColorResponse'>;
|
|
176
180
|
export type CreateClipResponse = Schema<'CreateClipResponse'>;
|
|
177
181
|
export type Clip = Schema<'Clip'>;
|
|
178
182
|
export type GetClipsResponse = Schema<'GetClipsResponse'>;
|
|
183
|
+
export type GetConduitsResponse = Schema<'GetConduitsResponse'>;
|
|
184
|
+
export type CreateConduitsBody = Schema<'CreateConduitsBody'>;
|
|
185
|
+
export type CreateConduitsResponse = Schema<'CreateConduitsResponse'>;
|
|
186
|
+
export type UpdateConduitsBody = Schema<'UpdateConduitsBody'>;
|
|
187
|
+
export type UpdateConduitsResponse = Schema<'UpdateConduitsResponse'>;
|
|
188
|
+
export type GetConduitShardsResponse = Schema<'GetConduitShardsResponse'>;
|
|
189
|
+
export type UpdateConduitShardsBody = Schema<'UpdateConduitShardsBody'>;
|
|
190
|
+
export type UpdateConduitShardsResponse = Schema<'UpdateConduitShardsResponse'>;
|
|
179
191
|
export type ContentClassificationLabel = Schema<'ContentClassificationLabel'>;
|
|
180
192
|
export type GetContentClassificationLabelsResponse = Schema<'GetContentClassificationLabelsResponse'>;
|
|
181
193
|
export type DropsEntitlement = Schema<'DropsEntitlement'>;
|
|
@@ -339,12 +351,15 @@ const getSearchParams = <T extends Record<string, any>>(params: T) => {
|
|
|
339
351
|
type CallApiOptions = {
|
|
340
352
|
path: string;
|
|
341
353
|
method?: string;
|
|
342
|
-
params?: any;
|
|
343
|
-
body?: any;
|
|
344
|
-
clientId?: string;
|
|
345
|
-
accessToken?: string;
|
|
354
|
+
params?: Record<string, any> | null;
|
|
355
|
+
body?: Record<string, any> | null;
|
|
346
356
|
requiresAuth?: boolean;
|
|
347
|
-
|
|
357
|
+
request: [
|
|
358
|
+
clientId?: string | null,
|
|
359
|
+
accessToken?: string | null,
|
|
360
|
+
requestInit?: RequestInit,
|
|
361
|
+
];
|
|
362
|
+
};
|
|
348
363
|
|
|
349
364
|
export type TwitchApiOptions = {
|
|
350
365
|
accessToken?: string;
|
|
@@ -360,19 +375,22 @@ export class TwitchApi {
|
|
|
360
375
|
this._clientId = clientId;
|
|
361
376
|
}
|
|
362
377
|
|
|
363
|
-
private async callApi
|
|
378
|
+
private async callApi<
|
|
379
|
+
TData,
|
|
380
|
+
TSuccessCode extends SuccessCode = SuccessCode,
|
|
381
|
+
TErrorCode extends ErrorCode = ErrorCode,
|
|
382
|
+
>({
|
|
364
383
|
path,
|
|
365
384
|
method = 'GET',
|
|
366
385
|
params,
|
|
367
386
|
body,
|
|
368
|
-
clientId,
|
|
369
|
-
accessToken,
|
|
370
387
|
requiresAuth = true,
|
|
371
|
-
|
|
388
|
+
request: [clientId = null, accessToken = null, requestInit = {}],
|
|
389
|
+
}: CallApiOptions): ApiResponse<TData, TSuccessCode, TErrorCode> {
|
|
372
390
|
const url = params
|
|
373
391
|
? `${BASE_URL}${path}?${getSearchParams(params)}`
|
|
374
392
|
: `${BASE_URL}${path}`;
|
|
375
|
-
const options: RequestInit = { method };
|
|
393
|
+
const options: RequestInit = { ...requestInit, method };
|
|
376
394
|
const headers = new Headers();
|
|
377
395
|
options.headers = headers;
|
|
378
396
|
if (body) {
|
|
@@ -380,7 +398,10 @@ export class TwitchApi {
|
|
|
380
398
|
options.body = JSON.stringify(body);
|
|
381
399
|
}
|
|
382
400
|
if (requiresAuth) {
|
|
383
|
-
options.headers.set(
|
|
401
|
+
options.headers.set(
|
|
402
|
+
'Authorization',
|
|
403
|
+
`Bearer ${accessToken || this._accessToken}`,
|
|
404
|
+
);
|
|
384
405
|
options.headers.set('Client-Id', clientId || this._clientId);
|
|
385
406
|
}
|
|
386
407
|
const response = await fetch(url, options);
|
|
@@ -441,15 +462,13 @@ export class TwitchApi {
|
|
|
441
462
|
*/
|
|
442
463
|
startCommercial: async (
|
|
443
464
|
body: StartCommercialBody,
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
this.callApi({
|
|
465
|
+
...request: CallApiOptions['request']
|
|
466
|
+
) =>
|
|
467
|
+
this.callApi<StartCommercialResponse, 200, 400 | 401 | 404 | 429>({
|
|
448
468
|
path: '/channels/commercial',
|
|
449
469
|
method: 'POST',
|
|
450
470
|
body,
|
|
451
|
-
|
|
452
|
-
accessToken,
|
|
471
|
+
request,
|
|
453
472
|
}),
|
|
454
473
|
/**
|
|
455
474
|
* This endpoint returns ad schedule related information, including snooze, when the last ad was run, when the next ad is scheduled, and if the channel is currently in pre-roll free time. Note that a new ad cannot be run until 8 minutes after running a previous ad.
|
|
@@ -478,14 +497,12 @@ export class TwitchApi {
|
|
|
478
497
|
*/
|
|
479
498
|
getAdSchedule: async (
|
|
480
499
|
params: GetAdScheduleParams,
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
this.callApi({
|
|
500
|
+
...request: CallApiOptions['request']
|
|
501
|
+
) =>
|
|
502
|
+
this.callApi<GetAdScheduleResponse, 200, 400 | 500>({
|
|
485
503
|
path: '/channels/ads',
|
|
486
504
|
params,
|
|
487
|
-
|
|
488
|
-
accessToken,
|
|
505
|
+
request,
|
|
489
506
|
}),
|
|
490
507
|
/**
|
|
491
508
|
* If available, pushes back the timestamp of the upcoming automatic mid-roll ad by 5 minutes. This endpoint duplicates the snooze functionality in the creator dashboard’s Ads Manager.
|
|
@@ -520,15 +537,13 @@ export class TwitchApi {
|
|
|
520
537
|
*/
|
|
521
538
|
snoozeNextAd: async (
|
|
522
539
|
params: SnoozeNextAdParams,
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
this.callApi({
|
|
540
|
+
...request: CallApiOptions['request']
|
|
541
|
+
) =>
|
|
542
|
+
this.callApi<SnoozeNextAdResponse, 200, 400 | 429 | 500>({
|
|
527
543
|
path: '/channels/ads/schedule/snooze',
|
|
528
544
|
method: 'POST',
|
|
529
545
|
params,
|
|
530
|
-
|
|
531
|
-
accessToken,
|
|
546
|
+
request,
|
|
532
547
|
}),
|
|
533
548
|
};
|
|
534
549
|
analytics = {
|
|
@@ -547,7 +562,7 @@ export class TwitchApi {
|
|
|
547
562
|
*
|
|
548
563
|
* _200 OK_
|
|
549
564
|
*
|
|
550
|
-
* Successfully retrieved the broadcaster
|
|
565
|
+
* Successfully retrieved the broadcaster's analytics reports.
|
|
551
566
|
*
|
|
552
567
|
* _400 Bad Request_
|
|
553
568
|
*
|
|
@@ -573,14 +588,12 @@ export class TwitchApi {
|
|
|
573
588
|
*/
|
|
574
589
|
getExtensionAnalytics: async (
|
|
575
590
|
params: GetExtensionAnalyticsParams | null | undefined = null,
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
this.callApi({
|
|
591
|
+
...request: CallApiOptions['request']
|
|
592
|
+
) =>
|
|
593
|
+
this.callApi<GetExtensionAnalyticsResponse, 200, 400 | 401 | 404>({
|
|
580
594
|
path: '/analytics/extensions',
|
|
581
595
|
params,
|
|
582
|
-
|
|
583
|
-
accessToken,
|
|
596
|
+
request,
|
|
584
597
|
}),
|
|
585
598
|
/**
|
|
586
599
|
* Gets an analytics report for one or more games. The response contains the URLs used to download the reports (CSV files). [Learn more](https://dev.twitch.tv/docs/insights)
|
|
@@ -623,14 +636,12 @@ export class TwitchApi {
|
|
|
623
636
|
*/
|
|
624
637
|
getGameAnalytics: async (
|
|
625
638
|
params: GetGameAnalyticsParams | null | undefined = null,
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
this.callApi({
|
|
639
|
+
...request: CallApiOptions['request']
|
|
640
|
+
) =>
|
|
641
|
+
this.callApi<GetGameAnalyticsResponse, 200, 400 | 401 | 404>({
|
|
630
642
|
path: '/analytics/games',
|
|
631
643
|
params,
|
|
632
|
-
|
|
633
|
-
accessToken,
|
|
644
|
+
request,
|
|
634
645
|
}),
|
|
635
646
|
};
|
|
636
647
|
bits = {
|
|
@@ -670,14 +681,12 @@ export class TwitchApi {
|
|
|
670
681
|
*/
|
|
671
682
|
getBitsLeaderboard: async (
|
|
672
683
|
params: GetBitsLeaderboardParams | null | undefined = null,
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
this.callApi({
|
|
684
|
+
...request: CallApiOptions['request']
|
|
685
|
+
) =>
|
|
686
|
+
this.callApi<GetBitsLeaderboardResponse, 200, 400 | 401 | 403>({
|
|
677
687
|
path: '/bits/leaderboard',
|
|
678
688
|
params,
|
|
679
|
-
|
|
680
|
-
accessToken,
|
|
689
|
+
request,
|
|
681
690
|
}),
|
|
682
691
|
/**
|
|
683
692
|
* Gets a list of Cheermotes that users can use to cheer Bits in any Bits-enabled channel’s chat room. Cheermotes are animated emotes that viewers can assign Bits to.
|
|
@@ -705,14 +714,12 @@ export class TwitchApi {
|
|
|
705
714
|
*/
|
|
706
715
|
getCheermotes: async (
|
|
707
716
|
params: GetCheermotesParams | null | undefined = null,
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
this.callApi({
|
|
717
|
+
...request: CallApiOptions['request']
|
|
718
|
+
) =>
|
|
719
|
+
this.callApi<GetCheermotesResponse, 200, 401>({
|
|
712
720
|
path: '/bits/cheermotes',
|
|
713
721
|
params,
|
|
714
|
-
|
|
715
|
-
accessToken,
|
|
722
|
+
request,
|
|
716
723
|
}),
|
|
717
724
|
/**
|
|
718
725
|
* Gets an extension’s list of transactions. A transaction records the exchange of a currency (for example, Bits) for a digital product.
|
|
@@ -752,14 +759,12 @@ export class TwitchApi {
|
|
|
752
759
|
*/
|
|
753
760
|
getExtensionTransactions: async (
|
|
754
761
|
params: GetExtensionTransactionsParams,
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
this.callApi({
|
|
762
|
+
...request: CallApiOptions['request']
|
|
763
|
+
) =>
|
|
764
|
+
this.callApi<GetExtensionTransactionsResponse, 200, 400 | 401 | 404>({
|
|
759
765
|
path: '/extensions/transactions',
|
|
760
766
|
params,
|
|
761
|
-
|
|
762
|
-
accessToken,
|
|
767
|
+
request,
|
|
763
768
|
}),
|
|
764
769
|
};
|
|
765
770
|
channels = {
|
|
@@ -802,14 +807,12 @@ export class TwitchApi {
|
|
|
802
807
|
*/
|
|
803
808
|
getChannelInformation: async (
|
|
804
809
|
params: GetChannelInformationParams,
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
this.callApi({
|
|
810
|
+
...request: CallApiOptions['request']
|
|
811
|
+
) =>
|
|
812
|
+
this.callApi<GetChannelInformationResponse, 200, 400 | 401 | 429 | 500>({
|
|
809
813
|
path: '/channels',
|
|
810
814
|
params,
|
|
811
|
-
|
|
812
|
-
accessToken,
|
|
815
|
+
request,
|
|
813
816
|
}),
|
|
814
817
|
/**
|
|
815
818
|
* Updates a channel’s properties.
|
|
@@ -871,16 +874,14 @@ export class TwitchApi {
|
|
|
871
874
|
modifyChannelInformation: async (
|
|
872
875
|
params: ModifyChannelInformationParams,
|
|
873
876
|
body: ModifyChannelInformationBody | null | undefined = null,
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
this.callApi({
|
|
877
|
+
...request: CallApiOptions['request']
|
|
878
|
+
) =>
|
|
879
|
+
this.callApi<void, 204, 400 | 401 | 403 | 409 | 500>({
|
|
878
880
|
path: '/channels',
|
|
879
881
|
method: 'PATCH',
|
|
880
882
|
params,
|
|
881
883
|
body,
|
|
882
|
-
|
|
883
|
-
accessToken,
|
|
884
|
+
request,
|
|
884
885
|
}),
|
|
885
886
|
/**
|
|
886
887
|
* Gets the broadcaster’s list editors.
|
|
@@ -915,14 +916,12 @@ export class TwitchApi {
|
|
|
915
916
|
*/
|
|
916
917
|
getChannelEditors: async (
|
|
917
918
|
params: GetChannelEditorsParams,
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
this.callApi({
|
|
919
|
+
...request: CallApiOptions['request']
|
|
920
|
+
) =>
|
|
921
|
+
this.callApi<GetChannelEditorsResponse, 200, 400 | 401>({
|
|
922
922
|
path: '/channels/editors',
|
|
923
923
|
params,
|
|
924
|
-
|
|
925
|
-
accessToken,
|
|
924
|
+
request,
|
|
926
925
|
}),
|
|
927
926
|
/**
|
|
928
927
|
* Gets a list of broadcasters that the specified user follows. You can also use this endpoint to see whether a user follows a specific broadcaster.
|
|
@@ -963,14 +962,12 @@ export class TwitchApi {
|
|
|
963
962
|
*/
|
|
964
963
|
getFollowedChannels: async (
|
|
965
964
|
params: GetFollowedChannelsParams,
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
this.callApi({
|
|
965
|
+
...request: CallApiOptions['request']
|
|
966
|
+
) =>
|
|
967
|
+
this.callApi<GetFollowedChannelsResponse, 200, 400 | 401>({
|
|
970
968
|
path: '/channels/followed',
|
|
971
969
|
params,
|
|
972
|
-
|
|
973
|
-
accessToken,
|
|
970
|
+
request,
|
|
974
971
|
}),
|
|
975
972
|
/**
|
|
976
973
|
* Gets a list of users that follow the specified broadcaster. You can also use this endpoint to see whether a specific user follows the broadcaster.
|
|
@@ -1014,14 +1011,12 @@ export class TwitchApi {
|
|
|
1014
1011
|
*/
|
|
1015
1012
|
getChannelFollowers: async (
|
|
1016
1013
|
params: GetChannelFollowersParams,
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
this.callApi({
|
|
1014
|
+
...request: CallApiOptions['request']
|
|
1015
|
+
) =>
|
|
1016
|
+
this.callApi<GetChannelFollowersResponse, 200, 400 | 401>({
|
|
1021
1017
|
path: '/channels/followers',
|
|
1022
1018
|
params,
|
|
1023
|
-
|
|
1024
|
-
accessToken,
|
|
1019
|
+
request,
|
|
1025
1020
|
}),
|
|
1026
1021
|
};
|
|
1027
1022
|
channelPoints = {
|
|
@@ -1074,16 +1069,14 @@ export class TwitchApi {
|
|
|
1074
1069
|
createCustomRewards: async (
|
|
1075
1070
|
params: CreateCustomRewardsParams,
|
|
1076
1071
|
body: CreateCustomRewardsBody,
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
this.callApi({
|
|
1072
|
+
...request: CallApiOptions['request']
|
|
1073
|
+
) =>
|
|
1074
|
+
this.callApi<CreateCustomRewardsResponse, 200, 400 | 401 | 403 | 500>({
|
|
1081
1075
|
path: '/channel_points/custom_rewards',
|
|
1082
1076
|
method: 'POST',
|
|
1083
1077
|
params,
|
|
1084
1078
|
body,
|
|
1085
|
-
|
|
1086
|
-
accessToken,
|
|
1079
|
+
request,
|
|
1087
1080
|
}),
|
|
1088
1081
|
/**
|
|
1089
1082
|
* Deletes a custom reward that the broadcaster created.
|
|
@@ -1131,15 +1124,13 @@ export class TwitchApi {
|
|
|
1131
1124
|
*/
|
|
1132
1125
|
deleteCustomReward: async (
|
|
1133
1126
|
params: DeleteCustomRewardParams,
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
this.callApi({
|
|
1127
|
+
...request: CallApiOptions['request']
|
|
1128
|
+
) =>
|
|
1129
|
+
this.callApi<void, 204, 400 | 401 | 403 | 404 | 500>({
|
|
1138
1130
|
path: '/channel_points/custom_rewards',
|
|
1139
1131
|
method: 'DELETE',
|
|
1140
1132
|
params,
|
|
1141
|
-
|
|
1142
|
-
accessToken,
|
|
1133
|
+
request,
|
|
1143
1134
|
}),
|
|
1144
1135
|
/**
|
|
1145
1136
|
* Gets a list of custom rewards that the specified broadcaster created.
|
|
@@ -1186,14 +1177,12 @@ export class TwitchApi {
|
|
|
1186
1177
|
*/
|
|
1187
1178
|
getCustomReward: async (
|
|
1188
1179
|
params: GetCustomRewardParams,
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
this.callApi({
|
|
1180
|
+
...request: CallApiOptions['request']
|
|
1181
|
+
) =>
|
|
1182
|
+
this.callApi<GetCustomRewardResponse, 200, 400 | 401 | 403 | 404 | 500>({
|
|
1193
1183
|
path: '/channel_points/custom_rewards',
|
|
1194
1184
|
params,
|
|
1195
|
-
|
|
1196
|
-
accessToken,
|
|
1185
|
+
request,
|
|
1197
1186
|
}),
|
|
1198
1187
|
/**
|
|
1199
1188
|
* Updates a custom reward. The app used to create the reward is the only app that may update the reward.
|
|
@@ -1251,16 +1240,14 @@ export class TwitchApi {
|
|
|
1251
1240
|
updateCustomReward: async (
|
|
1252
1241
|
params: UpdateCustomRewardParams,
|
|
1253
1242
|
body: UpdateCustomRewardBody | null | undefined = null,
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
this.callApi({
|
|
1243
|
+
...request: CallApiOptions['request']
|
|
1244
|
+
) =>
|
|
1245
|
+
this.callApi<UpdateCustomRewardResponse, 200, 400 | 401 | 403 | 404 | 500>({
|
|
1258
1246
|
path: '/channel_points/custom_rewards',
|
|
1259
1247
|
method: 'PATCH',
|
|
1260
1248
|
params,
|
|
1261
1249
|
body,
|
|
1262
|
-
|
|
1263
|
-
accessToken,
|
|
1250
|
+
request,
|
|
1264
1251
|
}),
|
|
1265
1252
|
/**
|
|
1266
1253
|
* Gets a list of redemptions for the specified custom reward. The app used to create the reward is the only app that may get the redemptions.
|
|
@@ -1309,14 +1296,12 @@ export class TwitchApi {
|
|
|
1309
1296
|
*/
|
|
1310
1297
|
getCustomRewardRedemption: async (
|
|
1311
1298
|
params: GetCustomRewardRedemptionParams,
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
this.callApi({
|
|
1299
|
+
...request: CallApiOptions['request']
|
|
1300
|
+
) =>
|
|
1301
|
+
this.callApi<GetCustomRewardRedemptionResponse, 200, 400 | 401 | 403 | 404 | 500>({
|
|
1316
1302
|
path: '/channel_points/custom_rewards/redemptions',
|
|
1317
1303
|
params,
|
|
1318
|
-
|
|
1319
|
-
accessToken,
|
|
1304
|
+
request,
|
|
1320
1305
|
}),
|
|
1321
1306
|
/**
|
|
1322
1307
|
* Updates a redemption’s status. You may update a redemption only if its status is UNFULFILLED. The app used to create the reward is the only app that may update the redemption.
|
|
@@ -1366,16 +1351,14 @@ export class TwitchApi {
|
|
|
1366
1351
|
updateRedemptionStatus: async (
|
|
1367
1352
|
params: UpdateRedemptionStatusParams,
|
|
1368
1353
|
body: UpdateRedemptionStatusBody,
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
this.callApi({
|
|
1354
|
+
...request: CallApiOptions['request']
|
|
1355
|
+
) =>
|
|
1356
|
+
this.callApi<UpdateRedemptionStatusResponse, 200, 400 | 401 | 403 | 404 | 500>({
|
|
1373
1357
|
path: '/channel_points/custom_rewards/redemptions',
|
|
1374
1358
|
method: 'PATCH',
|
|
1375
1359
|
params,
|
|
1376
1360
|
body,
|
|
1377
|
-
|
|
1378
|
-
accessToken,
|
|
1361
|
+
request,
|
|
1379
1362
|
}),
|
|
1380
1363
|
};
|
|
1381
1364
|
charity = {
|
|
@@ -1419,14 +1402,12 @@ export class TwitchApi {
|
|
|
1419
1402
|
*/
|
|
1420
1403
|
getCharityCampaign: async (
|
|
1421
1404
|
params: GetCharityCampaignParams,
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
this.callApi({
|
|
1405
|
+
...request: CallApiOptions['request']
|
|
1406
|
+
) =>
|
|
1407
|
+
this.callApi<GetCharityCampaignResponse, 200, 400 | 401 | 403>({
|
|
1426
1408
|
path: '/charity/campaigns',
|
|
1427
1409
|
params,
|
|
1428
|
-
|
|
1429
|
-
accessToken,
|
|
1410
|
+
request,
|
|
1430
1411
|
}),
|
|
1431
1412
|
/**
|
|
1432
1413
|
* Gets the list of donations that users have made to the broadcaster’s active charity campaign.
|
|
@@ -1468,14 +1449,12 @@ export class TwitchApi {
|
|
|
1468
1449
|
*/
|
|
1469
1450
|
getCharityCampaignDonations: async (
|
|
1470
1451
|
params: GetCharityCampaignDonationsParams,
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
this.callApi({
|
|
1452
|
+
...request: CallApiOptions['request']
|
|
1453
|
+
) =>
|
|
1454
|
+
this.callApi<GetCharityCampaignDonationsResponse, 200, 400 | 401 | 403>({
|
|
1475
1455
|
path: '/charity/donations',
|
|
1476
1456
|
params,
|
|
1477
|
-
|
|
1478
|
-
accessToken,
|
|
1457
|
+
request,
|
|
1479
1458
|
}),
|
|
1480
1459
|
};
|
|
1481
1460
|
chat = {
|
|
@@ -1523,14 +1502,12 @@ export class TwitchApi {
|
|
|
1523
1502
|
*/
|
|
1524
1503
|
getChatters: async (
|
|
1525
1504
|
params: GetChattersParams,
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
this.callApi({
|
|
1505
|
+
...request: CallApiOptions['request']
|
|
1506
|
+
) =>
|
|
1507
|
+
this.callApi<GetChattersResponse, 200, 400 | 401 | 403>({
|
|
1530
1508
|
path: '/chat/chatters',
|
|
1531
1509
|
params,
|
|
1532
|
-
|
|
1533
|
-
accessToken,
|
|
1510
|
+
request,
|
|
1534
1511
|
}),
|
|
1535
1512
|
/**
|
|
1536
1513
|
* Gets the broadcaster’s list of custom emotes. Broadcasters create these custom emotes for users who subscribe to or follow the channel or cheer Bits in the channel’s chat window. [Learn More](https://dev.twitch.tv/docs/irc/emotes)
|
|
@@ -1567,14 +1544,12 @@ export class TwitchApi {
|
|
|
1567
1544
|
*/
|
|
1568
1545
|
getChannelEmotes: async (
|
|
1569
1546
|
params: GetChannelEmotesParams,
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
this.callApi({
|
|
1547
|
+
...request: CallApiOptions['request']
|
|
1548
|
+
) =>
|
|
1549
|
+
this.callApi<GetChannelEmotesResponse, 200, 400 | 401>({
|
|
1574
1550
|
path: '/chat/emotes',
|
|
1575
1551
|
params,
|
|
1576
|
-
|
|
1577
|
-
accessToken,
|
|
1552
|
+
request,
|
|
1578
1553
|
}),
|
|
1579
1554
|
/**
|
|
1580
1555
|
* Gets the list of [global emotes](https://www.twitch.tv/creatorcamp/en/learn-the-basics/emotes/). Global emotes are Twitch-created emotes that users can use in any Twitch chat.
|
|
@@ -1607,11 +1582,10 @@ export class TwitchApi {
|
|
|
1607
1582
|
*
|
|
1608
1583
|
* @see https://dev.twitch.tv/docs/api/reference#get-global-emotes
|
|
1609
1584
|
*/
|
|
1610
|
-
getGlobalEmotes: async (
|
|
1611
|
-
this.callApi({
|
|
1585
|
+
getGlobalEmotes: async (...request: CallApiOptions['request']) =>
|
|
1586
|
+
this.callApi<GetGlobalEmotesResponse, 200, 401>({
|
|
1612
1587
|
path: '/chat/emotes/global',
|
|
1613
|
-
|
|
1614
|
-
accessToken,
|
|
1588
|
+
request,
|
|
1615
1589
|
}),
|
|
1616
1590
|
/**
|
|
1617
1591
|
* Gets emotes for one or more specified emote sets.
|
|
@@ -1649,14 +1623,12 @@ export class TwitchApi {
|
|
|
1649
1623
|
*/
|
|
1650
1624
|
getEmoteSets: async (
|
|
1651
1625
|
params: GetEmoteSetsParams,
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
this.callApi({
|
|
1626
|
+
...request: CallApiOptions['request']
|
|
1627
|
+
) =>
|
|
1628
|
+
this.callApi<GetEmoteSetsResponse, 200, 400 | 401>({
|
|
1656
1629
|
path: '/chat/emotes/set',
|
|
1657
1630
|
params,
|
|
1658
|
-
|
|
1659
|
-
accessToken,
|
|
1631
|
+
request,
|
|
1660
1632
|
}),
|
|
1661
1633
|
/**
|
|
1662
1634
|
* Gets the broadcaster’s list of custom chat badges. The list is empty if the broadcaster hasn’t created custom chat badges. For information about custom badges, see [subscriber badges](https://help.twitch.tv/s/article/subscriber-badge-guide) and [Bits badges](https://help.twitch.tv/s/article/custom-bit-badges-guide).
|
|
@@ -1689,14 +1661,12 @@ export class TwitchApi {
|
|
|
1689
1661
|
*/
|
|
1690
1662
|
getChannelChatBadges: async (
|
|
1691
1663
|
params: GetChannelChatBadgesParams,
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
this.callApi({
|
|
1664
|
+
...request: CallApiOptions['request']
|
|
1665
|
+
) =>
|
|
1666
|
+
this.callApi<GetChannelChatBadgesResponse, 200, 400 | 401>({
|
|
1696
1667
|
path: '/chat/badges',
|
|
1697
1668
|
params,
|
|
1698
|
-
|
|
1699
|
-
accessToken,
|
|
1669
|
+
request,
|
|
1700
1670
|
}),
|
|
1701
1671
|
/**
|
|
1702
1672
|
* Gets Twitch’s list of chat badges, which users may use in any channel’s chat room. For information about chat badges, see [Twitch Chat Badges Guide](https://help.twitch.tv/s/article/twitch-chat-badges-guide).
|
|
@@ -1727,11 +1697,10 @@ export class TwitchApi {
|
|
|
1727
1697
|
*
|
|
1728
1698
|
* @see https://dev.twitch.tv/docs/api/reference#get-global-chat-badges
|
|
1729
1699
|
*/
|
|
1730
|
-
getGlobalChatBadges: async (
|
|
1731
|
-
this.callApi({
|
|
1700
|
+
getGlobalChatBadges: async (...request: CallApiOptions['request']) =>
|
|
1701
|
+
this.callApi<GetGlobalChatBadgesResponse, 200, 401>({
|
|
1732
1702
|
path: '/chat/badges/global',
|
|
1733
|
-
|
|
1734
|
-
accessToken,
|
|
1703
|
+
request,
|
|
1735
1704
|
}),
|
|
1736
1705
|
/**
|
|
1737
1706
|
* Gets the broadcaster’s chat settings.
|
|
@@ -1766,14 +1735,12 @@ export class TwitchApi {
|
|
|
1766
1735
|
*/
|
|
1767
1736
|
getChatSettings: async (
|
|
1768
1737
|
params: GetChatSettingsParams,
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
this.callApi({
|
|
1738
|
+
...request: CallApiOptions['request']
|
|
1739
|
+
) =>
|
|
1740
|
+
this.callApi<GetChatSettingsResponse, 200, 400 | 401>({
|
|
1773
1741
|
path: '/chat/settings',
|
|
1774
1742
|
params,
|
|
1775
|
-
|
|
1776
|
-
accessToken,
|
|
1743
|
+
request,
|
|
1777
1744
|
}),
|
|
1778
1745
|
/**
|
|
1779
1746
|
* Updates the broadcaster’s chat settings.
|
|
@@ -1827,16 +1794,14 @@ export class TwitchApi {
|
|
|
1827
1794
|
updateChatSettings: async (
|
|
1828
1795
|
params: UpdateChatSettingsParams,
|
|
1829
1796
|
body: UpdateChatSettingsBody | null | undefined = null,
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
this.callApi({
|
|
1797
|
+
...request: CallApiOptions['request']
|
|
1798
|
+
) =>
|
|
1799
|
+
this.callApi<UpdateChatSettingsResponse, 200, 400 | 401 | 403>({
|
|
1834
1800
|
path: '/chat/settings',
|
|
1835
1801
|
method: 'PATCH',
|
|
1836
1802
|
params,
|
|
1837
1803
|
body,
|
|
1838
|
-
|
|
1839
|
-
accessToken,
|
|
1804
|
+
request,
|
|
1840
1805
|
}),
|
|
1841
1806
|
/**
|
|
1842
1807
|
* Sends an announcement to the broadcaster’s chat room.
|
|
@@ -1859,7 +1824,6 @@ export class TwitchApi {
|
|
|
1859
1824
|
*
|
|
1860
1825
|
* * The `message` field in the request's body is required.
|
|
1861
1826
|
* * The `message` field may not contain an empty string.
|
|
1862
|
-
* * The `message` field may not contain an empty string.
|
|
1863
1827
|
* * The string in the `message` field failed review.
|
|
1864
1828
|
* * The specified color is not valid.
|
|
1865
1829
|
*
|
|
@@ -1875,16 +1839,14 @@ export class TwitchApi {
|
|
|
1875
1839
|
sendChatAnnouncement: async (
|
|
1876
1840
|
params: SendChatAnnouncementParams,
|
|
1877
1841
|
body: SendChatAnnouncementBody,
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
this.callApi({
|
|
1842
|
+
...request: CallApiOptions['request']
|
|
1843
|
+
) =>
|
|
1844
|
+
this.callApi<void, 204, 400 | 401>({
|
|
1882
1845
|
path: '/chat/announcements',
|
|
1883
1846
|
method: 'POST',
|
|
1884
1847
|
params,
|
|
1885
1848
|
body,
|
|
1886
|
-
|
|
1887
|
-
accessToken,
|
|
1849
|
+
request,
|
|
1888
1850
|
}),
|
|
1889
1851
|
/**
|
|
1890
1852
|
* Sends a Shoutout to the specified broadcaster. Typically, you send Shoutouts when you or one of your moderators notice another broadcaster in your chat, the other broadcaster is coming up in conversation, or after they raid your broadcast.
|
|
@@ -1940,15 +1902,67 @@ export class TwitchApi {
|
|
|
1940
1902
|
*/
|
|
1941
1903
|
sendShoutout: async (
|
|
1942
1904
|
params: SendShoutoutParams,
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
this.callApi({
|
|
1905
|
+
...request: CallApiOptions['request']
|
|
1906
|
+
) =>
|
|
1907
|
+
this.callApi<void, 204, 400 | 401 | 403 | 429>({
|
|
1947
1908
|
path: '/chat/shoutouts',
|
|
1948
1909
|
method: 'POST',
|
|
1949
1910
|
params,
|
|
1950
|
-
|
|
1951
|
-
|
|
1911
|
+
request,
|
|
1912
|
+
}),
|
|
1913
|
+
/**
|
|
1914
|
+
* NEW Sends a message to the broadcaster’s chat room.
|
|
1915
|
+
*
|
|
1916
|
+
* __Authorization:__
|
|
1917
|
+
*
|
|
1918
|
+
* 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) that includes the `user:write:chat` scope. If app access token used, then additionally requires `user:bot` scope from chatting user, and either `channel:bot` scope from broadcaster or moderator status.
|
|
1919
|
+
*
|
|
1920
|
+
* __URL:__
|
|
1921
|
+
*
|
|
1922
|
+
* `POST https://api.twitch.tv/helix/chat/messages`
|
|
1923
|
+
*
|
|
1924
|
+
* __Response Codes:__
|
|
1925
|
+
*
|
|
1926
|
+
* _200 OK_
|
|
1927
|
+
*
|
|
1928
|
+
* Successfully sent the specified broadcaster a message.
|
|
1929
|
+
*
|
|
1930
|
+
* _400 Bad Request_
|
|
1931
|
+
*
|
|
1932
|
+
* * The _broadcaster\_id_ query parameter is required.
|
|
1933
|
+
* * The ID in the _broadcaster\_id_ query parameter is not valid.
|
|
1934
|
+
* * The _sender\_id_ query parameter is required.
|
|
1935
|
+
* * The ID in the _sender\_id_ query parameter is not valid.
|
|
1936
|
+
* * The _text_ query parameter is required.
|
|
1937
|
+
* * The ID in the _reply\_parent\_message\_id_ query parameter is not valid.
|
|
1938
|
+
*
|
|
1939
|
+
* _401 Unauthorized_
|
|
1940
|
+
*
|
|
1941
|
+
* * The ID in the user\_id query parameter must match the user ID in the access token.
|
|
1942
|
+
* * The Authorization header is required and must contain a user access token.
|
|
1943
|
+
* * The user access token must include the user:write:chat scope.
|
|
1944
|
+
* * The access token is not valid.
|
|
1945
|
+
* * The client ID specified in the Client-Id header does not match the client ID specified in the access token.
|
|
1946
|
+
*
|
|
1947
|
+
* _403 Forbidden_
|
|
1948
|
+
*
|
|
1949
|
+
* The sender is not permitted to send chat messages to the broadcaster’s chat room.
|
|
1950
|
+
*
|
|
1951
|
+
* _422 Unprocessable Entity_
|
|
1952
|
+
*
|
|
1953
|
+
* The message is too large.
|
|
1954
|
+
*
|
|
1955
|
+
* @see https://dev.twitch.tv/docs/api/reference#send-chat-message
|
|
1956
|
+
*/
|
|
1957
|
+
sendChatMessage: async (
|
|
1958
|
+
body: SendChatMessageBody,
|
|
1959
|
+
...request: CallApiOptions['request']
|
|
1960
|
+
) =>
|
|
1961
|
+
this.callApi<SendChatMessageResponse, 200, 400 | 401 | 403 | 422>({
|
|
1962
|
+
path: '/chat/messages',
|
|
1963
|
+
method: 'POST',
|
|
1964
|
+
body,
|
|
1965
|
+
request,
|
|
1952
1966
|
}),
|
|
1953
1967
|
/**
|
|
1954
1968
|
* Gets the color used for the user’s name in chat.
|
|
@@ -1981,14 +1995,12 @@ export class TwitchApi {
|
|
|
1981
1995
|
*/
|
|
1982
1996
|
getUserChatColor: async (
|
|
1983
1997
|
params: GetUserChatColorParams,
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
this.callApi({
|
|
1998
|
+
...request: CallApiOptions['request']
|
|
1999
|
+
) =>
|
|
2000
|
+
this.callApi<GetUserChatColorResponse, 200, 400 | 401>({
|
|
1988
2001
|
path: '/chat/color',
|
|
1989
2002
|
params,
|
|
1990
|
-
|
|
1991
|
-
accessToken,
|
|
2003
|
+
request,
|
|
1992
2004
|
}),
|
|
1993
2005
|
/**
|
|
1994
2006
|
* Updates the color used for the user’s name in chat.
|
|
@@ -2005,7 +2017,7 @@ export class TwitchApi {
|
|
|
2005
2017
|
*
|
|
2006
2018
|
* _204 No Content_
|
|
2007
2019
|
*
|
|
2008
|
-
* Successfully updated the user
|
|
2020
|
+
* Successfully updated the user's chat color.
|
|
2009
2021
|
*
|
|
2010
2022
|
* _400 Bad Request_
|
|
2011
2023
|
*
|
|
@@ -2026,15 +2038,13 @@ export class TwitchApi {
|
|
|
2026
2038
|
*/
|
|
2027
2039
|
updateUserChatColor: async (
|
|
2028
2040
|
params: UpdateUserChatColorParams,
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
this.callApi({
|
|
2041
|
+
...request: CallApiOptions['request']
|
|
2042
|
+
) =>
|
|
2043
|
+
this.callApi<void, 204, 400 | 401>({
|
|
2033
2044
|
path: '/chat/color',
|
|
2034
2045
|
method: 'PUT',
|
|
2035
2046
|
params,
|
|
2036
|
-
|
|
2037
|
-
accessToken,
|
|
2047
|
+
request,
|
|
2038
2048
|
}),
|
|
2039
2049
|
};
|
|
2040
2050
|
clips = {
|
|
@@ -2086,15 +2096,13 @@ export class TwitchApi {
|
|
|
2086
2096
|
*/
|
|
2087
2097
|
createClip: async (
|
|
2088
2098
|
params: CreateClipParams,
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
this.callApi({
|
|
2099
|
+
...request: CallApiOptions['request']
|
|
2100
|
+
) =>
|
|
2101
|
+
this.callApi<CreateClipResponse, 202, 400 | 401 | 403 | 404>({
|
|
2093
2102
|
path: '/clips',
|
|
2094
2103
|
method: 'POST',
|
|
2095
2104
|
params,
|
|
2096
|
-
|
|
2097
|
-
accessToken,
|
|
2105
|
+
request,
|
|
2098
2106
|
}),
|
|
2099
2107
|
/**
|
|
2100
2108
|
* 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).
|
|
@@ -2136,14 +2144,253 @@ export class TwitchApi {
|
|
|
2136
2144
|
*/
|
|
2137
2145
|
getClips: async (
|
|
2138
2146
|
params: GetClipsParams | null | undefined = null,
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
this.callApi({
|
|
2147
|
+
...request: CallApiOptions['request']
|
|
2148
|
+
) =>
|
|
2149
|
+
this.callApi<GetClipsResponse, 200, 400 | 401 | 404>({
|
|
2143
2150
|
path: '/clips',
|
|
2144
2151
|
params,
|
|
2145
|
-
|
|
2146
|
-
|
|
2152
|
+
request,
|
|
2153
|
+
}),
|
|
2154
|
+
};
|
|
2155
|
+
conduits = {
|
|
2156
|
+
/**
|
|
2157
|
+
* NEW Gets the [conduits](https://dev.twitch.tv/docs/eventsub/handling-conduit-events) for a client ID.
|
|
2158
|
+
*
|
|
2159
|
+
* __Authorization:__
|
|
2160
|
+
*
|
|
2161
|
+
* Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens).
|
|
2162
|
+
*
|
|
2163
|
+
* __URL:__
|
|
2164
|
+
*
|
|
2165
|
+
* `GET https://api.twitch.tv/helix/eventsub/conduits`
|
|
2166
|
+
*
|
|
2167
|
+
* __Response Codes:__
|
|
2168
|
+
*
|
|
2169
|
+
* _200 OK_
|
|
2170
|
+
*
|
|
2171
|
+
* Successfully retrieved conduits.
|
|
2172
|
+
*
|
|
2173
|
+
* _401 Unauthorized_
|
|
2174
|
+
*
|
|
2175
|
+
* Authorization header required with an app access token.
|
|
2176
|
+
*
|
|
2177
|
+
* @see https://dev.twitch.tv/docs/api/reference#get-conduits
|
|
2178
|
+
*/
|
|
2179
|
+
getConduits: async (...request: CallApiOptions['request']) =>
|
|
2180
|
+
this.callApi<GetConduitsResponse, 200, 401>({
|
|
2181
|
+
path: '/eventsub/conduits',
|
|
2182
|
+
request,
|
|
2183
|
+
}),
|
|
2184
|
+
/**
|
|
2185
|
+
* NEW Creates a new [conduit](https://dev.twitch.tv/docs/eventsub/handling-conduit-events).
|
|
2186
|
+
*
|
|
2187
|
+
* __Authorization:__
|
|
2188
|
+
*
|
|
2189
|
+
* Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens).
|
|
2190
|
+
*
|
|
2191
|
+
* __URL:__
|
|
2192
|
+
*
|
|
2193
|
+
* `POST https://api.twitch.tv/helix/eventsub/conduits`
|
|
2194
|
+
*
|
|
2195
|
+
* __Response Codes:__
|
|
2196
|
+
*
|
|
2197
|
+
* _200 OK_
|
|
2198
|
+
*
|
|
2199
|
+
* Conduit created.
|
|
2200
|
+
*
|
|
2201
|
+
* _400 Bad Request_
|
|
2202
|
+
*
|
|
2203
|
+
* Invalid shard count.
|
|
2204
|
+
*
|
|
2205
|
+
* _401 Unauthorized_
|
|
2206
|
+
*
|
|
2207
|
+
* Authorization header required with an app access token.
|
|
2208
|
+
*
|
|
2209
|
+
* _429 Too Many Requests_
|
|
2210
|
+
*
|
|
2211
|
+
* Conduit limit reached.
|
|
2212
|
+
*
|
|
2213
|
+
* @see https://dev.twitch.tv/docs/api/reference#create-conduits
|
|
2214
|
+
*/
|
|
2215
|
+
createConduits: async (
|
|
2216
|
+
body: CreateConduitsBody,
|
|
2217
|
+
...request: CallApiOptions['request']
|
|
2218
|
+
) =>
|
|
2219
|
+
this.callApi<CreateConduitsResponse, 200, 400 | 401 | 429>({
|
|
2220
|
+
path: '/eventsub/conduits',
|
|
2221
|
+
method: 'POST',
|
|
2222
|
+
body,
|
|
2223
|
+
request,
|
|
2224
|
+
}),
|
|
2225
|
+
/**
|
|
2226
|
+
* 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.
|
|
2227
|
+
*
|
|
2228
|
+
* __Authorization:__
|
|
2229
|
+
*
|
|
2230
|
+
* Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens).
|
|
2231
|
+
*
|
|
2232
|
+
* __URL:__
|
|
2233
|
+
*
|
|
2234
|
+
* `PATCH https://api.twitch.tv/helix/eventsub/conduits`
|
|
2235
|
+
*
|
|
2236
|
+
* __Response Codes:__
|
|
2237
|
+
*
|
|
2238
|
+
* _200 OK_
|
|
2239
|
+
*
|
|
2240
|
+
* Conduit updated.
|
|
2241
|
+
*
|
|
2242
|
+
* _400 Bad Request_
|
|
2243
|
+
*
|
|
2244
|
+
* * Invalid shard count
|
|
2245
|
+
* * The id query parameter is required.
|
|
2246
|
+
*
|
|
2247
|
+
* _401 Unauthorized_
|
|
2248
|
+
*
|
|
2249
|
+
* Authorization header required with an app access token.
|
|
2250
|
+
*
|
|
2251
|
+
* _404 Not Found_
|
|
2252
|
+
*
|
|
2253
|
+
* * Conduit not found.
|
|
2254
|
+
* * Conduit’s owner must match the client ID in the access token.
|
|
2255
|
+
*
|
|
2256
|
+
* @see https://dev.twitch.tv/docs/api/reference#update-conduits
|
|
2257
|
+
*/
|
|
2258
|
+
updateConduits: async (
|
|
2259
|
+
body: UpdateConduitsBody,
|
|
2260
|
+
...request: CallApiOptions['request']
|
|
2261
|
+
) =>
|
|
2262
|
+
this.callApi<UpdateConduitsResponse, 200, 400 | 401 | 404>({
|
|
2263
|
+
path: '/eventsub/conduits',
|
|
2264
|
+
method: 'PATCH',
|
|
2265
|
+
body,
|
|
2266
|
+
request,
|
|
2267
|
+
}),
|
|
2268
|
+
/**
|
|
2269
|
+
* 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).
|
|
2270
|
+
*
|
|
2271
|
+
* __Authorization:__
|
|
2272
|
+
*
|
|
2273
|
+
* Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens).
|
|
2274
|
+
*
|
|
2275
|
+
* __URL:__
|
|
2276
|
+
*
|
|
2277
|
+
* `DELETE https://api.twitch.tv/helix/eventsub/conduits`
|
|
2278
|
+
*
|
|
2279
|
+
* __Response Codes:__
|
|
2280
|
+
*
|
|
2281
|
+
* _204 No Content_
|
|
2282
|
+
*
|
|
2283
|
+
* Successfully deleted the conduit.
|
|
2284
|
+
*
|
|
2285
|
+
* _400 Bad Request_
|
|
2286
|
+
*
|
|
2287
|
+
* The id query parameter is required.
|
|
2288
|
+
*
|
|
2289
|
+
* _401 Unauthorized_
|
|
2290
|
+
*
|
|
2291
|
+
* Authorization header required with an app access token.
|
|
2292
|
+
*
|
|
2293
|
+
* _404 Not Found_
|
|
2294
|
+
*
|
|
2295
|
+
* * Conduit not found.
|
|
2296
|
+
* * Conduit’s owner must match the client ID in the access token.
|
|
2297
|
+
*
|
|
2298
|
+
* @see https://dev.twitch.tv/docs/api/reference#delete-conduit
|
|
2299
|
+
*/
|
|
2300
|
+
deleteConduit: async (
|
|
2301
|
+
params: DeleteConduitParams,
|
|
2302
|
+
...request: CallApiOptions['request']
|
|
2303
|
+
) =>
|
|
2304
|
+
this.callApi<void, 204, 400 | 401 | 404>({
|
|
2305
|
+
path: '/eventsub/conduits',
|
|
2306
|
+
method: 'DELETE',
|
|
2307
|
+
params,
|
|
2308
|
+
request,
|
|
2309
|
+
}),
|
|
2310
|
+
/**
|
|
2311
|
+
* NEW Gets a lists of all shards for a [conduit](https://dev.twitch.tv/docs/eventsub/handling-conduit-events).
|
|
2312
|
+
*
|
|
2313
|
+
* __Authorization:__
|
|
2314
|
+
*
|
|
2315
|
+
* Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens).
|
|
2316
|
+
*
|
|
2317
|
+
* __URL:__
|
|
2318
|
+
*
|
|
2319
|
+
* `GET https://api.twitch.tv/helix/eventsub/conduits/shards`
|
|
2320
|
+
*
|
|
2321
|
+
* __Response Codes:__
|
|
2322
|
+
*
|
|
2323
|
+
* _200 OK_
|
|
2324
|
+
*
|
|
2325
|
+
* Successfully retrieved shards.
|
|
2326
|
+
*
|
|
2327
|
+
* _400 Bad Request_
|
|
2328
|
+
*
|
|
2329
|
+
* The id query parameter is required.
|
|
2330
|
+
*
|
|
2331
|
+
* _401 Unauthorized_
|
|
2332
|
+
*
|
|
2333
|
+
* Authorization header required with an app access token.
|
|
2334
|
+
*
|
|
2335
|
+
* _404 Not Found_
|
|
2336
|
+
*
|
|
2337
|
+
* * Conduit not found.
|
|
2338
|
+
* * Conduit’s owner must match the client ID in the access token.
|
|
2339
|
+
*
|
|
2340
|
+
* @see https://dev.twitch.tv/docs/api/reference#get-conduit-shards
|
|
2341
|
+
*/
|
|
2342
|
+
getConduitShards: async (
|
|
2343
|
+
params: GetConduitShardsParams,
|
|
2344
|
+
...request: CallApiOptions['request']
|
|
2345
|
+
) =>
|
|
2346
|
+
this.callApi<GetConduitShardsResponse, 200, 400 | 401 | 404>({
|
|
2347
|
+
path: '/eventsub/conduits/shards',
|
|
2348
|
+
params,
|
|
2349
|
+
request,
|
|
2350
|
+
}),
|
|
2351
|
+
/**
|
|
2352
|
+
* NEW Updates shard(s) for a [conduit](https://dev.twitch.tv/docs/eventsub/handling-conduit-events).
|
|
2353
|
+
*
|
|
2354
|
+
* **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.
|
|
2355
|
+
*
|
|
2356
|
+
* __Authorization:__
|
|
2357
|
+
*
|
|
2358
|
+
* Requires an [app access token](https://dev.twitch.tv/docs/authentication#app-access-tokens).
|
|
2359
|
+
*
|
|
2360
|
+
* __URL:__
|
|
2361
|
+
*
|
|
2362
|
+
* `PATCH https://api.twitch.tv/helix/eventsub/conduits/shards`
|
|
2363
|
+
*
|
|
2364
|
+
* __Response Codes:__
|
|
2365
|
+
*
|
|
2366
|
+
* _202 Accepted_
|
|
2367
|
+
*
|
|
2368
|
+
* Successfully retrieved shards.
|
|
2369
|
+
*
|
|
2370
|
+
* _400 Bad Request_
|
|
2371
|
+
*
|
|
2372
|
+
* The id query parameter is required.
|
|
2373
|
+
*
|
|
2374
|
+
* _401 Unauthorized_
|
|
2375
|
+
*
|
|
2376
|
+
* Authorization header required with an app access token.
|
|
2377
|
+
*
|
|
2378
|
+
* _404 Not Found_
|
|
2379
|
+
*
|
|
2380
|
+
* * Conduit not found.
|
|
2381
|
+
* * Conduit’s owner must match the client ID in the access token.
|
|
2382
|
+
*
|
|
2383
|
+
* @see https://dev.twitch.tv/docs/api/reference#update-conduit-shards
|
|
2384
|
+
*/
|
|
2385
|
+
updateConduitShards: async (
|
|
2386
|
+
body: UpdateConduitShardsBody,
|
|
2387
|
+
...request: CallApiOptions['request']
|
|
2388
|
+
) =>
|
|
2389
|
+
this.callApi<UpdateConduitShardsResponse, 202, 400 | 401 | 404>({
|
|
2390
|
+
path: '/eventsub/conduits/shards',
|
|
2391
|
+
method: 'PATCH',
|
|
2392
|
+
body,
|
|
2393
|
+
request,
|
|
2147
2394
|
}),
|
|
2148
2395
|
};
|
|
2149
2396
|
ccls = {
|
|
@@ -2174,14 +2421,12 @@ export class TwitchApi {
|
|
|
2174
2421
|
*/
|
|
2175
2422
|
getContentClassificationLabels: async (
|
|
2176
2423
|
params: GetContentClassificationLabelsParams | null | undefined = null,
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
this.callApi({
|
|
2424
|
+
...request: CallApiOptions['request']
|
|
2425
|
+
) =>
|
|
2426
|
+
this.callApi<GetContentClassificationLabelsResponse, 200, 400 | 401 | 500>({
|
|
2181
2427
|
path: '/content_classification_labels',
|
|
2182
2428
|
params,
|
|
2183
|
-
|
|
2184
|
-
accessToken,
|
|
2429
|
+
request,
|
|
2185
2430
|
}),
|
|
2186
2431
|
};
|
|
2187
2432
|
entitlements = {
|
|
@@ -2240,14 +2485,12 @@ export class TwitchApi {
|
|
|
2240
2485
|
*/
|
|
2241
2486
|
getDropsEntitlements: async (
|
|
2242
2487
|
params: GetDropsEntitlementsParams | null | undefined = null,
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
this.callApi({
|
|
2488
|
+
...request: CallApiOptions['request']
|
|
2489
|
+
) =>
|
|
2490
|
+
this.callApi<GetDropsEntitlementsResponse, 200, 400 | 401 | 403 | 500>({
|
|
2247
2491
|
path: '/entitlements/drops',
|
|
2248
2492
|
params,
|
|
2249
|
-
|
|
2250
|
-
accessToken,
|
|
2493
|
+
request,
|
|
2251
2494
|
}),
|
|
2252
2495
|
/**
|
|
2253
2496
|
* Updates the Drop entitlement’s fulfillment status.
|
|
@@ -2292,15 +2535,13 @@ export class TwitchApi {
|
|
|
2292
2535
|
*/
|
|
2293
2536
|
updateDropsEntitlements: async (
|
|
2294
2537
|
body: UpdateDropsEntitlementsBody | null | undefined = null,
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
this.callApi({
|
|
2538
|
+
...request: CallApiOptions['request']
|
|
2539
|
+
) =>
|
|
2540
|
+
this.callApi<UpdateDropsEntitlementsResponse, 200, 400 | 401 | 500>({
|
|
2299
2541
|
path: '/entitlements/drops',
|
|
2300
2542
|
method: 'PATCH',
|
|
2301
2543
|
body,
|
|
2302
|
-
|
|
2303
|
-
accessToken,
|
|
2544
|
+
request,
|
|
2304
2545
|
}),
|
|
2305
2546
|
};
|
|
2306
2547
|
extensions = {
|
|
@@ -2343,14 +2584,12 @@ export class TwitchApi {
|
|
|
2343
2584
|
*/
|
|
2344
2585
|
getExtensionConfigurationSegment: async (
|
|
2345
2586
|
params: GetExtensionConfigurationSegmentParams,
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
this.callApi({
|
|
2587
|
+
...request: CallApiOptions['request']
|
|
2588
|
+
) =>
|
|
2589
|
+
this.callApi<GetExtensionConfigurationSegmentResponse, 200, 400 | 401 | 429>({
|
|
2350
2590
|
path: '/extensions/configurations',
|
|
2351
2591
|
params,
|
|
2352
|
-
|
|
2353
|
-
accessToken,
|
|
2592
|
+
request,
|
|
2354
2593
|
}),
|
|
2355
2594
|
/**
|
|
2356
2595
|
* Updates a configuration segment. The segment is limited to 5 KB. Extensions that are active on a channel do not receive the updated configuration.
|
|
@@ -2385,15 +2624,13 @@ export class TwitchApi {
|
|
|
2385
2624
|
*/
|
|
2386
2625
|
setExtensionConfigurationSegment: async (
|
|
2387
2626
|
body: SetExtensionConfigurationSegmentBody,
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
this.callApi({
|
|
2627
|
+
...request: CallApiOptions['request']
|
|
2628
|
+
) =>
|
|
2629
|
+
this.callApi<void, 204, 400 | 401>({
|
|
2392
2630
|
path: '/extensions/configurations',
|
|
2393
2631
|
method: 'PUT',
|
|
2394
2632
|
body,
|
|
2395
|
-
|
|
2396
|
-
accessToken,
|
|
2633
|
+
request,
|
|
2397
2634
|
}),
|
|
2398
2635
|
/**
|
|
2399
2636
|
* Updates the extension’s required\_configuration string. Use this endpoint if your extension requires the broadcaster to configure the extension before activating it (to require configuration, you must select **Custom/My Own Service** in Extension [Capabilities](https://dev.twitch.tv/docs/extensions/life-cycle/#capabilities)). For more information, see [Required Configurations](https://dev.twitch.tv/docs/extensions/building#required-configurations) and [Setting Required Configuration](https://dev.twitch.tv/docs/extensions/building#setting-required-configuration-with-the-configuration-service-optional).
|
|
@@ -2430,16 +2667,14 @@ export class TwitchApi {
|
|
|
2430
2667
|
setExtensionRequiredConfiguration: async (
|
|
2431
2668
|
params: SetExtensionRequiredConfigurationParams,
|
|
2432
2669
|
body: SetExtensionRequiredConfigurationBody,
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
this.callApi({
|
|
2670
|
+
...request: CallApiOptions['request']
|
|
2671
|
+
) =>
|
|
2672
|
+
this.callApi<void, 204, 400 | 401>({
|
|
2437
2673
|
path: '/extensions/required_configuration',
|
|
2438
2674
|
method: 'PUT',
|
|
2439
2675
|
params,
|
|
2440
2676
|
body,
|
|
2441
|
-
|
|
2442
|
-
accessToken,
|
|
2677
|
+
request,
|
|
2443
2678
|
}),
|
|
2444
2679
|
/**
|
|
2445
2680
|
* Sends a message to one or more viewers. You can send messages to a specific channel or to all channels where your extension is active. This endpoint uses the same mechanism as the [send](https://dev.twitch.tv/docs/extensions/reference#send) JavaScript helper function used to send messages.
|
|
@@ -2512,15 +2747,13 @@ export class TwitchApi {
|
|
|
2512
2747
|
*/
|
|
2513
2748
|
sendExtensionPubSubMessage: async (
|
|
2514
2749
|
body: SendExtensionPubSubMessageBody,
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
this.callApi({
|
|
2750
|
+
...request: CallApiOptions['request']
|
|
2751
|
+
) =>
|
|
2752
|
+
this.callApi<void, 204, 400 | 401 | 422>({
|
|
2519
2753
|
path: '/extensions/pubsub',
|
|
2520
2754
|
method: 'POST',
|
|
2521
2755
|
body,
|
|
2522
|
-
|
|
2523
|
-
accessToken,
|
|
2756
|
+
request,
|
|
2524
2757
|
}),
|
|
2525
2758
|
/**
|
|
2526
2759
|
* Gets a list of broadcasters that are streaming live and have installed or activated the extension.
|
|
@@ -2560,14 +2793,12 @@ export class TwitchApi {
|
|
|
2560
2793
|
*/
|
|
2561
2794
|
getExtensionLiveChannels: async (
|
|
2562
2795
|
params: GetExtensionLiveChannelsParams,
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
this.callApi({
|
|
2796
|
+
...request: CallApiOptions['request']
|
|
2797
|
+
) =>
|
|
2798
|
+
this.callApi<GetExtensionLiveChannelsResponse, 200, 400 | 401 | 404>({
|
|
2567
2799
|
path: '/extensions/live',
|
|
2568
2800
|
params,
|
|
2569
|
-
|
|
2570
|
-
accessToken,
|
|
2801
|
+
request,
|
|
2571
2802
|
}),
|
|
2572
2803
|
/**
|
|
2573
2804
|
* Gets an extension’s list of shared secrets.
|
|
@@ -2598,11 +2829,10 @@ export class TwitchApi {
|
|
|
2598
2829
|
*
|
|
2599
2830
|
* @see https://dev.twitch.tv/docs/api/reference#get-extension-secrets
|
|
2600
2831
|
*/
|
|
2601
|
-
getExtensionSecrets: async (
|
|
2602
|
-
this.callApi({
|
|
2832
|
+
getExtensionSecrets: async (...request: CallApiOptions['request']) =>
|
|
2833
|
+
this.callApi<GetExtensionSecretsResponse, 200, 400 | 401>({
|
|
2603
2834
|
path: '/extensions/jwt/secrets',
|
|
2604
|
-
|
|
2605
|
-
accessToken,
|
|
2835
|
+
request,
|
|
2606
2836
|
}),
|
|
2607
2837
|
/**
|
|
2608
2838
|
* Creates a shared secret used to sign and verify JWT tokens. Creating a new secret removes the current secrets from service. Use this function only when you are ready to use the new secret it returns.
|
|
@@ -2636,15 +2866,13 @@ export class TwitchApi {
|
|
|
2636
2866
|
*/
|
|
2637
2867
|
createExtensionSecret: async (
|
|
2638
2868
|
params: CreateExtensionSecretParams,
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
this.callApi({
|
|
2869
|
+
...request: CallApiOptions['request']
|
|
2870
|
+
) =>
|
|
2871
|
+
this.callApi<CreateExtensionSecretResponse, 200, 400 | 401>({
|
|
2643
2872
|
path: '/extensions/jwt/secrets',
|
|
2644
2873
|
method: 'POST',
|
|
2645
2874
|
params,
|
|
2646
|
-
|
|
2647
|
-
accessToken,
|
|
2875
|
+
request,
|
|
2648
2876
|
}),
|
|
2649
2877
|
/**
|
|
2650
2878
|
* Sends a message to the specified broadcaster’s chat room. The extension’s name is used as the username for the message in the chat room. To send a chat message, your extension must enable **Chat Capabilities** (under your extension’s **Capabilities** tab).
|
|
@@ -2685,16 +2913,14 @@ export class TwitchApi {
|
|
|
2685
2913
|
sendExtensionChatMessage: async (
|
|
2686
2914
|
params: SendExtensionChatMessageParams,
|
|
2687
2915
|
body: SendExtensionChatMessageBody,
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
this.callApi({
|
|
2916
|
+
...request: CallApiOptions['request']
|
|
2917
|
+
) =>
|
|
2918
|
+
this.callApi<void, 204, 400 | 401>({
|
|
2692
2919
|
path: '/extensions/chat',
|
|
2693
2920
|
method: 'POST',
|
|
2694
2921
|
params,
|
|
2695
2922
|
body,
|
|
2696
|
-
|
|
2697
|
-
accessToken,
|
|
2923
|
+
request,
|
|
2698
2924
|
}),
|
|
2699
2925
|
/**
|
|
2700
2926
|
* Gets information about an extension.
|
|
@@ -2732,14 +2958,12 @@ export class TwitchApi {
|
|
|
2732
2958
|
*/
|
|
2733
2959
|
getExtensions: async (
|
|
2734
2960
|
params: GetExtensionsParams,
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
this.callApi({
|
|
2961
|
+
...request: CallApiOptions['request']
|
|
2962
|
+
) =>
|
|
2963
|
+
this.callApi<GetExtensionsResponse, 200, 400 | 401 | 404>({
|
|
2739
2964
|
path: '/extensions',
|
|
2740
2965
|
params,
|
|
2741
|
-
|
|
2742
|
-
accessToken,
|
|
2966
|
+
request,
|
|
2743
2967
|
}),
|
|
2744
2968
|
/**
|
|
2745
2969
|
* Gets information about a released extension. Returns the extension if its `state` is Released.
|
|
@@ -2776,14 +3000,12 @@ export class TwitchApi {
|
|
|
2776
3000
|
*/
|
|
2777
3001
|
getReleasedExtensions: async (
|
|
2778
3002
|
params: GetReleasedExtensionsParams,
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
this.callApi({
|
|
3003
|
+
...request: CallApiOptions['request']
|
|
3004
|
+
) =>
|
|
3005
|
+
this.callApi<GetReleasedExtensionsResponse, 200, 400 | 401 | 404>({
|
|
2783
3006
|
path: '/extensions/released',
|
|
2784
3007
|
params,
|
|
2785
|
-
|
|
2786
|
-
accessToken,
|
|
3008
|
+
request,
|
|
2787
3009
|
}),
|
|
2788
3010
|
/**
|
|
2789
3011
|
* Gets the list of Bits products that belongs to the extension. The client ID in the app access token identifies the extension.
|
|
@@ -2816,14 +3038,12 @@ export class TwitchApi {
|
|
|
2816
3038
|
*/
|
|
2817
3039
|
getExtensionBitsProducts: async (
|
|
2818
3040
|
params: GetExtensionBitsProductsParams | null | undefined = null,
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
this.callApi({
|
|
3041
|
+
...request: CallApiOptions['request']
|
|
3042
|
+
) =>
|
|
3043
|
+
this.callApi<GetExtensionBitsProductsResponse, 200, 400 | 401>({
|
|
2823
3044
|
path: '/bits/extensions',
|
|
2824
3045
|
params,
|
|
2825
|
-
|
|
2826
|
-
accessToken,
|
|
3046
|
+
request,
|
|
2827
3047
|
}),
|
|
2828
3048
|
/**
|
|
2829
3049
|
* Adds or updates a Bits product that the extension created. If the SKU doesn’t exist, the product is added. You may update all fields except the `sku` field.
|
|
@@ -2848,7 +3068,7 @@ export class TwitchApi {
|
|
|
2848
3068
|
* * The value in the `sku` field is not valid. The SKU may contain only alphanumeric characters, dashes (-), underscores (\_), and periods (.).
|
|
2849
3069
|
* * The `cost` object's `amount` field is required.
|
|
2850
3070
|
* * The value in the `cost` object's `amount` field is not valid.
|
|
2851
|
-
* * The cost object's `type` field is required.
|
|
3071
|
+
* * The `cost` object's `type` field is required.
|
|
2852
3072
|
* * The value in the `cost` object's `type` field is not valid.
|
|
2853
3073
|
* * The `display_name` field is required.
|
|
2854
3074
|
* * The ID in the Client-Id header must belong to the extension.
|
|
@@ -2863,15 +3083,13 @@ export class TwitchApi {
|
|
|
2863
3083
|
*/
|
|
2864
3084
|
updateExtensionBitsProduct: async (
|
|
2865
3085
|
body: UpdateExtensionBitsProductBody,
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
this.callApi({
|
|
3086
|
+
...request: CallApiOptions['request']
|
|
3087
|
+
) =>
|
|
3088
|
+
this.callApi<UpdateExtensionBitsProductResponse, 200, 400 | 401>({
|
|
2870
3089
|
path: '/bits/extensions',
|
|
2871
3090
|
method: 'PUT',
|
|
2872
3091
|
body,
|
|
2873
|
-
|
|
2874
|
-
accessToken,
|
|
3092
|
+
request,
|
|
2875
3093
|
}),
|
|
2876
3094
|
};
|
|
2877
3095
|
eventSub = {
|
|
@@ -2884,6 +3102,8 @@ export class TwitchApi {
|
|
|
2884
3102
|
*
|
|
2885
3103
|
* 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.
|
|
2886
3104
|
*
|
|
3105
|
+
* 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.
|
|
3106
|
+
*
|
|
2887
3107
|
* __URL:__
|
|
2888
3108
|
*
|
|
2889
3109
|
* `POST https://api.twitch.tv/helix/eventsub/subscriptions`
|
|
@@ -2906,6 +3126,7 @@ export class TwitchApi {
|
|
|
2906
3126
|
* * The `callback` field is required if you specify the webhook transport method.
|
|
2907
3127
|
* * The `session_id` field is required if you specify the WebSocket transport method.
|
|
2908
3128
|
* * The combination of subscription type and version is not valid.
|
|
3129
|
+
* * The `conduit_id` field is required if you specify the Conduit transport method.
|
|
2909
3130
|
*
|
|
2910
3131
|
* _401 Unauthorized_
|
|
2911
3132
|
*
|
|
@@ -2916,29 +3137,27 @@ export class TwitchApi {
|
|
|
2916
3137
|
*
|
|
2917
3138
|
* _403 Forbidden_
|
|
2918
3139
|
*
|
|
2919
|
-
*
|
|
3140
|
+
* The access token is missing the required scopes.
|
|
2920
3141
|
*
|
|
2921
3142
|
* _409 Conflict_
|
|
2922
3143
|
*
|
|
2923
|
-
*
|
|
3144
|
+
* A subscription already exists for the specified event type and `condition` combination.
|
|
2924
3145
|
*
|
|
2925
3146
|
* _429 Too Many Requests_
|
|
2926
3147
|
*
|
|
2927
|
-
*
|
|
3148
|
+
* The request exceeds the number of subscriptions that you may create with the same combination of `type` and `condition` values.
|
|
2928
3149
|
*
|
|
2929
3150
|
* @see https://dev.twitch.tv/docs/api/reference#create-eventsub-subscription
|
|
2930
3151
|
*/
|
|
2931
3152
|
createEventSubSubscription: async (
|
|
2932
3153
|
body: CreateEventSubSubscriptionBody,
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
this.callApi({
|
|
3154
|
+
...request: CallApiOptions['request']
|
|
3155
|
+
) =>
|
|
3156
|
+
this.callApi<CreateEventSubSubscriptionResponse, 202, 400 | 401 | 403 | 409 | 429>({
|
|
2937
3157
|
path: '/eventsub/subscriptions',
|
|
2938
3158
|
method: 'POST',
|
|
2939
3159
|
body,
|
|
2940
|
-
|
|
2941
|
-
accessToken,
|
|
3160
|
+
request,
|
|
2942
3161
|
}),
|
|
2943
3162
|
/**
|
|
2944
3163
|
* Deletes an EventSub subscription.
|
|
@@ -2977,15 +3196,13 @@ export class TwitchApi {
|
|
|
2977
3196
|
*/
|
|
2978
3197
|
deleteEventSubSubscription: async (
|
|
2979
3198
|
params: DeleteEventSubSubscriptionParams,
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
this.callApi({
|
|
3199
|
+
...request: CallApiOptions['request']
|
|
3200
|
+
) =>
|
|
3201
|
+
this.callApi<void, 204, 400 | 401 | 404>({
|
|
2984
3202
|
path: '/eventsub/subscriptions',
|
|
2985
3203
|
method: 'DELETE',
|
|
2986
3204
|
params,
|
|
2987
|
-
|
|
2988
|
-
accessToken,
|
|
3205
|
+
request,
|
|
2989
3206
|
}),
|
|
2990
3207
|
/**
|
|
2991
3208
|
* Gets a list of EventSub subscriptions that the client in the access token created.
|
|
@@ -3027,14 +3244,12 @@ export class TwitchApi {
|
|
|
3027
3244
|
*/
|
|
3028
3245
|
getEventSubSubscriptions: async (
|
|
3029
3246
|
params: GetEventSubSubscriptionsParams | null | undefined = null,
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
this.callApi({
|
|
3247
|
+
...request: CallApiOptions['request']
|
|
3248
|
+
) =>
|
|
3249
|
+
this.callApi<GetEventSubSubscriptionsResponse, 200, 400 | 401>({
|
|
3034
3250
|
path: '/eventsub/subscriptions',
|
|
3035
3251
|
params,
|
|
3036
|
-
|
|
3037
|
-
accessToken,
|
|
3252
|
+
request,
|
|
3038
3253
|
}),
|
|
3039
3254
|
};
|
|
3040
3255
|
games = {
|
|
@@ -3070,14 +3285,12 @@ export class TwitchApi {
|
|
|
3070
3285
|
*/
|
|
3071
3286
|
getTopGames: async (
|
|
3072
3287
|
params: GetTopGamesParams | null | undefined = null,
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
this.callApi({
|
|
3288
|
+
...request: CallApiOptions['request']
|
|
3289
|
+
) =>
|
|
3290
|
+
this.callApi<GetTopGamesResponse, 200, 400 | 401>({
|
|
3077
3291
|
path: '/games/top',
|
|
3078
3292
|
params,
|
|
3079
|
-
|
|
3080
|
-
accessToken,
|
|
3293
|
+
request,
|
|
3081
3294
|
}),
|
|
3082
3295
|
/**
|
|
3083
3296
|
* Gets information about specified categories or games.
|
|
@@ -3113,14 +3326,12 @@ export class TwitchApi {
|
|
|
3113
3326
|
*/
|
|
3114
3327
|
getGames: async (
|
|
3115
3328
|
params: GetGamesParams | null | undefined = null,
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
this.callApi({
|
|
3329
|
+
...request: CallApiOptions['request']
|
|
3330
|
+
) =>
|
|
3331
|
+
this.callApi<GetGamesResponse, 200, 400 | 401>({
|
|
3120
3332
|
path: '/games',
|
|
3121
3333
|
params,
|
|
3122
|
-
|
|
3123
|
-
accessToken,
|
|
3334
|
+
request,
|
|
3124
3335
|
}),
|
|
3125
3336
|
};
|
|
3126
3337
|
goals = {
|
|
@@ -3159,14 +3370,12 @@ export class TwitchApi {
|
|
|
3159
3370
|
*/
|
|
3160
3371
|
getCreatorGoals: async (
|
|
3161
3372
|
params: GetCreatorGoalsParams,
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
this.callApi({
|
|
3373
|
+
...request: CallApiOptions['request']
|
|
3374
|
+
) =>
|
|
3375
|
+
this.callApi<GetCreatorGoalsResponse, 200, 400 | 401>({
|
|
3166
3376
|
path: '/goals',
|
|
3167
3377
|
params,
|
|
3168
|
-
|
|
3169
|
-
accessToken,
|
|
3378
|
+
request,
|
|
3170
3379
|
}),
|
|
3171
3380
|
};
|
|
3172
3381
|
guestStar = {
|
|
@@ -3199,14 +3408,12 @@ export class TwitchApi {
|
|
|
3199
3408
|
*/
|
|
3200
3409
|
getChannelGuestStarSettings: async (
|
|
3201
3410
|
params: GetChannelGuestStarSettingsParams,
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
this.callApi({
|
|
3411
|
+
...request: CallApiOptions['request']
|
|
3412
|
+
) =>
|
|
3413
|
+
this.callApi<GetChannelGuestStarSettingsResponse, 200, 400 | 403>({
|
|
3206
3414
|
path: '/guest_star/channel_settings',
|
|
3207
3415
|
params,
|
|
3208
|
-
|
|
3209
|
-
accessToken,
|
|
3416
|
+
request,
|
|
3210
3417
|
}),
|
|
3211
3418
|
/**
|
|
3212
3419
|
* BETA Mutates the channel settings for configuration of the Guest Star feature for a particular host.
|
|
@@ -3237,16 +3444,14 @@ export class TwitchApi {
|
|
|
3237
3444
|
updateChannelGuestStarSettings: async (
|
|
3238
3445
|
params: UpdateChannelGuestStarSettingsParams,
|
|
3239
3446
|
body: UpdateChannelGuestStarSettingsBody | null | undefined = null,
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
this.callApi({
|
|
3447
|
+
...request: CallApiOptions['request']
|
|
3448
|
+
) =>
|
|
3449
|
+
this.callApi<void, 204, 400>({
|
|
3244
3450
|
path: '/guest_star/channel_settings',
|
|
3245
3451
|
method: 'PUT',
|
|
3246
3452
|
params,
|
|
3247
3453
|
body,
|
|
3248
|
-
|
|
3249
|
-
accessToken,
|
|
3454
|
+
request,
|
|
3250
3455
|
}),
|
|
3251
3456
|
/**
|
|
3252
3457
|
* BETA Gets information about an ongoing Guest Star session for a particular channel.
|
|
@@ -3277,14 +3482,12 @@ export class TwitchApi {
|
|
|
3277
3482
|
*/
|
|
3278
3483
|
getGuestStarSession: async (
|
|
3279
3484
|
params: GetGuestStarSessionParams,
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
this.callApi({
|
|
3485
|
+
...request: CallApiOptions['request']
|
|
3486
|
+
) =>
|
|
3487
|
+
this.callApi<GetGuestStarSessionResponse, 200, 400 | 401>({
|
|
3284
3488
|
path: '/guest_star/session',
|
|
3285
3489
|
params,
|
|
3286
|
-
|
|
3287
|
-
accessToken,
|
|
3490
|
+
request,
|
|
3288
3491
|
}),
|
|
3289
3492
|
/**
|
|
3290
3493
|
* BETA Programmatically creates a Guest Star session on behalf of the broadcaster. Requires the broadcaster to be present in the call interface, or the call will be ended automatically.
|
|
@@ -3319,15 +3522,13 @@ export class TwitchApi {
|
|
|
3319
3522
|
*/
|
|
3320
3523
|
createGuestStarSession: async (
|
|
3321
3524
|
params: CreateGuestStarSessionParams,
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
this.callApi({
|
|
3525
|
+
...request: CallApiOptions['request']
|
|
3526
|
+
) =>
|
|
3527
|
+
this.callApi<CreateGuestStarSessionResponse, 200, 400 | 401 | 403>({
|
|
3326
3528
|
path: '/guest_star/session',
|
|
3327
3529
|
method: 'POST',
|
|
3328
3530
|
params,
|
|
3329
|
-
|
|
3330
|
-
accessToken,
|
|
3531
|
+
request,
|
|
3331
3532
|
}),
|
|
3332
3533
|
/**
|
|
3333
3534
|
* BETA Programmatically ends a Guest Star session on behalf of the broadcaster. Performs the same action as if the host clicked the “End Call” button in the Guest Star UI.
|
|
@@ -3359,15 +3560,13 @@ export class TwitchApi {
|
|
|
3359
3560
|
*/
|
|
3360
3561
|
endGuestStarSession: async (
|
|
3361
3562
|
params: EndGuestStarSessionParams,
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
this.callApi({
|
|
3563
|
+
...request: CallApiOptions['request']
|
|
3564
|
+
) =>
|
|
3565
|
+
this.callApi<void, 204, 400 | 403>({
|
|
3366
3566
|
path: '/guest_star/session',
|
|
3367
3567
|
method: 'DELETE',
|
|
3368
3568
|
params,
|
|
3369
|
-
|
|
3370
|
-
accessToken,
|
|
3569
|
+
request,
|
|
3371
3570
|
}),
|
|
3372
3571
|
/**
|
|
3373
3572
|
* BETA Provides the caller with a list of pending invites to a Guest Star session, including the invitee’s ready status while joining the waiting room.
|
|
@@ -3394,14 +3593,12 @@ export class TwitchApi {
|
|
|
3394
3593
|
*/
|
|
3395
3594
|
getGuestStarInvites: async (
|
|
3396
3595
|
params: GetGuestStarInvitesParams,
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
this.callApi({
|
|
3596
|
+
...request: CallApiOptions['request']
|
|
3597
|
+
) =>
|
|
3598
|
+
this.callApi<GetGuestStarInvitesResponse, 200, 400>({
|
|
3401
3599
|
path: '/guest_star/invites',
|
|
3402
3600
|
params,
|
|
3403
|
-
|
|
3404
|
-
accessToken,
|
|
3601
|
+
request,
|
|
3405
3602
|
}),
|
|
3406
3603
|
/**
|
|
3407
3604
|
* BETA Sends an invite to a specified guest on behalf of the broadcaster for a Guest Star session in progress.
|
|
@@ -3436,15 +3633,13 @@ export class TwitchApi {
|
|
|
3436
3633
|
*/
|
|
3437
3634
|
sendGuestStarInvite: async (
|
|
3438
3635
|
params: SendGuestStarInviteParams,
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
this.callApi({
|
|
3636
|
+
...request: CallApiOptions['request']
|
|
3637
|
+
) =>
|
|
3638
|
+
this.callApi<void, 204, 400 | 403>({
|
|
3443
3639
|
path: '/guest_star/invites',
|
|
3444
3640
|
method: 'POST',
|
|
3445
3641
|
params,
|
|
3446
|
-
|
|
3447
|
-
accessToken,
|
|
3642
|
+
request,
|
|
3448
3643
|
}),
|
|
3449
3644
|
/**
|
|
3450
3645
|
* BETA Revokes a previously sent invite for a Guest Star session.
|
|
@@ -3477,15 +3672,13 @@ export class TwitchApi {
|
|
|
3477
3672
|
*/
|
|
3478
3673
|
deleteGuestStarInvite: async (
|
|
3479
3674
|
params: DeleteGuestStarInviteParams,
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
this.callApi({
|
|
3675
|
+
...request: CallApiOptions['request']
|
|
3676
|
+
) =>
|
|
3677
|
+
this.callApi<void, 204, 400 | 404>({
|
|
3484
3678
|
path: '/guest_star/invites',
|
|
3485
3679
|
method: 'DELETE',
|
|
3486
3680
|
params,
|
|
3487
|
-
|
|
3488
|
-
accessToken,
|
|
3681
|
+
request,
|
|
3489
3682
|
}),
|
|
3490
3683
|
/**
|
|
3491
3684
|
* BETA Allows a previously invited user to be assigned a slot within the active Guest Star session, once that guest has indicated they are ready to join.
|
|
@@ -3528,15 +3721,13 @@ export class TwitchApi {
|
|
|
3528
3721
|
*/
|
|
3529
3722
|
assignGuestStarSlot: async (
|
|
3530
3723
|
params: AssignGuestStarSlotParams,
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
this.callApi({
|
|
3724
|
+
...request: CallApiOptions['request']
|
|
3725
|
+
) =>
|
|
3726
|
+
this.callApi<void, 204, 400 | 401 | 403>({
|
|
3535
3727
|
path: '/guest_star/slot',
|
|
3536
3728
|
method: 'POST',
|
|
3537
3729
|
params,
|
|
3538
|
-
|
|
3539
|
-
accessToken,
|
|
3730
|
+
request,
|
|
3540
3731
|
}),
|
|
3541
3732
|
/**
|
|
3542
3733
|
* BETA Allows a user to update the assigned slot for a particular user within the active Guest Star session.
|
|
@@ -3566,15 +3757,13 @@ export class TwitchApi {
|
|
|
3566
3757
|
*/
|
|
3567
3758
|
updateGuestStarSlot: async (
|
|
3568
3759
|
params: UpdateGuestStarSlotParams,
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
this.callApi({
|
|
3760
|
+
...request: CallApiOptions['request']
|
|
3761
|
+
) =>
|
|
3762
|
+
this.callApi<void, 204, 400>({
|
|
3573
3763
|
path: '/guest_star/slot',
|
|
3574
3764
|
method: 'PATCH',
|
|
3575
3765
|
params,
|
|
3576
|
-
|
|
3577
|
-
accessToken,
|
|
3766
|
+
request,
|
|
3578
3767
|
}),
|
|
3579
3768
|
/**
|
|
3580
3769
|
* BETA Allows a caller to remove a slot assignment from a user participating in an active Guest Star session. This revokes their access to the session immediately and disables their access to publish or subscribe to media within the session.
|
|
@@ -3614,15 +3803,13 @@ export class TwitchApi {
|
|
|
3614
3803
|
*/
|
|
3615
3804
|
deleteGuestStarSlot: async (
|
|
3616
3805
|
params: DeleteGuestStarSlotParams,
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
this.callApi({
|
|
3806
|
+
...request: CallApiOptions['request']
|
|
3807
|
+
) =>
|
|
3808
|
+
this.callApi<void, 204, 400 | 403 | 404>({
|
|
3621
3809
|
path: '/guest_star/slot',
|
|
3622
3810
|
method: 'DELETE',
|
|
3623
3811
|
params,
|
|
3624
|
-
|
|
3625
|
-
accessToken,
|
|
3812
|
+
request,
|
|
3626
3813
|
}),
|
|
3627
3814
|
/**
|
|
3628
3815
|
* BETA Allows a user to update slot settings for a particular guest within a Guest Star session, such as allowing the user to share audio or video within the call as a host. These settings will be broadcasted to all subscribers which control their view of the guest in that slot. One or more of the optional parameters to this API can be specified at any time.
|
|
@@ -3658,15 +3845,13 @@ export class TwitchApi {
|
|
|
3658
3845
|
*/
|
|
3659
3846
|
updateGuestStarSlotSettings: async (
|
|
3660
3847
|
params: UpdateGuestStarSlotSettingsParams,
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
this.callApi({
|
|
3848
|
+
...request: CallApiOptions['request']
|
|
3849
|
+
) =>
|
|
3850
|
+
this.callApi<void, 204, 400 | 403>({
|
|
3665
3851
|
path: '/guest_star/slot_settings',
|
|
3666
3852
|
method: 'PATCH',
|
|
3667
3853
|
params,
|
|
3668
|
-
|
|
3669
|
-
accessToken,
|
|
3854
|
+
request,
|
|
3670
3855
|
}),
|
|
3671
3856
|
};
|
|
3672
3857
|
hypeTrain = {
|
|
@@ -3701,14 +3886,12 @@ export class TwitchApi {
|
|
|
3701
3886
|
*/
|
|
3702
3887
|
getHypeTrainEvents: async (
|
|
3703
3888
|
params: GetHypeTrainEventsParams,
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
this.callApi({
|
|
3889
|
+
...request: CallApiOptions['request']
|
|
3890
|
+
) =>
|
|
3891
|
+
this.callApi<GetHypeTrainEventsResponse, 200, 401>({
|
|
3708
3892
|
path: '/hypetrain/events',
|
|
3709
3893
|
params,
|
|
3710
|
-
|
|
3711
|
-
accessToken,
|
|
3894
|
+
request,
|
|
3712
3895
|
}),
|
|
3713
3896
|
};
|
|
3714
3897
|
moderation = {
|
|
@@ -3769,16 +3952,14 @@ export class TwitchApi {
|
|
|
3769
3952
|
checkAutoModStatus: async (
|
|
3770
3953
|
params: CheckAutoModStatusParams,
|
|
3771
3954
|
body: CheckAutoModStatusBody,
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
this.callApi({
|
|
3955
|
+
...request: CallApiOptions['request']
|
|
3956
|
+
) =>
|
|
3957
|
+
this.callApi<CheckAutoModStatusResponse, 200, 400 | 401 | 403 | 429>({
|
|
3776
3958
|
path: '/moderation/enforcements/status',
|
|
3777
3959
|
method: 'POST',
|
|
3778
3960
|
params,
|
|
3779
3961
|
body,
|
|
3780
|
-
|
|
3781
|
-
accessToken,
|
|
3962
|
+
request,
|
|
3782
3963
|
}),
|
|
3783
3964
|
/**
|
|
3784
3965
|
* Allow or deny the message that AutoMod flagged for review. For information about AutoMod, see [How to Use AutoMod](https://help.twitch.tv/s/article/how-to-use-automod).
|
|
@@ -3826,15 +4007,13 @@ export class TwitchApi {
|
|
|
3826
4007
|
*/
|
|
3827
4008
|
manageHeldAutoModMessages: async (
|
|
3828
4009
|
body: ManageHeldAutoModMessagesBody,
|
|
3829
|
-
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
this.callApi({
|
|
4010
|
+
...request: CallApiOptions['request']
|
|
4011
|
+
) =>
|
|
4012
|
+
this.callApi<void, 204, 400 | 401 | 403 | 404>({
|
|
3833
4013
|
path: '/moderation/automod/message',
|
|
3834
4014
|
method: 'POST',
|
|
3835
4015
|
body,
|
|
3836
|
-
|
|
3837
|
-
accessToken,
|
|
4016
|
+
request,
|
|
3838
4017
|
}),
|
|
3839
4018
|
/**
|
|
3840
4019
|
* Gets the broadcaster’s AutoMod settings. The settings are used to automatically block inappropriate or harassing messages from appearing in the broadcaster’s chat room.
|
|
@@ -3874,14 +4053,12 @@ export class TwitchApi {
|
|
|
3874
4053
|
*/
|
|
3875
4054
|
getAutoModSettings: async (
|
|
3876
4055
|
params: GetAutoModSettingsParams,
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
this.callApi({
|
|
4056
|
+
...request: CallApiOptions['request']
|
|
4057
|
+
) =>
|
|
4058
|
+
this.callApi<GetAutoModSettingsResponse, 200, 400 | 401 | 403>({
|
|
3881
4059
|
path: '/moderation/automod/settings',
|
|
3882
4060
|
params,
|
|
3883
|
-
|
|
3884
|
-
accessToken,
|
|
4061
|
+
request,
|
|
3885
4062
|
}),
|
|
3886
4063
|
/**
|
|
3887
4064
|
* Updates the broadcaster’s AutoMod settings. The settings are used to automatically block inappropriate or harassing messages from appearing in the broadcaster’s chat room.
|
|
@@ -3938,16 +4115,14 @@ export class TwitchApi {
|
|
|
3938
4115
|
updateAutoModSettings: async (
|
|
3939
4116
|
params: UpdateAutoModSettingsParams,
|
|
3940
4117
|
body: UpdateAutoModSettingsBody | null | undefined = null,
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
this.callApi({
|
|
4118
|
+
...request: CallApiOptions['request']
|
|
4119
|
+
) =>
|
|
4120
|
+
this.callApi<UpdateAutoModSettingsResponse, 200, 400 | 401 | 403>({
|
|
3945
4121
|
path: '/moderation/automod/settings',
|
|
3946
4122
|
method: 'PUT',
|
|
3947
4123
|
params,
|
|
3948
4124
|
body,
|
|
3949
|
-
|
|
3950
|
-
accessToken,
|
|
4125
|
+
request,
|
|
3951
4126
|
}),
|
|
3952
4127
|
/**
|
|
3953
4128
|
* Gets all users that the broadcaster banned or put in a timeout.
|
|
@@ -3982,14 +4157,12 @@ export class TwitchApi {
|
|
|
3982
4157
|
*/
|
|
3983
4158
|
getBannedUsers: async (
|
|
3984
4159
|
params: GetBannedUsersParams,
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
this.callApi({
|
|
4160
|
+
...request: CallApiOptions['request']
|
|
4161
|
+
) =>
|
|
4162
|
+
this.callApi<GetBannedUsersResponse, 200, 400 | 401>({
|
|
3989
4163
|
path: '/moderation/banned',
|
|
3990
4164
|
params,
|
|
3991
|
-
|
|
3992
|
-
accessToken,
|
|
4165
|
+
request,
|
|
3993
4166
|
}),
|
|
3994
4167
|
/**
|
|
3995
4168
|
* Bans a user from participating in the specified broadcaster’s chat room or puts them in a timeout.
|
|
@@ -4050,16 +4223,14 @@ export class TwitchApi {
|
|
|
4050
4223
|
banUser: async (
|
|
4051
4224
|
params: BanUserParams,
|
|
4052
4225
|
body: BanUserBody,
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
this.callApi({
|
|
4226
|
+
...request: CallApiOptions['request']
|
|
4227
|
+
) =>
|
|
4228
|
+
this.callApi<BanUserResponse, 200, 400 | 401 | 403 | 409 | 429>({
|
|
4057
4229
|
path: '/moderation/bans',
|
|
4058
4230
|
method: 'POST',
|
|
4059
4231
|
params,
|
|
4060
4232
|
body,
|
|
4061
|
-
|
|
4062
|
-
accessToken,
|
|
4233
|
+
request,
|
|
4063
4234
|
}),
|
|
4064
4235
|
/**
|
|
4065
4236
|
* Removes the ban or timeout that was placed on the specified user.
|
|
@@ -4111,15 +4282,13 @@ export class TwitchApi {
|
|
|
4111
4282
|
*/
|
|
4112
4283
|
unbanUser: async (
|
|
4113
4284
|
params: UnbanUserParams,
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
this.callApi({
|
|
4285
|
+
...request: CallApiOptions['request']
|
|
4286
|
+
) =>
|
|
4287
|
+
this.callApi<void, 204, 400 | 401 | 403 | 409 | 429>({
|
|
4118
4288
|
path: '/moderation/bans',
|
|
4119
4289
|
method: 'DELETE',
|
|
4120
4290
|
params,
|
|
4121
|
-
|
|
4122
|
-
accessToken,
|
|
4291
|
+
request,
|
|
4123
4292
|
}),
|
|
4124
4293
|
/**
|
|
4125
4294
|
* 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.
|
|
@@ -4159,14 +4328,12 @@ export class TwitchApi {
|
|
|
4159
4328
|
*/
|
|
4160
4329
|
getBlockedTerms: async (
|
|
4161
4330
|
params: GetBlockedTermsParams,
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
this.callApi({
|
|
4331
|
+
...request: CallApiOptions['request']
|
|
4332
|
+
) =>
|
|
4333
|
+
this.callApi<GetBlockedTermsResponse, 200, 400 | 401 | 403>({
|
|
4166
4334
|
path: '/moderation/blocked_terms',
|
|
4167
4335
|
params,
|
|
4168
|
-
|
|
4169
|
-
accessToken,
|
|
4336
|
+
request,
|
|
4170
4337
|
}),
|
|
4171
4338
|
/**
|
|
4172
4339
|
* Adds a word or phrase to the broadcaster’s list of blocked terms. These are the terms that the broadcaster doesn’t want used in their chat room.
|
|
@@ -4209,16 +4376,14 @@ export class TwitchApi {
|
|
|
4209
4376
|
addBlockedTerm: async (
|
|
4210
4377
|
params: AddBlockedTermParams,
|
|
4211
4378
|
body: AddBlockedTermBody,
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
this.callApi({
|
|
4379
|
+
...request: CallApiOptions['request']
|
|
4380
|
+
) =>
|
|
4381
|
+
this.callApi<AddBlockedTermResponse, 200, 400 | 401 | 403>({
|
|
4216
4382
|
path: '/moderation/blocked_terms',
|
|
4217
4383
|
method: 'POST',
|
|
4218
4384
|
params,
|
|
4219
4385
|
body,
|
|
4220
|
-
|
|
4221
|
-
accessToken,
|
|
4386
|
+
request,
|
|
4222
4387
|
}),
|
|
4223
4388
|
/**
|
|
4224
4389
|
* Removes the word or phrase from the broadcaster’s list of blocked terms.
|
|
@@ -4259,15 +4424,13 @@ export class TwitchApi {
|
|
|
4259
4424
|
*/
|
|
4260
4425
|
removeBlockedTerm: async (
|
|
4261
4426
|
params: RemoveBlockedTermParams,
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
this.callApi({
|
|
4427
|
+
...request: CallApiOptions['request']
|
|
4428
|
+
) =>
|
|
4429
|
+
this.callApi<void, 204, 400 | 401 | 403>({
|
|
4266
4430
|
path: '/moderation/blocked_terms',
|
|
4267
4431
|
method: 'DELETE',
|
|
4268
4432
|
params,
|
|
4269
|
-
|
|
4270
|
-
accessToken,
|
|
4433
|
+
request,
|
|
4271
4434
|
}),
|
|
4272
4435
|
/**
|
|
4273
4436
|
* Removes a single chat message or all chat messages from the broadcaster’s chat room.
|
|
@@ -4311,15 +4474,13 @@ export class TwitchApi {
|
|
|
4311
4474
|
*/
|
|
4312
4475
|
deleteChatMessages: async (
|
|
4313
4476
|
params: DeleteChatMessagesParams,
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
this.callApi({
|
|
4477
|
+
...request: CallApiOptions['request']
|
|
4478
|
+
) =>
|
|
4479
|
+
this.callApi<void, 204, 400 | 401 | 403 | 404>({
|
|
4318
4480
|
path: '/moderation/chat',
|
|
4319
4481
|
method: 'DELETE',
|
|
4320
4482
|
params,
|
|
4321
|
-
|
|
4322
|
-
accessToken,
|
|
4483
|
+
request,
|
|
4323
4484
|
}),
|
|
4324
4485
|
/**
|
|
4325
4486
|
* BETA Gets a list of channels that the specified user has moderator privileges in.
|
|
@@ -4349,14 +4510,12 @@ export class TwitchApi {
|
|
|
4349
4510
|
*/
|
|
4350
4511
|
getModeratedChannels: async (
|
|
4351
4512
|
params: GetModeratedChannelsParams,
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
this.callApi({
|
|
4513
|
+
...request: CallApiOptions['request']
|
|
4514
|
+
) =>
|
|
4515
|
+
this.callApi<GetModeratedChannelsResponse, 200, 400 | 401 | 500>({
|
|
4356
4516
|
path: '/moderation/channels',
|
|
4357
4517
|
params,
|
|
4358
|
-
|
|
4359
|
-
accessToken,
|
|
4518
|
+
request,
|
|
4360
4519
|
}),
|
|
4361
4520
|
/**
|
|
4362
4521
|
* Gets all users allowed to moderate the broadcaster’s chat room.
|
|
@@ -4391,14 +4550,12 @@ export class TwitchApi {
|
|
|
4391
4550
|
*/
|
|
4392
4551
|
getModerators: async (
|
|
4393
4552
|
params: GetModeratorsParams,
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
this.callApi({
|
|
4553
|
+
...request: CallApiOptions['request']
|
|
4554
|
+
) =>
|
|
4555
|
+
this.callApi<GetModeratorsResponse, 200, 400 | 401>({
|
|
4398
4556
|
path: '/moderation/moderators',
|
|
4399
4557
|
params,
|
|
4400
|
-
|
|
4401
|
-
accessToken,
|
|
4558
|
+
request,
|
|
4402
4559
|
}),
|
|
4403
4560
|
/**
|
|
4404
4561
|
* Adds a moderator to the broadcaster’s chat room.
|
|
@@ -4446,15 +4603,13 @@ export class TwitchApi {
|
|
|
4446
4603
|
*/
|
|
4447
4604
|
addChannelModerator: async (
|
|
4448
4605
|
params: AddChannelModeratorParams,
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
this.callApi({
|
|
4606
|
+
...request: CallApiOptions['request']
|
|
4607
|
+
) =>
|
|
4608
|
+
this.callApi<void, 204, 400 | 401 | 422 | 429>({
|
|
4453
4609
|
path: '/moderation/moderators',
|
|
4454
4610
|
method: 'POST',
|
|
4455
4611
|
params,
|
|
4456
|
-
|
|
4457
|
-
accessToken,
|
|
4612
|
+
request,
|
|
4458
4613
|
}),
|
|
4459
4614
|
/**
|
|
4460
4615
|
* Removes a moderator from the broadcaster’s chat room.
|
|
@@ -4497,15 +4652,13 @@ export class TwitchApi {
|
|
|
4497
4652
|
*/
|
|
4498
4653
|
removeChannelModerator: async (
|
|
4499
4654
|
params: RemoveChannelModeratorParams,
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
this.callApi({
|
|
4655
|
+
...request: CallApiOptions['request']
|
|
4656
|
+
) =>
|
|
4657
|
+
this.callApi<void, 204, 400 | 401 | 429>({
|
|
4504
4658
|
path: '/moderation/moderators',
|
|
4505
4659
|
method: 'DELETE',
|
|
4506
4660
|
params,
|
|
4507
|
-
|
|
4508
|
-
accessToken,
|
|
4661
|
+
request,
|
|
4509
4662
|
}),
|
|
4510
4663
|
/**
|
|
4511
4664
|
* Gets a list of the broadcaster’s VIPs.
|
|
@@ -4542,14 +4695,12 @@ export class TwitchApi {
|
|
|
4542
4695
|
*/
|
|
4543
4696
|
getVIPs: async (
|
|
4544
4697
|
params: GetVIPsParams,
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
this.callApi({
|
|
4698
|
+
...request: CallApiOptions['request']
|
|
4699
|
+
) =>
|
|
4700
|
+
this.callApi<GetVIPsResponse, 200, 400 | 401>({
|
|
4549
4701
|
path: '/channels/vips',
|
|
4550
4702
|
params,
|
|
4551
|
-
|
|
4552
|
-
accessToken,
|
|
4703
|
+
request,
|
|
4553
4704
|
}),
|
|
4554
4705
|
/**
|
|
4555
4706
|
* Adds the specified user as a VIP in the broadcaster’s channel.
|
|
@@ -4614,15 +4765,13 @@ export class TwitchApi {
|
|
|
4614
4765
|
*/
|
|
4615
4766
|
addChannelVIP: async (
|
|
4616
4767
|
params: AddChannelVIPParams,
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
this.callApi({
|
|
4768
|
+
...request: CallApiOptions['request']
|
|
4769
|
+
) =>
|
|
4770
|
+
this.callApi<void, 204, 400 | 401 | 403 | 404 | 409 | 422 | 425 | 429>({
|
|
4621
4771
|
path: '/channels/vips',
|
|
4622
4772
|
method: 'POST',
|
|
4623
4773
|
params,
|
|
4624
|
-
|
|
4625
|
-
accessToken,
|
|
4774
|
+
request,
|
|
4626
4775
|
}),
|
|
4627
4776
|
/**
|
|
4628
4777
|
* Removes the specified user as a VIP in the broadcaster’s channel.
|
|
@@ -4679,15 +4828,13 @@ export class TwitchApi {
|
|
|
4679
4828
|
*/
|
|
4680
4829
|
removeChannelVIP: async (
|
|
4681
4830
|
params: RemoveChannelVIPParams,
|
|
4682
|
-
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
this.callApi({
|
|
4831
|
+
...request: CallApiOptions['request']
|
|
4832
|
+
) =>
|
|
4833
|
+
this.callApi<void, 204, 400 | 401 | 403 | 404 | 422 | 429>({
|
|
4686
4834
|
path: '/channels/vips',
|
|
4687
4835
|
method: 'DELETE',
|
|
4688
4836
|
params,
|
|
4689
|
-
|
|
4690
|
-
accessToken,
|
|
4837
|
+
request,
|
|
4691
4838
|
}),
|
|
4692
4839
|
/**
|
|
4693
4840
|
* Activates or deactivates the broadcaster’s Shield Mode.
|
|
@@ -4732,16 +4879,14 @@ export class TwitchApi {
|
|
|
4732
4879
|
updateShieldModeStatus: async (
|
|
4733
4880
|
params: UpdateShieldModeStatusParams,
|
|
4734
4881
|
body: UpdateShieldModeStatusBody,
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
this.callApi({
|
|
4882
|
+
...request: CallApiOptions['request']
|
|
4883
|
+
) =>
|
|
4884
|
+
this.callApi<UpdateShieldModeStatusResponse, 200, 400 | 401 | 403>({
|
|
4739
4885
|
path: '/moderation/shield_mode',
|
|
4740
4886
|
method: 'PUT',
|
|
4741
4887
|
params,
|
|
4742
4888
|
body,
|
|
4743
|
-
|
|
4744
|
-
accessToken,
|
|
4889
|
+
request,
|
|
4745
4890
|
}),
|
|
4746
4891
|
/**
|
|
4747
4892
|
* Gets the broadcaster’s Shield Mode activation status.
|
|
@@ -4783,14 +4928,12 @@ export class TwitchApi {
|
|
|
4783
4928
|
*/
|
|
4784
4929
|
getShieldModeStatus: async (
|
|
4785
4930
|
params: GetShieldModeStatusParams,
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
this.callApi({
|
|
4931
|
+
...request: CallApiOptions['request']
|
|
4932
|
+
) =>
|
|
4933
|
+
this.callApi<GetShieldModeStatusResponse, 200, 400 | 401 | 403>({
|
|
4790
4934
|
path: '/moderation/shield_mode',
|
|
4791
4935
|
params,
|
|
4792
|
-
|
|
4793
|
-
accessToken,
|
|
4936
|
+
request,
|
|
4794
4937
|
}),
|
|
4795
4938
|
};
|
|
4796
4939
|
polls = {
|
|
@@ -4833,14 +4976,12 @@ export class TwitchApi {
|
|
|
4833
4976
|
*/
|
|
4834
4977
|
getPolls: async (
|
|
4835
4978
|
params: GetPollsParams,
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
this.callApi({
|
|
4979
|
+
...request: CallApiOptions['request']
|
|
4980
|
+
) =>
|
|
4981
|
+
this.callApi<GetPollsResponse, 200, 400 | 401 | 404>({
|
|
4840
4982
|
path: '/polls',
|
|
4841
4983
|
params,
|
|
4842
|
-
|
|
4843
|
-
accessToken,
|
|
4984
|
+
request,
|
|
4844
4985
|
}),
|
|
4845
4986
|
/**
|
|
4846
4987
|
* Creates a poll that viewers in the broadcaster’s channel can vote on.
|
|
@@ -4888,15 +5029,13 @@ export class TwitchApi {
|
|
|
4888
5029
|
*/
|
|
4889
5030
|
createPoll: async (
|
|
4890
5031
|
body: CreatePollBody,
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
this.callApi({
|
|
5032
|
+
...request: CallApiOptions['request']
|
|
5033
|
+
) =>
|
|
5034
|
+
this.callApi<CreatePollResponse, 200, 400 | 401>({
|
|
4895
5035
|
path: '/polls',
|
|
4896
5036
|
method: 'POST',
|
|
4897
5037
|
body,
|
|
4898
|
-
|
|
4899
|
-
accessToken,
|
|
5038
|
+
request,
|
|
4900
5039
|
}),
|
|
4901
5040
|
/**
|
|
4902
5041
|
* Ends an active poll. You have the option to end it or end it and archive it.
|
|
@@ -4935,15 +5074,13 @@ export class TwitchApi {
|
|
|
4935
5074
|
*/
|
|
4936
5075
|
endPoll: async (
|
|
4937
5076
|
body: EndPollBody,
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
this.callApi({
|
|
5077
|
+
...request: CallApiOptions['request']
|
|
5078
|
+
) =>
|
|
5079
|
+
this.callApi<EndPollResponse, 200, 400 | 401>({
|
|
4942
5080
|
path: '/polls',
|
|
4943
5081
|
method: 'PATCH',
|
|
4944
5082
|
body,
|
|
4945
|
-
|
|
4946
|
-
accessToken,
|
|
5083
|
+
request,
|
|
4947
5084
|
}),
|
|
4948
5085
|
};
|
|
4949
5086
|
predictions = {
|
|
@@ -4980,14 +5117,12 @@ export class TwitchApi {
|
|
|
4980
5117
|
*/
|
|
4981
5118
|
getPredictions: async (
|
|
4982
5119
|
params: GetPredictionsParams,
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
this.callApi({
|
|
5120
|
+
...request: CallApiOptions['request']
|
|
5121
|
+
) =>
|
|
5122
|
+
this.callApi<GetPredictionsResponse, 200, 400 | 401>({
|
|
4987
5123
|
path: '/predictions',
|
|
4988
5124
|
params,
|
|
4989
|
-
|
|
4990
|
-
accessToken,
|
|
5125
|
+
request,
|
|
4991
5126
|
}),
|
|
4992
5127
|
/**
|
|
4993
5128
|
* Creates a Channel Points Prediction.
|
|
@@ -5035,15 +5170,13 @@ export class TwitchApi {
|
|
|
5035
5170
|
*/
|
|
5036
5171
|
createPrediction: async (
|
|
5037
5172
|
body: CreatePredictionBody,
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
this.callApi({
|
|
5173
|
+
...request: CallApiOptions['request']
|
|
5174
|
+
) =>
|
|
5175
|
+
this.callApi<CreatePredictionResponse, 200, 400 | 401 | 429>({
|
|
5042
5176
|
path: '/predictions',
|
|
5043
5177
|
method: 'POST',
|
|
5044
5178
|
body,
|
|
5045
|
-
|
|
5046
|
-
accessToken,
|
|
5179
|
+
request,
|
|
5047
5180
|
}),
|
|
5048
5181
|
/**
|
|
5049
5182
|
* Locks, resolves, or cancels a Channel Points Prediction.
|
|
@@ -5089,15 +5222,13 @@ export class TwitchApi {
|
|
|
5089
5222
|
*/
|
|
5090
5223
|
endPrediction: async (
|
|
5091
5224
|
body: EndPredictionBody,
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
this.callApi({
|
|
5225
|
+
...request: CallApiOptions['request']
|
|
5226
|
+
) =>
|
|
5227
|
+
this.callApi<EndPredictionResponse, 200, 400 | 401 | 404>({
|
|
5096
5228
|
path: '/predictions',
|
|
5097
5229
|
method: 'PATCH',
|
|
5098
5230
|
body,
|
|
5099
|
-
|
|
5100
|
-
accessToken,
|
|
5231
|
+
request,
|
|
5101
5232
|
}),
|
|
5102
5233
|
};
|
|
5103
5234
|
raids = {
|
|
@@ -5159,15 +5290,13 @@ export class TwitchApi {
|
|
|
5159
5290
|
*/
|
|
5160
5291
|
startRaid: async (
|
|
5161
5292
|
params: StartRaidParams | null | undefined = null,
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
this.callApi({
|
|
5293
|
+
...request: CallApiOptions['request']
|
|
5294
|
+
) =>
|
|
5295
|
+
this.callApi<StartRaidResponse, 200, 400 | 401 | 404 | 409 | 429>({
|
|
5166
5296
|
path: '/raids',
|
|
5167
5297
|
method: 'POST',
|
|
5168
5298
|
params,
|
|
5169
|
-
|
|
5170
|
-
accessToken,
|
|
5299
|
+
request,
|
|
5171
5300
|
}),
|
|
5172
5301
|
/**
|
|
5173
5302
|
* Cancel a pending raid.
|
|
@@ -5214,15 +5343,13 @@ export class TwitchApi {
|
|
|
5214
5343
|
*/
|
|
5215
5344
|
cancelRaid: async (
|
|
5216
5345
|
params: CancelRaidParams,
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
this.callApi({
|
|
5346
|
+
...request: CallApiOptions['request']
|
|
5347
|
+
) =>
|
|
5348
|
+
this.callApi<void, 204, 400 | 401 | 404 | 429>({
|
|
5221
5349
|
path: '/raids',
|
|
5222
5350
|
method: 'DELETE',
|
|
5223
5351
|
params,
|
|
5224
|
-
|
|
5225
|
-
accessToken,
|
|
5352
|
+
request,
|
|
5226
5353
|
}),
|
|
5227
5354
|
};
|
|
5228
5355
|
schedule = {
|
|
@@ -5268,14 +5395,12 @@ export class TwitchApi {
|
|
|
5268
5395
|
*/
|
|
5269
5396
|
getChannelStreamSchedule: async (
|
|
5270
5397
|
params: GetChannelStreamScheduleParams,
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
this.callApi({
|
|
5398
|
+
...request: CallApiOptions['request']
|
|
5399
|
+
) =>
|
|
5400
|
+
this.callApi<GetChannelStreamScheduleResponse, 200, 400 | 401 | 403 | 404>({
|
|
5275
5401
|
path: '/schedule',
|
|
5276
5402
|
params,
|
|
5277
|
-
|
|
5278
|
-
accessToken,
|
|
5403
|
+
request,
|
|
5279
5404
|
}),
|
|
5280
5405
|
/**
|
|
5281
5406
|
* Gets the broadcaster’s streaming schedule as an [iCalendar](https://datatracker.ietf.org/doc/html/rfc5545).
|
|
@@ -5309,14 +5434,12 @@ export class TwitchApi {
|
|
|
5309
5434
|
*/
|
|
5310
5435
|
getChannelICalendar: async (
|
|
5311
5436
|
params: GetChannelICalendarParams,
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
this.callApi({
|
|
5437
|
+
...request: CallApiOptions['request']
|
|
5438
|
+
) =>
|
|
5439
|
+
this.callApi<string, 200, 400>({
|
|
5316
5440
|
path: '/schedule/icalendar',
|
|
5317
5441
|
params,
|
|
5318
|
-
|
|
5319
|
-
accessToken,
|
|
5442
|
+
request,
|
|
5320
5443
|
}),
|
|
5321
5444
|
/**
|
|
5322
5445
|
* Updates the broadcaster’s schedule settings, such as scheduling a vacation.
|
|
@@ -5359,15 +5482,13 @@ export class TwitchApi {
|
|
|
5359
5482
|
*/
|
|
5360
5483
|
updateChannelStreamSchedule: async (
|
|
5361
5484
|
params: UpdateChannelStreamScheduleParams,
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
this.callApi({
|
|
5485
|
+
...request: CallApiOptions['request']
|
|
5486
|
+
) =>
|
|
5487
|
+
this.callApi<void, 204, 400 | 401 | 404>({
|
|
5366
5488
|
path: '/schedule/settings',
|
|
5367
5489
|
method: 'PATCH',
|
|
5368
5490
|
params,
|
|
5369
|
-
|
|
5370
|
-
accessToken,
|
|
5491
|
+
request,
|
|
5371
5492
|
}),
|
|
5372
5493
|
/**
|
|
5373
5494
|
* Adds a single or recurring broadcast to the broadcaster’s streaming schedule. For information about scheduling broadcasts, see [Stream Schedule](https://help.twitch.tv/s/article/channel-page-setup#Schedule).
|
|
@@ -5413,16 +5534,14 @@ export class TwitchApi {
|
|
|
5413
5534
|
createChannelStreamScheduleSegment: async (
|
|
5414
5535
|
params: CreateChannelStreamScheduleSegmentParams,
|
|
5415
5536
|
body: CreateChannelStreamScheduleSegmentBody,
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
this.callApi({
|
|
5537
|
+
...request: CallApiOptions['request']
|
|
5538
|
+
) =>
|
|
5539
|
+
this.callApi<CreateChannelStreamScheduleSegmentResponse, 200, 400 | 401 | 403>({
|
|
5420
5540
|
path: '/schedule/segment',
|
|
5421
5541
|
method: 'POST',
|
|
5422
5542
|
params,
|
|
5423
5543
|
body,
|
|
5424
|
-
|
|
5425
|
-
accessToken,
|
|
5544
|
+
request,
|
|
5426
5545
|
}),
|
|
5427
5546
|
/**
|
|
5428
5547
|
* Updates a scheduled broadcast segment.
|
|
@@ -5472,16 +5591,14 @@ export class TwitchApi {
|
|
|
5472
5591
|
updateChannelStreamScheduleSegment: async (
|
|
5473
5592
|
params: UpdateChannelStreamScheduleSegmentParams,
|
|
5474
5593
|
body: UpdateChannelStreamScheduleSegmentBody | null | undefined = null,
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
this.callApi({
|
|
5594
|
+
...request: CallApiOptions['request']
|
|
5595
|
+
) =>
|
|
5596
|
+
this.callApi<UpdateChannelStreamScheduleSegmentResponse, 200, 400 | 401 | 404>({
|
|
5479
5597
|
path: '/schedule/segment',
|
|
5480
5598
|
method: 'PATCH',
|
|
5481
5599
|
params,
|
|
5482
5600
|
body,
|
|
5483
|
-
|
|
5484
|
-
accessToken,
|
|
5601
|
+
request,
|
|
5485
5602
|
}),
|
|
5486
5603
|
/**
|
|
5487
5604
|
* Removes a broadcast segment from the broadcaster’s streaming schedule.
|
|
@@ -5521,15 +5638,13 @@ export class TwitchApi {
|
|
|
5521
5638
|
*/
|
|
5522
5639
|
deleteChannelStreamScheduleSegment: async (
|
|
5523
5640
|
params: DeleteChannelStreamScheduleSegmentParams,
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
this.callApi({
|
|
5641
|
+
...request: CallApiOptions['request']
|
|
5642
|
+
) =>
|
|
5643
|
+
this.callApi<void, 204, 400 | 401>({
|
|
5528
5644
|
path: '/schedule/segment',
|
|
5529
5645
|
method: 'DELETE',
|
|
5530
5646
|
params,
|
|
5531
|
-
|
|
5532
|
-
accessToken,
|
|
5647
|
+
request,
|
|
5533
5648
|
}),
|
|
5534
5649
|
};
|
|
5535
5650
|
search = {
|
|
@@ -5566,14 +5681,12 @@ export class TwitchApi {
|
|
|
5566
5681
|
*/
|
|
5567
5682
|
searchCategories: async (
|
|
5568
5683
|
params: SearchCategoriesParams,
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
this.callApi({
|
|
5684
|
+
...request: CallApiOptions['request']
|
|
5685
|
+
) =>
|
|
5686
|
+
this.callApi<SearchCategoriesResponse, 200, 400 | 401>({
|
|
5573
5687
|
path: '/search/categories',
|
|
5574
5688
|
params,
|
|
5575
|
-
|
|
5576
|
-
accessToken,
|
|
5689
|
+
request,
|
|
5577
5690
|
}),
|
|
5578
5691
|
/**
|
|
5579
5692
|
* Gets the channels that match the specified query and have streamed content within the past 6 months.
|
|
@@ -5612,14 +5725,12 @@ export class TwitchApi {
|
|
|
5612
5725
|
*/
|
|
5613
5726
|
searchChannels: async (
|
|
5614
5727
|
params: SearchChannelsParams,
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
this.callApi({
|
|
5728
|
+
...request: CallApiOptions['request']
|
|
5729
|
+
) =>
|
|
5730
|
+
this.callApi<SearchChannelsResponse, 200, 400 | 401>({
|
|
5619
5731
|
path: '/search/channels',
|
|
5620
5732
|
params,
|
|
5621
|
-
|
|
5622
|
-
accessToken,
|
|
5733
|
+
request,
|
|
5623
5734
|
}),
|
|
5624
5735
|
};
|
|
5625
5736
|
streams = {
|
|
@@ -5657,14 +5768,12 @@ export class TwitchApi {
|
|
|
5657
5768
|
*/
|
|
5658
5769
|
getStreamKey: async (
|
|
5659
5770
|
params: GetStreamKeyParams,
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
this.callApi({
|
|
5771
|
+
...request: CallApiOptions['request']
|
|
5772
|
+
) =>
|
|
5773
|
+
this.callApi<GetStreamKeyResponse, 200, 400 | 401>({
|
|
5664
5774
|
path: '/streams/key',
|
|
5665
5775
|
params,
|
|
5666
|
-
|
|
5667
|
-
accessToken,
|
|
5776
|
+
request,
|
|
5668
5777
|
}),
|
|
5669
5778
|
/**
|
|
5670
5779
|
* Gets a list of all streams. The list is in descending order by the number of viewers watching the stream. Because viewers come and go during a stream, it’s possible to find duplicate or missing streams in the list as you page through the results.
|
|
@@ -5697,14 +5806,12 @@ export class TwitchApi {
|
|
|
5697
5806
|
*/
|
|
5698
5807
|
getStreams: async (
|
|
5699
5808
|
params: GetStreamsParams | null | undefined = null,
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
this.callApi({
|
|
5809
|
+
...request: CallApiOptions['request']
|
|
5810
|
+
) =>
|
|
5811
|
+
this.callApi<GetStreamsResponse, 200, 400 | 401>({
|
|
5704
5812
|
path: '/streams',
|
|
5705
5813
|
params,
|
|
5706
|
-
|
|
5707
|
-
accessToken,
|
|
5814
|
+
request,
|
|
5708
5815
|
}),
|
|
5709
5816
|
/**
|
|
5710
5817
|
* Gets the list of broadcasters that the user follows and that are streaming live.
|
|
@@ -5739,14 +5846,12 @@ export class TwitchApi {
|
|
|
5739
5846
|
*/
|
|
5740
5847
|
getFollowedStreams: async (
|
|
5741
5848
|
params: GetFollowedStreamsParams,
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
this.callApi({
|
|
5849
|
+
...request: CallApiOptions['request']
|
|
5850
|
+
) =>
|
|
5851
|
+
this.callApi<GetFollowedStreamsResponse, 200, 400 | 401>({
|
|
5746
5852
|
path: '/streams/followed',
|
|
5747
5853
|
params,
|
|
5748
|
-
|
|
5749
|
-
accessToken,
|
|
5854
|
+
request,
|
|
5750
5855
|
}),
|
|
5751
5856
|
/**
|
|
5752
5857
|
* Adds a marker to a live stream. A marker is an arbitrary point in a live stream that the broadcaster or editor wants to mark, so they can return to that spot later to create video highlights (see Video Producer, Highlights in the Twitch UX).
|
|
@@ -5798,15 +5903,13 @@ export class TwitchApi {
|
|
|
5798
5903
|
*/
|
|
5799
5904
|
createStreamMarker: async (
|
|
5800
5905
|
body: CreateStreamMarkerBody,
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
this.callApi({
|
|
5906
|
+
...request: CallApiOptions['request']
|
|
5907
|
+
) =>
|
|
5908
|
+
this.callApi<CreateStreamMarkerResponse, 200, 400 | 401 | 403 | 404>({
|
|
5805
5909
|
path: '/streams/markers',
|
|
5806
5910
|
method: 'POST',
|
|
5807
5911
|
body,
|
|
5808
|
-
|
|
5809
|
-
accessToken,
|
|
5912
|
+
request,
|
|
5810
5913
|
}),
|
|
5811
5914
|
/**
|
|
5812
5915
|
* Gets a list of markers from the user’s most recent stream or from the specified VOD/video. A marker is an arbitrary point in a live stream that the broadcaster or editor marked, so they can return to that spot later to create video highlights (see Video Producer, Highlights in the Twitch UX).
|
|
@@ -5848,14 +5951,12 @@ export class TwitchApi {
|
|
|
5848
5951
|
*/
|
|
5849
5952
|
getStreamMarkers: async (
|
|
5850
5953
|
params: GetStreamMarkersParams | null | undefined = null,
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
this.callApi({
|
|
5954
|
+
...request: CallApiOptions['request']
|
|
5955
|
+
) =>
|
|
5956
|
+
this.callApi<GetStreamMarkersResponse, 200, 400 | 401 | 403 | 404>({
|
|
5855
5957
|
path: '/streams/markers',
|
|
5856
5958
|
params,
|
|
5857
|
-
|
|
5858
|
-
accessToken,
|
|
5959
|
+
request,
|
|
5859
5960
|
}),
|
|
5860
5961
|
};
|
|
5861
5962
|
subscriptions = {
|
|
@@ -5894,14 +5995,12 @@ export class TwitchApi {
|
|
|
5894
5995
|
*/
|
|
5895
5996
|
getBroadcasterSubscriptions: async (
|
|
5896
5997
|
params: GetBroadcasterSubscriptionsParams,
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
this.callApi({
|
|
5998
|
+
...request: CallApiOptions['request']
|
|
5999
|
+
) =>
|
|
6000
|
+
this.callApi<GetBroadcasterSubscriptionsResponse, 200, 400 | 401>({
|
|
5901
6001
|
path: '/subscriptions',
|
|
5902
6002
|
params,
|
|
5903
|
-
|
|
5904
|
-
accessToken,
|
|
6003
|
+
request,
|
|
5905
6004
|
}),
|
|
5906
6005
|
/**
|
|
5907
6006
|
* Checks whether the user subscribes to the broadcaster’s channel.
|
|
@@ -5943,14 +6042,12 @@ export class TwitchApi {
|
|
|
5943
6042
|
*/
|
|
5944
6043
|
checkUserSubscription: async (
|
|
5945
6044
|
params: CheckUserSubscriptionParams,
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
this.callApi({
|
|
6045
|
+
...request: CallApiOptions['request']
|
|
6046
|
+
) =>
|
|
6047
|
+
this.callApi<CheckUserSubscriptionResponse, 200, 400 | 401 | 404>({
|
|
5950
6048
|
path: '/subscriptions/user',
|
|
5951
6049
|
params,
|
|
5952
|
-
|
|
5953
|
-
accessToken,
|
|
6050
|
+
request,
|
|
5954
6051
|
}),
|
|
5955
6052
|
};
|
|
5956
6053
|
tags = {
|
|
@@ -5988,14 +6085,12 @@ export class TwitchApi {
|
|
|
5988
6085
|
*/
|
|
5989
6086
|
getAllStreamTags: async (
|
|
5990
6087
|
params: GetAllStreamTagsParams | null | undefined = null,
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
this.callApi({
|
|
6088
|
+
...request: CallApiOptions['request']
|
|
6089
|
+
) =>
|
|
6090
|
+
this.callApi<GetAllStreamTagsResponse, 200, 400 | 401>({
|
|
5995
6091
|
path: '/tags/streams',
|
|
5996
6092
|
params,
|
|
5997
|
-
|
|
5998
|
-
accessToken,
|
|
6093
|
+
request,
|
|
5999
6094
|
}),
|
|
6000
6095
|
/**
|
|
6001
6096
|
* **IMPORTANT** Twitch is moving from Twitch-defined tags to channel-defined tags. **IMPORTANT** As of February 28, 2023, this endpoint returns an empty array. On July 13, 2023, it will return a 410 response. If you use this endpoint, please update your code to use [Get Channel Information](https://dev.twitch.tv/docs/api/reference#get-channel-information).
|
|
@@ -6031,14 +6126,12 @@ export class TwitchApi {
|
|
|
6031
6126
|
*/
|
|
6032
6127
|
getStreamTags: async (
|
|
6033
6128
|
params: GetStreamTagsParams,
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
this.callApi({
|
|
6129
|
+
...request: CallApiOptions['request']
|
|
6130
|
+
) =>
|
|
6131
|
+
this.callApi<GetStreamTagsResponse, 200, 400 | 401>({
|
|
6038
6132
|
path: '/streams/tags',
|
|
6039
6133
|
params,
|
|
6040
|
-
|
|
6041
|
-
accessToken,
|
|
6134
|
+
request,
|
|
6042
6135
|
}),
|
|
6043
6136
|
};
|
|
6044
6137
|
teams = {
|
|
@@ -6077,14 +6170,12 @@ export class TwitchApi {
|
|
|
6077
6170
|
*/
|
|
6078
6171
|
getChannelTeams: async (
|
|
6079
6172
|
params: GetChannelTeamsParams,
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
this.callApi({
|
|
6173
|
+
...request: CallApiOptions['request']
|
|
6174
|
+
) =>
|
|
6175
|
+
this.callApi<GetChannelTeamsResponse, 200, 400 | 401 | 404>({
|
|
6084
6176
|
path: '/teams/channel',
|
|
6085
6177
|
params,
|
|
6086
|
-
|
|
6087
|
-
accessToken,
|
|
6178
|
+
request,
|
|
6088
6179
|
}),
|
|
6089
6180
|
/**
|
|
6090
6181
|
* Gets information about the specified Twitch team. [Read More](https://help.twitch.tv/s/article/twitch-teams)
|
|
@@ -6123,14 +6214,12 @@ export class TwitchApi {
|
|
|
6123
6214
|
*/
|
|
6124
6215
|
getTeams: async (
|
|
6125
6216
|
params: GetTeamsParams | null | undefined = null,
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
this.callApi({
|
|
6217
|
+
...request: CallApiOptions['request']
|
|
6218
|
+
) =>
|
|
6219
|
+
this.callApi<GetTeamsResponse, 200, 400 | 401 | 404>({
|
|
6130
6220
|
path: '/teams',
|
|
6131
6221
|
params,
|
|
6132
|
-
|
|
6133
|
-
accessToken,
|
|
6222
|
+
request,
|
|
6134
6223
|
}),
|
|
6135
6224
|
};
|
|
6136
6225
|
users = {
|
|
@@ -6172,14 +6261,12 @@ export class TwitchApi {
|
|
|
6172
6261
|
*/
|
|
6173
6262
|
getUsers: async (
|
|
6174
6263
|
params: GetUsersParams | null | undefined = null,
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
this.callApi({
|
|
6264
|
+
...request: CallApiOptions['request']
|
|
6265
|
+
) =>
|
|
6266
|
+
this.callApi<GetUsersResponse, 200, 400 | 401>({
|
|
6179
6267
|
path: '/users',
|
|
6180
6268
|
params,
|
|
6181
|
-
|
|
6182
|
-
accessToken,
|
|
6269
|
+
request,
|
|
6183
6270
|
}),
|
|
6184
6271
|
/**
|
|
6185
6272
|
* Updates the specified user’s information. The user ID in the OAuth token identifies the user whose information you want to update.
|
|
@@ -6215,15 +6302,13 @@ export class TwitchApi {
|
|
|
6215
6302
|
*/
|
|
6216
6303
|
updateUser: async (
|
|
6217
6304
|
params: UpdateUserParams | null | undefined = null,
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
this.callApi({
|
|
6305
|
+
...request: CallApiOptions['request']
|
|
6306
|
+
) =>
|
|
6307
|
+
this.callApi<UpdateUserResponse, 200, 400 | 401>({
|
|
6222
6308
|
path: '/users',
|
|
6223
6309
|
method: 'PUT',
|
|
6224
6310
|
params,
|
|
6225
|
-
|
|
6226
|
-
accessToken,
|
|
6311
|
+
request,
|
|
6227
6312
|
}),
|
|
6228
6313
|
/**
|
|
6229
6314
|
* Gets the list of users that the broadcaster has blocked. [Read More](https://help.twitch.tv/s/article/how-to-manage-harassment-in-chat?language=en%5FUS#BlockWhispersandMessagesfromStrangers)
|
|
@@ -6258,14 +6343,12 @@ export class TwitchApi {
|
|
|
6258
6343
|
*/
|
|
6259
6344
|
getUserBlockList: async (
|
|
6260
6345
|
params: GetUserBlockListParams,
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
this.callApi({
|
|
6346
|
+
...request: CallApiOptions['request']
|
|
6347
|
+
) =>
|
|
6348
|
+
this.callApi<GetUserBlockListResponse, 200, 400 | 401>({
|
|
6265
6349
|
path: '/users/blocks',
|
|
6266
6350
|
params,
|
|
6267
|
-
|
|
6268
|
-
accessToken,
|
|
6351
|
+
request,
|
|
6269
6352
|
}),
|
|
6270
6353
|
/**
|
|
6271
6354
|
* Blocks the specified user from interacting with or having contact with the broadcaster. The user ID in the OAuth token identifies the broadcaster who is blocking the user.
|
|
@@ -6304,15 +6387,13 @@ export class TwitchApi {
|
|
|
6304
6387
|
*/
|
|
6305
6388
|
blockUser: async (
|
|
6306
6389
|
params: BlockUserParams,
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
this.callApi({
|
|
6390
|
+
...request: CallApiOptions['request']
|
|
6391
|
+
) =>
|
|
6392
|
+
this.callApi<void, 204, 400 | 401>({
|
|
6311
6393
|
path: '/users/blocks',
|
|
6312
6394
|
method: 'PUT',
|
|
6313
6395
|
params,
|
|
6314
|
-
|
|
6315
|
-
accessToken,
|
|
6396
|
+
request,
|
|
6316
6397
|
}),
|
|
6317
6398
|
/**
|
|
6318
6399
|
* Removes the user from the broadcaster’s list of blocked users. The user ID in the OAuth token identifies the broadcaster who’s removing the block.
|
|
@@ -6346,15 +6427,13 @@ export class TwitchApi {
|
|
|
6346
6427
|
*/
|
|
6347
6428
|
unblockUser: async (
|
|
6348
6429
|
params: UnblockUserParams,
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
this.callApi({
|
|
6430
|
+
...request: CallApiOptions['request']
|
|
6431
|
+
) =>
|
|
6432
|
+
this.callApi<void, 204, 400 | 401>({
|
|
6353
6433
|
path: '/users/blocks',
|
|
6354
6434
|
method: 'DELETE',
|
|
6355
6435
|
params,
|
|
6356
|
-
|
|
6357
|
-
accessToken,
|
|
6436
|
+
request,
|
|
6358
6437
|
}),
|
|
6359
6438
|
/**
|
|
6360
6439
|
* Gets a list of all extensions (both active and inactive) that the broadcaster has installed. The user ID in the access token identifies the broadcaster.
|
|
@@ -6382,11 +6461,10 @@ export class TwitchApi {
|
|
|
6382
6461
|
*
|
|
6383
6462
|
* @see https://dev.twitch.tv/docs/api/reference#get-user-extensions
|
|
6384
6463
|
*/
|
|
6385
|
-
getUserExtensions: async (
|
|
6386
|
-
this.callApi({
|
|
6464
|
+
getUserExtensions: async (...request: CallApiOptions['request']) =>
|
|
6465
|
+
this.callApi<GetUserExtensionsResponse, 200, 401>({
|
|
6387
6466
|
path: '/users/extensions/list',
|
|
6388
|
-
|
|
6389
|
-
accessToken,
|
|
6467
|
+
request,
|
|
6390
6468
|
}),
|
|
6391
6469
|
/**
|
|
6392
6470
|
* Gets the active extensions that the broadcaster has installed for each configuration.
|
|
@@ -6421,14 +6499,12 @@ export class TwitchApi {
|
|
|
6421
6499
|
*/
|
|
6422
6500
|
getUserActiveExtensions: async (
|
|
6423
6501
|
params: GetUserActiveExtensionsParams | null | undefined = null,
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
this.callApi({
|
|
6502
|
+
...request: CallApiOptions['request']
|
|
6503
|
+
) =>
|
|
6504
|
+
this.callApi<GetUserActiveExtensionsResponse, 200, 400 | 401>({
|
|
6428
6505
|
path: '/users/extensions',
|
|
6429
6506
|
params,
|
|
6430
|
-
|
|
6431
|
-
accessToken,
|
|
6507
|
+
request,
|
|
6432
6508
|
}),
|
|
6433
6509
|
/**
|
|
6434
6510
|
* Updates an installed extension’s information. You can update the extension’s activation state, ID, and version number. The user ID in the access token identifies the broadcaster whose extensions you’re updating.
|
|
@@ -6468,15 +6544,13 @@ export class TwitchApi {
|
|
|
6468
6544
|
*/
|
|
6469
6545
|
updateUserExtensions: async (
|
|
6470
6546
|
body: UpdateUserExtensionsBody,
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
this.callApi({
|
|
6547
|
+
...request: CallApiOptions['request']
|
|
6548
|
+
) =>
|
|
6549
|
+
this.callApi<UpdateUserExtensionsResponse, 200, 400 | 401 | 404>({
|
|
6475
6550
|
path: '/users/extensions',
|
|
6476
6551
|
method: 'PUT',
|
|
6477
6552
|
body,
|
|
6478
|
-
|
|
6479
|
-
accessToken,
|
|
6553
|
+
request,
|
|
6480
6554
|
}),
|
|
6481
6555
|
};
|
|
6482
6556
|
videos = {
|
|
@@ -6524,14 +6598,12 @@ export class TwitchApi {
|
|
|
6524
6598
|
*/
|
|
6525
6599
|
getVideos: async (
|
|
6526
6600
|
params: GetVideosParams | null | undefined = null,
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
this.callApi({
|
|
6601
|
+
...request: CallApiOptions['request']
|
|
6602
|
+
) =>
|
|
6603
|
+
this.callApi<GetVideosResponse, 200, 400 | 401 | 404>({
|
|
6531
6604
|
path: '/videos',
|
|
6532
6605
|
params,
|
|
6533
|
-
|
|
6534
|
-
accessToken,
|
|
6606
|
+
request,
|
|
6535
6607
|
}),
|
|
6536
6608
|
/**
|
|
6537
6609
|
* Deletes one or more videos. You may delete past broadcasts, highlights, or uploads.
|
|
@@ -6567,15 +6639,13 @@ export class TwitchApi {
|
|
|
6567
6639
|
*/
|
|
6568
6640
|
deleteVideos: async (
|
|
6569
6641
|
params: DeleteVideosParams,
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
this.callApi({
|
|
6642
|
+
...request: CallApiOptions['request']
|
|
6643
|
+
) =>
|
|
6644
|
+
this.callApi<DeleteVideosResponse, 200, 400 | 401>({
|
|
6574
6645
|
path: '/videos',
|
|
6575
6646
|
method: 'DELETE',
|
|
6576
6647
|
params,
|
|
6577
|
-
|
|
6578
|
-
accessToken,
|
|
6648
|
+
request,
|
|
6579
6649
|
}),
|
|
6580
6650
|
};
|
|
6581
6651
|
whispers = {
|
|
@@ -6638,16 +6708,14 @@ export class TwitchApi {
|
|
|
6638
6708
|
sendWhisper: async (
|
|
6639
6709
|
params: SendWhisperParams,
|
|
6640
6710
|
body: SendWhisperBody,
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
this.callApi({
|
|
6711
|
+
...request: CallApiOptions['request']
|
|
6712
|
+
) =>
|
|
6713
|
+
this.callApi<void, 204, 400 | 401 | 403 | 404 | 429>({
|
|
6645
6714
|
path: '/whispers',
|
|
6646
6715
|
method: 'POST',
|
|
6647
6716
|
params,
|
|
6648
6717
|
body,
|
|
6649
|
-
|
|
6650
|
-
accessToken,
|
|
6718
|
+
request,
|
|
6651
6719
|
}),
|
|
6652
6720
|
};
|
|
6653
6721
|
}
|