steamutils 1.4.92 → 1.4.93

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