ts-twitch-api 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -47,10 +47,17 @@ var TwitchApi = class {
47
47
  options.headers.set("Client-Id", clientId || this._clientId);
48
48
  }
49
49
  const response = await fetch(url, options);
50
+ const status = response.status;
51
+ let data = null;
52
+ if (status === 200 && path === "/schedule/icalendar") {
53
+ data = await response.text();
54
+ } else if (status !== 204) {
55
+ data = await response.json();
56
+ }
50
57
  return {
51
58
  ok: response.ok,
52
- status: response.status,
53
- data: await response.json()
59
+ status,
60
+ data
54
61
  };
55
62
  }
56
63
  ads = {
@@ -101,7 +108,7 @@ var TwitchApi = class {
101
108
  *
102
109
  * @see https://dev.twitch.tv/docs/api/reference#start-commercial
103
110
  */
104
- startCommercial: async (body, options = {}) => this.callApi({
111
+ startCommercial: (body, options = {}) => this.callApi({
105
112
  path: "/channels/commercial",
106
113
  method: "POST",
107
114
  body,
@@ -132,7 +139,7 @@ var TwitchApi = class {
132
139
  *
133
140
  * @see https://dev.twitch.tv/docs/api/reference#get-ad-schedule
134
141
  */
135
- getAdSchedule: async (params, options = {}) => this.callApi({
142
+ getAdSchedule: (params, options = {}) => this.callApi({
136
143
  path: "/channels/ads",
137
144
  params,
138
145
  options
@@ -168,7 +175,7 @@ var TwitchApi = class {
168
175
  *
169
176
  * @see https://dev.twitch.tv/docs/api/reference#snooze-next-ad
170
177
  */
171
- snoozeNextAd: async (params, options = {}) => this.callApi({
178
+ snoozeNextAd: (params, options = {}) => this.callApi({
172
179
  path: "/channels/ads/schedule/snooze",
173
180
  method: "POST",
174
181
  params,
@@ -215,7 +222,7 @@ var TwitchApi = class {
215
222
  *
216
223
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-analytics
217
224
  */
218
- getExtensionAnalytics: async (params = null, options = {}) => this.callApi({
225
+ getExtensionAnalytics: (params = null, options = {}) => this.callApi({
219
226
  path: "/analytics/extensions",
220
227
  params,
221
228
  options
@@ -259,7 +266,7 @@ var TwitchApi = class {
259
266
  *
260
267
  * @see https://dev.twitch.tv/docs/api/reference#get-game-analytics
261
268
  */
262
- getGameAnalytics: async (params = null, options = {}) => this.callApi({
269
+ getGameAnalytics: (params = null, options = {}) => this.callApi({
263
270
  path: "/analytics/games",
264
271
  params,
265
272
  options
@@ -300,7 +307,7 @@ var TwitchApi = class {
300
307
  *
301
308
  * @see https://dev.twitch.tv/docs/api/reference#get-bits-leaderboard
302
309
  */
303
- getBitsLeaderboard: async (params = null, options = {}) => this.callApi({
310
+ getBitsLeaderboard: (params = null, options = {}) => this.callApi({
304
311
  path: "/bits/leaderboard",
305
312
  params,
306
313
  options
@@ -329,7 +336,7 @@ var TwitchApi = class {
329
336
  *
330
337
  * @see https://dev.twitch.tv/docs/api/reference#get-cheermotes
331
338
  */
332
- getCheermotes: async (params = null, options = {}) => this.callApi({
339
+ getCheermotes: (params = null, options = {}) => this.callApi({
333
340
  path: "/bits/cheermotes",
334
341
  params,
335
342
  options
@@ -370,7 +377,7 @@ var TwitchApi = class {
370
377
  *
371
378
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-transactions
372
379
  */
373
- getExtensionTransactions: async (params, options = {}) => this.callApi({
380
+ getExtensionTransactions: (params, options = {}) => this.callApi({
374
381
  path: "/extensions/transactions",
375
382
  params,
376
383
  options
@@ -414,7 +421,7 @@ var TwitchApi = class {
414
421
  *
415
422
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-information
416
423
  */
417
- getChannelInformation: async (params, options = {}) => this.callApi({
424
+ getChannelInformation: (params, options = {}) => this.callApi({
418
425
  path: "/channels",
419
426
  params,
420
427
  options
@@ -476,7 +483,7 @@ var TwitchApi = class {
476
483
  *
477
484
  * @see https://dev.twitch.tv/docs/api/reference#modify-channel-information
478
485
  */
479
- modifyChannelInformation: async (params, body = null, options = {}) => this.callApi({
486
+ modifyChannelInformation: (params, body = null, options = {}) => this.callApi({
480
487
  path: "/channels",
481
488
  method: "PATCH",
482
489
  params,
@@ -514,7 +521,7 @@ var TwitchApi = class {
514
521
  *
515
522
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-editors
516
523
  */
517
- getChannelEditors: async (params, options = {}) => this.callApi({
524
+ getChannelEditors: (params, options = {}) => this.callApi({
518
525
  path: "/channels/editors",
519
526
  params,
520
527
  options
@@ -556,7 +563,7 @@ var TwitchApi = class {
556
563
  *
557
564
  * @see https://dev.twitch.tv/docs/api/reference#get-followed-channels
558
565
  */
559
- getFollowedChannels: async (params, options = {}) => this.callApi({
566
+ getFollowedChannels: (params, options = {}) => this.callApi({
560
567
  path: "/channels/followed",
561
568
  params,
562
569
  options
@@ -601,7 +608,7 @@ var TwitchApi = class {
601
608
  *
602
609
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-followers
603
610
  */
604
- getChannelFollowers: async (params, options = {}) => this.callApi({
611
+ getChannelFollowers: (params, options = {}) => this.callApi({
605
612
  path: "/channels/followers",
606
613
  params,
607
614
  options
@@ -654,7 +661,7 @@ var TwitchApi = class {
654
661
  *
655
662
  * @see https://dev.twitch.tv/docs/api/reference#create-custom-rewards
656
663
  */
657
- createCustomRewards: async (params, body, options = {}) => this.callApi({
664
+ createCustomRewards: (params, body, options = {}) => this.callApi({
658
665
  path: "/channel_points/custom_rewards",
659
666
  method: "POST",
660
667
  params,
@@ -705,7 +712,7 @@ var TwitchApi = class {
705
712
  *
706
713
  * @see https://dev.twitch.tv/docs/api/reference#delete-custom-reward
707
714
  */
708
- deleteCustomReward: async (params, options = {}) => this.callApi({
715
+ deleteCustomReward: (params, options = {}) => this.callApi({
709
716
  path: "/channel_points/custom_rewards",
710
717
  method: "DELETE",
711
718
  params,
@@ -754,7 +761,7 @@ var TwitchApi = class {
754
761
  *
755
762
  * @see https://dev.twitch.tv/docs/api/reference#get-custom-reward
756
763
  */
757
- getCustomReward: async (params, options = {}) => this.callApi({
764
+ getCustomReward: (params, options = {}) => this.callApi({
758
765
  path: "/channel_points/custom_rewards",
759
766
  params,
760
767
  options
@@ -764,7 +771,7 @@ var TwitchApi = class {
764
771
  *
765
772
  * __Authorization:__
766
773
  *
767
- * Requires a [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens) that includes the **channel:manage:redemptions** scope.
774
+ * Requires a [user access token](https://dev.twitch.tv/docs/api/authentication#user-access-tokens) that includes the **channel:manage:redemptions** scope.
768
775
  *
769
776
  * __Request Body:__
770
777
  *
@@ -782,6 +789,7 @@ var TwitchApi = class {
782
789
  *
783
790
  * _400 Bad Request_
784
791
  *
792
+ * ul>
785
793
  * * The _broadcaster\_id_ query parameter is required.
786
794
  * * The _id_ query parameter is required.
787
795
  * * The `title` must contain a minimum of 1 character and a maximum of 45 characters.
@@ -812,7 +820,7 @@ var TwitchApi = class {
812
820
  *
813
821
  * @see https://dev.twitch.tv/docs/api/reference#update-custom-reward
814
822
  */
815
- updateCustomReward: async (params, body = null, options = {}) => this.callApi({
823
+ updateCustomReward: (params, body = null, options = {}) => this.callApi({
816
824
  path: "/channel_points/custom_rewards",
817
825
  method: "PATCH",
818
826
  params,
@@ -864,7 +872,7 @@ var TwitchApi = class {
864
872
  *
865
873
  * @see https://dev.twitch.tv/docs/api/reference#get-custom-reward-redemption
866
874
  */
867
- getCustomRewardRedemption: async (params, options = {}) => this.callApi({
875
+ getCustomRewardRedemption: (params, options = {}) => this.callApi({
868
876
  path: "/channel_points/custom_rewards/redemptions",
869
877
  params,
870
878
  options
@@ -914,7 +922,7 @@ var TwitchApi = class {
914
922
  *
915
923
  * @see https://dev.twitch.tv/docs/api/reference#update-redemption-status
916
924
  */
917
- updateRedemptionStatus: async (params, body, options = {}) => this.callApi({
925
+ updateRedemptionStatus: (params, body, options = {}) => this.callApi({
918
926
  path: "/channel_points/custom_rewards/redemptions",
919
927
  method: "PATCH",
920
928
  params,
@@ -961,7 +969,7 @@ var TwitchApi = class {
961
969
  *
962
970
  * @see https://dev.twitch.tv/docs/api/reference#get-charity-campaign
963
971
  */
964
- getCharityCampaign: async (params, options = {}) => this.callApi({
972
+ getCharityCampaign: (params, options = {}) => this.callApi({
965
973
  path: "/charity/campaigns",
966
974
  params,
967
975
  options
@@ -1004,7 +1012,7 @@ var TwitchApi = class {
1004
1012
  *
1005
1013
  * @see https://dev.twitch.tv/docs/api/reference#get-charity-campaign-donations
1006
1014
  */
1007
- getCharityCampaignDonations: async (params, options = {}) => this.callApi({
1015
+ getCharityCampaignDonations: (params, options = {}) => this.callApi({
1008
1016
  path: "/charity/donations",
1009
1017
  params,
1010
1018
  options
@@ -1053,7 +1061,7 @@ var TwitchApi = class {
1053
1061
  *
1054
1062
  * @see https://dev.twitch.tv/docs/api/reference#get-chatters
1055
1063
  */
1056
- getChatters: async (params, options = {}) => this.callApi({
1064
+ getChatters: (params, options = {}) => this.callApi({
1057
1065
  path: "/chat/chatters",
1058
1066
  params,
1059
1067
  options
@@ -1091,7 +1099,7 @@ var TwitchApi = class {
1091
1099
  *
1092
1100
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-emotes
1093
1101
  */
1094
- getChannelEmotes: async (params, options = {}) => this.callApi({
1102
+ getChannelEmotes: (params, options = {}) => this.callApi({
1095
1103
  path: "/chat/emotes",
1096
1104
  params,
1097
1105
  options
@@ -1127,7 +1135,7 @@ var TwitchApi = class {
1127
1135
  *
1128
1136
  * @see https://dev.twitch.tv/docs/api/reference#get-global-emotes
1129
1137
  */
1130
- getGlobalEmotes: async (options = {}) => this.callApi({
1138
+ getGlobalEmotes: (options = {}) => this.callApi({
1131
1139
  path: "/chat/emotes/global",
1132
1140
  options
1133
1141
  }),
@@ -1165,7 +1173,7 @@ var TwitchApi = class {
1165
1173
  *
1166
1174
  * @see https://dev.twitch.tv/docs/api/reference#get-emote-sets
1167
1175
  */
1168
- getEmoteSets: async (params, options = {}) => this.callApi({
1176
+ getEmoteSets: (params, options = {}) => this.callApi({
1169
1177
  path: "/chat/emotes/set",
1170
1178
  params,
1171
1179
  options
@@ -1199,7 +1207,7 @@ var TwitchApi = class {
1199
1207
  *
1200
1208
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-chat-badges
1201
1209
  */
1202
- getChannelChatBadges: async (params, options = {}) => this.callApi({
1210
+ getChannelChatBadges: (params, options = {}) => this.callApi({
1203
1211
  path: "/chat/badges",
1204
1212
  params,
1205
1213
  options
@@ -1233,7 +1241,7 @@ var TwitchApi = class {
1233
1241
  *
1234
1242
  * @see https://dev.twitch.tv/docs/api/reference#get-global-chat-badges
1235
1243
  */
1236
- getGlobalChatBadges: async (options = {}) => this.callApi({
1244
+ getGlobalChatBadges: (options = {}) => this.callApi({
1237
1245
  path: "/chat/badges/global",
1238
1246
  options
1239
1247
  }),
@@ -1268,7 +1276,7 @@ var TwitchApi = class {
1268
1276
  *
1269
1277
  * @see https://dev.twitch.tv/docs/api/reference#get-chat-settings
1270
1278
  */
1271
- getChatSettings: async (params, options = {}) => this.callApi({
1279
+ getChatSettings: (params, options = {}) => this.callApi({
1272
1280
  path: "/chat/settings",
1273
1281
  params,
1274
1282
  options
@@ -1322,7 +1330,7 @@ var TwitchApi = class {
1322
1330
  *
1323
1331
  * @see https://dev.twitch.tv/docs/api/reference#update-chat-settings
1324
1332
  */
1325
- updateChatSettings: async (params, body = null, options = {}) => this.callApi({
1333
+ updateChatSettings: (params, body = null, options = {}) => this.callApi({
1326
1334
  path: "/chat/settings",
1327
1335
  method: "PATCH",
1328
1336
  params,
@@ -1330,7 +1338,7 @@ var TwitchApi = class {
1330
1338
  options
1331
1339
  }),
1332
1340
  /**
1333
- * BETA Retrieves emotes available to the user across all channels.
1341
+ * NEW Retrieves emotes available to the user across all channels.
1334
1342
  *
1335
1343
  * __Authorization:__
1336
1344
  *
@@ -1362,7 +1370,7 @@ var TwitchApi = class {
1362
1370
  *
1363
1371
  * @see https://dev.twitch.tv/docs/api/reference#get-user-emotes
1364
1372
  */
1365
- getUserEmotes: async (params, options = {}) => this.callApi({
1373
+ getUserEmotes: (params, options = {}) => this.callApi({
1366
1374
  path: "/chat/emotes/user",
1367
1375
  params,
1368
1376
  options
@@ -1400,7 +1408,7 @@ var TwitchApi = class {
1400
1408
  *
1401
1409
  * @see https://dev.twitch.tv/docs/api/reference#send-chat-announcement
1402
1410
  */
1403
- sendChatAnnouncement: async (params, body, options = {}) => this.callApi({
1411
+ sendChatAnnouncement: (params, body, options = {}) => this.callApi({
1404
1412
  path: "/chat/announcements",
1405
1413
  method: "POST",
1406
1414
  params,
@@ -1459,7 +1467,7 @@ var TwitchApi = class {
1459
1467
  *
1460
1468
  * @see https://dev.twitch.tv/docs/api/reference#send-a-shoutout
1461
1469
  */
1462
- sendShoutout: async (params, options = {}) => this.callApi({
1470
+ sendShoutout: (params, options = {}) => this.callApi({
1463
1471
  path: "/chat/shoutouts",
1464
1472
  method: "POST",
1465
1473
  params,
@@ -1509,7 +1517,7 @@ var TwitchApi = class {
1509
1517
  *
1510
1518
  * @see https://dev.twitch.tv/docs/api/reference#send-chat-message
1511
1519
  */
1512
- sendChatMessage: async (body, options = {}) => this.callApi({
1520
+ sendChatMessage: (body, options = {}) => this.callApi({
1513
1521
  path: "/chat/messages",
1514
1522
  method: "POST",
1515
1523
  body,
@@ -1544,7 +1552,7 @@ var TwitchApi = class {
1544
1552
  *
1545
1553
  * @see https://dev.twitch.tv/docs/api/reference#get-user-chat-color
1546
1554
  */
1547
- getUserChatColor: async (params, options = {}) => this.callApi({
1555
+ getUserChatColor: (params, options = {}) => this.callApi({
1548
1556
  path: "/chat/color",
1549
1557
  params,
1550
1558
  options
@@ -1583,7 +1591,7 @@ var TwitchApi = class {
1583
1591
  *
1584
1592
  * @see https://dev.twitch.tv/docs/api/reference#update-user-chat-color
1585
1593
  */
1586
- updateUserChatColor: async (params, options = {}) => this.callApi({
1594
+ updateUserChatColor: (params, options = {}) => this.callApi({
1587
1595
  path: "/chat/color",
1588
1596
  method: "PUT",
1589
1597
  params,
@@ -1637,7 +1645,7 @@ var TwitchApi = class {
1637
1645
  *
1638
1646
  * @see https://dev.twitch.tv/docs/api/reference#create-clip
1639
1647
  */
1640
- createClip: async (params, options = {}) => this.callApi({
1648
+ createClip: (params, options = {}) => this.callApi({
1641
1649
  path: "/clips",
1642
1650
  method: "POST",
1643
1651
  params,
@@ -1681,7 +1689,7 @@ var TwitchApi = class {
1681
1689
  *
1682
1690
  * @see https://dev.twitch.tv/docs/api/reference#get-clips
1683
1691
  */
1684
- getClips: async (params = null, options = {}) => this.callApi({
1692
+ getClips: (params = null, options = {}) => this.callApi({
1685
1693
  path: "/clips",
1686
1694
  params,
1687
1695
  options
@@ -1711,7 +1719,7 @@ var TwitchApi = class {
1711
1719
  *
1712
1720
  * @see https://dev.twitch.tv/docs/api/reference#get-conduits
1713
1721
  */
1714
- getConduits: async (options = {}) => this.callApi({
1722
+ getConduits: (options = {}) => this.callApi({
1715
1723
  path: "/eventsub/conduits",
1716
1724
  options
1717
1725
  }),
@@ -1746,7 +1754,7 @@ var TwitchApi = class {
1746
1754
  *
1747
1755
  * @see https://dev.twitch.tv/docs/api/reference#create-conduits
1748
1756
  */
1749
- createConduits: async (body, options = {}) => this.callApi({
1757
+ createConduits: (body, options = {}) => this.callApi({
1750
1758
  path: "/eventsub/conduits",
1751
1759
  method: "POST",
1752
1760
  body,
@@ -1785,7 +1793,7 @@ var TwitchApi = class {
1785
1793
  *
1786
1794
  * @see https://dev.twitch.tv/docs/api/reference#update-conduits
1787
1795
  */
1788
- updateConduits: async (body, options = {}) => this.callApi({
1796
+ updateConduits: (body, options = {}) => this.callApi({
1789
1797
  path: "/eventsub/conduits",
1790
1798
  method: "PATCH",
1791
1799
  body,
@@ -1823,7 +1831,7 @@ var TwitchApi = class {
1823
1831
  *
1824
1832
  * @see https://dev.twitch.tv/docs/api/reference#delete-conduit
1825
1833
  */
1826
- deleteConduit: async (params, options = {}) => this.callApi({
1834
+ deleteConduit: (params, options = {}) => this.callApi({
1827
1835
  path: "/eventsub/conduits",
1828
1836
  method: "DELETE",
1829
1837
  params,
@@ -1861,7 +1869,7 @@ var TwitchApi = class {
1861
1869
  *
1862
1870
  * @see https://dev.twitch.tv/docs/api/reference#get-conduit-shards
1863
1871
  */
1864
- getConduitShards: async (params, options = {}) => this.callApi({
1872
+ getConduitShards: (params, options = {}) => this.callApi({
1865
1873
  path: "/eventsub/conduits/shards",
1866
1874
  params,
1867
1875
  options
@@ -1900,7 +1908,7 @@ var TwitchApi = class {
1900
1908
  *
1901
1909
  * @see https://dev.twitch.tv/docs/api/reference#update-conduit-shards
1902
1910
  */
1903
- updateConduitShards: async (body, options = {}) => this.callApi({
1911
+ updateConduitShards: (body, options = {}) => this.callApi({
1904
1912
  path: "/eventsub/conduits/shards",
1905
1913
  method: "PATCH",
1906
1914
  body,
@@ -1933,7 +1941,7 @@ var TwitchApi = class {
1933
1941
  *
1934
1942
  * @see https://dev.twitch.tv/docs/api/reference#get-content-classification-labels
1935
1943
  */
1936
- getContentClassificationLabels: async (params = null, options = {}) => this.callApi({
1944
+ getContentClassificationLabels: (params = null, options = {}) => this.callApi({
1937
1945
  path: "/content_classification_labels",
1938
1946
  params,
1939
1947
  options
@@ -1995,7 +2003,7 @@ var TwitchApi = class {
1995
2003
  *
1996
2004
  * @see https://dev.twitch.tv/docs/api/reference#get-drops-entitlements
1997
2005
  */
1998
- getDropsEntitlements: async (params = null, options = {}) => this.callApi({
2006
+ getDropsEntitlements: (params = null, options = {}) => this.callApi({
1999
2007
  path: "/entitlements/drops",
2000
2008
  params,
2001
2009
  options
@@ -2041,7 +2049,7 @@ var TwitchApi = class {
2041
2049
  *
2042
2050
  * @see https://dev.twitch.tv/docs/api/reference#update-drops-entitlements
2043
2051
  */
2044
- updateDropsEntitlements: async (body = null, options = {}) => this.callApi({
2052
+ updateDropsEntitlements: (body = null, options = {}) => this.callApi({
2045
2053
  path: "/entitlements/drops",
2046
2054
  method: "PATCH",
2047
2055
  body,
@@ -2086,7 +2094,7 @@ var TwitchApi = class {
2086
2094
  *
2087
2095
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-configuration-segment
2088
2096
  */
2089
- getExtensionConfigurationSegment: async (params, options = {}) => this.callApi({
2097
+ getExtensionConfigurationSegment: (params, options = {}) => this.callApi({
2090
2098
  path: "/extensions/configurations",
2091
2099
  params,
2092
2100
  options
@@ -2122,7 +2130,7 @@ var TwitchApi = class {
2122
2130
  *
2123
2131
  * @see https://dev.twitch.tv/docs/api/reference#set-extension-configuration-segment
2124
2132
  */
2125
- setExtensionConfigurationSegment: async (body, options = {}) => this.callApi({
2133
+ setExtensionConfigurationSegment: (body, options = {}) => this.callApi({
2126
2134
  path: "/extensions/configurations",
2127
2135
  method: "PUT",
2128
2136
  body,
@@ -2160,7 +2168,7 @@ var TwitchApi = class {
2160
2168
  *
2161
2169
  * @see https://dev.twitch.tv/docs/api/reference#set-extension-required-configuration
2162
2170
  */
2163
- setExtensionRequiredConfiguration: async (params, body, options = {}) => this.callApi({
2171
+ setExtensionRequiredConfiguration: (params, body, options = {}) => this.callApi({
2164
2172
  path: "/extensions/required_configuration",
2165
2173
  method: "PUT",
2166
2174
  params,
@@ -2236,7 +2244,7 @@ var TwitchApi = class {
2236
2244
  *
2237
2245
  * @see https://dev.twitch.tv/docs/api/reference#send-extension-pubsub-message
2238
2246
  */
2239
- sendExtensionPubSubMessage: async (body, options = {}) => this.callApi({
2247
+ sendExtensionPubSubMessage: (body, options = {}) => this.callApi({
2240
2248
  path: "/extensions/pubsub",
2241
2249
  method: "POST",
2242
2250
  body,
@@ -2278,7 +2286,7 @@ var TwitchApi = class {
2278
2286
  *
2279
2287
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-live-channels
2280
2288
  */
2281
- getExtensionLiveChannels: async (params, options = {}) => this.callApi({
2289
+ getExtensionLiveChannels: (params, options = {}) => this.callApi({
2282
2290
  path: "/extensions/live",
2283
2291
  params,
2284
2292
  options
@@ -2312,7 +2320,7 @@ var TwitchApi = class {
2312
2320
  *
2313
2321
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-secrets
2314
2322
  */
2315
- getExtensionSecrets: async (options = {}) => this.callApi({
2323
+ getExtensionSecrets: (options = {}) => this.callApi({
2316
2324
  path: "/extensions/jwt/secrets",
2317
2325
  options
2318
2326
  }),
@@ -2346,7 +2354,7 @@ var TwitchApi = class {
2346
2354
  *
2347
2355
  * @see https://dev.twitch.tv/docs/api/reference#create-extension-secret
2348
2356
  */
2349
- createExtensionSecret: async (params, options = {}) => this.callApi({
2357
+ createExtensionSecret: (params, options = {}) => this.callApi({
2350
2358
  path: "/extensions/jwt/secrets",
2351
2359
  method: "POST",
2352
2360
  params,
@@ -2388,7 +2396,7 @@ var TwitchApi = class {
2388
2396
  *
2389
2397
  * @see https://dev.twitch.tv/docs/api/reference#send-extension-chat-message
2390
2398
  */
2391
- sendExtensionChatMessage: async (params, body, options = {}) => this.callApi({
2399
+ sendExtensionChatMessage: (params, body, options = {}) => this.callApi({
2392
2400
  path: "/extensions/chat",
2393
2401
  method: "POST",
2394
2402
  params,
@@ -2429,7 +2437,7 @@ var TwitchApi = class {
2429
2437
  *
2430
2438
  * @see https://dev.twitch.tv/docs/api/reference#get-extensions
2431
2439
  */
2432
- getExtensions: async (params, options = {}) => this.callApi({
2440
+ getExtensions: (params, options = {}) => this.callApi({
2433
2441
  path: "/extensions",
2434
2442
  params,
2435
2443
  options
@@ -2467,7 +2475,7 @@ var TwitchApi = class {
2467
2475
  *
2468
2476
  * @see https://dev.twitch.tv/docs/api/reference#get-released-extensions
2469
2477
  */
2470
- getReleasedExtensions: async (params, options = {}) => this.callApi({
2478
+ getReleasedExtensions: (params, options = {}) => this.callApi({
2471
2479
  path: "/extensions/released",
2472
2480
  params,
2473
2481
  options
@@ -2501,7 +2509,7 @@ var TwitchApi = class {
2501
2509
  *
2502
2510
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-bits-products
2503
2511
  */
2504
- getExtensionBitsProducts: async (params = null, options = {}) => this.callApi({
2512
+ getExtensionBitsProducts: (params = null, options = {}) => this.callApi({
2505
2513
  path: "/bits/extensions",
2506
2514
  params,
2507
2515
  options
@@ -2542,7 +2550,7 @@ var TwitchApi = class {
2542
2550
  *
2543
2551
  * @see https://dev.twitch.tv/docs/api/reference#update-extension-bits-product
2544
2552
  */
2545
- updateExtensionBitsProduct: async (body, options = {}) => this.callApi({
2553
+ updateExtensionBitsProduct: (body, options = {}) => this.callApi({
2546
2554
  path: "/bits/extensions",
2547
2555
  method: "PUT",
2548
2556
  body,
@@ -2606,7 +2614,7 @@ var TwitchApi = class {
2606
2614
  *
2607
2615
  * @see https://dev.twitch.tv/docs/api/reference#create-eventsub-subscription
2608
2616
  */
2609
- createEventSubSubscription: async (body, options = {}) => this.callApi({
2617
+ createEventSubSubscription: (body, options = {}) => this.callApi({
2610
2618
  path: "/eventsub/subscriptions",
2611
2619
  method: "POST",
2612
2620
  body,
@@ -2647,7 +2655,7 @@ var TwitchApi = class {
2647
2655
  *
2648
2656
  * @see https://dev.twitch.tv/docs/api/reference#delete-eventsub-subscription
2649
2657
  */
2650
- deleteEventSubSubscription: async (params, options = {}) => this.callApi({
2658
+ deleteEventSubSubscription: (params, options = {}) => this.callApi({
2651
2659
  path: "/eventsub/subscriptions",
2652
2660
  method: "DELETE",
2653
2661
  params,
@@ -2691,7 +2699,7 @@ var TwitchApi = class {
2691
2699
  *
2692
2700
  * @see https://dev.twitch.tv/docs/api/reference#get-eventsub-subscriptions
2693
2701
  */
2694
- getEventSubSubscriptions: async (params = null, options = {}) => this.callApi({
2702
+ getEventSubSubscriptions: (params = null, options = {}) => this.callApi({
2695
2703
  path: "/eventsub/subscriptions",
2696
2704
  params,
2697
2705
  options
@@ -2728,7 +2736,7 @@ var TwitchApi = class {
2728
2736
  *
2729
2737
  * @see https://dev.twitch.tv/docs/api/reference#get-top-games
2730
2738
  */
2731
- getTopGames: async (params = null, options = {}) => this.callApi({
2739
+ getTopGames: (params = null, options = {}) => this.callApi({
2732
2740
  path: "/games/top",
2733
2741
  params,
2734
2742
  options
@@ -2765,7 +2773,7 @@ var TwitchApi = class {
2765
2773
  *
2766
2774
  * @see https://dev.twitch.tv/docs/api/reference#get-games
2767
2775
  */
2768
- getGames: async (params = null, options = {}) => this.callApi({
2776
+ getGames: (params = null, options = {}) => this.callApi({
2769
2777
  path: "/games",
2770
2778
  params,
2771
2779
  options
@@ -2805,7 +2813,7 @@ var TwitchApi = class {
2805
2813
  *
2806
2814
  * @see https://dev.twitch.tv/docs/api/reference#get-creator-goals
2807
2815
  */
2808
- getCreatorGoals: async (params, options = {}) => this.callApi({
2816
+ getCreatorGoals: (params, options = {}) => this.callApi({
2809
2817
  path: "/goals",
2810
2818
  params,
2811
2819
  options
@@ -2839,7 +2847,7 @@ var TwitchApi = class {
2839
2847
  *
2840
2848
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-guest-star-settings
2841
2849
  */
2842
- getChannelGuestStarSettings: async (params, options = {}) => this.callApi({
2850
+ getChannelGuestStarSettings: (params, options = {}) => this.callApi({
2843
2851
  path: "/guest_star/channel_settings",
2844
2852
  params,
2845
2853
  options
@@ -2870,7 +2878,7 @@ var TwitchApi = class {
2870
2878
  *
2871
2879
  * @see https://dev.twitch.tv/docs/api/reference#update-channel-guest-star-settings
2872
2880
  */
2873
- updateChannelGuestStarSettings: async (params, body = null, options = {}) => this.callApi({
2881
+ updateChannelGuestStarSettings: (params, body = null, options = {}) => this.callApi({
2874
2882
  path: "/guest_star/channel_settings",
2875
2883
  method: "PUT",
2876
2884
  params,
@@ -2904,7 +2912,7 @@ var TwitchApi = class {
2904
2912
  *
2905
2913
  * @see https://dev.twitch.tv/docs/api/reference#get-guest-star-session
2906
2914
  */
2907
- getGuestStarSession: async (params, options = {}) => this.callApi({
2915
+ getGuestStarSession: (params, options = {}) => this.callApi({
2908
2916
  path: "/guest_star/session",
2909
2917
  params,
2910
2918
  options
@@ -2940,7 +2948,7 @@ var TwitchApi = class {
2940
2948
  *
2941
2949
  * @see https://dev.twitch.tv/docs/api/reference#create-guest-star-session
2942
2950
  */
2943
- createGuestStarSession: async (params, options = {}) => this.callApi({
2951
+ createGuestStarSession: (params, options = {}) => this.callApi({
2944
2952
  path: "/guest_star/session",
2945
2953
  method: "POST",
2946
2954
  params,
@@ -2974,7 +2982,7 @@ var TwitchApi = class {
2974
2982
  *
2975
2983
  * @see https://dev.twitch.tv/docs/api/reference#end-guest-star-session
2976
2984
  */
2977
- endGuestStarSession: async (params, options = {}) => this.callApi({
2985
+ endGuestStarSession: (params, options = {}) => this.callApi({
2978
2986
  path: "/guest_star/session",
2979
2987
  method: "DELETE",
2980
2988
  params,
@@ -3003,7 +3011,7 @@ var TwitchApi = class {
3003
3011
  *
3004
3012
  * @see https://dev.twitch.tv/docs/api/reference#get-guest-star-invites
3005
3013
  */
3006
- getGuestStarInvites: async (params, options = {}) => this.callApi({
3014
+ getGuestStarInvites: (params, options = {}) => this.callApi({
3007
3015
  path: "/guest_star/invites",
3008
3016
  params,
3009
3017
  options
@@ -3039,7 +3047,7 @@ var TwitchApi = class {
3039
3047
  *
3040
3048
  * @see https://dev.twitch.tv/docs/api/reference#send-guest-star-invite
3041
3049
  */
3042
- sendGuestStarInvite: async (params, options = {}) => this.callApi({
3050
+ sendGuestStarInvite: (params, options = {}) => this.callApi({
3043
3051
  path: "/guest_star/invites",
3044
3052
  method: "POST",
3045
3053
  params,
@@ -3074,7 +3082,7 @@ var TwitchApi = class {
3074
3082
  *
3075
3083
  * @see https://dev.twitch.tv/docs/api/reference#delete-guest-star-invite
3076
3084
  */
3077
- deleteGuestStarInvite: async (params, options = {}) => this.callApi({
3085
+ deleteGuestStarInvite: (params, options = {}) => this.callApi({
3078
3086
  path: "/guest_star/invites",
3079
3087
  method: "DELETE",
3080
3088
  params,
@@ -3119,7 +3127,7 @@ var TwitchApi = class {
3119
3127
  *
3120
3128
  * @see https://dev.twitch.tv/docs/api/reference#assign-guest-star-slot
3121
3129
  */
3122
- assignGuestStarSlot: async (params, options = {}) => this.callApi({
3130
+ assignGuestStarSlot: (params, options = {}) => this.callApi({
3123
3131
  path: "/guest_star/slot",
3124
3132
  method: "POST",
3125
3133
  params,
@@ -3151,7 +3159,7 @@ var TwitchApi = class {
3151
3159
  *
3152
3160
  * @see https://dev.twitch.tv/docs/api/reference#update-guest-star-slot
3153
3161
  */
3154
- updateGuestStarSlot: async (params, options = {}) => this.callApi({
3162
+ updateGuestStarSlot: (params, options = {}) => this.callApi({
3155
3163
  path: "/guest_star/slot",
3156
3164
  method: "PATCH",
3157
3165
  params,
@@ -3193,7 +3201,7 @@ var TwitchApi = class {
3193
3201
  *
3194
3202
  * @see https://dev.twitch.tv/docs/api/reference#delete-guest-star-slot
3195
3203
  */
3196
- deleteGuestStarSlot: async (params, options = {}) => this.callApi({
3204
+ deleteGuestStarSlot: (params, options = {}) => this.callApi({
3197
3205
  path: "/guest_star/slot",
3198
3206
  method: "DELETE",
3199
3207
  params,
@@ -3231,7 +3239,7 @@ var TwitchApi = class {
3231
3239
  *
3232
3240
  * @see https://dev.twitch.tv/docs/api/reference#update-guest-star-slot-settings
3233
3241
  */
3234
- updateGuestStarSlotSettings: async (params, options = {}) => this.callApi({
3242
+ updateGuestStarSlotSettings: (params, options = {}) => this.callApi({
3235
3243
  path: "/guest_star/slot_settings",
3236
3244
  method: "PATCH",
3237
3245
  params,
@@ -3268,7 +3276,7 @@ var TwitchApi = class {
3268
3276
  *
3269
3277
  * @see https://dev.twitch.tv/docs/api/reference#get-hype-train-events
3270
3278
  */
3271
- getHypeTrainEvents: async (params, options = {}) => this.callApi({
3279
+ getHypeTrainEvents: (params, options = {}) => this.callApi({
3272
3280
  path: "/hypetrain/events",
3273
3281
  params,
3274
3282
  options
@@ -3329,7 +3337,7 @@ var TwitchApi = class {
3329
3337
  *
3330
3338
  * @see https://dev.twitch.tv/docs/api/reference#check-automod-status
3331
3339
  */
3332
- checkAutoModStatus: async (params, body, options = {}) => this.callApi({
3340
+ checkAutoModStatus: (params, body, options = {}) => this.callApi({
3333
3341
  path: "/moderation/enforcements/status",
3334
3342
  method: "POST",
3335
3343
  params,
@@ -3380,7 +3388,7 @@ var TwitchApi = class {
3380
3388
  *
3381
3389
  * @see https://dev.twitch.tv/docs/api/reference#manage-held-automod-messages
3382
3390
  */
3383
- manageHeldAutoModMessages: async (body, options = {}) => this.callApi({
3391
+ manageHeldAutoModMessages: (body, options = {}) => this.callApi({
3384
3392
  path: "/moderation/automod/message",
3385
3393
  method: "POST",
3386
3394
  body,
@@ -3422,7 +3430,7 @@ var TwitchApi = class {
3422
3430
  *
3423
3431
  * @see https://dev.twitch.tv/docs/api/reference#get-automod-settings
3424
3432
  */
3425
- getAutoModSettings: async (params, options = {}) => this.callApi({
3433
+ getAutoModSettings: (params, options = {}) => this.callApi({
3426
3434
  path: "/moderation/automod/settings",
3427
3435
  params,
3428
3436
  options
@@ -3479,7 +3487,7 @@ var TwitchApi = class {
3479
3487
  *
3480
3488
  * @see https://dev.twitch.tv/docs/api/reference#update-automod-settings
3481
3489
  */
3482
- updateAutoModSettings: async (params, body = null, options = {}) => this.callApi({
3490
+ updateAutoModSettings: (params, body = null, options = {}) => this.callApi({
3483
3491
  path: "/moderation/automod/settings",
3484
3492
  method: "PUT",
3485
3493
  params,
@@ -3517,7 +3525,7 @@ var TwitchApi = class {
3517
3525
  *
3518
3526
  * @see https://dev.twitch.tv/docs/api/reference#get-banned-users
3519
3527
  */
3520
- getBannedUsers: async (params, options = {}) => this.callApi({
3528
+ getBannedUsers: (params, options = {}) => this.callApi({
3521
3529
  path: "/moderation/banned",
3522
3530
  params,
3523
3531
  options
@@ -3578,7 +3586,7 @@ var TwitchApi = class {
3578
3586
  *
3579
3587
  * @see https://dev.twitch.tv/docs/api/reference#ban-user
3580
3588
  */
3581
- banUser: async (params, body, options = {}) => this.callApi({
3589
+ banUser: (params, body, options = {}) => this.callApi({
3582
3590
  path: "/moderation/bans",
3583
3591
  method: "POST",
3584
3592
  params,
@@ -3633,14 +3641,14 @@ var TwitchApi = class {
3633
3641
  *
3634
3642
  * @see https://dev.twitch.tv/docs/api/reference#unban-user
3635
3643
  */
3636
- unbanUser: async (params, options = {}) => this.callApi({
3644
+ unbanUser: (params, options = {}) => this.callApi({
3637
3645
  path: "/moderation/bans",
3638
3646
  method: "DELETE",
3639
3647
  params,
3640
3648
  options
3641
3649
  }),
3642
3650
  /**
3643
- * BETA Gets a list of unban requests for a broadcaster’s channel.
3651
+ * NEW Gets a list of unban requests for a broadcaster’s channel.
3644
3652
  *
3645
3653
  * __Authorization:__
3646
3654
  *
@@ -3675,18 +3683,18 @@ var TwitchApi = class {
3675
3683
  *
3676
3684
  * @see https://dev.twitch.tv/docs/api/reference#get-unban-requests
3677
3685
  */
3678
- getUnbanRequests: async (params, options = {}) => this.callApi({
3686
+ getUnbanRequests: (params, options = {}) => this.callApi({
3679
3687
  path: "/moderation/unban_requests",
3680
3688
  params,
3681
3689
  options
3682
3690
  }),
3683
3691
  /**
3684
- * BETA Resolves an unban request by approving or denying it.
3692
+ * NEW Resolves an unban request by approving or denying it.
3685
3693
  *
3686
3694
  * __Authorization:__
3687
3695
  *
3688
- * * Requires a user access token that includes the **moderator:manage:unban\_requests** scope.
3689
- * * Query parameter `moderator_id` must match the `user_id` in the [user access token](https://dev.twitch.tv/docs/authentication/#user-access-tokens).
3696
+ * * Requires a user access token that includes the **moderator:manage:unban\\\_requests** scope.
3697
+ * * Query parameter `moderator_id` must match the `user_id` in the[user access token](https://dev.twitch.tv/docs/authentication/#user-access-tokens).
3690
3698
  *
3691
3699
  * __URL:__
3692
3700
  *
@@ -3722,7 +3730,7 @@ var TwitchApi = class {
3722
3730
  *
3723
3731
  * @see https://dev.twitch.tv/docs/api/reference#resolve-unban-requests
3724
3732
  */
3725
- resolveUnbanRequests: async (params, options = {}) => this.callApi({
3733
+ resolveUnbanRequests: (params, options = {}) => this.callApi({
3726
3734
  path: "/moderation/unban_requests",
3727
3735
  method: "PATCH",
3728
3736
  params,
@@ -3764,7 +3772,7 @@ var TwitchApi = class {
3764
3772
  *
3765
3773
  * @see https://dev.twitch.tv/docs/api/reference#get-blocked-terms
3766
3774
  */
3767
- getBlockedTerms: async (params, options = {}) => this.callApi({
3775
+ getBlockedTerms: (params, options = {}) => this.callApi({
3768
3776
  path: "/moderation/blocked_terms",
3769
3777
  params,
3770
3778
  options
@@ -3807,7 +3815,7 @@ var TwitchApi = class {
3807
3815
  *
3808
3816
  * @see https://dev.twitch.tv/docs/api/reference#add-blocked-term
3809
3817
  */
3810
- addBlockedTerm: async (params, body, options = {}) => this.callApi({
3818
+ addBlockedTerm: (params, body, options = {}) => this.callApi({
3811
3819
  path: "/moderation/blocked_terms",
3812
3820
  method: "POST",
3813
3821
  params,
@@ -3851,7 +3859,7 @@ var TwitchApi = class {
3851
3859
  *
3852
3860
  * @see https://dev.twitch.tv/docs/api/reference#remove-blocked-term
3853
3861
  */
3854
- removeBlockedTerm: async (params, options = {}) => this.callApi({
3862
+ removeBlockedTerm: (params, options = {}) => this.callApi({
3855
3863
  path: "/moderation/blocked_terms",
3856
3864
  method: "DELETE",
3857
3865
  params,
@@ -3897,7 +3905,7 @@ var TwitchApi = class {
3897
3905
  *
3898
3906
  * @see https://dev.twitch.tv/docs/api/reference#delete-chat-messages
3899
3907
  */
3900
- deleteChatMessages: async (params, options = {}) => this.callApi({
3908
+ deleteChatMessages: (params, options = {}) => this.callApi({
3901
3909
  path: "/moderation/chat",
3902
3910
  method: "DELETE",
3903
3911
  params,
@@ -3929,7 +3937,7 @@ var TwitchApi = class {
3929
3937
  *
3930
3938
  * @see https://dev.twitch.tv/docs/api/reference#get-moderated-channels
3931
3939
  */
3932
- getModeratedChannels: async (params, options = {}) => this.callApi({
3940
+ getModeratedChannels: (params, options = {}) => this.callApi({
3933
3941
  path: "/moderation/channels",
3934
3942
  params,
3935
3943
  options
@@ -3965,7 +3973,7 @@ var TwitchApi = class {
3965
3973
  *
3966
3974
  * @see https://dev.twitch.tv/docs/api/reference#get-moderators
3967
3975
  */
3968
- getModerators: async (params, options = {}) => this.callApi({
3976
+ getModerators: (params, options = {}) => this.callApi({
3969
3977
  path: "/moderation/moderators",
3970
3978
  params,
3971
3979
  options
@@ -4014,7 +4022,7 @@ var TwitchApi = class {
4014
4022
  *
4015
4023
  * @see https://dev.twitch.tv/docs/api/reference#add-channel-moderator
4016
4024
  */
4017
- addChannelModerator: async (params, options = {}) => this.callApi({
4025
+ addChannelModerator: (params, options = {}) => this.callApi({
4018
4026
  path: "/moderation/moderators",
4019
4027
  method: "POST",
4020
4028
  params,
@@ -4059,7 +4067,7 @@ var TwitchApi = class {
4059
4067
  *
4060
4068
  * @see https://dev.twitch.tv/docs/api/reference#remove-channel-moderator
4061
4069
  */
4062
- removeChannelModerator: async (params, options = {}) => this.callApi({
4070
+ removeChannelModerator: (params, options = {}) => this.callApi({
4063
4071
  path: "/moderation/moderators",
4064
4072
  method: "DELETE",
4065
4073
  params,
@@ -4098,7 +4106,7 @@ var TwitchApi = class {
4098
4106
  *
4099
4107
  * @see https://dev.twitch.tv/docs/api/reference#get-vips
4100
4108
  */
4101
- getVIPs: async (params, options = {}) => this.callApi({
4109
+ getVIPs: (params, options = {}) => this.callApi({
4102
4110
  path: "/channels/vips",
4103
4111
  params,
4104
4112
  options
@@ -4164,7 +4172,7 @@ var TwitchApi = class {
4164
4172
  *
4165
4173
  * @see https://dev.twitch.tv/docs/api/reference#add-channel-vip
4166
4174
  */
4167
- addChannelVIP: async (params, options = {}) => this.callApi({
4175
+ addChannelVIP: (params, options = {}) => this.callApi({
4168
4176
  path: "/channels/vips",
4169
4177
  method: "POST",
4170
4178
  params,
@@ -4223,7 +4231,7 @@ var TwitchApi = class {
4223
4231
  *
4224
4232
  * @see https://dev.twitch.tv/docs/api/reference#remove-channel-vip
4225
4233
  */
4226
- removeChannelVIP: async (params, options = {}) => this.callApi({
4234
+ removeChannelVIP: (params, options = {}) => this.callApi({
4227
4235
  path: "/channels/vips",
4228
4236
  method: "DELETE",
4229
4237
  params,
@@ -4269,7 +4277,7 @@ var TwitchApi = class {
4269
4277
  *
4270
4278
  * @see https://dev.twitch.tv/docs/api/reference#update-shield-mode-status
4271
4279
  */
4272
- updateShieldModeStatus: async (params, body, options = {}) => this.callApi({
4280
+ updateShieldModeStatus: (params, body, options = {}) => this.callApi({
4273
4281
  path: "/moderation/shield_mode",
4274
4282
  method: "PUT",
4275
4283
  params,
@@ -4314,10 +4322,69 @@ var TwitchApi = class {
4314
4322
  *
4315
4323
  * @see https://dev.twitch.tv/docs/api/reference#get-shield-mode-status
4316
4324
  */
4317
- getShieldModeStatus: async (params, options = {}) => this.callApi({
4325
+ getShieldModeStatus: (params, options = {}) => this.callApi({
4318
4326
  path: "/moderation/shield_mode",
4319
4327
  params,
4320
4328
  options
4329
+ }),
4330
+ /**
4331
+ * NEW Warns a user in the specified broadcaster’s chat room, preventing them from chat interaction until the warning is acknowledged. New warnings can be issued to a user when they already have a warning in the channel (new warning will replace old warning).
4332
+ *
4333
+ * __Authorization:__
4334
+ *
4335
+ * Requires a user access token that includes the **moderator:manage:warnings** scope. Query parameter `moderator_id` must match the `user_id` in the [user access token](https://dev.twitch.tv/docs/authentication/#user-access-tokens).
4336
+ *
4337
+ * __URL:__
4338
+ *
4339
+ * `POST https://api.twitch.tv/helix/moderation/warnings`
4340
+ *
4341
+ * __Response Codes:__
4342
+ *
4343
+ * _200 OK_
4344
+ *
4345
+ * Successfully warn a user.
4346
+ *
4347
+ * _400 Bad Request_
4348
+ *
4349
+ * * The _broadcaster\_id_ query parameter is required.
4350
+ * * The _moderator\_id_ query parameter is required.
4351
+ * * The _user\_id_ query parameter is required.
4352
+ * * The _reason_ query parameter is required.
4353
+ * * The text in the _reason_ field is too long.
4354
+ * * The user specified in the _user\_id_ may not be warned.
4355
+ *
4356
+ * _401 Unauthorized_
4357
+ *
4358
+ * * The ID in _moderator\_id_ must match the user ID in the user access token.
4359
+ * * The Authorization header is required and must contain a user access token.
4360
+ * * The user access token must include the **moderator:manage:warnings** scope.
4361
+ * * The access token is not valid.
4362
+ * * The client ID specified in the Client-Id header does not match the client ID specified in the access token.
4363
+ *
4364
+ * _403 Forbidden_
4365
+ *
4366
+ * The user in _moderator\_id_ is not one of the broadcaster’s moderators.
4367
+ *
4368
+ * _409 Conflict_
4369
+ *
4370
+ * You may not update the user’s warning state while someone else is updating the state. For example, someone else is currently warning the user or the user is acknowledging an existing warning. Please retry your request.
4371
+ *
4372
+ * _429 Too Many Requests_
4373
+ *
4374
+ * The app has exceeded the number of requests it may make per minute for this broadcaster.
4375
+ *
4376
+ * _500 Internal Server Error_
4377
+ *
4378
+ * Internal Server Error.
4379
+ *
4380
+ * @see https://dev.twitch.tv/docs/api/reference#warn-chat-user
4381
+ */
4382
+ warnChatUser: (params, body, options = {}) => this.callApi({
4383
+ path: "/moderation/warnings",
4384
+ method: "POST",
4385
+ params,
4386
+ body,
4387
+ options
4321
4388
  })
4322
4389
  };
4323
4390
  polls = {
@@ -4358,7 +4425,7 @@ var TwitchApi = class {
4358
4425
  *
4359
4426
  * @see https://dev.twitch.tv/docs/api/reference#get-polls
4360
4427
  */
4361
- getPolls: async (params, options = {}) => this.callApi({
4428
+ getPolls: (params, options = {}) => this.callApi({
4362
4429
  path: "/polls",
4363
4430
  params,
4364
4431
  options
@@ -4407,7 +4474,7 @@ var TwitchApi = class {
4407
4474
  *
4408
4475
  * @see https://dev.twitch.tv/docs/api/reference#create-poll
4409
4476
  */
4410
- createPoll: async (body, options = {}) => this.callApi({
4477
+ createPoll: (body, options = {}) => this.callApi({
4411
4478
  path: "/polls",
4412
4479
  method: "POST",
4413
4480
  body,
@@ -4448,7 +4515,7 @@ var TwitchApi = class {
4448
4515
  *
4449
4516
  * @see https://dev.twitch.tv/docs/api/reference#end-poll
4450
4517
  */
4451
- endPoll: async (body, options = {}) => this.callApi({
4518
+ endPoll: (body, options = {}) => this.callApi({
4452
4519
  path: "/polls",
4453
4520
  method: "PATCH",
4454
4521
  body,
@@ -4487,7 +4554,7 @@ var TwitchApi = class {
4487
4554
  *
4488
4555
  * @see https://dev.twitch.tv/docs/api/reference#get-predictions
4489
4556
  */
4490
- getPredictions: async (params, options = {}) => this.callApi({
4557
+ getPredictions: (params, options = {}) => this.callApi({
4491
4558
  path: "/predictions",
4492
4559
  params,
4493
4560
  options
@@ -4536,7 +4603,7 @@ var TwitchApi = class {
4536
4603
  *
4537
4604
  * @see https://dev.twitch.tv/docs/api/reference#create-prediction
4538
4605
  */
4539
- createPrediction: async (body, options = {}) => this.callApi({
4606
+ createPrediction: (body, options = {}) => this.callApi({
4540
4607
  path: "/predictions",
4541
4608
  method: "POST",
4542
4609
  body,
@@ -4584,7 +4651,7 @@ var TwitchApi = class {
4584
4651
  *
4585
4652
  * @see https://dev.twitch.tv/docs/api/reference#end-prediction
4586
4653
  */
4587
- endPrediction: async (body, options = {}) => this.callApi({
4654
+ endPrediction: (body, options = {}) => this.callApi({
4588
4655
  path: "/predictions",
4589
4656
  method: "PATCH",
4590
4657
  body,
@@ -4648,7 +4715,7 @@ var TwitchApi = class {
4648
4715
  *
4649
4716
  * @see https://dev.twitch.tv/docs/api/reference#start-a-raid
4650
4717
  */
4651
- startRaid: async (params = null, options = {}) => this.callApi({
4718
+ startRaid: (params = null, options = {}) => this.callApi({
4652
4719
  path: "/raids",
4653
4720
  method: "POST",
4654
4721
  params,
@@ -4697,7 +4764,7 @@ var TwitchApi = class {
4697
4764
  *
4698
4765
  * @see https://dev.twitch.tv/docs/api/reference#cancel-a-raid
4699
4766
  */
4700
- cancelRaid: async (params, options = {}) => this.callApi({
4767
+ cancelRaid: (params, options = {}) => this.callApi({
4701
4768
  path: "/raids",
4702
4769
  method: "DELETE",
4703
4770
  params,
@@ -4745,7 +4812,7 @@ var TwitchApi = class {
4745
4812
  *
4746
4813
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-stream-schedule
4747
4814
  */
4748
- getChannelStreamSchedule: async (params, options = {}) => this.callApi({
4815
+ getChannelStreamSchedule: (params, options = {}) => this.callApi({
4749
4816
  path: "/schedule",
4750
4817
  params,
4751
4818
  options
@@ -4780,7 +4847,7 @@ var TwitchApi = class {
4780
4847
  *
4781
4848
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-icalendar
4782
4849
  */
4783
- getChannelICalendar: async (params, options = {}) => this.callApi({
4850
+ getChannelICalendar: (params, options = {}) => this.callApi({
4784
4851
  path: "/schedule/icalendar",
4785
4852
  params,
4786
4853
  options
@@ -4824,7 +4891,7 @@ var TwitchApi = class {
4824
4891
  *
4825
4892
  * @see https://dev.twitch.tv/docs/api/reference#update-channel-stream-schedule
4826
4893
  */
4827
- updateChannelStreamSchedule: async (params, options = {}) => this.callApi({
4894
+ updateChannelStreamSchedule: (params, options = {}) => this.callApi({
4828
4895
  path: "/schedule/settings",
4829
4896
  method: "PATCH",
4830
4897
  params,
@@ -4871,7 +4938,7 @@ var TwitchApi = class {
4871
4938
  *
4872
4939
  * @see https://dev.twitch.tv/docs/api/reference#create-channel-stream-schedule-segment
4873
4940
  */
4874
- createChannelStreamScheduleSegment: async (params, body, options = {}) => this.callApi({
4941
+ createChannelStreamScheduleSegment: (params, body, options = {}) => this.callApi({
4875
4942
  path: "/schedule/segment",
4876
4943
  method: "POST",
4877
4944
  params,
@@ -4923,7 +4990,7 @@ var TwitchApi = class {
4923
4990
  *
4924
4991
  * @see https://dev.twitch.tv/docs/api/reference#update-channel-stream-schedule-segment
4925
4992
  */
4926
- updateChannelStreamScheduleSegment: async (params, body = null, options = {}) => this.callApi({
4993
+ updateChannelStreamScheduleSegment: (params, body = null, options = {}) => this.callApi({
4927
4994
  path: "/schedule/segment",
4928
4995
  method: "PATCH",
4929
4996
  params,
@@ -4966,7 +5033,7 @@ var TwitchApi = class {
4966
5033
  *
4967
5034
  * @see https://dev.twitch.tv/docs/api/reference#delete-channel-stream-schedule-segment
4968
5035
  */
4969
- deleteChannelStreamScheduleSegment: async (params, options = {}) => this.callApi({
5036
+ deleteChannelStreamScheduleSegment: (params, options = {}) => this.callApi({
4970
5037
  path: "/schedule/segment",
4971
5038
  method: "DELETE",
4972
5039
  params,
@@ -5005,7 +5072,7 @@ var TwitchApi = class {
5005
5072
  *
5006
5073
  * @see https://dev.twitch.tv/docs/api/reference#search-categories
5007
5074
  */
5008
- searchCategories: async (params, options = {}) => this.callApi({
5075
+ searchCategories: (params, options = {}) => this.callApi({
5009
5076
  path: "/search/categories",
5010
5077
  params,
5011
5078
  options
@@ -5045,7 +5112,7 @@ var TwitchApi = class {
5045
5112
  *
5046
5113
  * @see https://dev.twitch.tv/docs/api/reference#search-channels
5047
5114
  */
5048
- searchChannels: async (params, options = {}) => this.callApi({
5115
+ searchChannels: (params, options = {}) => this.callApi({
5049
5116
  path: "/search/channels",
5050
5117
  params,
5051
5118
  options
@@ -5084,7 +5151,7 @@ var TwitchApi = class {
5084
5151
  *
5085
5152
  * @see https://dev.twitch.tv/docs/api/reference#get-stream-key
5086
5153
  */
5087
- getStreamKey: async (params, options = {}) => this.callApi({
5154
+ getStreamKey: (params, options = {}) => this.callApi({
5088
5155
  path: "/streams/key",
5089
5156
  params,
5090
5157
  options
@@ -5118,7 +5185,7 @@ var TwitchApi = class {
5118
5185
  *
5119
5186
  * @see https://dev.twitch.tv/docs/api/reference#get-streams
5120
5187
  */
5121
- getStreams: async (params = null, options = {}) => this.callApi({
5188
+ getStreams: (params = null, options = {}) => this.callApi({
5122
5189
  path: "/streams",
5123
5190
  params,
5124
5191
  options
@@ -5154,7 +5221,7 @@ var TwitchApi = class {
5154
5221
  *
5155
5222
  * @see https://dev.twitch.tv/docs/api/reference#get-followed-streams
5156
5223
  */
5157
- getFollowedStreams: async (params, options = {}) => this.callApi({
5224
+ getFollowedStreams: (params, options = {}) => this.callApi({
5158
5225
  path: "/streams/followed",
5159
5226
  params,
5160
5227
  options
@@ -5207,7 +5274,7 @@ var TwitchApi = class {
5207
5274
  *
5208
5275
  * @see https://dev.twitch.tv/docs/api/reference#create-stream-marker
5209
5276
  */
5210
- createStreamMarker: async (body, options = {}) => this.callApi({
5277
+ createStreamMarker: (body, options = {}) => this.callApi({
5211
5278
  path: "/streams/markers",
5212
5279
  method: "POST",
5213
5280
  body,
@@ -5251,7 +5318,7 @@ var TwitchApi = class {
5251
5318
  *
5252
5319
  * @see https://dev.twitch.tv/docs/api/reference#get-stream-markers
5253
5320
  */
5254
- getStreamMarkers: async (params = null, options = {}) => this.callApi({
5321
+ getStreamMarkers: (params = null, options = {}) => this.callApi({
5255
5322
  path: "/streams/markers",
5256
5323
  params,
5257
5324
  options
@@ -5291,7 +5358,7 @@ var TwitchApi = class {
5291
5358
  *
5292
5359
  * @see https://dev.twitch.tv/docs/api/reference#get-broadcaster-subscriptions
5293
5360
  */
5294
- getBroadcasterSubscriptions: async (params, options = {}) => this.callApi({
5361
+ getBroadcasterSubscriptions: (params, options = {}) => this.callApi({
5295
5362
  path: "/subscriptions",
5296
5363
  params,
5297
5364
  options
@@ -5334,7 +5401,7 @@ var TwitchApi = class {
5334
5401
  *
5335
5402
  * @see https://dev.twitch.tv/docs/api/reference#check-user-subscription
5336
5403
  */
5337
- checkUserSubscription: async (params, options = {}) => this.callApi({
5404
+ checkUserSubscription: (params, options = {}) => this.callApi({
5338
5405
  path: "/subscriptions/user",
5339
5406
  params,
5340
5407
  options
@@ -5373,7 +5440,7 @@ var TwitchApi = class {
5373
5440
  *
5374
5441
  * @see https://dev.twitch.tv/docs/api/reference#get-all-stream-tags
5375
5442
  */
5376
- getAllStreamTags: async (params = null, options = {}) => this.callApi({
5443
+ getAllStreamTags: (params = null, options = {}) => this.callApi({
5377
5444
  path: "/tags/streams",
5378
5445
  params,
5379
5446
  options
@@ -5410,7 +5477,7 @@ var TwitchApi = class {
5410
5477
  *
5411
5478
  * @see https://dev.twitch.tv/docs/api/reference#get-stream-tags
5412
5479
  */
5413
- getStreamTags: async (params, options = {}) => this.callApi({
5480
+ getStreamTags: (params, options = {}) => this.callApi({
5414
5481
  path: "/streams/tags",
5415
5482
  params,
5416
5483
  options
@@ -5450,7 +5517,7 @@ var TwitchApi = class {
5450
5517
  *
5451
5518
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-teams
5452
5519
  */
5453
- getChannelTeams: async (params, options = {}) => this.callApi({
5520
+ getChannelTeams: (params, options = {}) => this.callApi({
5454
5521
  path: "/teams/channel",
5455
5522
  params,
5456
5523
  options
@@ -5490,7 +5557,7 @@ var TwitchApi = class {
5490
5557
  *
5491
5558
  * @see https://dev.twitch.tv/docs/api/reference#get-teams
5492
5559
  */
5493
- getTeams: async (params = null, options = {}) => this.callApi({
5560
+ getTeams: (params = null, options = {}) => this.callApi({
5494
5561
  path: "/teams",
5495
5562
  params,
5496
5563
  options
@@ -5518,12 +5585,12 @@ var TwitchApi = class {
5518
5585
  *
5519
5586
  * _200 OK_
5520
5587
  *
5521
- * Successfully retrieved the specified users' information.
5588
+ * Successfully retrieved the specified users’ information.
5522
5589
  *
5523
5590
  * _400 Bad Request_
5524
5591
  *
5525
- * * The _id_ or _login_ query parameter is required unless the request uses a user access token.
5526
- * * The request exceeded the maximum allowed number of _id_ and/or _login_ query parameters.
5592
+ * * The \*id\* or \*login\* query parameter is required unless the request uses a user access token.
5593
+ * * The request exceeded the maximum allowed number of \*id\* and/or \*login\* query parameters.
5527
5594
  *
5528
5595
  * _401 Unauthorized_
5529
5596
  *
@@ -5533,7 +5600,7 @@ var TwitchApi = class {
5533
5600
  *
5534
5601
  * @see https://dev.twitch.tv/docs/api/reference#get-users
5535
5602
  */
5536
- getUsers: async (params = null, options = {}) => this.callApi({
5603
+ getUsers: (params = null, options = {}) => this.callApi({
5537
5604
  path: "/users",
5538
5605
  params,
5539
5606
  options
@@ -5570,7 +5637,7 @@ var TwitchApi = class {
5570
5637
  *
5571
5638
  * @see https://dev.twitch.tv/docs/api/reference#update-user
5572
5639
  */
5573
- updateUser: async (params = null, options = {}) => this.callApi({
5640
+ updateUser: (params = null, options = {}) => this.callApi({
5574
5641
  path: "/users",
5575
5642
  method: "PUT",
5576
5643
  params,
@@ -5607,7 +5674,7 @@ var TwitchApi = class {
5607
5674
  *
5608
5675
  * @see https://dev.twitch.tv/docs/api/reference#get-user-block-list
5609
5676
  */
5610
- getUserBlockList: async (params, options = {}) => this.callApi({
5677
+ getUserBlockList: (params, options = {}) => this.callApi({
5611
5678
  path: "/users/blocks",
5612
5679
  params,
5613
5680
  options
@@ -5647,7 +5714,7 @@ var TwitchApi = class {
5647
5714
  *
5648
5715
  * @see https://dev.twitch.tv/docs/api/reference#block-user
5649
5716
  */
5650
- blockUser: async (params, options = {}) => this.callApi({
5717
+ blockUser: (params, options = {}) => this.callApi({
5651
5718
  path: "/users/blocks",
5652
5719
  method: "PUT",
5653
5720
  params,
@@ -5683,7 +5750,7 @@ var TwitchApi = class {
5683
5750
  *
5684
5751
  * @see https://dev.twitch.tv/docs/api/reference#unblock-user
5685
5752
  */
5686
- unblockUser: async (params, options = {}) => this.callApi({
5753
+ unblockUser: (params, options = {}) => this.callApi({
5687
5754
  path: "/users/blocks",
5688
5755
  method: "DELETE",
5689
5756
  params,
@@ -5715,7 +5782,7 @@ var TwitchApi = class {
5715
5782
  *
5716
5783
  * @see https://dev.twitch.tv/docs/api/reference#get-user-extensions
5717
5784
  */
5718
- getUserExtensions: async (options = {}) => this.callApi({
5785
+ getUserExtensions: (options = {}) => this.callApi({
5719
5786
  path: "/users/extensions/list",
5720
5787
  options
5721
5788
  }),
@@ -5750,7 +5817,7 @@ var TwitchApi = class {
5750
5817
  *
5751
5818
  * @see https://dev.twitch.tv/docs/api/reference#get-user-active-extensions
5752
5819
  */
5753
- getUserActiveExtensions: async (params = null, options = {}) => this.callApi({
5820
+ getUserActiveExtensions: (params = null, options = {}) => this.callApi({
5754
5821
  path: "/users/extensions",
5755
5822
  params,
5756
5823
  options
@@ -5791,7 +5858,7 @@ var TwitchApi = class {
5791
5858
  *
5792
5859
  * @see https://dev.twitch.tv/docs/api/reference#update-user-extensions
5793
5860
  */
5794
- updateUserExtensions: async (body, options = {}) => this.callApi({
5861
+ updateUserExtensions: (body, options = {}) => this.callApi({
5795
5862
  path: "/users/extensions",
5796
5863
  method: "PUT",
5797
5864
  body,
@@ -5841,7 +5908,7 @@ var TwitchApi = class {
5841
5908
  *
5842
5909
  * @see https://dev.twitch.tv/docs/api/reference#get-videos
5843
5910
  */
5844
- getVideos: async (params = null, options = {}) => this.callApi({
5911
+ getVideos: (params = null, options = {}) => this.callApi({
5845
5912
  path: "/videos",
5846
5913
  params,
5847
5914
  options
@@ -5878,7 +5945,7 @@ var TwitchApi = class {
5878
5945
  *
5879
5946
  * @see https://dev.twitch.tv/docs/api/reference#delete-videos
5880
5947
  */
5881
- deleteVideos: async (params, options = {}) => this.callApi({
5948
+ deleteVideos: (params, options = {}) => this.callApi({
5882
5949
  path: "/videos",
5883
5950
  method: "DELETE",
5884
5951
  params,
@@ -5942,7 +6009,7 @@ var TwitchApi = class {
5942
6009
  *
5943
6010
  * @see https://dev.twitch.tv/docs/api/reference#send-whisper
5944
6011
  */
5945
- sendWhisper: async (params, body, options = {}) => this.callApi({
6012
+ sendWhisper: (params, body, options = {}) => this.callApi({
5946
6013
  path: "/whispers",
5947
6014
  method: "POST",
5948
6015
  params,