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.cjs CHANGED
@@ -73,10 +73,17 @@ var TwitchApi = class {
73
73
  options.headers.set("Client-Id", clientId || this._clientId);
74
74
  }
75
75
  const response = await fetch(url, options);
76
+ const status = response.status;
77
+ let data = null;
78
+ if (status === 200 && path === "/schedule/icalendar") {
79
+ data = await response.text();
80
+ } else if (status !== 204) {
81
+ data = await response.json();
82
+ }
76
83
  return {
77
84
  ok: response.ok,
78
- status: response.status,
79
- data: await response.json()
85
+ status,
86
+ data
80
87
  };
81
88
  }
82
89
  ads = {
@@ -127,7 +134,7 @@ var TwitchApi = class {
127
134
  *
128
135
  * @see https://dev.twitch.tv/docs/api/reference#start-commercial
129
136
  */
130
- startCommercial: async (body, options = {}) => this.callApi({
137
+ startCommercial: (body, options = {}) => this.callApi({
131
138
  path: "/channels/commercial",
132
139
  method: "POST",
133
140
  body,
@@ -158,7 +165,7 @@ var TwitchApi = class {
158
165
  *
159
166
  * @see https://dev.twitch.tv/docs/api/reference#get-ad-schedule
160
167
  */
161
- getAdSchedule: async (params, options = {}) => this.callApi({
168
+ getAdSchedule: (params, options = {}) => this.callApi({
162
169
  path: "/channels/ads",
163
170
  params,
164
171
  options
@@ -194,7 +201,7 @@ var TwitchApi = class {
194
201
  *
195
202
  * @see https://dev.twitch.tv/docs/api/reference#snooze-next-ad
196
203
  */
197
- snoozeNextAd: async (params, options = {}) => this.callApi({
204
+ snoozeNextAd: (params, options = {}) => this.callApi({
198
205
  path: "/channels/ads/schedule/snooze",
199
206
  method: "POST",
200
207
  params,
@@ -241,7 +248,7 @@ var TwitchApi = class {
241
248
  *
242
249
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-analytics
243
250
  */
244
- getExtensionAnalytics: async (params = null, options = {}) => this.callApi({
251
+ getExtensionAnalytics: (params = null, options = {}) => this.callApi({
245
252
  path: "/analytics/extensions",
246
253
  params,
247
254
  options
@@ -285,7 +292,7 @@ var TwitchApi = class {
285
292
  *
286
293
  * @see https://dev.twitch.tv/docs/api/reference#get-game-analytics
287
294
  */
288
- getGameAnalytics: async (params = null, options = {}) => this.callApi({
295
+ getGameAnalytics: (params = null, options = {}) => this.callApi({
289
296
  path: "/analytics/games",
290
297
  params,
291
298
  options
@@ -326,7 +333,7 @@ var TwitchApi = class {
326
333
  *
327
334
  * @see https://dev.twitch.tv/docs/api/reference#get-bits-leaderboard
328
335
  */
329
- getBitsLeaderboard: async (params = null, options = {}) => this.callApi({
336
+ getBitsLeaderboard: (params = null, options = {}) => this.callApi({
330
337
  path: "/bits/leaderboard",
331
338
  params,
332
339
  options
@@ -355,7 +362,7 @@ var TwitchApi = class {
355
362
  *
356
363
  * @see https://dev.twitch.tv/docs/api/reference#get-cheermotes
357
364
  */
358
- getCheermotes: async (params = null, options = {}) => this.callApi({
365
+ getCheermotes: (params = null, options = {}) => this.callApi({
359
366
  path: "/bits/cheermotes",
360
367
  params,
361
368
  options
@@ -396,7 +403,7 @@ var TwitchApi = class {
396
403
  *
397
404
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-transactions
398
405
  */
399
- getExtensionTransactions: async (params, options = {}) => this.callApi({
406
+ getExtensionTransactions: (params, options = {}) => this.callApi({
400
407
  path: "/extensions/transactions",
401
408
  params,
402
409
  options
@@ -440,7 +447,7 @@ var TwitchApi = class {
440
447
  *
441
448
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-information
442
449
  */
443
- getChannelInformation: async (params, options = {}) => this.callApi({
450
+ getChannelInformation: (params, options = {}) => this.callApi({
444
451
  path: "/channels",
445
452
  params,
446
453
  options
@@ -502,7 +509,7 @@ var TwitchApi = class {
502
509
  *
503
510
  * @see https://dev.twitch.tv/docs/api/reference#modify-channel-information
504
511
  */
505
- modifyChannelInformation: async (params, body = null, options = {}) => this.callApi({
512
+ modifyChannelInformation: (params, body = null, options = {}) => this.callApi({
506
513
  path: "/channels",
507
514
  method: "PATCH",
508
515
  params,
@@ -540,7 +547,7 @@ var TwitchApi = class {
540
547
  *
541
548
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-editors
542
549
  */
543
- getChannelEditors: async (params, options = {}) => this.callApi({
550
+ getChannelEditors: (params, options = {}) => this.callApi({
544
551
  path: "/channels/editors",
545
552
  params,
546
553
  options
@@ -582,7 +589,7 @@ var TwitchApi = class {
582
589
  *
583
590
  * @see https://dev.twitch.tv/docs/api/reference#get-followed-channels
584
591
  */
585
- getFollowedChannels: async (params, options = {}) => this.callApi({
592
+ getFollowedChannels: (params, options = {}) => this.callApi({
586
593
  path: "/channels/followed",
587
594
  params,
588
595
  options
@@ -627,7 +634,7 @@ var TwitchApi = class {
627
634
  *
628
635
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-followers
629
636
  */
630
- getChannelFollowers: async (params, options = {}) => this.callApi({
637
+ getChannelFollowers: (params, options = {}) => this.callApi({
631
638
  path: "/channels/followers",
632
639
  params,
633
640
  options
@@ -680,7 +687,7 @@ var TwitchApi = class {
680
687
  *
681
688
  * @see https://dev.twitch.tv/docs/api/reference#create-custom-rewards
682
689
  */
683
- createCustomRewards: async (params, body, options = {}) => this.callApi({
690
+ createCustomRewards: (params, body, options = {}) => this.callApi({
684
691
  path: "/channel_points/custom_rewards",
685
692
  method: "POST",
686
693
  params,
@@ -731,7 +738,7 @@ var TwitchApi = class {
731
738
  *
732
739
  * @see https://dev.twitch.tv/docs/api/reference#delete-custom-reward
733
740
  */
734
- deleteCustomReward: async (params, options = {}) => this.callApi({
741
+ deleteCustomReward: (params, options = {}) => this.callApi({
735
742
  path: "/channel_points/custom_rewards",
736
743
  method: "DELETE",
737
744
  params,
@@ -780,7 +787,7 @@ var TwitchApi = class {
780
787
  *
781
788
  * @see https://dev.twitch.tv/docs/api/reference#get-custom-reward
782
789
  */
783
- getCustomReward: async (params, options = {}) => this.callApi({
790
+ getCustomReward: (params, options = {}) => this.callApi({
784
791
  path: "/channel_points/custom_rewards",
785
792
  params,
786
793
  options
@@ -790,7 +797,7 @@ var TwitchApi = class {
790
797
  *
791
798
  * __Authorization:__
792
799
  *
793
- * Requires a [user access token](https://dev.twitch.tv/docs/authentication#user-access-tokens) that includes the **channel:manage:redemptions** scope.
800
+ * Requires a [user access token](https://dev.twitch.tv/docs/api/authentication#user-access-tokens) that includes the **channel:manage:redemptions** scope.
794
801
  *
795
802
  * __Request Body:__
796
803
  *
@@ -808,6 +815,7 @@ var TwitchApi = class {
808
815
  *
809
816
  * _400 Bad Request_
810
817
  *
818
+ * ul>
811
819
  * * The _broadcaster\_id_ query parameter is required.
812
820
  * * The _id_ query parameter is required.
813
821
  * * The `title` must contain a minimum of 1 character and a maximum of 45 characters.
@@ -838,7 +846,7 @@ var TwitchApi = class {
838
846
  *
839
847
  * @see https://dev.twitch.tv/docs/api/reference#update-custom-reward
840
848
  */
841
- updateCustomReward: async (params, body = null, options = {}) => this.callApi({
849
+ updateCustomReward: (params, body = null, options = {}) => this.callApi({
842
850
  path: "/channel_points/custom_rewards",
843
851
  method: "PATCH",
844
852
  params,
@@ -890,7 +898,7 @@ var TwitchApi = class {
890
898
  *
891
899
  * @see https://dev.twitch.tv/docs/api/reference#get-custom-reward-redemption
892
900
  */
893
- getCustomRewardRedemption: async (params, options = {}) => this.callApi({
901
+ getCustomRewardRedemption: (params, options = {}) => this.callApi({
894
902
  path: "/channel_points/custom_rewards/redemptions",
895
903
  params,
896
904
  options
@@ -940,7 +948,7 @@ var TwitchApi = class {
940
948
  *
941
949
  * @see https://dev.twitch.tv/docs/api/reference#update-redemption-status
942
950
  */
943
- updateRedemptionStatus: async (params, body, options = {}) => this.callApi({
951
+ updateRedemptionStatus: (params, body, options = {}) => this.callApi({
944
952
  path: "/channel_points/custom_rewards/redemptions",
945
953
  method: "PATCH",
946
954
  params,
@@ -987,7 +995,7 @@ var TwitchApi = class {
987
995
  *
988
996
  * @see https://dev.twitch.tv/docs/api/reference#get-charity-campaign
989
997
  */
990
- getCharityCampaign: async (params, options = {}) => this.callApi({
998
+ getCharityCampaign: (params, options = {}) => this.callApi({
991
999
  path: "/charity/campaigns",
992
1000
  params,
993
1001
  options
@@ -1030,7 +1038,7 @@ var TwitchApi = class {
1030
1038
  *
1031
1039
  * @see https://dev.twitch.tv/docs/api/reference#get-charity-campaign-donations
1032
1040
  */
1033
- getCharityCampaignDonations: async (params, options = {}) => this.callApi({
1041
+ getCharityCampaignDonations: (params, options = {}) => this.callApi({
1034
1042
  path: "/charity/donations",
1035
1043
  params,
1036
1044
  options
@@ -1079,7 +1087,7 @@ var TwitchApi = class {
1079
1087
  *
1080
1088
  * @see https://dev.twitch.tv/docs/api/reference#get-chatters
1081
1089
  */
1082
- getChatters: async (params, options = {}) => this.callApi({
1090
+ getChatters: (params, options = {}) => this.callApi({
1083
1091
  path: "/chat/chatters",
1084
1092
  params,
1085
1093
  options
@@ -1117,7 +1125,7 @@ var TwitchApi = class {
1117
1125
  *
1118
1126
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-emotes
1119
1127
  */
1120
- getChannelEmotes: async (params, options = {}) => this.callApi({
1128
+ getChannelEmotes: (params, options = {}) => this.callApi({
1121
1129
  path: "/chat/emotes",
1122
1130
  params,
1123
1131
  options
@@ -1153,7 +1161,7 @@ var TwitchApi = class {
1153
1161
  *
1154
1162
  * @see https://dev.twitch.tv/docs/api/reference#get-global-emotes
1155
1163
  */
1156
- getGlobalEmotes: async (options = {}) => this.callApi({
1164
+ getGlobalEmotes: (options = {}) => this.callApi({
1157
1165
  path: "/chat/emotes/global",
1158
1166
  options
1159
1167
  }),
@@ -1191,7 +1199,7 @@ var TwitchApi = class {
1191
1199
  *
1192
1200
  * @see https://dev.twitch.tv/docs/api/reference#get-emote-sets
1193
1201
  */
1194
- getEmoteSets: async (params, options = {}) => this.callApi({
1202
+ getEmoteSets: (params, options = {}) => this.callApi({
1195
1203
  path: "/chat/emotes/set",
1196
1204
  params,
1197
1205
  options
@@ -1225,7 +1233,7 @@ var TwitchApi = class {
1225
1233
  *
1226
1234
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-chat-badges
1227
1235
  */
1228
- getChannelChatBadges: async (params, options = {}) => this.callApi({
1236
+ getChannelChatBadges: (params, options = {}) => this.callApi({
1229
1237
  path: "/chat/badges",
1230
1238
  params,
1231
1239
  options
@@ -1259,7 +1267,7 @@ var TwitchApi = class {
1259
1267
  *
1260
1268
  * @see https://dev.twitch.tv/docs/api/reference#get-global-chat-badges
1261
1269
  */
1262
- getGlobalChatBadges: async (options = {}) => this.callApi({
1270
+ getGlobalChatBadges: (options = {}) => this.callApi({
1263
1271
  path: "/chat/badges/global",
1264
1272
  options
1265
1273
  }),
@@ -1294,7 +1302,7 @@ var TwitchApi = class {
1294
1302
  *
1295
1303
  * @see https://dev.twitch.tv/docs/api/reference#get-chat-settings
1296
1304
  */
1297
- getChatSettings: async (params, options = {}) => this.callApi({
1305
+ getChatSettings: (params, options = {}) => this.callApi({
1298
1306
  path: "/chat/settings",
1299
1307
  params,
1300
1308
  options
@@ -1348,7 +1356,7 @@ var TwitchApi = class {
1348
1356
  *
1349
1357
  * @see https://dev.twitch.tv/docs/api/reference#update-chat-settings
1350
1358
  */
1351
- updateChatSettings: async (params, body = null, options = {}) => this.callApi({
1359
+ updateChatSettings: (params, body = null, options = {}) => this.callApi({
1352
1360
  path: "/chat/settings",
1353
1361
  method: "PATCH",
1354
1362
  params,
@@ -1356,7 +1364,7 @@ var TwitchApi = class {
1356
1364
  options
1357
1365
  }),
1358
1366
  /**
1359
- * BETA Retrieves emotes available to the user across all channels.
1367
+ * NEW Retrieves emotes available to the user across all channels.
1360
1368
  *
1361
1369
  * __Authorization:__
1362
1370
  *
@@ -1388,7 +1396,7 @@ var TwitchApi = class {
1388
1396
  *
1389
1397
  * @see https://dev.twitch.tv/docs/api/reference#get-user-emotes
1390
1398
  */
1391
- getUserEmotes: async (params, options = {}) => this.callApi({
1399
+ getUserEmotes: (params, options = {}) => this.callApi({
1392
1400
  path: "/chat/emotes/user",
1393
1401
  params,
1394
1402
  options
@@ -1426,7 +1434,7 @@ var TwitchApi = class {
1426
1434
  *
1427
1435
  * @see https://dev.twitch.tv/docs/api/reference#send-chat-announcement
1428
1436
  */
1429
- sendChatAnnouncement: async (params, body, options = {}) => this.callApi({
1437
+ sendChatAnnouncement: (params, body, options = {}) => this.callApi({
1430
1438
  path: "/chat/announcements",
1431
1439
  method: "POST",
1432
1440
  params,
@@ -1485,7 +1493,7 @@ var TwitchApi = class {
1485
1493
  *
1486
1494
  * @see https://dev.twitch.tv/docs/api/reference#send-a-shoutout
1487
1495
  */
1488
- sendShoutout: async (params, options = {}) => this.callApi({
1496
+ sendShoutout: (params, options = {}) => this.callApi({
1489
1497
  path: "/chat/shoutouts",
1490
1498
  method: "POST",
1491
1499
  params,
@@ -1535,7 +1543,7 @@ var TwitchApi = class {
1535
1543
  *
1536
1544
  * @see https://dev.twitch.tv/docs/api/reference#send-chat-message
1537
1545
  */
1538
- sendChatMessage: async (body, options = {}) => this.callApi({
1546
+ sendChatMessage: (body, options = {}) => this.callApi({
1539
1547
  path: "/chat/messages",
1540
1548
  method: "POST",
1541
1549
  body,
@@ -1570,7 +1578,7 @@ var TwitchApi = class {
1570
1578
  *
1571
1579
  * @see https://dev.twitch.tv/docs/api/reference#get-user-chat-color
1572
1580
  */
1573
- getUserChatColor: async (params, options = {}) => this.callApi({
1581
+ getUserChatColor: (params, options = {}) => this.callApi({
1574
1582
  path: "/chat/color",
1575
1583
  params,
1576
1584
  options
@@ -1609,7 +1617,7 @@ var TwitchApi = class {
1609
1617
  *
1610
1618
  * @see https://dev.twitch.tv/docs/api/reference#update-user-chat-color
1611
1619
  */
1612
- updateUserChatColor: async (params, options = {}) => this.callApi({
1620
+ updateUserChatColor: (params, options = {}) => this.callApi({
1613
1621
  path: "/chat/color",
1614
1622
  method: "PUT",
1615
1623
  params,
@@ -1663,7 +1671,7 @@ var TwitchApi = class {
1663
1671
  *
1664
1672
  * @see https://dev.twitch.tv/docs/api/reference#create-clip
1665
1673
  */
1666
- createClip: async (params, options = {}) => this.callApi({
1674
+ createClip: (params, options = {}) => this.callApi({
1667
1675
  path: "/clips",
1668
1676
  method: "POST",
1669
1677
  params,
@@ -1707,7 +1715,7 @@ var TwitchApi = class {
1707
1715
  *
1708
1716
  * @see https://dev.twitch.tv/docs/api/reference#get-clips
1709
1717
  */
1710
- getClips: async (params = null, options = {}) => this.callApi({
1718
+ getClips: (params = null, options = {}) => this.callApi({
1711
1719
  path: "/clips",
1712
1720
  params,
1713
1721
  options
@@ -1737,7 +1745,7 @@ var TwitchApi = class {
1737
1745
  *
1738
1746
  * @see https://dev.twitch.tv/docs/api/reference#get-conduits
1739
1747
  */
1740
- getConduits: async (options = {}) => this.callApi({
1748
+ getConduits: (options = {}) => this.callApi({
1741
1749
  path: "/eventsub/conduits",
1742
1750
  options
1743
1751
  }),
@@ -1772,7 +1780,7 @@ var TwitchApi = class {
1772
1780
  *
1773
1781
  * @see https://dev.twitch.tv/docs/api/reference#create-conduits
1774
1782
  */
1775
- createConduits: async (body, options = {}) => this.callApi({
1783
+ createConduits: (body, options = {}) => this.callApi({
1776
1784
  path: "/eventsub/conduits",
1777
1785
  method: "POST",
1778
1786
  body,
@@ -1811,7 +1819,7 @@ var TwitchApi = class {
1811
1819
  *
1812
1820
  * @see https://dev.twitch.tv/docs/api/reference#update-conduits
1813
1821
  */
1814
- updateConduits: async (body, options = {}) => this.callApi({
1822
+ updateConduits: (body, options = {}) => this.callApi({
1815
1823
  path: "/eventsub/conduits",
1816
1824
  method: "PATCH",
1817
1825
  body,
@@ -1849,7 +1857,7 @@ var TwitchApi = class {
1849
1857
  *
1850
1858
  * @see https://dev.twitch.tv/docs/api/reference#delete-conduit
1851
1859
  */
1852
- deleteConduit: async (params, options = {}) => this.callApi({
1860
+ deleteConduit: (params, options = {}) => this.callApi({
1853
1861
  path: "/eventsub/conduits",
1854
1862
  method: "DELETE",
1855
1863
  params,
@@ -1887,7 +1895,7 @@ var TwitchApi = class {
1887
1895
  *
1888
1896
  * @see https://dev.twitch.tv/docs/api/reference#get-conduit-shards
1889
1897
  */
1890
- getConduitShards: async (params, options = {}) => this.callApi({
1898
+ getConduitShards: (params, options = {}) => this.callApi({
1891
1899
  path: "/eventsub/conduits/shards",
1892
1900
  params,
1893
1901
  options
@@ -1926,7 +1934,7 @@ var TwitchApi = class {
1926
1934
  *
1927
1935
  * @see https://dev.twitch.tv/docs/api/reference#update-conduit-shards
1928
1936
  */
1929
- updateConduitShards: async (body, options = {}) => this.callApi({
1937
+ updateConduitShards: (body, options = {}) => this.callApi({
1930
1938
  path: "/eventsub/conduits/shards",
1931
1939
  method: "PATCH",
1932
1940
  body,
@@ -1959,7 +1967,7 @@ var TwitchApi = class {
1959
1967
  *
1960
1968
  * @see https://dev.twitch.tv/docs/api/reference#get-content-classification-labels
1961
1969
  */
1962
- getContentClassificationLabels: async (params = null, options = {}) => this.callApi({
1970
+ getContentClassificationLabels: (params = null, options = {}) => this.callApi({
1963
1971
  path: "/content_classification_labels",
1964
1972
  params,
1965
1973
  options
@@ -2021,7 +2029,7 @@ var TwitchApi = class {
2021
2029
  *
2022
2030
  * @see https://dev.twitch.tv/docs/api/reference#get-drops-entitlements
2023
2031
  */
2024
- getDropsEntitlements: async (params = null, options = {}) => this.callApi({
2032
+ getDropsEntitlements: (params = null, options = {}) => this.callApi({
2025
2033
  path: "/entitlements/drops",
2026
2034
  params,
2027
2035
  options
@@ -2067,7 +2075,7 @@ var TwitchApi = class {
2067
2075
  *
2068
2076
  * @see https://dev.twitch.tv/docs/api/reference#update-drops-entitlements
2069
2077
  */
2070
- updateDropsEntitlements: async (body = null, options = {}) => this.callApi({
2078
+ updateDropsEntitlements: (body = null, options = {}) => this.callApi({
2071
2079
  path: "/entitlements/drops",
2072
2080
  method: "PATCH",
2073
2081
  body,
@@ -2112,7 +2120,7 @@ var TwitchApi = class {
2112
2120
  *
2113
2121
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-configuration-segment
2114
2122
  */
2115
- getExtensionConfigurationSegment: async (params, options = {}) => this.callApi({
2123
+ getExtensionConfigurationSegment: (params, options = {}) => this.callApi({
2116
2124
  path: "/extensions/configurations",
2117
2125
  params,
2118
2126
  options
@@ -2148,7 +2156,7 @@ var TwitchApi = class {
2148
2156
  *
2149
2157
  * @see https://dev.twitch.tv/docs/api/reference#set-extension-configuration-segment
2150
2158
  */
2151
- setExtensionConfigurationSegment: async (body, options = {}) => this.callApi({
2159
+ setExtensionConfigurationSegment: (body, options = {}) => this.callApi({
2152
2160
  path: "/extensions/configurations",
2153
2161
  method: "PUT",
2154
2162
  body,
@@ -2186,7 +2194,7 @@ var TwitchApi = class {
2186
2194
  *
2187
2195
  * @see https://dev.twitch.tv/docs/api/reference#set-extension-required-configuration
2188
2196
  */
2189
- setExtensionRequiredConfiguration: async (params, body, options = {}) => this.callApi({
2197
+ setExtensionRequiredConfiguration: (params, body, options = {}) => this.callApi({
2190
2198
  path: "/extensions/required_configuration",
2191
2199
  method: "PUT",
2192
2200
  params,
@@ -2262,7 +2270,7 @@ var TwitchApi = class {
2262
2270
  *
2263
2271
  * @see https://dev.twitch.tv/docs/api/reference#send-extension-pubsub-message
2264
2272
  */
2265
- sendExtensionPubSubMessage: async (body, options = {}) => this.callApi({
2273
+ sendExtensionPubSubMessage: (body, options = {}) => this.callApi({
2266
2274
  path: "/extensions/pubsub",
2267
2275
  method: "POST",
2268
2276
  body,
@@ -2304,7 +2312,7 @@ var TwitchApi = class {
2304
2312
  *
2305
2313
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-live-channels
2306
2314
  */
2307
- getExtensionLiveChannels: async (params, options = {}) => this.callApi({
2315
+ getExtensionLiveChannels: (params, options = {}) => this.callApi({
2308
2316
  path: "/extensions/live",
2309
2317
  params,
2310
2318
  options
@@ -2338,7 +2346,7 @@ var TwitchApi = class {
2338
2346
  *
2339
2347
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-secrets
2340
2348
  */
2341
- getExtensionSecrets: async (options = {}) => this.callApi({
2349
+ getExtensionSecrets: (options = {}) => this.callApi({
2342
2350
  path: "/extensions/jwt/secrets",
2343
2351
  options
2344
2352
  }),
@@ -2372,7 +2380,7 @@ var TwitchApi = class {
2372
2380
  *
2373
2381
  * @see https://dev.twitch.tv/docs/api/reference#create-extension-secret
2374
2382
  */
2375
- createExtensionSecret: async (params, options = {}) => this.callApi({
2383
+ createExtensionSecret: (params, options = {}) => this.callApi({
2376
2384
  path: "/extensions/jwt/secrets",
2377
2385
  method: "POST",
2378
2386
  params,
@@ -2414,7 +2422,7 @@ var TwitchApi = class {
2414
2422
  *
2415
2423
  * @see https://dev.twitch.tv/docs/api/reference#send-extension-chat-message
2416
2424
  */
2417
- sendExtensionChatMessage: async (params, body, options = {}) => this.callApi({
2425
+ sendExtensionChatMessage: (params, body, options = {}) => this.callApi({
2418
2426
  path: "/extensions/chat",
2419
2427
  method: "POST",
2420
2428
  params,
@@ -2455,7 +2463,7 @@ var TwitchApi = class {
2455
2463
  *
2456
2464
  * @see https://dev.twitch.tv/docs/api/reference#get-extensions
2457
2465
  */
2458
- getExtensions: async (params, options = {}) => this.callApi({
2466
+ getExtensions: (params, options = {}) => this.callApi({
2459
2467
  path: "/extensions",
2460
2468
  params,
2461
2469
  options
@@ -2493,7 +2501,7 @@ var TwitchApi = class {
2493
2501
  *
2494
2502
  * @see https://dev.twitch.tv/docs/api/reference#get-released-extensions
2495
2503
  */
2496
- getReleasedExtensions: async (params, options = {}) => this.callApi({
2504
+ getReleasedExtensions: (params, options = {}) => this.callApi({
2497
2505
  path: "/extensions/released",
2498
2506
  params,
2499
2507
  options
@@ -2527,7 +2535,7 @@ var TwitchApi = class {
2527
2535
  *
2528
2536
  * @see https://dev.twitch.tv/docs/api/reference#get-extension-bits-products
2529
2537
  */
2530
- getExtensionBitsProducts: async (params = null, options = {}) => this.callApi({
2538
+ getExtensionBitsProducts: (params = null, options = {}) => this.callApi({
2531
2539
  path: "/bits/extensions",
2532
2540
  params,
2533
2541
  options
@@ -2568,7 +2576,7 @@ var TwitchApi = class {
2568
2576
  *
2569
2577
  * @see https://dev.twitch.tv/docs/api/reference#update-extension-bits-product
2570
2578
  */
2571
- updateExtensionBitsProduct: async (body, options = {}) => this.callApi({
2579
+ updateExtensionBitsProduct: (body, options = {}) => this.callApi({
2572
2580
  path: "/bits/extensions",
2573
2581
  method: "PUT",
2574
2582
  body,
@@ -2632,7 +2640,7 @@ var TwitchApi = class {
2632
2640
  *
2633
2641
  * @see https://dev.twitch.tv/docs/api/reference#create-eventsub-subscription
2634
2642
  */
2635
- createEventSubSubscription: async (body, options = {}) => this.callApi({
2643
+ createEventSubSubscription: (body, options = {}) => this.callApi({
2636
2644
  path: "/eventsub/subscriptions",
2637
2645
  method: "POST",
2638
2646
  body,
@@ -2673,7 +2681,7 @@ var TwitchApi = class {
2673
2681
  *
2674
2682
  * @see https://dev.twitch.tv/docs/api/reference#delete-eventsub-subscription
2675
2683
  */
2676
- deleteEventSubSubscription: async (params, options = {}) => this.callApi({
2684
+ deleteEventSubSubscription: (params, options = {}) => this.callApi({
2677
2685
  path: "/eventsub/subscriptions",
2678
2686
  method: "DELETE",
2679
2687
  params,
@@ -2717,7 +2725,7 @@ var TwitchApi = class {
2717
2725
  *
2718
2726
  * @see https://dev.twitch.tv/docs/api/reference#get-eventsub-subscriptions
2719
2727
  */
2720
- getEventSubSubscriptions: async (params = null, options = {}) => this.callApi({
2728
+ getEventSubSubscriptions: (params = null, options = {}) => this.callApi({
2721
2729
  path: "/eventsub/subscriptions",
2722
2730
  params,
2723
2731
  options
@@ -2754,7 +2762,7 @@ var TwitchApi = class {
2754
2762
  *
2755
2763
  * @see https://dev.twitch.tv/docs/api/reference#get-top-games
2756
2764
  */
2757
- getTopGames: async (params = null, options = {}) => this.callApi({
2765
+ getTopGames: (params = null, options = {}) => this.callApi({
2758
2766
  path: "/games/top",
2759
2767
  params,
2760
2768
  options
@@ -2791,7 +2799,7 @@ var TwitchApi = class {
2791
2799
  *
2792
2800
  * @see https://dev.twitch.tv/docs/api/reference#get-games
2793
2801
  */
2794
- getGames: async (params = null, options = {}) => this.callApi({
2802
+ getGames: (params = null, options = {}) => this.callApi({
2795
2803
  path: "/games",
2796
2804
  params,
2797
2805
  options
@@ -2831,7 +2839,7 @@ var TwitchApi = class {
2831
2839
  *
2832
2840
  * @see https://dev.twitch.tv/docs/api/reference#get-creator-goals
2833
2841
  */
2834
- getCreatorGoals: async (params, options = {}) => this.callApi({
2842
+ getCreatorGoals: (params, options = {}) => this.callApi({
2835
2843
  path: "/goals",
2836
2844
  params,
2837
2845
  options
@@ -2865,7 +2873,7 @@ var TwitchApi = class {
2865
2873
  *
2866
2874
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-guest-star-settings
2867
2875
  */
2868
- getChannelGuestStarSettings: async (params, options = {}) => this.callApi({
2876
+ getChannelGuestStarSettings: (params, options = {}) => this.callApi({
2869
2877
  path: "/guest_star/channel_settings",
2870
2878
  params,
2871
2879
  options
@@ -2896,7 +2904,7 @@ var TwitchApi = class {
2896
2904
  *
2897
2905
  * @see https://dev.twitch.tv/docs/api/reference#update-channel-guest-star-settings
2898
2906
  */
2899
- updateChannelGuestStarSettings: async (params, body = null, options = {}) => this.callApi({
2907
+ updateChannelGuestStarSettings: (params, body = null, options = {}) => this.callApi({
2900
2908
  path: "/guest_star/channel_settings",
2901
2909
  method: "PUT",
2902
2910
  params,
@@ -2930,7 +2938,7 @@ var TwitchApi = class {
2930
2938
  *
2931
2939
  * @see https://dev.twitch.tv/docs/api/reference#get-guest-star-session
2932
2940
  */
2933
- getGuestStarSession: async (params, options = {}) => this.callApi({
2941
+ getGuestStarSession: (params, options = {}) => this.callApi({
2934
2942
  path: "/guest_star/session",
2935
2943
  params,
2936
2944
  options
@@ -2966,7 +2974,7 @@ var TwitchApi = class {
2966
2974
  *
2967
2975
  * @see https://dev.twitch.tv/docs/api/reference#create-guest-star-session
2968
2976
  */
2969
- createGuestStarSession: async (params, options = {}) => this.callApi({
2977
+ createGuestStarSession: (params, options = {}) => this.callApi({
2970
2978
  path: "/guest_star/session",
2971
2979
  method: "POST",
2972
2980
  params,
@@ -3000,7 +3008,7 @@ var TwitchApi = class {
3000
3008
  *
3001
3009
  * @see https://dev.twitch.tv/docs/api/reference#end-guest-star-session
3002
3010
  */
3003
- endGuestStarSession: async (params, options = {}) => this.callApi({
3011
+ endGuestStarSession: (params, options = {}) => this.callApi({
3004
3012
  path: "/guest_star/session",
3005
3013
  method: "DELETE",
3006
3014
  params,
@@ -3029,7 +3037,7 @@ var TwitchApi = class {
3029
3037
  *
3030
3038
  * @see https://dev.twitch.tv/docs/api/reference#get-guest-star-invites
3031
3039
  */
3032
- getGuestStarInvites: async (params, options = {}) => this.callApi({
3040
+ getGuestStarInvites: (params, options = {}) => this.callApi({
3033
3041
  path: "/guest_star/invites",
3034
3042
  params,
3035
3043
  options
@@ -3065,7 +3073,7 @@ var TwitchApi = class {
3065
3073
  *
3066
3074
  * @see https://dev.twitch.tv/docs/api/reference#send-guest-star-invite
3067
3075
  */
3068
- sendGuestStarInvite: async (params, options = {}) => this.callApi({
3076
+ sendGuestStarInvite: (params, options = {}) => this.callApi({
3069
3077
  path: "/guest_star/invites",
3070
3078
  method: "POST",
3071
3079
  params,
@@ -3100,7 +3108,7 @@ var TwitchApi = class {
3100
3108
  *
3101
3109
  * @see https://dev.twitch.tv/docs/api/reference#delete-guest-star-invite
3102
3110
  */
3103
- deleteGuestStarInvite: async (params, options = {}) => this.callApi({
3111
+ deleteGuestStarInvite: (params, options = {}) => this.callApi({
3104
3112
  path: "/guest_star/invites",
3105
3113
  method: "DELETE",
3106
3114
  params,
@@ -3145,7 +3153,7 @@ var TwitchApi = class {
3145
3153
  *
3146
3154
  * @see https://dev.twitch.tv/docs/api/reference#assign-guest-star-slot
3147
3155
  */
3148
- assignGuestStarSlot: async (params, options = {}) => this.callApi({
3156
+ assignGuestStarSlot: (params, options = {}) => this.callApi({
3149
3157
  path: "/guest_star/slot",
3150
3158
  method: "POST",
3151
3159
  params,
@@ -3177,7 +3185,7 @@ var TwitchApi = class {
3177
3185
  *
3178
3186
  * @see https://dev.twitch.tv/docs/api/reference#update-guest-star-slot
3179
3187
  */
3180
- updateGuestStarSlot: async (params, options = {}) => this.callApi({
3188
+ updateGuestStarSlot: (params, options = {}) => this.callApi({
3181
3189
  path: "/guest_star/slot",
3182
3190
  method: "PATCH",
3183
3191
  params,
@@ -3219,7 +3227,7 @@ var TwitchApi = class {
3219
3227
  *
3220
3228
  * @see https://dev.twitch.tv/docs/api/reference#delete-guest-star-slot
3221
3229
  */
3222
- deleteGuestStarSlot: async (params, options = {}) => this.callApi({
3230
+ deleteGuestStarSlot: (params, options = {}) => this.callApi({
3223
3231
  path: "/guest_star/slot",
3224
3232
  method: "DELETE",
3225
3233
  params,
@@ -3257,7 +3265,7 @@ var TwitchApi = class {
3257
3265
  *
3258
3266
  * @see https://dev.twitch.tv/docs/api/reference#update-guest-star-slot-settings
3259
3267
  */
3260
- updateGuestStarSlotSettings: async (params, options = {}) => this.callApi({
3268
+ updateGuestStarSlotSettings: (params, options = {}) => this.callApi({
3261
3269
  path: "/guest_star/slot_settings",
3262
3270
  method: "PATCH",
3263
3271
  params,
@@ -3294,7 +3302,7 @@ var TwitchApi = class {
3294
3302
  *
3295
3303
  * @see https://dev.twitch.tv/docs/api/reference#get-hype-train-events
3296
3304
  */
3297
- getHypeTrainEvents: async (params, options = {}) => this.callApi({
3305
+ getHypeTrainEvents: (params, options = {}) => this.callApi({
3298
3306
  path: "/hypetrain/events",
3299
3307
  params,
3300
3308
  options
@@ -3355,7 +3363,7 @@ var TwitchApi = class {
3355
3363
  *
3356
3364
  * @see https://dev.twitch.tv/docs/api/reference#check-automod-status
3357
3365
  */
3358
- checkAutoModStatus: async (params, body, options = {}) => this.callApi({
3366
+ checkAutoModStatus: (params, body, options = {}) => this.callApi({
3359
3367
  path: "/moderation/enforcements/status",
3360
3368
  method: "POST",
3361
3369
  params,
@@ -3406,7 +3414,7 @@ var TwitchApi = class {
3406
3414
  *
3407
3415
  * @see https://dev.twitch.tv/docs/api/reference#manage-held-automod-messages
3408
3416
  */
3409
- manageHeldAutoModMessages: async (body, options = {}) => this.callApi({
3417
+ manageHeldAutoModMessages: (body, options = {}) => this.callApi({
3410
3418
  path: "/moderation/automod/message",
3411
3419
  method: "POST",
3412
3420
  body,
@@ -3448,7 +3456,7 @@ var TwitchApi = class {
3448
3456
  *
3449
3457
  * @see https://dev.twitch.tv/docs/api/reference#get-automod-settings
3450
3458
  */
3451
- getAutoModSettings: async (params, options = {}) => this.callApi({
3459
+ getAutoModSettings: (params, options = {}) => this.callApi({
3452
3460
  path: "/moderation/automod/settings",
3453
3461
  params,
3454
3462
  options
@@ -3505,7 +3513,7 @@ var TwitchApi = class {
3505
3513
  *
3506
3514
  * @see https://dev.twitch.tv/docs/api/reference#update-automod-settings
3507
3515
  */
3508
- updateAutoModSettings: async (params, body = null, options = {}) => this.callApi({
3516
+ updateAutoModSettings: (params, body = null, options = {}) => this.callApi({
3509
3517
  path: "/moderation/automod/settings",
3510
3518
  method: "PUT",
3511
3519
  params,
@@ -3543,7 +3551,7 @@ var TwitchApi = class {
3543
3551
  *
3544
3552
  * @see https://dev.twitch.tv/docs/api/reference#get-banned-users
3545
3553
  */
3546
- getBannedUsers: async (params, options = {}) => this.callApi({
3554
+ getBannedUsers: (params, options = {}) => this.callApi({
3547
3555
  path: "/moderation/banned",
3548
3556
  params,
3549
3557
  options
@@ -3604,7 +3612,7 @@ var TwitchApi = class {
3604
3612
  *
3605
3613
  * @see https://dev.twitch.tv/docs/api/reference#ban-user
3606
3614
  */
3607
- banUser: async (params, body, options = {}) => this.callApi({
3615
+ banUser: (params, body, options = {}) => this.callApi({
3608
3616
  path: "/moderation/bans",
3609
3617
  method: "POST",
3610
3618
  params,
@@ -3659,14 +3667,14 @@ var TwitchApi = class {
3659
3667
  *
3660
3668
  * @see https://dev.twitch.tv/docs/api/reference#unban-user
3661
3669
  */
3662
- unbanUser: async (params, options = {}) => this.callApi({
3670
+ unbanUser: (params, options = {}) => this.callApi({
3663
3671
  path: "/moderation/bans",
3664
3672
  method: "DELETE",
3665
3673
  params,
3666
3674
  options
3667
3675
  }),
3668
3676
  /**
3669
- * BETA Gets a list of unban requests for a broadcaster’s channel.
3677
+ * NEW Gets a list of unban requests for a broadcaster’s channel.
3670
3678
  *
3671
3679
  * __Authorization:__
3672
3680
  *
@@ -3701,18 +3709,18 @@ var TwitchApi = class {
3701
3709
  *
3702
3710
  * @see https://dev.twitch.tv/docs/api/reference#get-unban-requests
3703
3711
  */
3704
- getUnbanRequests: async (params, options = {}) => this.callApi({
3712
+ getUnbanRequests: (params, options = {}) => this.callApi({
3705
3713
  path: "/moderation/unban_requests",
3706
3714
  params,
3707
3715
  options
3708
3716
  }),
3709
3717
  /**
3710
- * BETA Resolves an unban request by approving or denying it.
3718
+ * NEW Resolves an unban request by approving or denying it.
3711
3719
  *
3712
3720
  * __Authorization:__
3713
3721
  *
3714
- * * Requires a user access token that includes the **moderator:manage:unban\_requests** scope.
3715
- * * Query parameter `moderator_id` must match the `user_id` in the [user access token](https://dev.twitch.tv/docs/authentication/#user-access-tokens).
3722
+ * * Requires a user access token that includes the **moderator:manage:unban\\\_requests** scope.
3723
+ * * Query parameter `moderator_id` must match the `user_id` in the[user access token](https://dev.twitch.tv/docs/authentication/#user-access-tokens).
3716
3724
  *
3717
3725
  * __URL:__
3718
3726
  *
@@ -3748,7 +3756,7 @@ var TwitchApi = class {
3748
3756
  *
3749
3757
  * @see https://dev.twitch.tv/docs/api/reference#resolve-unban-requests
3750
3758
  */
3751
- resolveUnbanRequests: async (params, options = {}) => this.callApi({
3759
+ resolveUnbanRequests: (params, options = {}) => this.callApi({
3752
3760
  path: "/moderation/unban_requests",
3753
3761
  method: "PATCH",
3754
3762
  params,
@@ -3790,7 +3798,7 @@ var TwitchApi = class {
3790
3798
  *
3791
3799
  * @see https://dev.twitch.tv/docs/api/reference#get-blocked-terms
3792
3800
  */
3793
- getBlockedTerms: async (params, options = {}) => this.callApi({
3801
+ getBlockedTerms: (params, options = {}) => this.callApi({
3794
3802
  path: "/moderation/blocked_terms",
3795
3803
  params,
3796
3804
  options
@@ -3833,7 +3841,7 @@ var TwitchApi = class {
3833
3841
  *
3834
3842
  * @see https://dev.twitch.tv/docs/api/reference#add-blocked-term
3835
3843
  */
3836
- addBlockedTerm: async (params, body, options = {}) => this.callApi({
3844
+ addBlockedTerm: (params, body, options = {}) => this.callApi({
3837
3845
  path: "/moderation/blocked_terms",
3838
3846
  method: "POST",
3839
3847
  params,
@@ -3877,7 +3885,7 @@ var TwitchApi = class {
3877
3885
  *
3878
3886
  * @see https://dev.twitch.tv/docs/api/reference#remove-blocked-term
3879
3887
  */
3880
- removeBlockedTerm: async (params, options = {}) => this.callApi({
3888
+ removeBlockedTerm: (params, options = {}) => this.callApi({
3881
3889
  path: "/moderation/blocked_terms",
3882
3890
  method: "DELETE",
3883
3891
  params,
@@ -3923,7 +3931,7 @@ var TwitchApi = class {
3923
3931
  *
3924
3932
  * @see https://dev.twitch.tv/docs/api/reference#delete-chat-messages
3925
3933
  */
3926
- deleteChatMessages: async (params, options = {}) => this.callApi({
3934
+ deleteChatMessages: (params, options = {}) => this.callApi({
3927
3935
  path: "/moderation/chat",
3928
3936
  method: "DELETE",
3929
3937
  params,
@@ -3955,7 +3963,7 @@ var TwitchApi = class {
3955
3963
  *
3956
3964
  * @see https://dev.twitch.tv/docs/api/reference#get-moderated-channels
3957
3965
  */
3958
- getModeratedChannels: async (params, options = {}) => this.callApi({
3966
+ getModeratedChannels: (params, options = {}) => this.callApi({
3959
3967
  path: "/moderation/channels",
3960
3968
  params,
3961
3969
  options
@@ -3991,7 +3999,7 @@ var TwitchApi = class {
3991
3999
  *
3992
4000
  * @see https://dev.twitch.tv/docs/api/reference#get-moderators
3993
4001
  */
3994
- getModerators: async (params, options = {}) => this.callApi({
4002
+ getModerators: (params, options = {}) => this.callApi({
3995
4003
  path: "/moderation/moderators",
3996
4004
  params,
3997
4005
  options
@@ -4040,7 +4048,7 @@ var TwitchApi = class {
4040
4048
  *
4041
4049
  * @see https://dev.twitch.tv/docs/api/reference#add-channel-moderator
4042
4050
  */
4043
- addChannelModerator: async (params, options = {}) => this.callApi({
4051
+ addChannelModerator: (params, options = {}) => this.callApi({
4044
4052
  path: "/moderation/moderators",
4045
4053
  method: "POST",
4046
4054
  params,
@@ -4085,7 +4093,7 @@ var TwitchApi = class {
4085
4093
  *
4086
4094
  * @see https://dev.twitch.tv/docs/api/reference#remove-channel-moderator
4087
4095
  */
4088
- removeChannelModerator: async (params, options = {}) => this.callApi({
4096
+ removeChannelModerator: (params, options = {}) => this.callApi({
4089
4097
  path: "/moderation/moderators",
4090
4098
  method: "DELETE",
4091
4099
  params,
@@ -4124,7 +4132,7 @@ var TwitchApi = class {
4124
4132
  *
4125
4133
  * @see https://dev.twitch.tv/docs/api/reference#get-vips
4126
4134
  */
4127
- getVIPs: async (params, options = {}) => this.callApi({
4135
+ getVIPs: (params, options = {}) => this.callApi({
4128
4136
  path: "/channels/vips",
4129
4137
  params,
4130
4138
  options
@@ -4190,7 +4198,7 @@ var TwitchApi = class {
4190
4198
  *
4191
4199
  * @see https://dev.twitch.tv/docs/api/reference#add-channel-vip
4192
4200
  */
4193
- addChannelVIP: async (params, options = {}) => this.callApi({
4201
+ addChannelVIP: (params, options = {}) => this.callApi({
4194
4202
  path: "/channels/vips",
4195
4203
  method: "POST",
4196
4204
  params,
@@ -4249,7 +4257,7 @@ var TwitchApi = class {
4249
4257
  *
4250
4258
  * @see https://dev.twitch.tv/docs/api/reference#remove-channel-vip
4251
4259
  */
4252
- removeChannelVIP: async (params, options = {}) => this.callApi({
4260
+ removeChannelVIP: (params, options = {}) => this.callApi({
4253
4261
  path: "/channels/vips",
4254
4262
  method: "DELETE",
4255
4263
  params,
@@ -4295,7 +4303,7 @@ var TwitchApi = class {
4295
4303
  *
4296
4304
  * @see https://dev.twitch.tv/docs/api/reference#update-shield-mode-status
4297
4305
  */
4298
- updateShieldModeStatus: async (params, body, options = {}) => this.callApi({
4306
+ updateShieldModeStatus: (params, body, options = {}) => this.callApi({
4299
4307
  path: "/moderation/shield_mode",
4300
4308
  method: "PUT",
4301
4309
  params,
@@ -4340,10 +4348,69 @@ var TwitchApi = class {
4340
4348
  *
4341
4349
  * @see https://dev.twitch.tv/docs/api/reference#get-shield-mode-status
4342
4350
  */
4343
- getShieldModeStatus: async (params, options = {}) => this.callApi({
4351
+ getShieldModeStatus: (params, options = {}) => this.callApi({
4344
4352
  path: "/moderation/shield_mode",
4345
4353
  params,
4346
4354
  options
4355
+ }),
4356
+ /**
4357
+ * 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).
4358
+ *
4359
+ * __Authorization:__
4360
+ *
4361
+ * 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).
4362
+ *
4363
+ * __URL:__
4364
+ *
4365
+ * `POST https://api.twitch.tv/helix/moderation/warnings`
4366
+ *
4367
+ * __Response Codes:__
4368
+ *
4369
+ * _200 OK_
4370
+ *
4371
+ * Successfully warn a user.
4372
+ *
4373
+ * _400 Bad Request_
4374
+ *
4375
+ * * The _broadcaster\_id_ query parameter is required.
4376
+ * * The _moderator\_id_ query parameter is required.
4377
+ * * The _user\_id_ query parameter is required.
4378
+ * * The _reason_ query parameter is required.
4379
+ * * The text in the _reason_ field is too long.
4380
+ * * The user specified in the _user\_id_ may not be warned.
4381
+ *
4382
+ * _401 Unauthorized_
4383
+ *
4384
+ * * The ID in _moderator\_id_ must match the user ID in the user access token.
4385
+ * * The Authorization header is required and must contain a user access token.
4386
+ * * The user access token must include the **moderator:manage:warnings** scope.
4387
+ * * The access token is not valid.
4388
+ * * The client ID specified in the Client-Id header does not match the client ID specified in the access token.
4389
+ *
4390
+ * _403 Forbidden_
4391
+ *
4392
+ * The user in _moderator\_id_ is not one of the broadcaster’s moderators.
4393
+ *
4394
+ * _409 Conflict_
4395
+ *
4396
+ * 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.
4397
+ *
4398
+ * _429 Too Many Requests_
4399
+ *
4400
+ * The app has exceeded the number of requests it may make per minute for this broadcaster.
4401
+ *
4402
+ * _500 Internal Server Error_
4403
+ *
4404
+ * Internal Server Error.
4405
+ *
4406
+ * @see https://dev.twitch.tv/docs/api/reference#warn-chat-user
4407
+ */
4408
+ warnChatUser: (params, body, options = {}) => this.callApi({
4409
+ path: "/moderation/warnings",
4410
+ method: "POST",
4411
+ params,
4412
+ body,
4413
+ options
4347
4414
  })
4348
4415
  };
4349
4416
  polls = {
@@ -4384,7 +4451,7 @@ var TwitchApi = class {
4384
4451
  *
4385
4452
  * @see https://dev.twitch.tv/docs/api/reference#get-polls
4386
4453
  */
4387
- getPolls: async (params, options = {}) => this.callApi({
4454
+ getPolls: (params, options = {}) => this.callApi({
4388
4455
  path: "/polls",
4389
4456
  params,
4390
4457
  options
@@ -4433,7 +4500,7 @@ var TwitchApi = class {
4433
4500
  *
4434
4501
  * @see https://dev.twitch.tv/docs/api/reference#create-poll
4435
4502
  */
4436
- createPoll: async (body, options = {}) => this.callApi({
4503
+ createPoll: (body, options = {}) => this.callApi({
4437
4504
  path: "/polls",
4438
4505
  method: "POST",
4439
4506
  body,
@@ -4474,7 +4541,7 @@ var TwitchApi = class {
4474
4541
  *
4475
4542
  * @see https://dev.twitch.tv/docs/api/reference#end-poll
4476
4543
  */
4477
- endPoll: async (body, options = {}) => this.callApi({
4544
+ endPoll: (body, options = {}) => this.callApi({
4478
4545
  path: "/polls",
4479
4546
  method: "PATCH",
4480
4547
  body,
@@ -4513,7 +4580,7 @@ var TwitchApi = class {
4513
4580
  *
4514
4581
  * @see https://dev.twitch.tv/docs/api/reference#get-predictions
4515
4582
  */
4516
- getPredictions: async (params, options = {}) => this.callApi({
4583
+ getPredictions: (params, options = {}) => this.callApi({
4517
4584
  path: "/predictions",
4518
4585
  params,
4519
4586
  options
@@ -4562,7 +4629,7 @@ var TwitchApi = class {
4562
4629
  *
4563
4630
  * @see https://dev.twitch.tv/docs/api/reference#create-prediction
4564
4631
  */
4565
- createPrediction: async (body, options = {}) => this.callApi({
4632
+ createPrediction: (body, options = {}) => this.callApi({
4566
4633
  path: "/predictions",
4567
4634
  method: "POST",
4568
4635
  body,
@@ -4610,7 +4677,7 @@ var TwitchApi = class {
4610
4677
  *
4611
4678
  * @see https://dev.twitch.tv/docs/api/reference#end-prediction
4612
4679
  */
4613
- endPrediction: async (body, options = {}) => this.callApi({
4680
+ endPrediction: (body, options = {}) => this.callApi({
4614
4681
  path: "/predictions",
4615
4682
  method: "PATCH",
4616
4683
  body,
@@ -4674,7 +4741,7 @@ var TwitchApi = class {
4674
4741
  *
4675
4742
  * @see https://dev.twitch.tv/docs/api/reference#start-a-raid
4676
4743
  */
4677
- startRaid: async (params = null, options = {}) => this.callApi({
4744
+ startRaid: (params = null, options = {}) => this.callApi({
4678
4745
  path: "/raids",
4679
4746
  method: "POST",
4680
4747
  params,
@@ -4723,7 +4790,7 @@ var TwitchApi = class {
4723
4790
  *
4724
4791
  * @see https://dev.twitch.tv/docs/api/reference#cancel-a-raid
4725
4792
  */
4726
- cancelRaid: async (params, options = {}) => this.callApi({
4793
+ cancelRaid: (params, options = {}) => this.callApi({
4727
4794
  path: "/raids",
4728
4795
  method: "DELETE",
4729
4796
  params,
@@ -4771,7 +4838,7 @@ var TwitchApi = class {
4771
4838
  *
4772
4839
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-stream-schedule
4773
4840
  */
4774
- getChannelStreamSchedule: async (params, options = {}) => this.callApi({
4841
+ getChannelStreamSchedule: (params, options = {}) => this.callApi({
4775
4842
  path: "/schedule",
4776
4843
  params,
4777
4844
  options
@@ -4806,7 +4873,7 @@ var TwitchApi = class {
4806
4873
  *
4807
4874
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-icalendar
4808
4875
  */
4809
- getChannelICalendar: async (params, options = {}) => this.callApi({
4876
+ getChannelICalendar: (params, options = {}) => this.callApi({
4810
4877
  path: "/schedule/icalendar",
4811
4878
  params,
4812
4879
  options
@@ -4850,7 +4917,7 @@ var TwitchApi = class {
4850
4917
  *
4851
4918
  * @see https://dev.twitch.tv/docs/api/reference#update-channel-stream-schedule
4852
4919
  */
4853
- updateChannelStreamSchedule: async (params, options = {}) => this.callApi({
4920
+ updateChannelStreamSchedule: (params, options = {}) => this.callApi({
4854
4921
  path: "/schedule/settings",
4855
4922
  method: "PATCH",
4856
4923
  params,
@@ -4897,7 +4964,7 @@ var TwitchApi = class {
4897
4964
  *
4898
4965
  * @see https://dev.twitch.tv/docs/api/reference#create-channel-stream-schedule-segment
4899
4966
  */
4900
- createChannelStreamScheduleSegment: async (params, body, options = {}) => this.callApi({
4967
+ createChannelStreamScheduleSegment: (params, body, options = {}) => this.callApi({
4901
4968
  path: "/schedule/segment",
4902
4969
  method: "POST",
4903
4970
  params,
@@ -4949,7 +5016,7 @@ var TwitchApi = class {
4949
5016
  *
4950
5017
  * @see https://dev.twitch.tv/docs/api/reference#update-channel-stream-schedule-segment
4951
5018
  */
4952
- updateChannelStreamScheduleSegment: async (params, body = null, options = {}) => this.callApi({
5019
+ updateChannelStreamScheduleSegment: (params, body = null, options = {}) => this.callApi({
4953
5020
  path: "/schedule/segment",
4954
5021
  method: "PATCH",
4955
5022
  params,
@@ -4992,7 +5059,7 @@ var TwitchApi = class {
4992
5059
  *
4993
5060
  * @see https://dev.twitch.tv/docs/api/reference#delete-channel-stream-schedule-segment
4994
5061
  */
4995
- deleteChannelStreamScheduleSegment: async (params, options = {}) => this.callApi({
5062
+ deleteChannelStreamScheduleSegment: (params, options = {}) => this.callApi({
4996
5063
  path: "/schedule/segment",
4997
5064
  method: "DELETE",
4998
5065
  params,
@@ -5031,7 +5098,7 @@ var TwitchApi = class {
5031
5098
  *
5032
5099
  * @see https://dev.twitch.tv/docs/api/reference#search-categories
5033
5100
  */
5034
- searchCategories: async (params, options = {}) => this.callApi({
5101
+ searchCategories: (params, options = {}) => this.callApi({
5035
5102
  path: "/search/categories",
5036
5103
  params,
5037
5104
  options
@@ -5071,7 +5138,7 @@ var TwitchApi = class {
5071
5138
  *
5072
5139
  * @see https://dev.twitch.tv/docs/api/reference#search-channels
5073
5140
  */
5074
- searchChannels: async (params, options = {}) => this.callApi({
5141
+ searchChannels: (params, options = {}) => this.callApi({
5075
5142
  path: "/search/channels",
5076
5143
  params,
5077
5144
  options
@@ -5110,7 +5177,7 @@ var TwitchApi = class {
5110
5177
  *
5111
5178
  * @see https://dev.twitch.tv/docs/api/reference#get-stream-key
5112
5179
  */
5113
- getStreamKey: async (params, options = {}) => this.callApi({
5180
+ getStreamKey: (params, options = {}) => this.callApi({
5114
5181
  path: "/streams/key",
5115
5182
  params,
5116
5183
  options
@@ -5144,7 +5211,7 @@ var TwitchApi = class {
5144
5211
  *
5145
5212
  * @see https://dev.twitch.tv/docs/api/reference#get-streams
5146
5213
  */
5147
- getStreams: async (params = null, options = {}) => this.callApi({
5214
+ getStreams: (params = null, options = {}) => this.callApi({
5148
5215
  path: "/streams",
5149
5216
  params,
5150
5217
  options
@@ -5180,7 +5247,7 @@ var TwitchApi = class {
5180
5247
  *
5181
5248
  * @see https://dev.twitch.tv/docs/api/reference#get-followed-streams
5182
5249
  */
5183
- getFollowedStreams: async (params, options = {}) => this.callApi({
5250
+ getFollowedStreams: (params, options = {}) => this.callApi({
5184
5251
  path: "/streams/followed",
5185
5252
  params,
5186
5253
  options
@@ -5233,7 +5300,7 @@ var TwitchApi = class {
5233
5300
  *
5234
5301
  * @see https://dev.twitch.tv/docs/api/reference#create-stream-marker
5235
5302
  */
5236
- createStreamMarker: async (body, options = {}) => this.callApi({
5303
+ createStreamMarker: (body, options = {}) => this.callApi({
5237
5304
  path: "/streams/markers",
5238
5305
  method: "POST",
5239
5306
  body,
@@ -5277,7 +5344,7 @@ var TwitchApi = class {
5277
5344
  *
5278
5345
  * @see https://dev.twitch.tv/docs/api/reference#get-stream-markers
5279
5346
  */
5280
- getStreamMarkers: async (params = null, options = {}) => this.callApi({
5347
+ getStreamMarkers: (params = null, options = {}) => this.callApi({
5281
5348
  path: "/streams/markers",
5282
5349
  params,
5283
5350
  options
@@ -5317,7 +5384,7 @@ var TwitchApi = class {
5317
5384
  *
5318
5385
  * @see https://dev.twitch.tv/docs/api/reference#get-broadcaster-subscriptions
5319
5386
  */
5320
- getBroadcasterSubscriptions: async (params, options = {}) => this.callApi({
5387
+ getBroadcasterSubscriptions: (params, options = {}) => this.callApi({
5321
5388
  path: "/subscriptions",
5322
5389
  params,
5323
5390
  options
@@ -5360,7 +5427,7 @@ var TwitchApi = class {
5360
5427
  *
5361
5428
  * @see https://dev.twitch.tv/docs/api/reference#check-user-subscription
5362
5429
  */
5363
- checkUserSubscription: async (params, options = {}) => this.callApi({
5430
+ checkUserSubscription: (params, options = {}) => this.callApi({
5364
5431
  path: "/subscriptions/user",
5365
5432
  params,
5366
5433
  options
@@ -5399,7 +5466,7 @@ var TwitchApi = class {
5399
5466
  *
5400
5467
  * @see https://dev.twitch.tv/docs/api/reference#get-all-stream-tags
5401
5468
  */
5402
- getAllStreamTags: async (params = null, options = {}) => this.callApi({
5469
+ getAllStreamTags: (params = null, options = {}) => this.callApi({
5403
5470
  path: "/tags/streams",
5404
5471
  params,
5405
5472
  options
@@ -5436,7 +5503,7 @@ var TwitchApi = class {
5436
5503
  *
5437
5504
  * @see https://dev.twitch.tv/docs/api/reference#get-stream-tags
5438
5505
  */
5439
- getStreamTags: async (params, options = {}) => this.callApi({
5506
+ getStreamTags: (params, options = {}) => this.callApi({
5440
5507
  path: "/streams/tags",
5441
5508
  params,
5442
5509
  options
@@ -5476,7 +5543,7 @@ var TwitchApi = class {
5476
5543
  *
5477
5544
  * @see https://dev.twitch.tv/docs/api/reference#get-channel-teams
5478
5545
  */
5479
- getChannelTeams: async (params, options = {}) => this.callApi({
5546
+ getChannelTeams: (params, options = {}) => this.callApi({
5480
5547
  path: "/teams/channel",
5481
5548
  params,
5482
5549
  options
@@ -5516,7 +5583,7 @@ var TwitchApi = class {
5516
5583
  *
5517
5584
  * @see https://dev.twitch.tv/docs/api/reference#get-teams
5518
5585
  */
5519
- getTeams: async (params = null, options = {}) => this.callApi({
5586
+ getTeams: (params = null, options = {}) => this.callApi({
5520
5587
  path: "/teams",
5521
5588
  params,
5522
5589
  options
@@ -5544,12 +5611,12 @@ var TwitchApi = class {
5544
5611
  *
5545
5612
  * _200 OK_
5546
5613
  *
5547
- * Successfully retrieved the specified users' information.
5614
+ * Successfully retrieved the specified users’ information.
5548
5615
  *
5549
5616
  * _400 Bad Request_
5550
5617
  *
5551
- * * The _id_ or _login_ query parameter is required unless the request uses a user access token.
5552
- * * The request exceeded the maximum allowed number of _id_ and/or _login_ query parameters.
5618
+ * * The \*id\* or \*login\* query parameter is required unless the request uses a user access token.
5619
+ * * The request exceeded the maximum allowed number of \*id\* and/or \*login\* query parameters.
5553
5620
  *
5554
5621
  * _401 Unauthorized_
5555
5622
  *
@@ -5559,7 +5626,7 @@ var TwitchApi = class {
5559
5626
  *
5560
5627
  * @see https://dev.twitch.tv/docs/api/reference#get-users
5561
5628
  */
5562
- getUsers: async (params = null, options = {}) => this.callApi({
5629
+ getUsers: (params = null, options = {}) => this.callApi({
5563
5630
  path: "/users",
5564
5631
  params,
5565
5632
  options
@@ -5596,7 +5663,7 @@ var TwitchApi = class {
5596
5663
  *
5597
5664
  * @see https://dev.twitch.tv/docs/api/reference#update-user
5598
5665
  */
5599
- updateUser: async (params = null, options = {}) => this.callApi({
5666
+ updateUser: (params = null, options = {}) => this.callApi({
5600
5667
  path: "/users",
5601
5668
  method: "PUT",
5602
5669
  params,
@@ -5633,7 +5700,7 @@ var TwitchApi = class {
5633
5700
  *
5634
5701
  * @see https://dev.twitch.tv/docs/api/reference#get-user-block-list
5635
5702
  */
5636
- getUserBlockList: async (params, options = {}) => this.callApi({
5703
+ getUserBlockList: (params, options = {}) => this.callApi({
5637
5704
  path: "/users/blocks",
5638
5705
  params,
5639
5706
  options
@@ -5673,7 +5740,7 @@ var TwitchApi = class {
5673
5740
  *
5674
5741
  * @see https://dev.twitch.tv/docs/api/reference#block-user
5675
5742
  */
5676
- blockUser: async (params, options = {}) => this.callApi({
5743
+ blockUser: (params, options = {}) => this.callApi({
5677
5744
  path: "/users/blocks",
5678
5745
  method: "PUT",
5679
5746
  params,
@@ -5709,7 +5776,7 @@ var TwitchApi = class {
5709
5776
  *
5710
5777
  * @see https://dev.twitch.tv/docs/api/reference#unblock-user
5711
5778
  */
5712
- unblockUser: async (params, options = {}) => this.callApi({
5779
+ unblockUser: (params, options = {}) => this.callApi({
5713
5780
  path: "/users/blocks",
5714
5781
  method: "DELETE",
5715
5782
  params,
@@ -5741,7 +5808,7 @@ var TwitchApi = class {
5741
5808
  *
5742
5809
  * @see https://dev.twitch.tv/docs/api/reference#get-user-extensions
5743
5810
  */
5744
- getUserExtensions: async (options = {}) => this.callApi({
5811
+ getUserExtensions: (options = {}) => this.callApi({
5745
5812
  path: "/users/extensions/list",
5746
5813
  options
5747
5814
  }),
@@ -5776,7 +5843,7 @@ var TwitchApi = class {
5776
5843
  *
5777
5844
  * @see https://dev.twitch.tv/docs/api/reference#get-user-active-extensions
5778
5845
  */
5779
- getUserActiveExtensions: async (params = null, options = {}) => this.callApi({
5846
+ getUserActiveExtensions: (params = null, options = {}) => this.callApi({
5780
5847
  path: "/users/extensions",
5781
5848
  params,
5782
5849
  options
@@ -5817,7 +5884,7 @@ var TwitchApi = class {
5817
5884
  *
5818
5885
  * @see https://dev.twitch.tv/docs/api/reference#update-user-extensions
5819
5886
  */
5820
- updateUserExtensions: async (body, options = {}) => this.callApi({
5887
+ updateUserExtensions: (body, options = {}) => this.callApi({
5821
5888
  path: "/users/extensions",
5822
5889
  method: "PUT",
5823
5890
  body,
@@ -5867,7 +5934,7 @@ var TwitchApi = class {
5867
5934
  *
5868
5935
  * @see https://dev.twitch.tv/docs/api/reference#get-videos
5869
5936
  */
5870
- getVideos: async (params = null, options = {}) => this.callApi({
5937
+ getVideos: (params = null, options = {}) => this.callApi({
5871
5938
  path: "/videos",
5872
5939
  params,
5873
5940
  options
@@ -5904,7 +5971,7 @@ var TwitchApi = class {
5904
5971
  *
5905
5972
  * @see https://dev.twitch.tv/docs/api/reference#delete-videos
5906
5973
  */
5907
- deleteVideos: async (params, options = {}) => this.callApi({
5974
+ deleteVideos: (params, options = {}) => this.callApi({
5908
5975
  path: "/videos",
5909
5976
  method: "DELETE",
5910
5977
  params,
@@ -5968,7 +6035,7 @@ var TwitchApi = class {
5968
6035
  *
5969
6036
  * @see https://dev.twitch.tv/docs/api/reference#send-whisper
5970
6037
  */
5971
- sendWhisper: async (params, body, options = {}) => this.callApi({
6038
+ sendWhisper: (params, body, options = {}) => this.callApi({
5972
6039
  path: "/whispers",
5973
6040
  method: "POST",
5974
6041
  params,