steamutils 1.5.7 → 1.5.9

Sign up to get free protection for your applications and to get access to all the features.
package/race.js ADDED
@@ -0,0 +1,2241 @@
1
+ import axios from "axios";
2
+ import SteamUser, { ELanguage } from "./index.js";
3
+ import CookieManager from "./CookieManager.js";
4
+ import RemoteSteamUser from "./remote.js";
5
+
6
+ function getAppURL() {
7
+ if (!RemoteSteamUser.__appIndex) {
8
+ RemoteSteamUser.__appIndex = 0;
9
+ }
10
+ RemoteSteamUser.__appIndex++;
11
+ if (RemoteSteamUser.__appIndex >= RemoteSteamUser.__apps.length) {
12
+ RemoteSteamUser.__appIndex = 0;
13
+ }
14
+ return RemoteSteamUser.__apps[RemoteSteamUser.__appIndex];
15
+ }
16
+
17
+ function formatParams(__params, __cookies) {
18
+ if (__params.length === 1 && __params[0] === undefined) {
19
+ __params.length = 0;
20
+ }
21
+ if (__cookies) {
22
+ if (!Array.isArray(__cookies)) {
23
+ __cookies = [__cookies];
24
+ }
25
+ __cookies = __cookies.map(function (cookie) {
26
+ return cookie.toString();
27
+ });
28
+ }
29
+
30
+ return {
31
+ __params,
32
+ __cookies,
33
+ };
34
+ }
35
+
36
+ const MAX_RETRY = 5;
37
+
38
+ async function doRequest(config) {
39
+ for (let i = 0; i < MAX_RETRY; i++) {
40
+ let url = getAppURL();
41
+ url = [url.replace(/\/$/, ""), config.method].join("/");
42
+
43
+ try {
44
+ const response = await axios.post(url, config);
45
+
46
+ if (!response || !response.data) {
47
+ continue;
48
+ }
49
+
50
+ return response.data?.result;
51
+ } catch (e) {
52
+ /* empty */
53
+ }
54
+ }
55
+ }
56
+
57
+ export default class RaceSteamUser {
58
+ constructor(cookies, refreshCookie, onRefreshCookie) {
59
+ if (!Array.isArray(cookies)) {
60
+ cookies = [cookies];
61
+ }
62
+ this._refreshCookie = refreshCookie;
63
+ this._onRefreshCookie = onRefreshCookie;
64
+ this._cookies = cookies.map(function (cookie) {
65
+ return new CookieManager(cookie?.cookie || cookie);
66
+ });
67
+ const timezoneOffset = `${new Date().getTimezoneOffset() * -1 * 60},0`;
68
+ for (const cookie of this._cookies) {
69
+ cookie.setCookie("timezoneOffset", timezoneOffset);
70
+
71
+ let { steamMachineAuth, steamLoginSecure, steamRememberLogin, steamId, miniprofile, sessionid } = SteamUser.parseCookie(cookie.toString());
72
+
73
+ if (!sessionid) {
74
+ sessionid = SteamUser.generateSessionID();
75
+ cookie.setCookie("sessionid", sessionid);
76
+ }
77
+
78
+ this._sessionId = sessionid;
79
+ this._customURL = null;
80
+ this._steamIdUser = steamId;
81
+ this._miniProfileUser = miniprofile;
82
+ this._steamMachineAuth = steamMachineAuth;
83
+ this._steamLoginSecure = steamLoginSecure;
84
+ this._steamRememberLogin = steamRememberLogin;
85
+ }
86
+
87
+ this.setSteamLanguage(ELanguage.english);
88
+
89
+ if (!this._steamIdUser) {
90
+ console.error("Invalid cookie. Missing steamId");
91
+ }
92
+ }
93
+
94
+ setSteamLanguage(language) {
95
+ language = language?.toLowerCase();
96
+ if (!Object.hasOwn(ELanguage, language)) {
97
+ return;
98
+ }
99
+ this.Steam_Language = language;
100
+ this._cookies.forEach(function (cookie) {
101
+ cookie.setCookie("Steam_Language", language);
102
+ cookie.setCookie("strInventoryLastContext", "730_2");
103
+ });
104
+ }
105
+ getCookies(index = 0) {
106
+ return this._cookies[index].toString();
107
+ }
108
+ getSteamIdUser() {
109
+ return this._steamIdUser;
110
+ }
111
+ getMiniProfileUser() {
112
+ return this._miniProfileUser;
113
+ }
114
+ getSessionid() {
115
+ return this._sessionId;
116
+ }
117
+ getSteamMachineAuth() {
118
+ return this._steamMachineAuth;
119
+ }
120
+ getSteamUserProfileURL(steamId) {
121
+ return `profiles/${steamId}`;
122
+ }
123
+ getMyProfileURL() {
124
+ if (this._customURL) {
125
+ return `id/${this._customURL}`;
126
+ }
127
+ return "my";
128
+ }
129
+ async getUserSummary(steamId) {
130
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
131
+ const config = {
132
+ method: "getUserSummary",
133
+ params: __params,
134
+ cookies: __cookies,
135
+ is_static: false,
136
+ };
137
+ return await doRequest(config);
138
+ }
139
+ async getUserSummaryFromProfile(steamId) {
140
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
141
+ const config = {
142
+ method: "getUserSummaryFromProfile",
143
+ params: __params,
144
+ cookies: __cookies,
145
+ is_static: false,
146
+ };
147
+ return await doRequest(config);
148
+ }
149
+ async getQuickInviteData() {
150
+ const { __params, __cookies } = formatParams([], this._cookies);
151
+ const config = {
152
+ method: "getQuickInviteData",
153
+ params: __params,
154
+ cookies: __cookies,
155
+ is_static: false,
156
+ };
157
+ return await doRequest(config);
158
+ }
159
+ async getQuickInviteLink() {
160
+ const { __params, __cookies } = formatParams([], this._cookies);
161
+ const config = {
162
+ method: "getQuickInviteLink",
163
+ params: __params,
164
+ cookies: __cookies,
165
+ is_static: false,
166
+ };
167
+ return await doRequest(config);
168
+ }
169
+ async getCurrentQuickInviteTokens() {
170
+ const { __params, __cookies } = formatParams([], this._cookies);
171
+ const config = {
172
+ method: "getCurrentQuickInviteTokens",
173
+ params: __params,
174
+ cookies: __cookies,
175
+ is_static: false,
176
+ };
177
+ return await doRequest(config);
178
+ }
179
+ async acceptQuickInviteData(quickInviteData) {
180
+ const { __params, __cookies } = formatParams([quickInviteData], this._cookies);
181
+ const config = {
182
+ method: "acceptQuickInviteData",
183
+ params: __params,
184
+ cookies: __cookies,
185
+ is_static: false,
186
+ };
187
+ return await doRequest(config);
188
+ }
189
+ async acceptQuickInviteLink(quickInviteLink) {
190
+ const { __params, __cookies } = formatParams([quickInviteLink], this._cookies);
191
+ const config = {
192
+ method: "acceptQuickInviteLink",
193
+ params: __params,
194
+ cookies: __cookies,
195
+ is_static: false,
196
+ };
197
+ return await doRequest(config);
198
+ }
199
+ async _parseComments(html) {
200
+ const { __params, __cookies } = formatParams([html], this._cookies);
201
+ const config = {
202
+ method: "_parseComments",
203
+ params: __params,
204
+ cookies: __cookies,
205
+ is_static: false,
206
+ };
207
+ return await doRequest(config);
208
+ }
209
+ async getMyComments() {
210
+ const { __params, __cookies } = formatParams([], this._cookies);
211
+ const config = {
212
+ method: "getMyComments",
213
+ params: __params,
214
+ cookies: __cookies,
215
+ is_static: false,
216
+ };
217
+ return await doRequest(config);
218
+ }
219
+ async getUserComments(steamId) {
220
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
221
+ const config = {
222
+ method: "getUserComments",
223
+ params: __params,
224
+ cookies: __cookies,
225
+ is_static: false,
226
+ };
227
+ return await doRequest(config);
228
+ }
229
+ async getGroupOverview({ groupURL, gid, page, content_only, searchKey }) {
230
+ const { __params, __cookies } = formatParams([{ groupURL, gid, page, content_only, searchKey }], this._cookies);
231
+ const config = {
232
+ method: "getGroupOverview",
233
+ params: __params,
234
+ cookies: __cookies,
235
+ is_static: false,
236
+ };
237
+ return await doRequest(config);
238
+ }
239
+ async getGroupMembers({ groupURL, gid, page, link, content_only, searchKey }) {
240
+ const { __params, __cookies } = formatParams([{ groupURL, gid, page, link, content_only, searchKey }], this._cookies);
241
+ const config = {
242
+ method: "getGroupMembers",
243
+ params: __params,
244
+ cookies: __cookies,
245
+ is_static: false,
246
+ };
247
+ return await doRequest(config);
248
+ }
249
+ async getGroupMembersFull({ groupURL, gid, cookie, cbOnMember, cbOnMembers, content_only, searchKey }) {
250
+ const { __params, __cookies } = formatParams([{ groupURL, gid, cookie, cbOnMember, cbOnMembers, content_only, searchKey }], this._cookies);
251
+ const config = {
252
+ method: "getGroupMembersFull",
253
+ params: __params,
254
+ cookies: __cookies,
255
+ is_static: false,
256
+ };
257
+ return await doRequest(config);
258
+ }
259
+ async _parseFriendList(result) {
260
+ const { __params, __cookies } = formatParams([result], this._cookies);
261
+ const config = {
262
+ method: "_parseFriendList",
263
+ params: __params,
264
+ cookies: __cookies,
265
+ is_static: false,
266
+ };
267
+ return await doRequest(config);
268
+ }
269
+ async getFollowingPlayersList(steamId) {
270
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
271
+ const config = {
272
+ method: "getFollowingPlayersList",
273
+ params: __params,
274
+ cookies: __cookies,
275
+ is_static: false,
276
+ };
277
+ return await doRequest(config);
278
+ }
279
+ async getFriendsList(steamId) {
280
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
281
+ const config = {
282
+ method: "getFriendsList",
283
+ params: __params,
284
+ cookies: __cookies,
285
+ is_static: false,
286
+ };
287
+ return await doRequest(config);
288
+ }
289
+ async getMyFriendsIDList() {
290
+ const { __params, __cookies } = formatParams([], this._cookies);
291
+ const config = {
292
+ method: "getMyFriendsIDList",
293
+ params: __params,
294
+ cookies: __cookies,
295
+ is_static: false,
296
+ };
297
+ return await doRequest(config);
298
+ }
299
+ async getPendingFriendList() {
300
+ const { __params, __cookies } = formatParams([], this._cookies);
301
+ const config = {
302
+ method: "getPendingFriendList",
303
+ params: __params,
304
+ cookies: __cookies,
305
+ is_static: false,
306
+ };
307
+ return await doRequest(config);
308
+ }
309
+ async getMatchHistory_initial(matchHistoryType) {
310
+ const { __params, __cookies } = formatParams([matchHistoryType], this._cookies);
311
+ const config = {
312
+ method: "getMatchHistory_initial",
313
+ params: __params,
314
+ cookies: __cookies,
315
+ is_static: false,
316
+ };
317
+ return await doRequest(config);
318
+ }
319
+ async getClientJsToken(retry) {
320
+ const { __params, __cookies } = formatParams([retry], this._cookies);
321
+ const config = {
322
+ method: "getClientJsToken",
323
+ params: __params,
324
+ cookies: __cookies,
325
+ is_static: false,
326
+ };
327
+ return await doRequest(config);
328
+ }
329
+ async _getHistoryMatches(matchHistoryType, token) {
330
+ const { __params, __cookies } = formatParams([matchHistoryType, token], this._cookies);
331
+ const config = {
332
+ method: "_getHistoryMatches",
333
+ params: __params,
334
+ cookies: __cookies,
335
+ is_static: false,
336
+ };
337
+ return await doRequest(config);
338
+ }
339
+ async getFullHistoryMatches({ matchHistoryTypes, cbOnMatch, cbOnMatches, maxPage, Started_playing_CS_GO, shouldStop }) {
340
+ const { __params, __cookies } = formatParams([{ matchHistoryTypes, cbOnMatch, cbOnMatches, maxPage, Started_playing_CS_GO, shouldStop }], this._cookies);
341
+ const config = {
342
+ method: "getFullHistoryMatches",
343
+ params: __params,
344
+ cookies: __cookies,
345
+ is_static: false,
346
+ };
347
+ return await doRequest(config);
348
+ }
349
+ async _getFullHistoryMatches({ matchHistoryType, cbOnMatch, cbOnMatches, maxPage, Started_playing_CS_GO, shouldStop }) {
350
+ const { __params, __cookies } = formatParams([{ matchHistoryType, cbOnMatch, cbOnMatches, maxPage, Started_playing_CS_GO, shouldStop }], this._cookies);
351
+ const config = {
352
+ method: "_getFullHistoryMatches",
353
+ params: __params,
354
+ cookies: __cookies,
355
+ is_static: false,
356
+ };
357
+ return await doRequest(config);
358
+ }
359
+ async followUser(steamId) {
360
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
361
+ const config = {
362
+ method: "followUser",
363
+ params: __params,
364
+ cookies: __cookies,
365
+ is_static: false,
366
+ };
367
+ return await doRequest(config);
368
+ }
369
+ async unfollowUser(steamId) {
370
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
371
+ const config = {
372
+ method: "unfollowUser",
373
+ params: __params,
374
+ cookies: __cookies,
375
+ is_static: false,
376
+ };
377
+ return await doRequest(config);
378
+ }
379
+ async unfollowUsers(steamIDs) {
380
+ const { __params, __cookies } = formatParams([steamIDs], this._cookies);
381
+ const config = {
382
+ method: "unfollowUsers",
383
+ params: __params,
384
+ cookies: __cookies,
385
+ is_static: false,
386
+ };
387
+ return await doRequest(config);
388
+ }
389
+ async unfollowAllFollowUsers() {
390
+ const { __params, __cookies } = formatParams([], this._cookies);
391
+ const config = {
392
+ method: "unfollowAllFollowUsers",
393
+ params: __params,
394
+ cookies: __cookies,
395
+ is_static: false,
396
+ };
397
+ return await doRequest(config);
398
+ }
399
+ async blockCommunicationUser(steamId) {
400
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
401
+ const config = {
402
+ method: "blockCommunicationUser",
403
+ params: __params,
404
+ cookies: __cookies,
405
+ is_static: false,
406
+ };
407
+ return await doRequest(config);
408
+ }
409
+ async unblockCommunicationUser(steamId) {
410
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
411
+ const config = {
412
+ method: "unblockCommunicationUser",
413
+ params: __params,
414
+ cookies: __cookies,
415
+ is_static: false,
416
+ };
417
+ return await doRequest(config);
418
+ }
419
+ async addFriendUser(steamId) {
420
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
421
+ const config = {
422
+ method: "addFriendUser",
423
+ params: __params,
424
+ cookies: __cookies,
425
+ is_static: false,
426
+ };
427
+ return await doRequest(config);
428
+ }
429
+ async removeFriend(steamId) {
430
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
431
+ const config = {
432
+ method: "removeFriend",
433
+ params: __params,
434
+ cookies: __cookies,
435
+ is_static: false,
436
+ };
437
+ return await doRequest(config);
438
+ }
439
+ async removeFriends(steamIds) {
440
+ const { __params, __cookies } = formatParams([steamIds], this._cookies);
441
+ const config = {
442
+ method: "removeFriends",
443
+ params: __params,
444
+ cookies: __cookies,
445
+ is_static: false,
446
+ };
447
+ return await doRequest(config);
448
+ }
449
+ async acceptFriendRequest(steamId) {
450
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
451
+ const config = {
452
+ method: "acceptFriendRequest",
453
+ params: __params,
454
+ cookies: __cookies,
455
+ is_static: false,
456
+ };
457
+ return await doRequest(config);
458
+ }
459
+ async cancelAddFriendUser(steamId) {
460
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
461
+ const config = {
462
+ method: "cancelAddFriendUser",
463
+ params: __params,
464
+ cookies: __cookies,
465
+ is_static: false,
466
+ };
467
+ return await doRequest(config);
468
+ }
469
+ async ignoreFriendRequest(steamId) {
470
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
471
+ const config = {
472
+ method: "ignoreFriendRequest",
473
+ params: __params,
474
+ cookies: __cookies,
475
+ is_static: false,
476
+ };
477
+ return await doRequest(config);
478
+ }
479
+ async setNickname(steamId, nickname) {
480
+ const { __params, __cookies } = formatParams([steamId, nickname], this._cookies);
481
+ const config = {
482
+ method: "setNickname",
483
+ params: __params,
484
+ cookies: __cookies,
485
+ is_static: false,
486
+ };
487
+ return await doRequest(config);
488
+ }
489
+ async removeNickname(steamId) {
490
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
491
+ const config = {
492
+ method: "removeNickname",
493
+ params: __params,
494
+ cookies: __cookies,
495
+ is_static: false,
496
+ };
497
+ return await doRequest(config);
498
+ }
499
+ async getNameHistory(steamId) {
500
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
501
+ const config = {
502
+ method: "getNameHistory",
503
+ params: __params,
504
+ cookies: __cookies,
505
+ is_static: false,
506
+ };
507
+ return await doRequest(config);
508
+ }
509
+ async clearPreviousAliases() {
510
+ const { __params, __cookies } = formatParams([], this._cookies);
511
+ const config = {
512
+ method: "clearPreviousAliases",
513
+ params: __params,
514
+ cookies: __cookies,
515
+ is_static: false,
516
+ };
517
+ return await doRequest(config);
518
+ }
519
+ async setupProfile() {
520
+ const { __params, __cookies } = formatParams([], this._cookies);
521
+ const config = {
522
+ method: "setupProfile",
523
+ params: __params,
524
+ cookies: __cookies,
525
+ is_static: false,
526
+ };
527
+ return await doRequest(config);
528
+ }
529
+ async editMyProfile({ personaName, realName, customURL, country, summary, hide_profile_awards }) {
530
+ const { __params, __cookies } = formatParams([{ personaName, realName, customURL, country, summary, hide_profile_awards }], this._cookies);
531
+ const config = {
532
+ method: "editMyProfile",
533
+ params: __params,
534
+ cookies: __cookies,
535
+ is_static: false,
536
+ };
537
+ return await doRequest(config);
538
+ }
539
+ async setPersonaName(name) {
540
+ const { __params, __cookies } = formatParams([name], this._cookies);
541
+ const config = {
542
+ method: "setPersonaName",
543
+ params: __params,
544
+ cookies: __cookies,
545
+ is_static: false,
546
+ };
547
+ return await doRequest(config);
548
+ }
549
+ async getPrivacySettings() {
550
+ const { __params, __cookies } = formatParams([], this._cookies);
551
+ const config = {
552
+ method: "getPrivacySettings",
553
+ params: __params,
554
+ cookies: __cookies,
555
+ is_static: false,
556
+ };
557
+ return await doRequest(config);
558
+ }
559
+ async updatePrivacySettings(privacySettings) {
560
+ const { __params, __cookies } = formatParams([privacySettings], this._cookies);
561
+ const config = {
562
+ method: "updatePrivacySettings",
563
+ params: __params,
564
+ cookies: __cookies,
565
+ is_static: false,
566
+ };
567
+ return await doRequest(config);
568
+ }
569
+ async publicPrivacySettings() {
570
+ const { __params, __cookies } = formatParams([], this._cookies);
571
+ const config = {
572
+ method: "publicPrivacySettings",
573
+ params: __params,
574
+ cookies: __cookies,
575
+ is_static: false,
576
+ };
577
+ return await doRequest(config);
578
+ }
579
+ async privatePrivacySettings() {
580
+ const { __params, __cookies } = formatParams([], this._cookies);
581
+ const config = {
582
+ method: "privatePrivacySettings",
583
+ params: __params,
584
+ cookies: __cookies,
585
+ is_static: false,
586
+ };
587
+ return await doRequest(config);
588
+ }
589
+ async postComment(steamId, message) {
590
+ const { __params, __cookies } = formatParams([steamId, message], this._cookies);
591
+ const config = {
592
+ method: "postComment",
593
+ params: __params,
594
+ cookies: __cookies,
595
+ is_static: false,
596
+ };
597
+ return await doRequest(config);
598
+ }
599
+ async deleteComment(steamId, gidcomment) {
600
+ const { __params, __cookies } = formatParams([steamId, gidcomment], this._cookies);
601
+ const config = {
602
+ method: "deleteComment",
603
+ params: __params,
604
+ cookies: __cookies,
605
+ is_static: false,
606
+ };
607
+ return await doRequest(config);
608
+ }
609
+ async _formatCommentModel(comment) {
610
+ const { __params, __cookies } = formatParams([comment], this._cookies);
611
+ const config = {
612
+ method: "_formatCommentModel",
613
+ params: __params,
614
+ cookies: __cookies,
615
+ is_static: false,
616
+ };
617
+ return await doRequest(config);
618
+ }
619
+ async _formatPlayingTime(hrs) {
620
+ const { __params, __cookies } = formatParams([hrs], this._cookies);
621
+ const config = {
622
+ method: "_formatPlayingTime",
623
+ params: __params,
624
+ cookies: __cookies,
625
+ is_static: false,
626
+ };
627
+ return await doRequest(config);
628
+ }
629
+ async getFriendsThatPlay(appID, sorted) {
630
+ const { __params, __cookies } = formatParams([appID, sorted], this._cookies);
631
+ const config = {
632
+ method: "getFriendsThatPlay",
633
+ params: __params,
634
+ cookies: __cookies,
635
+ is_static: false,
636
+ };
637
+ return await doRequest(config);
638
+ }
639
+ async getOwnedAppsDetail() {
640
+ const { __params, __cookies } = formatParams([], this._cookies);
641
+ const config = {
642
+ method: "getOwnedAppsDetail",
643
+ params: __params,
644
+ cookies: __cookies,
645
+ is_static: false,
646
+ };
647
+ return await doRequest(config);
648
+ }
649
+ async GetOwnedApps() {
650
+ const { __params, __cookies } = formatParams([], this._cookies);
651
+ const config = {
652
+ method: "GetOwnedApps",
653
+ params: __params,
654
+ cookies: __cookies,
655
+ is_static: false,
656
+ };
657
+ return await doRequest(config);
658
+ }
659
+ async getOwnedAppsID() {
660
+ const { __params, __cookies } = formatParams([], this._cookies);
661
+ const config = {
662
+ method: "getOwnedAppsID",
663
+ params: __params,
664
+ cookies: __cookies,
665
+ is_static: false,
666
+ };
667
+ return await doRequest(config);
668
+ }
669
+ async getDynamicStoreUserData() {
670
+ const { __params, __cookies } = formatParams([], this._cookies);
671
+ const config = {
672
+ method: "getDynamicStoreUserData",
673
+ params: __params,
674
+ cookies: __cookies,
675
+ is_static: false,
676
+ };
677
+ return await doRequest(config);
678
+ }
679
+ async getListGroupInvitable(userSteamID) {
680
+ const { __params, __cookies } = formatParams([userSteamID], this._cookies);
681
+ const config = {
682
+ method: "getListGroupInvitable",
683
+ params: __params,
684
+ cookies: __cookies,
685
+ is_static: false,
686
+ };
687
+ return await doRequest(config);
688
+ }
689
+ async inviteUserToGroup(userSteamIDs, groupSteamID) {
690
+ const { __params, __cookies } = formatParams([userSteamIDs, groupSteamID], this._cookies);
691
+ const config = {
692
+ method: "inviteUserToGroup",
693
+ params: __params,
694
+ cookies: __cookies,
695
+ is_static: false,
696
+ };
697
+ return await doRequest(config);
698
+ }
699
+ async inviteAllFriendToGroup(groupSteamID) {
700
+ const { __params, __cookies } = formatParams([groupSteamID], this._cookies);
701
+ const config = {
702
+ method: "inviteAllFriendToGroup",
703
+ params: __params,
704
+ cookies: __cookies,
705
+ is_static: false,
706
+ };
707
+ return await doRequest(config);
708
+ }
709
+ async _respondToGroupInvite(groupSteamID, accept) {
710
+ const { __params, __cookies } = formatParams([groupSteamID, accept], this._cookies);
711
+ const config = {
712
+ method: "_respondToGroupInvite",
713
+ params: __params,
714
+ cookies: __cookies,
715
+ is_static: false,
716
+ };
717
+ return await doRequest(config);
718
+ }
719
+ async acceptInviteUserToGroup(groupSteamID) {
720
+ const { __params, __cookies } = formatParams([groupSteamID], this._cookies);
721
+ const config = {
722
+ method: "acceptInviteUserToGroup",
723
+ params: __params,
724
+ cookies: __cookies,
725
+ is_static: false,
726
+ };
727
+ return await doRequest(config);
728
+ }
729
+ async ignoreInviteUserToGroup(groupSteamID) {
730
+ const { __params, __cookies } = formatParams([groupSteamID], this._cookies);
731
+ const config = {
732
+ method: "ignoreInviteUserToGroup",
733
+ params: __params,
734
+ cookies: __cookies,
735
+ is_static: false,
736
+ };
737
+ return await doRequest(config);
738
+ }
739
+ async getGroupSteamIdFromVanilaURL(vanilaURL) {
740
+ const { __params, __cookies } = formatParams([vanilaURL], this._cookies);
741
+ const config = {
742
+ method: "getGroupSteamIdFromVanilaURL",
743
+ params: __params,
744
+ cookies: __cookies,
745
+ is_static: false,
746
+ };
747
+ return await doRequest(config);
748
+ }
749
+ async leaveGroup(groupSteamID) {
750
+ const { __params, __cookies } = formatParams([groupSteamID], this._cookies);
751
+ const config = {
752
+ method: "leaveGroup",
753
+ params: __params,
754
+ cookies: __cookies,
755
+ is_static: false,
756
+ };
757
+ return await doRequest(config);
758
+ }
759
+ async joinGroup(groupSteamID) {
760
+ const { __params, __cookies } = formatParams([groupSteamID], this._cookies);
761
+ const config = {
762
+ method: "joinGroup",
763
+ params: __params,
764
+ cookies: __cookies,
765
+ is_static: false,
766
+ };
767
+ return await doRequest(config);
768
+ }
769
+ async getFriendsInCommon(steamId) {
770
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
771
+ const config = {
772
+ method: "getFriendsInCommon",
773
+ params: __params,
774
+ cookies: __cookies,
775
+ is_static: false,
776
+ };
777
+ return await doRequest(config);
778
+ }
779
+ async getFriendsInGroup(groupID) {
780
+ const { __params, __cookies } = formatParams([groupID], this._cookies);
781
+ const config = {
782
+ method: "getFriendsInGroup",
783
+ params: __params,
784
+ cookies: __cookies,
785
+ is_static: false,
786
+ };
787
+ return await doRequest(config);
788
+ }
789
+ async _parseSteamWebAPIKey($) {
790
+ const { __params, __cookies } = formatParams([$], this._cookies);
791
+ const config = {
792
+ method: "_parseSteamWebAPIKey",
793
+ params: __params,
794
+ cookies: __cookies,
795
+ is_static: false,
796
+ };
797
+ return await doRequest(config);
798
+ }
799
+ async getSteamWebAPIKey(domain) {
800
+ const { __params, __cookies } = formatParams([domain], this._cookies);
801
+ const config = {
802
+ method: "getSteamWebAPIKey",
803
+ params: __params,
804
+ cookies: __cookies,
805
+ is_static: false,
806
+ };
807
+ return await doRequest(config);
808
+ }
809
+ async revokeSteamWebAPIKey() {
810
+ const { __params, __cookies } = formatParams([], this._cookies);
811
+ const config = {
812
+ method: "revokeSteamWebAPIKey",
813
+ params: __params,
814
+ cookies: __cookies,
815
+ is_static: false,
816
+ };
817
+ return await doRequest(config);
818
+ }
819
+ async _parsePlayerListFromblotter_daily_rollup_line($, contentEl) {
820
+ const { __params, __cookies } = formatParams([$, contentEl], this._cookies);
821
+ const config = {
822
+ method: "_parsePlayerListFromblotter_daily_rollup_line",
823
+ params: __params,
824
+ cookies: __cookies,
825
+ is_static: false,
826
+ };
827
+ return await doRequest(config);
828
+ }
829
+ async _parseAppIDFromLink(link) {
830
+ const { __params, __cookies } = formatParams([link], this._cookies);
831
+ const config = {
832
+ method: "_parseAppIDFromLink",
833
+ params: __params,
834
+ cookies: __cookies,
835
+ is_static: false,
836
+ };
837
+ return await doRequest(config);
838
+ }
839
+ async _parseAppListFromBlotter($, contentEl) {
840
+ const { __params, __cookies } = formatParams([$, contentEl], this._cookies);
841
+ const config = {
842
+ method: "_parseAppListFromBlotter",
843
+ params: __params,
844
+ cookies: __cookies,
845
+ is_static: false,
846
+ };
847
+ return await doRequest(config);
848
+ }
849
+ async _parseAchievedblotter_daily_rollup_line($, contentEl) {
850
+ const { __params, __cookies } = formatParams([$, contentEl], this._cookies);
851
+ const config = {
852
+ method: "_parseAchievedblotter_daily_rollup_line",
853
+ params: __params,
854
+ cookies: __cookies,
855
+ is_static: false,
856
+ };
857
+ return await doRequest(config);
858
+ }
859
+ async _parseGroupListFromblotter_daily_rollup_line($, contentEl) {
860
+ const { __params, __cookies } = formatParams([$, contentEl], this._cookies);
861
+ const config = {
862
+ method: "_parseGroupListFromblotter_daily_rollup_line",
863
+ params: __params,
864
+ cookies: __cookies,
865
+ is_static: false,
866
+ };
867
+ return await doRequest(config);
868
+ }
869
+ async _parseBlotterDailyRollup($, blotterBlockEl) {
870
+ const { __params, __cookies } = formatParams([$, blotterBlockEl], this._cookies);
871
+ const config = {
872
+ method: "_parseBlotterDailyRollup",
873
+ params: __params,
874
+ cookies: __cookies,
875
+ is_static: false,
876
+ };
877
+ return await doRequest(config);
878
+ }
879
+ async _parseBlotterGamepurchase($, blotterBlockEl) {
880
+ const { __params, __cookies } = formatParams([$, blotterBlockEl], this._cookies);
881
+ const config = {
882
+ method: "_parseBlotterGamepurchase",
883
+ params: __params,
884
+ cookies: __cookies,
885
+ is_static: false,
886
+ };
887
+ return await doRequest(config);
888
+ }
889
+ async getFriendActivity(start_or_url) {
890
+ const { __params, __cookies } = formatParams([start_or_url], this._cookies);
891
+ const config = {
892
+ method: "getFriendActivity",
893
+ params: __params,
894
+ cookies: __cookies,
895
+ is_static: false,
896
+ };
897
+ return await doRequest(config);
898
+ }
899
+ async commentUserReceivedNewGame({ steamId, threadId, comment }) {
900
+ const { __params, __cookies } = formatParams([{ steamId, threadId, comment }], this._cookies);
901
+ const config = {
902
+ method: "commentUserReceivedNewGame",
903
+ params: __params,
904
+ cookies: __cookies,
905
+ is_static: false,
906
+ };
907
+ return await doRequest(config);
908
+ }
909
+ async rateUpUserReceivedNewGame({ steamId, threadId }) {
910
+ const { __params, __cookies } = formatParams([{ steamId, threadId }], this._cookies);
911
+ const config = {
912
+ method: "rateUpUserReceivedNewGame",
913
+ params: __params,
914
+ cookies: __cookies,
915
+ is_static: false,
916
+ };
917
+ return await doRequest(config);
918
+ }
919
+ async deleteCommendUserReceivedNewGame({ steamId, threadId, commendId }) {
920
+ const { __params, __cookies } = formatParams([{ steamId, threadId, commendId }], this._cookies);
921
+ const config = {
922
+ method: "deleteCommendUserReceivedNewGame",
923
+ params: __params,
924
+ cookies: __cookies,
925
+ is_static: false,
926
+ };
927
+ return await doRequest(config);
928
+ }
929
+ async getFriendActivityFull({ cbOnActivity, cbOnActivities }) {
930
+ const { __params, __cookies } = formatParams([{ cbOnActivity, cbOnActivities }], this._cookies);
931
+ const config = {
932
+ method: "getFriendActivityFull",
933
+ params: __params,
934
+ cookies: __cookies,
935
+ is_static: false,
936
+ };
937
+ return await doRequest(config);
938
+ }
939
+ async searchSteamUserByName(text, page) {
940
+ const { __params, __cookies } = formatParams([text, page], this._cookies);
941
+ const config = {
942
+ method: "searchSteamUserByName",
943
+ params: __params,
944
+ cookies: __cookies,
945
+ is_static: false,
946
+ };
947
+ return await doRequest(config);
948
+ }
949
+ async getMyGroupsList() {
950
+ const { __params, __cookies } = formatParams([], this._cookies);
951
+ const config = {
952
+ method: "getMyGroupsList",
953
+ params: __params,
954
+ cookies: __cookies,
955
+ is_static: false,
956
+ };
957
+ return await doRequest(config);
958
+ }
959
+ async getUserGroupsList(steamId) {
960
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
961
+ const config = {
962
+ method: "getUserGroupsList",
963
+ params: __params,
964
+ cookies: __cookies,
965
+ is_static: false,
966
+ };
967
+ return await doRequest(config);
968
+ }
969
+ async getNotifications() {
970
+ const { __params, __cookies } = formatParams([], this._cookies);
971
+ const config = {
972
+ method: "getNotifications",
973
+ params: __params,
974
+ cookies: __cookies,
975
+ is_static: false,
976
+ };
977
+ return await doRequest(config);
978
+ }
979
+ async addFreeLicense(packageID) {
980
+ const { __params, __cookies } = formatParams([packageID], this._cookies);
981
+ const config = {
982
+ method: "addFreeLicense",
983
+ params: __params,
984
+ cookies: __cookies,
985
+ is_static: false,
986
+ };
987
+ return await doRequest(config);
988
+ }
989
+ async addSubFreeLicense(subid) {
990
+ const { __params, __cookies } = formatParams([subid], this._cookies);
991
+ const config = {
992
+ method: "addSubFreeLicense",
993
+ params: __params,
994
+ cookies: __cookies,
995
+ is_static: false,
996
+ };
997
+ return await doRequest(config);
998
+ }
999
+ async getCurrentSteamLogin() {
1000
+ const { __params, __cookies } = formatParams([], this._cookies);
1001
+ const config = {
1002
+ method: "getCurrentSteamLogin",
1003
+ params: __params,
1004
+ cookies: __cookies,
1005
+ is_static: false,
1006
+ };
1007
+ return await doRequest(config);
1008
+ }
1009
+ async setLanguagePreferences() {
1010
+ const { __params, __cookies } = formatParams([], this._cookies);
1011
+ const config = {
1012
+ method: "setLanguagePreferences",
1013
+ params: __params,
1014
+ cookies: __cookies,
1015
+ is_static: false,
1016
+ };
1017
+ return await doRequest(config);
1018
+ }
1019
+ async ChangeLanguage() {
1020
+ const { __params, __cookies } = formatParams([], this._cookies);
1021
+ const config = {
1022
+ method: "ChangeLanguage",
1023
+ params: __params,
1024
+ cookies: __cookies,
1025
+ is_static: false,
1026
+ };
1027
+ return await doRequest(config);
1028
+ }
1029
+ async getCompetitiveCooldownLevel() {
1030
+ const { __params, __cookies } = formatParams([], this._cookies);
1031
+ const config = {
1032
+ method: "getCompetitiveCooldownLevel",
1033
+ params: __params,
1034
+ cookies: __cookies,
1035
+ is_static: false,
1036
+ };
1037
+ return await doRequest(config);
1038
+ }
1039
+ async getPersonalGameDataAccountInformation() {
1040
+ const { __params, __cookies } = formatParams([], this._cookies);
1041
+ const config = {
1042
+ method: "getPersonalGameDataAccountInformation",
1043
+ params: __params,
1044
+ cookies: __cookies,
1045
+ is_static: false,
1046
+ };
1047
+ return await doRequest(config);
1048
+ }
1049
+ async resolveUsers(steamIDs) {
1050
+ const { __params, __cookies } = formatParams([steamIDs], this._cookies);
1051
+ const config = {
1052
+ method: "resolveUsers",
1053
+ params: __params,
1054
+ cookies: __cookies,
1055
+ is_static: false,
1056
+ };
1057
+ return await doRequest(config);
1058
+ }
1059
+ async testFullLanguage(cb) {
1060
+ const { __params, __cookies } = formatParams([cb], this._cookies);
1061
+ const config = {
1062
+ method: "testFullLanguage",
1063
+ params: __params,
1064
+ cookies: __cookies,
1065
+ is_static: false,
1066
+ };
1067
+ return await doRequest(config);
1068
+ }
1069
+ async testNotYetSetupTextList(steamId) {
1070
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
1071
+ const config = {
1072
+ method: "testNotYetSetupTextList",
1073
+ params: __params,
1074
+ cookies: __cookies,
1075
+ is_static: false,
1076
+ };
1077
+ return await doRequest(config);
1078
+ }
1079
+ async testPrivateText(steamId) {
1080
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
1081
+ const config = {
1082
+ method: "testPrivateText",
1083
+ params: __params,
1084
+ cookies: __cookies,
1085
+ is_static: false,
1086
+ };
1087
+ return await doRequest(config);
1088
+ }
1089
+ async testGameBan(steamId) {
1090
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
1091
+ const config = {
1092
+ method: "testGameBan",
1093
+ params: __params,
1094
+ cookies: __cookies,
1095
+ is_static: false,
1096
+ };
1097
+ return await doRequest(config);
1098
+ }
1099
+ async getSteamGuardStatus() {
1100
+ const { __params, __cookies } = formatParams([], this._cookies);
1101
+ const config = {
1102
+ method: "getSteamGuardStatus",
1103
+ params: __params,
1104
+ cookies: __cookies,
1105
+ is_static: false,
1106
+ };
1107
+ return await doRequest(config);
1108
+ }
1109
+ async turningSteamGuardOff() {
1110
+ const { __params, __cookies } = formatParams([], this._cookies);
1111
+ const config = {
1112
+ method: "turningSteamGuardOff",
1113
+ params: __params,
1114
+ cookies: __cookies,
1115
+ is_static: false,
1116
+ };
1117
+ return await doRequest(config);
1118
+ }
1119
+ async turningEmailAuthenticatorCheckOn() {
1120
+ const { __params, __cookies } = formatParams([], this._cookies);
1121
+ const config = {
1122
+ method: "turningEmailAuthenticatorCheckOn",
1123
+ params: __params,
1124
+ cookies: __cookies,
1125
+ is_static: false,
1126
+ };
1127
+ return await doRequest(config);
1128
+ }
1129
+ async getPhoneManage() {
1130
+ const { __params, __cookies } = formatParams([], this._cookies);
1131
+ const config = {
1132
+ method: "getPhoneManage",
1133
+ params: __params,
1134
+ cookies: __cookies,
1135
+ is_static: false,
1136
+ };
1137
+ return await doRequest(config);
1138
+ }
1139
+ async addPhoneNumber(phone) {
1140
+ const { __params, __cookies } = formatParams([phone], this._cookies);
1141
+ const config = {
1142
+ method: "addPhoneNumber",
1143
+ params: __params,
1144
+ cookies: __cookies,
1145
+ is_static: false,
1146
+ };
1147
+ return await doRequest(config);
1148
+ }
1149
+ async sendOtpConfirmPhoneForAdd() {
1150
+ const { __params, __cookies } = formatParams([], this._cookies);
1151
+ const config = {
1152
+ method: "sendOtpConfirmPhoneForAdd",
1153
+ params: __params,
1154
+ cookies: __cookies,
1155
+ is_static: false,
1156
+ };
1157
+ return await doRequest(config);
1158
+ }
1159
+ async confirmPhoneCodeForAdd(code) {
1160
+ const { __params, __cookies } = formatParams([code], this._cookies);
1161
+ const config = {
1162
+ method: "confirmPhoneCodeForAdd",
1163
+ params: __params,
1164
+ cookies: __cookies,
1165
+ is_static: false,
1166
+ };
1167
+ return await doRequest(config);
1168
+ }
1169
+ async removePhoneNumber() {
1170
+ const { __params, __cookies } = formatParams([], this._cookies);
1171
+ const config = {
1172
+ method: "removePhoneNumber",
1173
+ params: __params,
1174
+ cookies: __cookies,
1175
+ is_static: false,
1176
+ };
1177
+ return await doRequest(config);
1178
+ }
1179
+ async removePhoneNumberConfirmOptCode(params, code) {
1180
+ const { __params, __cookies } = formatParams([params, code], this._cookies);
1181
+ const config = {
1182
+ method: "removePhoneNumberConfirmOptCode",
1183
+ params: __params,
1184
+ cookies: __cookies,
1185
+ is_static: false,
1186
+ };
1187
+ return await doRequest(config);
1188
+ }
1189
+ async getAccountEmail() {
1190
+ const { __params, __cookies } = formatParams([], this._cookies);
1191
+ const config = {
1192
+ method: "getAccountEmail",
1193
+ params: __params,
1194
+ cookies: __cookies,
1195
+ is_static: false,
1196
+ };
1197
+ return await doRequest(config);
1198
+ }
1199
+ async getInventory(appID) {
1200
+ const { __params, __cookies } = formatParams([appID], this._cookies);
1201
+ const config = {
1202
+ method: "getInventory",
1203
+ params: __params,
1204
+ cookies: __cookies,
1205
+ is_static: false,
1206
+ };
1207
+ return await doRequest(config);
1208
+ }
1209
+ async getInventoryTrading(appID, contextid) {
1210
+ const { __params, __cookies } = formatParams([appID, contextid], this._cookies);
1211
+ const config = {
1212
+ method: "getInventoryTrading",
1213
+ params: __params,
1214
+ cookies: __cookies,
1215
+ is_static: false,
1216
+ };
1217
+ return await doRequest(config);
1218
+ }
1219
+ async getInventoryTradingPartner(appID, partner, contextid) {
1220
+ const { __params, __cookies } = formatParams([appID, partner, contextid], this._cookies);
1221
+ const config = {
1222
+ method: "getInventoryTradingPartner",
1223
+ params: __params,
1224
+ cookies: __cookies,
1225
+ is_static: false,
1226
+ };
1227
+ return await doRequest(config);
1228
+ }
1229
+ async getFullInventoryHistory() {
1230
+ const { __params, __cookies } = formatParams([], this._cookies);
1231
+ const config = {
1232
+ method: "getFullInventoryHistory",
1233
+ params: __params,
1234
+ cookies: __cookies,
1235
+ is_static: false,
1236
+ };
1237
+ return await doRequest(config);
1238
+ }
1239
+ async getInventoryHistory(cursor) {
1240
+ const { __params, __cookies } = formatParams([cursor], this._cookies);
1241
+ const config = {
1242
+ method: "getInventoryHistory",
1243
+ params: __params,
1244
+ cookies: __cookies,
1245
+ is_static: false,
1246
+ };
1247
+ return await doRequest(config);
1248
+ }
1249
+ async getTradeURL() {
1250
+ const { __params, __cookies } = formatParams([], this._cookies);
1251
+ const config = {
1252
+ method: "getTradeURL",
1253
+ params: __params,
1254
+ cookies: __cookies,
1255
+ is_static: false,
1256
+ };
1257
+ return await doRequest(config);
1258
+ }
1259
+ async sendTradeOffer({ tradeURL, myAssets, theirAssets, tradeoffermessage }) {
1260
+ const { __params, __cookies } = formatParams([{ tradeURL, myAssets, theirAssets, tradeoffermessage }], this._cookies);
1261
+ const config = {
1262
+ method: "sendTradeOffer",
1263
+ params: __params,
1264
+ cookies: __cookies,
1265
+ is_static: false,
1266
+ };
1267
+ return await doRequest(config);
1268
+ }
1269
+ async acceptTradeOffer(tradeOfferID, partnerSteamId) {
1270
+ const { __params, __cookies } = formatParams([tradeOfferID, partnerSteamId], this._cookies);
1271
+ const config = {
1272
+ method: "acceptTradeOffer",
1273
+ params: __params,
1274
+ cookies: __cookies,
1275
+ is_static: false,
1276
+ };
1277
+ return await doRequest(config);
1278
+ }
1279
+ async declineTradeOffer(tradeOfferID, partnerSteamId) {
1280
+ const { __params, __cookies } = formatParams([tradeOfferID, partnerSteamId], this._cookies);
1281
+ const config = {
1282
+ method: "declineTradeOffer",
1283
+ params: __params,
1284
+ cookies: __cookies,
1285
+ is_static: false,
1286
+ };
1287
+ return await doRequest(config);
1288
+ }
1289
+ async getTradeOffer() {
1290
+ const { __params, __cookies } = formatParams([], this._cookies);
1291
+ const config = {
1292
+ method: "getTradeOffer",
1293
+ params: __params,
1294
+ cookies: __cookies,
1295
+ is_static: false,
1296
+ };
1297
+ return await doRequest(config);
1298
+ }
1299
+ async uploadAvatar(filePath) {
1300
+ const { __params, __cookies } = formatParams([filePath], this._cookies);
1301
+ const config = {
1302
+ method: "uploadAvatar",
1303
+ params: __params,
1304
+ cookies: __cookies,
1305
+ is_static: false,
1306
+ };
1307
+ return await doRequest(config);
1308
+ }
1309
+ async selectPreviousAvatar(avatarHash) {
1310
+ const { __params, __cookies } = formatParams([avatarHash], this._cookies);
1311
+ const config = {
1312
+ method: "selectPreviousAvatar",
1313
+ params: __params,
1314
+ cookies: __cookies,
1315
+ is_static: false,
1316
+ };
1317
+ return await doRequest(config);
1318
+ }
1319
+ async getMiniprofile(steamId) {
1320
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
1321
+ const config = {
1322
+ method: "getMiniprofile",
1323
+ params: __params,
1324
+ cookies: __cookies,
1325
+ is_static: false,
1326
+ };
1327
+ return await doRequest(config);
1328
+ }
1329
+ async deauthorizeAllDevices() {
1330
+ const { __params, __cookies } = formatParams([], this._cookies);
1331
+ const config = {
1332
+ method: "deauthorizeAllDevices",
1333
+ params: __params,
1334
+ cookies: __cookies,
1335
+ is_static: false,
1336
+ };
1337
+ return await doRequest(config);
1338
+ }
1339
+ async getMarketUnavailable() {
1340
+ const { __params, __cookies } = formatParams([], this._cookies);
1341
+ const config = {
1342
+ method: "getMarketUnavailable",
1343
+ params: __params,
1344
+ cookies: __cookies,
1345
+ is_static: false,
1346
+ };
1347
+ return await doRequest(config);
1348
+ }
1349
+ async getAmountSpentOnSteam() {
1350
+ const { __params, __cookies } = formatParams([], this._cookies);
1351
+ const config = {
1352
+ method: "getAmountSpentOnSteam",
1353
+ params: __params,
1354
+ cookies: __cookies,
1355
+ is_static: false,
1356
+ };
1357
+ return await doRequest(config);
1358
+ }
1359
+ async sellItem({ appid, contextid, assetid, amount, price }) {
1360
+ const { __params, __cookies } = formatParams([{ appid, contextid, assetid, amount, price }], this._cookies);
1361
+ const config = {
1362
+ method: "sellItem",
1363
+ params: __params,
1364
+ cookies: __cookies,
1365
+ is_static: false,
1366
+ };
1367
+ return await doRequest(config);
1368
+ }
1369
+ async removeListing(id) {
1370
+ const { __params, __cookies } = formatParams([id], this._cookies);
1371
+ const config = {
1372
+ method: "removeListing",
1373
+ params: __params,
1374
+ cookies: __cookies,
1375
+ is_static: false,
1376
+ };
1377
+ return await doRequest(config);
1378
+ }
1379
+ async getMyListings() {
1380
+ const { __params, __cookies } = formatParams([], this._cookies);
1381
+ const config = {
1382
+ method: "getMyListings",
1383
+ params: __params,
1384
+ cookies: __cookies,
1385
+ is_static: false,
1386
+ };
1387
+ return await doRequest(config);
1388
+ }
1389
+ async getMyMarketHistory({ start, count }) {
1390
+ const { __params, __cookies } = formatParams([{ start, count }], this._cookies);
1391
+ const config = {
1392
+ method: "getMyMarketHistory",
1393
+ params: __params,
1394
+ cookies: __cookies,
1395
+ is_static: false,
1396
+ };
1397
+ return await doRequest(config);
1398
+ }
1399
+ async getPlayerReports(token) {
1400
+ const { __params, __cookies } = formatParams([token], this._cookies);
1401
+ const config = {
1402
+ method: "getPlayerReports",
1403
+ params: __params,
1404
+ cookies: __cookies,
1405
+ is_static: false,
1406
+ };
1407
+ return await doRequest(config);
1408
+ }
1409
+ async getAllPlayerReports(onPageCb) {
1410
+ const { __params, __cookies } = formatParams([onPageCb], this._cookies);
1411
+ const config = {
1412
+ method: "getAllPlayerReports",
1413
+ params: __params,
1414
+ cookies: __cookies,
1415
+ is_static: false,
1416
+ };
1417
+ return await doRequest(config);
1418
+ }
1419
+ async beginFileUpload(filePath) {
1420
+ const { __params, __cookies } = formatParams([filePath], this._cookies);
1421
+ const config = {
1422
+ method: "beginFileUpload",
1423
+ params: __params,
1424
+ cookies: __cookies,
1425
+ is_static: false,
1426
+ };
1427
+ return await doRequest(config);
1428
+ }
1429
+ async doFileUpload({ filePath, beginFileUploadResult }) {
1430
+ const { __params, __cookies } = formatParams([{ filePath, beginFileUploadResult }], this._cookies);
1431
+ const config = {
1432
+ method: "doFileUpload",
1433
+ params: __params,
1434
+ cookies: __cookies,
1435
+ is_static: false,
1436
+ };
1437
+ return await doRequest(config);
1438
+ }
1439
+ async commitFileUpload({ file_name, file_sha, file_image_width, file_image_height, file_type, hmac, timestamp, ugcid, friend_steamid }) {
1440
+ const { __params, __cookies } = formatParams([{ file_name, file_sha, file_image_width, file_image_height, file_type, hmac, timestamp, ugcid, friend_steamid }], this._cookies);
1441
+ const config = {
1442
+ method: "commitFileUpload",
1443
+ params: __params,
1444
+ cookies: __cookies,
1445
+ is_static: false,
1446
+ };
1447
+ return await doRequest(config);
1448
+ }
1449
+ async sendImageMessage({ imagePath, friend_steamid }) {
1450
+ const { __params, __cookies } = formatParams([{ imagePath, friend_steamid }], this._cookies);
1451
+ const config = {
1452
+ method: "sendImageMessage",
1453
+ params: __params,
1454
+ cookies: __cookies,
1455
+ is_static: false,
1456
+ };
1457
+ return await doRequest(config);
1458
+ }
1459
+ async isAlive() {
1460
+ const { __params, __cookies } = formatParams([], this._cookies);
1461
+ const config = {
1462
+ method: "isAlive",
1463
+ params: __params,
1464
+ cookies: __cookies,
1465
+ is_static: false,
1466
+ };
1467
+ return await doRequest(config);
1468
+ }
1469
+ async getAccountDetail() {
1470
+ const { __params, __cookies } = formatParams([], this._cookies);
1471
+ const config = {
1472
+ method: "getAccountDetail",
1473
+ params: __params,
1474
+ cookies: __cookies,
1475
+ is_static: false,
1476
+ };
1477
+ return await doRequest(config);
1478
+ }
1479
+ async getFriendSince(steamId) {
1480
+ const { __params, __cookies } = formatParams([steamId], this._cookies);
1481
+ const config = {
1482
+ method: "getFriendSince",
1483
+ params: __params,
1484
+ cookies: __cookies,
1485
+ is_static: false,
1486
+ };
1487
+ return await doRequest(config);
1488
+ }
1489
+ async getWalletBalance() {
1490
+ const { __params, __cookies } = formatParams([], this._cookies);
1491
+ const config = {
1492
+ method: "getWalletBalance",
1493
+ params: __params,
1494
+ cookies: __cookies,
1495
+ is_static: false,
1496
+ };
1497
+ return await doRequest(config);
1498
+ }
1499
+ async acceptConfirmationForObject(accessToken, identitySecret, objectID) {
1500
+ const { __params, __cookies } = formatParams([accessToken, identitySecret, objectID], this._cookies);
1501
+ const config = {
1502
+ method: "acceptConfirmationForObject",
1503
+ params: __params,
1504
+ cookies: __cookies,
1505
+ is_static: false,
1506
+ };
1507
+ return await doRequest(config);
1508
+ }
1509
+ async denyConfirmationForObject(accessToken, identitySecret, objectID) {
1510
+ const { __params, __cookies } = formatParams([accessToken, identitySecret, objectID], this._cookies);
1511
+ const config = {
1512
+ method: "denyConfirmationForObject",
1513
+ params: __params,
1514
+ cookies: __cookies,
1515
+ is_static: false,
1516
+ };
1517
+ return await doRequest(config);
1518
+ }
1519
+ async getConfirmations(accessToken, identitySecret) {
1520
+ const { __params, __cookies } = formatParams([accessToken, identitySecret], this._cookies);
1521
+ const config = {
1522
+ method: "getConfirmations",
1523
+ params: __params,
1524
+ cookies: __cookies,
1525
+ is_static: false,
1526
+ };
1527
+ return await doRequest(config);
1528
+ }
1529
+ async enableTwoFactor(accessToken) {
1530
+ const { __params, __cookies } = formatParams([accessToken], this._cookies);
1531
+ const config = {
1532
+ method: "enableTwoFactor",
1533
+ params: __params,
1534
+ cookies: __cookies,
1535
+ is_static: false,
1536
+ };
1537
+ return await doRequest(config);
1538
+ }
1539
+ async finalizeTwoFactor(accessToken, identitySecret, finalizeTwoFactorCode) {
1540
+ const { __params, __cookies } = formatParams([accessToken, identitySecret, finalizeTwoFactorCode], this._cookies);
1541
+ const config = {
1542
+ method: "finalizeTwoFactor",
1543
+ params: __params,
1544
+ cookies: __cookies,
1545
+ is_static: false,
1546
+ };
1547
+ return await doRequest(config);
1548
+ }
1549
+ async getHelpRequests() {
1550
+ const { __params, __cookies } = formatParams([], this._cookies);
1551
+ const config = {
1552
+ method: "getHelpRequests",
1553
+ params: __params,
1554
+ cookies: __cookies,
1555
+ is_static: false,
1556
+ };
1557
+ return await doRequest(config);
1558
+ }
1559
+ async getHelpRequestDetail(id) {
1560
+ const { __params, __cookies } = formatParams([id], this._cookies);
1561
+ const config = {
1562
+ method: "getHelpRequestDetail",
1563
+ params: __params,
1564
+ cookies: __cookies,
1565
+ is_static: false,
1566
+ };
1567
+ return await doRequest(config);
1568
+ }
1569
+ async getFriendOwnershipForGifting(accessToken) {
1570
+ const { __params, __cookies } = formatParams([accessToken], this._cookies);
1571
+ const config = {
1572
+ method: "getFriendOwnershipForGifting",
1573
+ params: __params,
1574
+ cookies: __cookies,
1575
+ is_static: false,
1576
+ };
1577
+ return await doRequest(config);
1578
+ }
1579
+ async getFriendsList_v1(accessToken) {
1580
+ const { __params, __cookies } = formatParams([accessToken], this._cookies);
1581
+ const config = {
1582
+ method: "getFriendsList_v1",
1583
+ params: __params,
1584
+ cookies: __cookies,
1585
+ is_static: false,
1586
+ };
1587
+ return await doRequest(config);
1588
+ }
1589
+ async getPlayerLinkDetails(accessToken, steamIds) {
1590
+ const { __params, __cookies } = formatParams([accessToken, steamIds], this._cookies);
1591
+ const config = {
1592
+ method: "getPlayerLinkDetails",
1593
+ params: __params,
1594
+ cookies: __cookies,
1595
+ is_static: false,
1596
+ };
1597
+ return await doRequest(config);
1598
+ }
1599
+ async getFriendsGameplayInfo(accessToken, appId) {
1600
+ const { __params, __cookies } = formatParams([accessToken, appId], this._cookies);
1601
+ const config = {
1602
+ method: "getFriendsGameplayInfo",
1603
+ params: __params,
1604
+ cookies: __cookies,
1605
+ is_static: false,
1606
+ };
1607
+ return await doRequest(config);
1608
+ }
1609
+ async getRecentMessages(accessToken, steamId) {
1610
+ const { __params, __cookies } = formatParams([accessToken, steamId], this._cookies);
1611
+ const config = {
1612
+ method: "getRecentMessages",
1613
+ params: __params,
1614
+ cookies: __cookies,
1615
+ is_static: false,
1616
+ };
1617
+ return await doRequest(config);
1618
+ }
1619
+ async getPurchaseHistory() {
1620
+ const { __params, __cookies } = formatParams([], this._cookies);
1621
+ const config = {
1622
+ method: "getPurchaseHistory",
1623
+ params: __params,
1624
+ cookies: __cookies,
1625
+ is_static: false,
1626
+ };
1627
+ return await doRequest(config);
1628
+ }
1629
+ async getActiveInventories() {
1630
+ const { __params, __cookies } = formatParams([], this._cookies);
1631
+ const config = {
1632
+ method: "getActiveInventories",
1633
+ params: __params,
1634
+ cookies: __cookies,
1635
+ is_static: false,
1636
+ };
1637
+ return await doRequest(config);
1638
+ }
1639
+ async redeemWalletCode(wallet_code) {
1640
+ const { __params, __cookies } = formatParams([wallet_code], this._cookies);
1641
+ const config = {
1642
+ method: "redeemWalletCode",
1643
+ params: __params,
1644
+ cookies: __cookies,
1645
+ is_static: false,
1646
+ };
1647
+ return await doRequest(config);
1648
+ }
1649
+ async enumerateTokens(accessToken) {
1650
+ const { __params, __cookies } = formatParams([accessToken], this._cookies);
1651
+ const config = {
1652
+ method: "enumerateTokens",
1653
+ params: __params,
1654
+ cookies: __cookies,
1655
+ is_static: false,
1656
+ };
1657
+ return await doRequest(config);
1658
+ }
1659
+ async hasToken(accessToken, tokenId) {
1660
+ const { __params, __cookies } = formatParams([accessToken, tokenId], this._cookies);
1661
+ const config = {
1662
+ method: "hasToken",
1663
+ params: __params,
1664
+ cookies: __cookies,
1665
+ is_static: false,
1666
+ };
1667
+ return await doRequest(config);
1668
+ }
1669
+ async enumerateTokenLastSeenMs(accessToken, platform_type) {
1670
+ const { __params, __cookies } = formatParams([accessToken, platform_type], this._cookies);
1671
+ const config = {
1672
+ method: "enumerateTokenLastSeenMs",
1673
+ params: __params,
1674
+ cookies: __cookies,
1675
+ is_static: false,
1676
+ };
1677
+ return await doRequest(config);
1678
+ }
1679
+ async queryRefreshTokenByID(accessToken, tokenId) {
1680
+ const { __params, __cookies } = formatParams([accessToken, tokenId], this._cookies);
1681
+ const config = {
1682
+ method: "queryRefreshTokenByID",
1683
+ params: __params,
1684
+ cookies: __cookies,
1685
+ is_static: false,
1686
+ };
1687
+ return await doRequest(config);
1688
+ }
1689
+ async revokeAccessToken(accessToken, tokenId, sharedSecret) {
1690
+ const { __params, __cookies } = formatParams([accessToken, tokenId, sharedSecret], this._cookies);
1691
+ const config = {
1692
+ method: "revokeAccessToken",
1693
+ params: __params,
1694
+ cookies: __cookies,
1695
+ is_static: false,
1696
+ };
1697
+ return await doRequest(config);
1698
+ }
1699
+ async changeEmail(newEmail, getNewEmailOptCodes, accessToken, identitySecret) {
1700
+ const { __params, __cookies } = formatParams([newEmail, getNewEmailOptCodes, accessToken, identitySecret], this._cookies);
1701
+ const config = {
1702
+ method: "changeEmail",
1703
+ params: __params,
1704
+ cookies: __cookies,
1705
+ is_static: false,
1706
+ };
1707
+ return await doRequest(config);
1708
+ }
1709
+ async sendMessage({ steamId, content, accessToken }) {
1710
+ const { __params, __cookies } = formatParams([{ steamId, content, accessToken }], this._cookies);
1711
+ const config = {
1712
+ method: "sendMessage",
1713
+ params: __params,
1714
+ cookies: __cookies,
1715
+ is_static: false,
1716
+ };
1717
+ return await doRequest(config);
1718
+ }
1719
+ static async parseCookie(cookies) {
1720
+ const { __params, __cookies } = formatParams([cookies]);
1721
+ const config = {
1722
+ method: "parseCookie",
1723
+ params: __params,
1724
+ is_static: true,
1725
+ };
1726
+ return await doRequest(config);
1727
+ }
1728
+ static async generateCookie({ steamMachineAuth, steamLoginSecure, steamRememberLogin, steamId, sessionid, Steam_Language }) {
1729
+ const { __params, __cookies } = formatParams([{ steamMachineAuth, steamLoginSecure, steamRememberLogin, steamId, sessionid, Steam_Language }]);
1730
+ const config = {
1731
+ method: "generateCookie",
1732
+ params: __params,
1733
+ is_static: true,
1734
+ };
1735
+ return await doRequest(config);
1736
+ }
1737
+ static async getUserSummary(steamId, parts, cookie) {
1738
+ const { __params, __cookies } = formatParams([steamId, parts, cookie]);
1739
+ const config = {
1740
+ method: "getUserSummary",
1741
+ params: __params,
1742
+ is_static: true,
1743
+ };
1744
+ return await doRequest(config);
1745
+ }
1746
+ static async getUserSummaryFromXML(steamId) {
1747
+ const { __params, __cookies } = formatParams([steamId]);
1748
+ const config = {
1749
+ method: "getUserSummaryFromXML",
1750
+ params: __params,
1751
+ is_static: true,
1752
+ };
1753
+ return await doRequest(config);
1754
+ }
1755
+ static async _parseSummaryFromXML(resultXml) {
1756
+ const { __params, __cookies } = formatParams([resultXml]);
1757
+ const config = {
1758
+ method: "_parseSummaryFromXML",
1759
+ params: __params,
1760
+ is_static: true,
1761
+ };
1762
+ return await doRequest(config);
1763
+ }
1764
+ static async getUserSummaryFromProfile(steamId, cookie) {
1765
+ const { __params, __cookies } = formatParams([steamId, cookie]);
1766
+ const config = {
1767
+ method: "getUserSummaryFromProfile",
1768
+ params: __params,
1769
+ is_static: true,
1770
+ };
1771
+ return await doRequest(config);
1772
+ }
1773
+ static async _formatSummary(summary) {
1774
+ const { __params, __cookies } = formatParams([summary]);
1775
+ const config = {
1776
+ method: "_formatSummary",
1777
+ params: __params,
1778
+ is_static: true,
1779
+ };
1780
+ return await doRequest(config);
1781
+ }
1782
+ static async _parseUserProfile(html) {
1783
+ const { __params, __cookies } = formatParams([html]);
1784
+ const config = {
1785
+ method: "_parseUserProfile",
1786
+ params: __params,
1787
+ is_static: true,
1788
+ };
1789
+ return await doRequest(config);
1790
+ }
1791
+ static async getUsersSummaryByWebApiKey(webApiKey, steamIds) {
1792
+ const { __params, __cookies } = formatParams([webApiKey, steamIds]);
1793
+ const config = {
1794
+ method: "getUsersSummaryByWebApiKey",
1795
+ params: __params,
1796
+ is_static: true,
1797
+ };
1798
+ return await doRequest(config);
1799
+ }
1800
+ static async getUserFriendListByWebApiKey(webApiKey, steamId) {
1801
+ const { __params, __cookies } = formatParams([webApiKey, steamId]);
1802
+ const config = {
1803
+ method: "getUserFriendListByWebApiKey",
1804
+ params: __params,
1805
+ is_static: true,
1806
+ };
1807
+ return await doRequest(config);
1808
+ }
1809
+ static async queryLocations() {
1810
+ const { __params, __cookies } = formatParams([]);
1811
+ const config = {
1812
+ method: "queryLocations",
1813
+ params: __params,
1814
+ is_static: true,
1815
+ };
1816
+ return await doRequest(config);
1817
+ }
1818
+ static async queryAppList(term) {
1819
+ const { __params, __cookies } = formatParams([term]);
1820
+ const config = {
1821
+ method: "queryAppList",
1822
+ params: __params,
1823
+ is_static: true,
1824
+ };
1825
+ return await doRequest(config);
1826
+ }
1827
+ static async suggestAppList(term) {
1828
+ const { __params, __cookies } = formatParams([term]);
1829
+ const config = {
1830
+ method: "suggestAppList",
1831
+ params: __params,
1832
+ is_static: true,
1833
+ };
1834
+ return await doRequest(config);
1835
+ }
1836
+ static async steamID642Miniprofile(steamId) {
1837
+ const { __params, __cookies } = formatParams([steamId]);
1838
+ const config = {
1839
+ method: "steamID642Miniprofile",
1840
+ params: __params,
1841
+ is_static: true,
1842
+ };
1843
+ return await doRequest(config);
1844
+ }
1845
+ static async miniprofile2SteamID64(miniprofile) {
1846
+ const { __params, __cookies } = formatParams([miniprofile]);
1847
+ const config = {
1848
+ method: "miniprofile2SteamID64",
1849
+ params: __params,
1850
+ is_static: true,
1851
+ };
1852
+ return await doRequest(config);
1853
+ }
1854
+ static async groupminiid2SteamID64(miniid) {
1855
+ const { __params, __cookies } = formatParams([miniid]);
1856
+ const config = {
1857
+ method: "groupminiid2SteamID64",
1858
+ params: __params,
1859
+ is_static: true,
1860
+ };
1861
+ return await doRequest(config);
1862
+ }
1863
+ static async getCustomURL_from_ProfileURL(profileURL) {
1864
+ const { __params, __cookies } = formatParams([profileURL]);
1865
+ const config = {
1866
+ method: "getCustomURL_from_ProfileURL",
1867
+ params: __params,
1868
+ is_static: true,
1869
+ };
1870
+ return await doRequest(config);
1871
+ }
1872
+ static async getProfileURL_from_CustomURL(customURL) {
1873
+ const { __params, __cookies } = formatParams([customURL]);
1874
+ const config = {
1875
+ method: "getProfileURL_from_CustomURL",
1876
+ params: __params,
1877
+ is_static: true,
1878
+ };
1879
+ return await doRequest(config);
1880
+ }
1881
+ static async getAppList() {
1882
+ const { __params, __cookies } = formatParams([]);
1883
+ const config = {
1884
+ method: "getAppList",
1885
+ params: __params,
1886
+ is_static: true,
1887
+ };
1888
+ return await doRequest(config);
1889
+ }
1890
+ static async getAppDetail(appIds) {
1891
+ const { __params, __cookies } = formatParams([appIds]);
1892
+ const config = {
1893
+ method: "getAppDetail",
1894
+ params: __params,
1895
+ is_static: true,
1896
+ };
1897
+ return await doRequest(config);
1898
+ }
1899
+ static async getAppVersion(appID) {
1900
+ const { __params, __cookies } = formatParams([appID]);
1901
+ const config = {
1902
+ method: "getAppVersion",
1903
+ params: __params,
1904
+ is_static: true,
1905
+ };
1906
+ return await doRequest(config);
1907
+ }
1908
+ static async generateSessionID() {
1909
+ const { __params, __cookies } = formatParams([]);
1910
+ const config = {
1911
+ method: "generateSessionID",
1912
+ params: __params,
1913
+ is_static: true,
1914
+ };
1915
+ return await doRequest(config);
1916
+ }
1917
+ static async communityLogin({ username, password, emailauth, cookie, steamMachineAuth }) {
1918
+ const { __params, __cookies } = formatParams([{ username, password, emailauth, cookie, steamMachineAuth }]);
1919
+ const config = {
1920
+ method: "communityLogin",
1921
+ params: __params,
1922
+ is_static: true,
1923
+ };
1924
+ return await doRequest(config);
1925
+ }
1926
+ static async getrsakey(username) {
1927
+ const { __params, __cookies } = formatParams([username]);
1928
+ const config = {
1929
+ method: "getrsakey",
1930
+ params: __params,
1931
+ is_static: true,
1932
+ };
1933
+ return await doRequest(config);
1934
+ }
1935
+ static async oAuthLogin(steamguard, access_token) {
1936
+ const { __params, __cookies } = formatParams([steamguard, access_token]);
1937
+ const config = {
1938
+ method: "oAuthLogin",
1939
+ params: __params,
1940
+ is_static: true,
1941
+ };
1942
+ return await doRequest(config);
1943
+ }
1944
+ static async _isPlsLoginFirst(data) {
1945
+ const { __params, __cookies } = formatParams([data]);
1946
+ const config = {
1947
+ method: "_isPlsLoginFirst",
1948
+ params: __params,
1949
+ is_static: true,
1950
+ };
1951
+ return await doRequest(config);
1952
+ }
1953
+ static async _httpRequestXML(link) {
1954
+ const { __params, __cookies } = formatParams([link]);
1955
+ const config = {
1956
+ method: "_httpRequestXML",
1957
+ params: __params,
1958
+ is_static: true,
1959
+ };
1960
+ return await doRequest(config);
1961
+ }
1962
+ static async _formatGroupLink({ link, gid, groupURL, page, content_only, searchKey, pathname }) {
1963
+ const { __params, __cookies } = formatParams([{ link, gid, groupURL, page, content_only, searchKey, pathname }]);
1964
+ const config = {
1965
+ method: "_formatGroupLink",
1966
+ params: __params,
1967
+ is_static: true,
1968
+ };
1969
+ return await doRequest(config);
1970
+ }
1971
+ static async _parseGroupInfo(html) {
1972
+ const { __params, __cookies } = formatParams([html]);
1973
+ const config = {
1974
+ method: "_parseGroupInfo",
1975
+ params: __params,
1976
+ is_static: true,
1977
+ };
1978
+ return await doRequest(config);
1979
+ }
1980
+ static async getGroupOverview({ groupURL, gid, page, cookie, link, content_only, searchKey }) {
1981
+ const { __params, __cookies } = formatParams([{ groupURL, gid, page, cookie, link, content_only, searchKey }]);
1982
+ const config = {
1983
+ method: "getGroupOverview",
1984
+ params: __params,
1985
+ is_static: true,
1986
+ };
1987
+ return await doRequest(config);
1988
+ }
1989
+ static async getGroupMembers({ groupURL, gid, page, cookie, link, content_only, searchKey }) {
1990
+ const { __params, __cookies } = formatParams([{ groupURL, gid, page, cookie, link, content_only, searchKey }]);
1991
+ const config = {
1992
+ method: "getGroupMembers",
1993
+ params: __params,
1994
+ is_static: true,
1995
+ };
1996
+ return await doRequest(config);
1997
+ }
1998
+ static async getGroupMembersFull({ groupURL, gid, cookie, cbOnMember, cbOnMembers, content_only, searchKey }) {
1999
+ const { __params, __cookies } = formatParams([{ groupURL, gid, cookie, cbOnMember, cbOnMembers, content_only, searchKey }]);
2000
+ const config = {
2001
+ method: "getGroupMembersFull",
2002
+ params: __params,
2003
+ is_static: true,
2004
+ };
2005
+ return await doRequest(config);
2006
+ }
2007
+ static async getGroupInfoXML({ groupURL, gid, page, link }) {
2008
+ const { __params, __cookies } = formatParams([{ groupURL, gid, page, link }]);
2009
+ const config = {
2010
+ method: "getGroupInfoXML",
2011
+ params: __params,
2012
+ is_static: true,
2013
+ };
2014
+ return await doRequest(config);
2015
+ }
2016
+ static async getGroupInfoXMLFull({ groupURL, gid, cbOnMembers }) {
2017
+ const { __params, __cookies } = formatParams([{ groupURL, gid, cbOnMembers }]);
2018
+ const config = {
2019
+ method: "getGroupInfoXMLFull",
2020
+ params: __params,
2021
+ is_static: true,
2022
+ };
2023
+ return await doRequest(config);
2024
+ }
2025
+ static async _parsePendingFriendList(html, selector) {
2026
+ const { __params, __cookies } = formatParams([html, selector]);
2027
+ const config = {
2028
+ method: "_parsePendingFriendList",
2029
+ params: __params,
2030
+ is_static: true,
2031
+ };
2032
+ return await doRequest(config);
2033
+ }
2034
+ static async _parseMatchHistory(html) {
2035
+ const { __params, __cookies } = formatParams([html]);
2036
+ const config = {
2037
+ method: "_parseMatchHistory",
2038
+ params: __params,
2039
+ is_static: true,
2040
+ };
2041
+ return await doRequest(config);
2042
+ }
2043
+ static async _formatPrivacySettings2String(privacySettings) {
2044
+ const { __params, __cookies } = formatParams([privacySettings]);
2045
+ const config = {
2046
+ method: "_formatPrivacySettings2String",
2047
+ params: __params,
2048
+ is_static: true,
2049
+ };
2050
+ return await doRequest(config);
2051
+ }
2052
+ static async _formatPrivacySettings2Value(privacySettings) {
2053
+ const { __params, __cookies } = formatParams([privacySettings]);
2054
+ const config = {
2055
+ method: "_formatPrivacySettings2Value",
2056
+ params: __params,
2057
+ is_static: true,
2058
+ };
2059
+ return await doRequest(config);
2060
+ }
2061
+ static async getUserGroupsList(steamId, cookie) {
2062
+ const { __params, __cookies } = formatParams([steamId, cookie]);
2063
+ const config = {
2064
+ method: "getUserGroupsList",
2065
+ params: __params,
2066
+ is_static: true,
2067
+ };
2068
+ return await doRequest(config);
2069
+ }
2070
+ static async _parseUserGroupList(html) {
2071
+ const { __params, __cookies } = formatParams([html]);
2072
+ const config = {
2073
+ method: "_parseUserGroupList",
2074
+ params: __params,
2075
+ is_static: true,
2076
+ };
2077
+ return await doRequest(config);
2078
+ }
2079
+ static async resolveUsers(steamIDs, cookie) {
2080
+ const { __params, __cookies } = formatParams([steamIDs, cookie]);
2081
+ const config = {
2082
+ method: "resolveUsers",
2083
+ params: __params,
2084
+ is_static: true,
2085
+ };
2086
+ return await doRequest(config);
2087
+ }
2088
+ static async GetAvatarURLFromHash(hash, size) {
2089
+ const { __params, __cookies } = formatParams([hash, size]);
2090
+ const config = {
2091
+ method: "GetAvatarURLFromHash",
2092
+ params: __params,
2093
+ is_static: true,
2094
+ };
2095
+ return await doRequest(config);
2096
+ }
2097
+ static async GetAvatarHashFromURL(url) {
2098
+ const { __params, __cookies } = formatParams([url]);
2099
+ const config = {
2100
+ method: "GetAvatarHashFromURL",
2101
+ params: __params,
2102
+ is_static: true,
2103
+ };
2104
+ return await doRequest(config);
2105
+ }
2106
+ static async GetAvatarHashFromMultipleURL(urls) {
2107
+ const { __params, __cookies } = formatParams([urls]);
2108
+ const config = {
2109
+ method: "GetAvatarHashFromMultipleURL",
2110
+ params: __params,
2111
+ is_static: true,
2112
+ };
2113
+ return await doRequest(config);
2114
+ }
2115
+ static async createFriendCode(steamId) {
2116
+ const { __params, __cookies } = formatParams([steamId]);
2117
+ const config = {
2118
+ method: "createFriendCode",
2119
+ params: __params,
2120
+ is_static: true,
2121
+ };
2122
+ return await doRequest(config);
2123
+ }
2124
+ static async parseFriendCode(friendCode) {
2125
+ const { __params, __cookies } = formatParams([friendCode]);
2126
+ const config = {
2127
+ method: "parseFriendCode",
2128
+ params: __params,
2129
+ is_static: true,
2130
+ };
2131
+ return await doRequest(config);
2132
+ }
2133
+ static async _formatString2Int(text) {
2134
+ const { __params, __cookies } = formatParams([text]);
2135
+ const config = {
2136
+ method: "_formatString2Int",
2137
+ params: __params,
2138
+ is_static: true,
2139
+ };
2140
+ return await doRequest(config);
2141
+ }
2142
+ static async confirmEmailForAdd(confirmURL) {
2143
+ const { __params, __cookies } = formatParams([confirmURL]);
2144
+ const config = {
2145
+ method: "confirmEmailForAdd",
2146
+ params: __params,
2147
+ is_static: true,
2148
+ };
2149
+ return await doRequest(config);
2150
+ }
2151
+ static async parseGameBanType(gameBanFull) {
2152
+ const { __params, __cookies } = formatParams([gameBanFull]);
2153
+ const config = {
2154
+ method: "parseGameBanType",
2155
+ params: __params,
2156
+ is_static: true,
2157
+ };
2158
+ return await doRequest(config);
2159
+ }
2160
+ static async getPriceOverview(appID, market_hash_name) {
2161
+ const { __params, __cookies } = formatParams([appID, market_hash_name]);
2162
+ const config = {
2163
+ method: "getPriceOverview",
2164
+ params: __params,
2165
+ is_static: true,
2166
+ };
2167
+ return await doRequest(config);
2168
+ }
2169
+ static async parseTradeURL(tradeURL) {
2170
+ const { __params, __cookies } = formatParams([tradeURL]);
2171
+ const config = {
2172
+ method: "parseTradeURL",
2173
+ params: __params,
2174
+ is_static: true,
2175
+ };
2176
+ return await doRequest(config);
2177
+ }
2178
+ static async isCookieAlive(cookie) {
2179
+ const { __params, __cookies } = formatParams([cookie]);
2180
+ const config = {
2181
+ method: "isCookieAlive",
2182
+ params: __params,
2183
+ is_static: true,
2184
+ };
2185
+ return await doRequest(config);
2186
+ }
2187
+ static async getItemOrdersHistogram(appID, market_hash_name, item_nameid) {
2188
+ const { __params, __cookies } = formatParams([appID, market_hash_name, item_nameid]);
2189
+ const config = {
2190
+ method: "getItemOrdersHistogram",
2191
+ params: __params,
2192
+ is_static: true,
2193
+ };
2194
+ return await doRequest(config);
2195
+ }
2196
+ static async fetchAccessToken(cookie) {
2197
+ const { __params, __cookies } = formatParams([cookie]);
2198
+ const config = {
2199
+ method: "fetchAccessToken",
2200
+ params: __params,
2201
+ is_static: true,
2202
+ };
2203
+ return await doRequest(config);
2204
+ }
2205
+ static async parseWizardPageParams(html) {
2206
+ const { __params, __cookies } = formatParams([html]);
2207
+ const config = {
2208
+ method: "parseWizardPageParams",
2209
+ params: __params,
2210
+ is_static: true,
2211
+ };
2212
+ return await doRequest(config);
2213
+ }
2214
+ static async decodeQRImage(imageURL) {
2215
+ const { __params, __cookies } = formatParams([imageURL]);
2216
+ const config = {
2217
+ method: "decodeQRImage",
2218
+ params: __params,
2219
+ is_static: true,
2220
+ };
2221
+ return await doRequest(config);
2222
+ }
2223
+ static async approveLoginRequest(steamId, url, sharedSecret, accessToken) {
2224
+ const { __params, __cookies } = formatParams([steamId, url, sharedSecret, accessToken]);
2225
+ const config = {
2226
+ method: "approveLoginRequest",
2227
+ params: __params,
2228
+ is_static: true,
2229
+ };
2230
+ return await doRequest(config);
2231
+ }
2232
+ static async getAuthSessionInfo(steamId, url, sharedSecret, accessToken) {
2233
+ const { __params, __cookies } = formatParams([steamId, url, sharedSecret, accessToken]);
2234
+ const config = {
2235
+ method: "getAuthSessionInfo",
2236
+ params: __params,
2237
+ is_static: true,
2238
+ };
2239
+ return await doRequest(config);
2240
+ }
2241
+ }