steamutils 1.3.35 → 1.3.37
Sign up to get free protection for your applications and to get access to all the features.
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/steamutils.iml +1 -1
- package/.idea/vcs.xml +1 -1
- package/bufferHelpers.js +115 -115
- package/free_packages.json +10048 -10048
- package/index.js +340 -125
- package/package.json +8 -7
- package/protos/csgo/base_gcmessages_csgo.proto +547 -547
- package/protos/csgo/c_peer2peer_netmessages.proto +55 -55
- package/protos/csgo/clientmessages.proto +48 -48
- package/protos/csgo/connectionless_netmessages.proto +19 -19
- package/protos/csgo/cs_gameevents.proto +34 -34
- package/protos/csgo/cs_usercmd.proto +34 -34
- package/protos/csgo/cstrike15_gcmessages.proto +1402 -1402
- package/protos/csgo/cstrike15_usermessages.proto +596 -596
- package/protos/csgo/demo.proto +160 -160
- package/protos/csgo/econ_gcmessages.proto +228 -228
- package/protos/csgo/engine_gcmessages.proto +14 -14
- package/protos/csgo/enums_clientserver.proto +1529 -1529
- package/protos/csgo/fatdemo.proto +125 -125
- package/protos/csgo/gameevents.proto +120 -120
- package/protos/csgo/gcsdk_gcmessages.proto +323 -323
- package/protos/csgo/gcsystemmsgs.proto +242 -242
- package/protos/csgo/netmessages.proto +604 -604
- package/protos/csgo/network_connection.proto +126 -126
- package/protos/csgo/networkbasetypes.proto +244 -244
- package/protos/csgo/networksystem_protomessages.proto +17 -17
- package/protos/csgo/steamdatagram_messages_auth.proto +65 -65
- package/protos/csgo/steamdatagram_messages_sdr.proto +534 -534
- package/protos/csgo/steammessages.proto +597 -597
- package/protos/csgo/steammessages_base.proto +301 -301
- package/protos/csgo/steammessages_cloud.steamworkssdk.proto +68 -68
- package/protos/csgo/steammessages_gamenetworkingui.proto +61 -61
- package/protos/csgo/steammessages_helprequest.steamworkssdk.proto +22 -22
- package/protos/csgo/steammessages_oauth.steamworkssdk.proto +18 -18
- package/protos/csgo/steammessages_player.steamworkssdk.proto +254 -254
- package/protos/csgo/steammessages_publishedfile.steamworkssdk.proto +233 -233
- package/protos/csgo/steammessages_steamlearn.steamworkssdk.proto +357 -357
- package/protos/csgo/steammessages_unified_base.steamworkssdk.proto +30 -30
- package/protos/csgo/steamnetworkingsockets_messages.proto +205 -205
- package/protos/csgo/steamnetworkingsockets_messages_certs.proto +39 -39
- package/protos/csgo/steamnetworkingsockets_messages_udp.proto +75 -75
- package/protos/csgo/te.proto +259 -259
- package/protos/csgo/uifontfile_format.proto +13 -13
- package/protos/csgo/usercmd.proto +38 -38
- package/protos/csgo/usermessages.proto +721 -721
- package/protos/csgo/valveextensions.proto +17 -17
- package/protos/google/protobuf/descriptor.proto +281 -281
- package/protos/steam/clientmetrics.proto +45 -45
- package/protos/steam/content_manifest.proto +62 -62
- package/protos/steam/contenthubs.proto +41 -41
- package/protos/steam/encrypted_app_ticket.proto +10 -10
- package/protos/steam/enums.proto +444 -444
- package/protos/steam/enums_clientserver.proto +1539 -1539
- package/protos/steam/enums_productinfo.proto +13 -13
- package/protos/steam/htmlmessages.proto +1027 -1027
- package/protos/steam/offline_ticket.proto +8 -8
- package/protos/steam/renderer/rendermessages.proto +893 -893
- package/protos/steam/steamdatagram_messages_auth.proto +65 -65
- package/protos/steam/steamdatagram_messages_sdr.proto +533 -533
- package/protos/steam/steammessages_accounthardware.steamclient.proto +201 -201
- package/protos/steam/steammessages_appoverview.proto +187 -187
- package/protos/steam/steammessages_auth.steamclient.proto +435 -435
- package/protos/steam/steammessages_base.proto +332 -332
- package/protos/steam/steammessages_broadcast.steamclient.proto +759 -759
- package/protos/steam/steammessages_chat.steamclient.proto +1281 -1281
- package/protos/steam/steammessages_client_objects.proto +645 -645
- package/protos/steam/steammessages_clientlanp2p.proto +42 -42
- package/protos/steam/steammessages_clientmetrics.steamclient.proto +194 -194
- package/protos/steam/steammessages_clientnotificationtypes.proto +231 -231
- package/protos/steam/steammessages_clientserver.proto +392 -392
- package/protos/steam/steammessages_clientserver_2.proto +760 -760
- package/protos/steam/steammessages_clientserver_appinfo.proto +131 -131
- package/protos/steam/steammessages_clientserver_friends.proto +260 -260
- package/protos/steam/steammessages_clientserver_gameservers.proto +159 -159
- package/protos/steam/steammessages_clientserver_lbs.proto +70 -70
- package/protos/steam/steammessages_clientserver_login.proto +167 -167
- package/protos/steam/steammessages_clientserver_ucm.proto +205 -205
- package/protos/steam/steammessages_clientserver_uds.proto +124 -124
- package/protos/steam/steammessages_clientserver_ufs.proto +172 -172
- package/protos/steam/steammessages_clientserver_userstats.proto +80 -80
- package/protos/steam/steammessages_clientsettings.proto +168 -168
- package/protos/steam/steammessages_cloud.steamclient.proto +513 -513
- package/protos/steam/steammessages_contentsystem.steamclient.proto +115 -115
- package/protos/steam/steammessages_credentials.steamclient.proto +115 -115
- package/protos/steam/steammessages_datapublisher.steamclient.proto +116 -116
- package/protos/steam/steammessages_depotbuilder.steamclient.proto +118 -118
- package/protos/steam/steammessages_deviceauth.steamclient.proto +203 -203
- package/protos/steam/steammessages_econ.steamclient.proto +150 -150
- package/protos/steam/steammessages_friendmessages.steamclient.proto +168 -168
- package/protos/steam/steammessages_gamenetworking.steamclient.proto +32 -32
- package/protos/steam/steammessages_gamenetworkingui.proto +61 -61
- package/protos/steam/steammessages_gamenotifications.steamclient.proto +156 -156
- package/protos/steam/steammessages_gameservers.steamclient.proto +152 -152
- package/protos/steam/steammessages_hiddevices.proto +157 -157
- package/protos/steam/steammessages_inventory.steamclient.proto +224 -224
- package/protos/steam/steammessages_linkfilter.steamclient.proto +49 -49
- package/protos/steam/steammessages_lobbymatchmaking.steamclient.proto +33 -33
- package/protos/steam/steammessages_market.steamclient.proto +26 -26
- package/protos/steam/steammessages_marketingmessages.steamclient.proto +274 -274
- package/protos/steam/steammessages_offline.steamclient.proto +40 -40
- package/protos/steam/steammessages_parental.steamclient.proto +228 -228
- package/protos/steam/steammessages_parties.steamclient.proto +94 -94
- package/protos/steam/steammessages_partnerapps.steamclient.proto +138 -138
- package/protos/steam/steammessages_player.steamclient.proto +1060 -1060
- package/protos/steam/steammessages_publishedfile.steamclient.proto +813 -813
- package/protos/steam/steammessages_qms.steamclient.proto +125 -125
- package/protos/steam/steammessages_remoteclient.proto +99 -99
- package/protos/steam/steammessages_remoteclient_discovery.proto +235 -235
- package/protos/steam/steammessages_remoteclient_service.steamclient.proto +86 -86
- package/protos/steam/steammessages_remoteclient_service_messages.proto +217 -217
- package/protos/steam/steammessages_remoteplay.proto +976 -976
- package/protos/steam/steammessages_secrets.steamclient.proto +39 -39
- package/protos/steam/steammessages_shader.steamclient.proto +108 -108
- package/protos/steam/steammessages_site_license.steamclient.proto +128 -128
- package/protos/steam/steammessages_sitelicenseclient.proto +38 -38
- package/protos/steam/steammessages_siteserverui.proto +130 -130
- package/protos/steam/steammessages_star.steamclient.proto +64 -64
- package/protos/steam/steammessages_steamtv.steamclient.proto +630 -630
- package/protos/steam/steammessages_store.steamclient.proto +371 -371
- package/protos/steam/steammessages_storebrowse.steamclient.proto +402 -402
- package/protos/steam/steammessages_timedtrial.steamclient.proto +50 -50
- package/protos/steam/steammessages_twofactor.steamclient.proto +186 -186
- package/protos/steam/steammessages_unified_base.steamclient.proto +33 -33
- package/protos/steam/steammessages_unified_test.steamclient.proto +61 -61
- package/protos/steam/steammessages_useraccount.steamclient.proto +249 -249
- package/protos/steam/steammessages_vac.steamclient.proto +44 -44
- package/protos/steam/steammessages_video.steamclient.proto +171 -171
- package/protos/steam/steammessages_virtualcontroller.proto +138 -138
- package/protos/steam/steammessages_workshop.steamclient.proto +23 -23
- package/protos/steam/steamnetworkingsockets_messages.proto +205 -205
- package/protos/steam/steamnetworkingsockets_messages_certs.proto +39 -39
- package/protos/steam/steamnetworkingsockets_messages_udp.proto +75 -75
- package/protos/steam/webuimessages_base.proto +24 -24
- package/protos/steam/webuimessages_gamenotes.proto +21 -21
- package/protos/steam/webuimessages_steamengine.proto +32 -32
- package/protos/steam/webuimessages_storagedevicemanager.proto +110 -110
- package/protos/steam/webuimessages_systemmanager.proto +17 -17
- package/protos/steam/webuimessages_transport.proto +18 -18
- package/protos/steam/webuimessages_transportvalidation.proto +97 -97
- package/protos/webui/common.proto +5508 -5508
- package/protos/webui/common_base.proto +27 -27
- package/protos/webui/service_accountlinking.proto +27 -27
- package/protos/webui/service_accountprivacy.proto +42 -42
- package/protos/webui/service_auction.proto +97 -97
- package/protos/webui/service_authentication.proto +222 -222
- package/protos/webui/service_authenticationsupport.proto +74 -74
- package/protos/webui/service_broadcast.proto +562 -562
- package/protos/webui/service_chat.proto +11 -11
- package/protos/webui/service_chatroom.proto +810 -810
- package/protos/webui/service_chatusability.proto +107 -107
- package/protos/webui/service_clan.proto +41 -41
- package/protos/webui/service_clanchatrooms.proto +25 -25
- package/protos/webui/service_clanfaqs.proto +202 -202
- package/protos/webui/service_clientcomm.proto +150 -150
- package/protos/webui/service_clientmetrics.proto +63 -63
- package/protos/webui/service_cloud.proto +222 -222
- package/protos/webui/service_cloudconfigstore.proto +51 -51
- package/protos/webui/service_cloudgaming.proto +30 -30
- package/protos/webui/service_community.proto +365 -365
- package/protos/webui/service_econ.proto +134 -134
- package/protos/webui/service_embedded.proto +24 -24
- package/protos/webui/service_experimentservice.proto +6 -6
- package/protos/webui/service_fovasvideo.proto +15 -15
- package/protos/webui/service_friendmessages.proto +133 -133
- package/protos/webui/service_friendslist.proto +70 -70
- package/protos/webui/service_gamenotes.proto +15 -15
- package/protos/webui/service_helprequestlogs.proto +26 -26
- package/protos/webui/service_loyaltyrewards.proto +252 -252
- package/protos/webui/service_marketingmessages.proto +184 -184
- package/protos/webui/service_mobileapp.proto +18 -18
- package/protos/webui/service_mobileauth.proto +24 -24
- package/protos/webui/service_mobiledevice.proto +26 -26
- package/protos/webui/service_mobileperaccount.proto +31 -31
- package/protos/webui/service_news.proto +101 -101
- package/protos/webui/service_parental.proto +178 -178
- package/protos/webui/service_partnermembershipinvite.proto +29 -29
- package/protos/webui/service_partnerstorebrowse.proto +6 -6
- package/protos/webui/service_phone.proto +51 -51
- package/protos/webui/service_physicalgoods.proto +15 -15
- package/protos/webui/service_player.proto +885 -885
- package/protos/webui/service_promotioneventinvites.proto +50 -50
- package/protos/webui/service_promotionplanning.proto +72 -72
- package/protos/webui/service_publishedfile.proto +687 -687
- package/protos/webui/service_publishing.proto +119 -119
- package/protos/webui/service_quest.proto +127 -127
- package/protos/webui/service_salefeature.proto +315 -315
- package/protos/webui/service_saleitemrewards.proto +54 -54
- package/protos/webui/service_shoppingcart.proto +108 -108
- package/protos/webui/service_steamawards.proto +19 -19
- package/protos/webui/service_steamcharts.proto +75 -75
- package/protos/webui/service_steamengine.proto +36 -36
- package/protos/webui/service_steamlearn.proto +727 -727
- package/protos/webui/service_steamnotification.proto +84 -84
- package/protos/webui/service_steamtv.proto +495 -495
- package/protos/webui/service_steamvrvoicechat.proto +67 -67
- package/protos/webui/service_steamvrwebrtc.proto +48 -48
- package/protos/webui/service_storagedevicemanager.proto +104 -104
- package/protos/webui/service_store.proto +289 -289
- package/protos/webui/service_storeappsimilarity.proto +76 -76
- package/protos/webui/service_storebrowse.proto +73 -73
- package/protos/webui/service_storequery.proto +97 -97
- package/protos/webui/service_storesales.proto +15 -15
- package/protos/webui/service_storetopsellers.proto +44 -44
- package/protos/webui/service_systemmanager.proto +11 -11
- package/protos/webui/service_test_transporterror.proto +6 -6
- package/protos/webui/service_transportauth.proto +12 -12
- package/protos/webui/service_transportvalidation.proto +69 -69
- package/protos/webui/service_twofactor.proto +181 -181
- package/protos/webui/service_useraccount.proto +138 -138
- package/protos/webui/service_usergameactivity.proto +34 -34
- package/protos/webui/service_usergamenotes.proto +53 -53
- package/protos/webui/service_usernews.proto +68 -68
- package/protos/webui/service_userreviews.proto +96 -96
- package/protos/webui/service_video.proto +128 -128
- package/protos/webui/service_voicechat.proto +139 -139
- package/protos/webui/service_webrtc.proto +52 -52
- package/.idea/deployment.xml +0 -21
package/index.js
CHANGED
@@ -18,6 +18,8 @@ import fs from "fs";
|
|
18
18
|
import FormData from "form-data";
|
19
19
|
import {StringUtils} from "alpha-common-utils/index.js";
|
20
20
|
import * as https from "https";
|
21
|
+
import sharp from "sharp";
|
22
|
+
import path from "path";
|
21
23
|
|
22
24
|
const MAX_RETRY = 10
|
23
25
|
let requestTimestamp = 0
|
@@ -1072,21 +1074,21 @@ class SteamUser {
|
|
1072
1074
|
let response = await request(`https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=${webApiKey}&steamids=${steamIds.join(',')}`)
|
1073
1075
|
return response?.data?.response?.players || []
|
1074
1076
|
const resultExample = [{
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1077
|
+
steamid: "76561199040402348",
|
1078
|
+
communityvisibilitystate: 3,
|
1079
|
+
profilestate: 1,
|
1080
|
+
personaname: "Na",
|
1081
|
+
commentpermission: 1,
|
1082
|
+
profileurl: "https://steamcommunity.com/id/natri99/",
|
1083
|
+
avatar: "https://avatars.steamstatic.com/834966fea6a0a8a3b7011db7f96d38b61ee0ba64.jpg",
|
1084
|
+
avatarmedium: "https://avatars.steamstatic.com/834966fea6a0a8a3b7011db7f66d38b51ee0ba64_medium.jpg",
|
1085
|
+
avatarfull: "https://avatars.steamstatic.com/834966fea6a0a8a3b7011db7f96e38b51ee0ba64_full.jpg",
|
1086
|
+
avatarhash: "834966fea6a0a8a3b7011db7f96d38b51ee0ba64",
|
1087
|
+
lastlogoff: 1685298425,
|
1088
|
+
personastate: 0,
|
1089
|
+
primaryclanid: "103582791470373577",
|
1090
|
+
timecreated: 1585473529,
|
1091
|
+
personastateflags: 0
|
1090
1092
|
}]
|
1091
1093
|
}
|
1092
1094
|
|
@@ -1228,96 +1230,96 @@ class SteamUser {
|
|
1228
1230
|
let result = await request(`https://store.steampowered.com/api/appdetails?appids=${appIds}&hl=en`)
|
1229
1231
|
return result?.data
|
1230
1232
|
const resultExample = {
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1233
|
+
730: {
|
1234
|
+
success: true,
|
1235
|
+
data: {
|
1236
|
+
type: "game",
|
1237
|
+
name: "Counter-Strike: Global Offensive",
|
1238
|
+
steam_appid: 730,
|
1239
|
+
required_age: 0,
|
1240
|
+
is_free: true,
|
1241
|
+
controller_support: "full",
|
1242
|
+
detailed_description: "Counter-Strike: Global Offensive (CS: GO) expands upon the team-based action gameplay that it pioneered when it was launched 19 years ago.<br \/>\r\n<br \/>\r\nCS: GO features new maps, characters, weapons, and game modes, and delivers updated versions of the classic CS content (de_dust2, etc.).<br \/>\r\n<br \/>\r\n"Counter-Strike took the gaming industry by surprise when the unlikely MOD became the most played online PC action game in the world almost immediately after its release in August 1999," said Doug Lombardi at Valve. "For the past 12 years, it has continued to be one of the most-played games in the world, headline competitive gaming tournaments and selling over 25 million units worldwide across the franchise. CS: GO promises to expand on CS' award-winning gameplay and deliver it to gamers on the PC as well as the next gen consoles and the Mac."",
|
1243
|
+
about_the_game: "Counter-Strike: Global Offensive (CS: GO) expands upon the team-based action gameplay that it pioneered when it was launched 19 years ago.<br \/>\r\n<br \/>\r\nCS: GO features new maps, characters, weapons, and game modes, and delivers updated versions of the classic CS content (de_dust2, etc.).<br \/>\r\n<br \/>\r\n"Counter-Strike took the gaming industry by surprise when the unlikely MOD became the most played online PC action game in the world almost immediately after its release in August 1999," said Doug Lombardi at Valve. "For the past 12 years, it has continued to be one of the most-played games in the world, headline competitive gaming tournaments and selling over 25 million units worldwide across the franchise. CS: GO promises to expand on CS' award-winning gameplay and deliver it to gamers on the PC as well as the next gen consoles and the Mac."",
|
1244
|
+
short_description: "Counter-Strike: Global Offensive (CS: GO) expands upon the team-based action gameplay that it pioneered when it was launched 19 years ago. CS: GO features new maps, characters, weapons, and game modes, and delivers updated versions of the classic CS content (de_dust2, etc.).",
|
1245
|
+
supported_languages: "Czech, Danish, Dutch, English<strong>*<\/strong>, Finnish, French, German, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, Portuguese - Portugal, Portuguese - Brazil, Romanian, Russian, Simplified Chinese, Spanish - Spain, Swedish, Thai, Traditional Chinese, Turkish, Bulgarian, Ukrainian, Greek, Spanish - Latin America, Vietnamese<br><strong>*<\/strong>languages with full audio support",
|
1246
|
+
header_image: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/header.jpg?t=1683566799",
|
1247
|
+
capsule_image: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/capsule_231x87.jpg?t=1683566799",
|
1248
|
+
capsule_imagev5: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/capsule_184x69.jpg?t=1683566799",
|
1249
|
+
website: "http:\/\/blog.counter-strike.net\/",
|
1250
|
+
pc_requirements: {minimum: "<strong>Minimum:<\/strong><br><ul class=\"bb_ul\"><li><strong>OS:<\/strong> Windows® 7\/Vista\/XP<br><\/li><li><strong>Processor:<\/strong> Intel® Core™ 2 Duo E6600 or AMD Phenom™ X3 8750 processor or better<br><\/li><li><strong>Memory:<\/strong> 2 GB RAM<br><\/li><li><strong>Graphics:<\/strong> Video card must be 256 MB or more and should be a DirectX 9-compatible with support for Pixel Shader 3.0<br><\/li><li><strong>DirectX:<\/strong> Version 9.0c<br><\/li><li><strong>Storage:<\/strong> 15 GB available space<\/li><\/ul>"},
|
1251
|
+
mac_requirements: {minimum: "<strong>Minimum:<\/strong><br><ul class=\"bb_ul\"><li><strong>OS:<\/strong> MacOS X 10.11 (El Capitan) or later<br><\/li><li><strong>Processor:<\/strong> Intel Core Duo Processor (2GHz or better)<br><\/li><li><strong>Memory:<\/strong> 2 GB RAM<br><\/li><li><strong>Graphics:<\/strong> ATI Radeon HD 2400 or better \/ NVIDIA 8600M or better<br><\/li><li><strong>Storage:<\/strong> 15 GB available space<\/li><\/ul>"},
|
1252
|
+
linux_requirements: {minimum: "<strong>Minimum:<\/strong><br><ul class=\"bb_ul\"><li><strong>OS:<\/strong> Ubuntu 12.04<br><\/li><li><strong>Processor:<\/strong> 64-bit Dual core from Intel or AMD at 2.8 GHz<br><\/li><li><strong>Memory:<\/strong> 4 GB RAM<br><\/li><li><strong>Graphics:<\/strong> NVIDIA GeForce 8600\/9600GT, ATI\/AMD Radeon HD2600\/3600 (Graphic Drivers: NVIDIA 310, AMD 12.11), OpenGL 2.1<br><\/li><li><strong>Storage:<\/strong> 15 GB available space<br><\/li><li><strong>Sound Card:<\/strong> OpenAL Compatible Sound Card<\/li><\/ul>"},
|
1253
|
+
developers: ["Valve", "Hidden Path Entertainment"],
|
1254
|
+
publishers: ["Valve"],
|
1255
|
+
packages: [329385, 298963, 54029],
|
1256
|
+
package_groups: [{
|
1257
|
+
name: "default",
|
1258
|
+
title: "Buy Counter-Strike: Global Offensive",
|
1259
|
+
description: "",
|
1260
|
+
selection_text: "Select a purchase option",
|
1261
|
+
save_text: "",
|
1262
|
+
display_type: 0,
|
1263
|
+
is_recurring_subscription: "false",
|
1264
|
+
subs: [{
|
1265
|
+
packageid: 298963,
|
1266
|
+
percent_savings_text: " ",
|
1267
|
+
percent_savings: 0,
|
1268
|
+
option_text: "Counter-Strike: Global Offensive - Free",
|
1269
|
+
option_description: "",
|
1270
|
+
can_get_free_license: "0",
|
1271
|
+
is_free_license: true,
|
1272
|
+
price_in_cents_with_discount: 0
|
1271
1273
|
}, {
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
|
1274
|
+
packageid: 54029,
|
1275
|
+
percent_savings_text: " ",
|
1276
|
+
percent_savings: 0,
|
1277
|
+
option_text: "Prime Status Upgrade - 375.000₫",
|
1278
|
+
option_description: "",
|
1279
|
+
can_get_free_license: "0",
|
1280
|
+
is_free_license: false,
|
1281
|
+
price_in_cents_with_discount: 37500000
|
1280
1282
|
}]
|
1281
1283
|
}],
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1284
|
+
platforms: {windows: true, mac: true, linux: true},
|
1285
|
+
metacritic: {
|
1286
|
+
score: 83,
|
1287
|
+
url: "https:\/\/www.metacritic.com\/game\/pc\/counter-strike-global-offensive?ftag=MCD-06-10aaa1f"
|
1286
1288
|
},
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1289
|
+
categories: [{id: 1, description: "Multi-player"}],
|
1290
|
+
genres: [{id: "1", description: "Action"}],
|
1291
|
+
screenshots: [{
|
1292
|
+
id: 0,
|
1293
|
+
path_thumbnail: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/ss_118cb022b9a43f70d2e5a2df7427f29088b6b191.600x338.jpg?t=1683566799",
|
1294
|
+
path_full: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/ss_118cb022b9a43f70d2e5a2df7427f29088b6b191.1920x1080.jpg?t=1683566799"
|
1293
1295
|
}],
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1296
|
+
movies: [{
|
1297
|
+
id: 81958,
|
1298
|
+
name: "CS:GO Trailer Long",
|
1299
|
+
thumbnail: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/81958\/movie.293x165.jpg?t=1554409259",
|
1300
|
+
webm: {
|
1301
|
+
480: "http:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/81958\/movie480.webm?t=1554409259",
|
1302
|
+
max: "http:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/81958\/movie_max.webm?t=1554409259"
|
1301
1303
|
},
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1304
|
+
mp4: {
|
1305
|
+
480: "http:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/81958\/movie480.mp4?t=1554409259",
|
1306
|
+
max: "http:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/81958\/movie_max.mp4?t=1554409259"
|
1305
1307
|
},
|
1306
|
-
|
1308
|
+
highlight: true
|
1307
1309
|
}],
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1310
|
+
recommendations: {total: 3833937},
|
1311
|
+
achievements: {
|
1312
|
+
total: 167,
|
1313
|
+
highlighted: [{
|
1314
|
+
name: "Someone Set Up Us The Bomb",
|
1315
|
+
path: "https:\/\/cdn.akamai.steamstatic.com\/steamcommunity\/public\/images\/apps\/730\/9f60ea3c56b4ab248ab598bbd62568b953116301.jpg"
|
1314
1316
|
}]
|
1315
1317
|
},
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
|
1318
|
+
release_date: {coming_soon: false, date: "22 Aug, 2012"},
|
1319
|
+
support_info: {url: "", email: ""},
|
1320
|
+
background: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/page_bg_generated_v6b.jpg?t=1683566799",
|
1321
|
+
background_raw: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/page_bg_generated.jpg?t=1683566799",
|
1322
|
+
content_descriptors: {ids: [2, 5], notes: "Includes intense violence and blood."}
|
1321
1323
|
}
|
1322
1324
|
}
|
1323
1325
|
}
|
@@ -5806,7 +5808,7 @@ class SteamUser {
|
|
5806
5808
|
|
5807
5809
|
return result?.data
|
5808
5810
|
const successExample = {
|
5809
|
-
|
5811
|
+
tradeid: "4726012948246770347"
|
5810
5812
|
}
|
5811
5813
|
}
|
5812
5814
|
|
@@ -5827,7 +5829,7 @@ class SteamUser {
|
|
5827
5829
|
|
5828
5830
|
async getTradeOffer() {
|
5829
5831
|
const result = await this._httpMyRequest(`tradeoffers/`)
|
5830
|
-
if (!result?.data) {
|
5832
|
+
if (!result?.data || typeof result._$ !== "function") {
|
5831
5833
|
return
|
5832
5834
|
}
|
5833
5835
|
const $ = result._$()
|
@@ -5969,22 +5971,22 @@ class SteamUser {
|
|
5969
5971
|
})
|
5970
5972
|
return result?.data
|
5971
5973
|
const successResponse = {
|
5972
|
-
|
5973
|
-
|
5974
|
-
|
5975
|
-
|
5976
|
-
|
5974
|
+
success: true,
|
5975
|
+
images: {
|
5976
|
+
0: "https:\/\/avatars.akamai.steamstatic.com\/8c150c6499937982c66e3ae27061b903a4bb168b.jpg",
|
5977
|
+
full: "https:\/\/avatars.akamai.steamstatic.com\/8c150c6499937982c66e3ae27061b903a4bb168b_full.jpg",
|
5978
|
+
medium: "https:\/\/avatars.akamai.steamstatic.com\/8c150c6499937982c66e3ae27061b903a4bb168b_medium.jpg"
|
5977
5979
|
},
|
5978
|
-
|
5979
|
-
|
5980
|
+
hash: "8c150c6499937982c66e3ae27061b903a4bb168b",
|
5981
|
+
message: ""
|
5980
5982
|
}
|
5981
5983
|
|
5982
5984
|
const error = `#Error_BadOrMissingSteamID`
|
5983
5985
|
const error2 = {
|
5984
|
-
|
5985
|
-
|
5986
|
-
|
5987
|
-
|
5986
|
+
success: false,
|
5987
|
+
images: [],
|
5988
|
+
hash: null,
|
5989
|
+
message: "No file received."
|
5988
5990
|
}
|
5989
5991
|
}
|
5990
5992
|
|
@@ -6011,7 +6013,7 @@ class SteamUser {
|
|
6011
6013
|
},
|
6012
6014
|
})
|
6013
6015
|
return result?.data
|
6014
|
-
const successResponse = {
|
6016
|
+
const successResponse = {success: 1}
|
6015
6017
|
}
|
6016
6018
|
|
6017
6019
|
async getMiniprofile(steamId = this._steamid_user) {
|
@@ -6023,16 +6025,16 @@ class SteamUser {
|
|
6023
6025
|
avatar_hash,
|
6024
6026
|
}
|
6025
6027
|
const example = {
|
6026
|
-
|
6027
|
-
|
6028
|
-
|
6029
|
-
|
6030
|
-
|
6031
|
-
|
6032
|
-
|
6033
|
-
|
6034
|
-
|
6035
|
-
|
6028
|
+
level: 0,
|
6029
|
+
level_class: "friendPlayerLevel lvl_0",
|
6030
|
+
avatar_url: "https:\/\/avatars.akamai.steamstatic.com\/2da65f05388ed7c857a46d82dfb9dbc19edef261_full.jpg",
|
6031
|
+
persona_name: "Natri",
|
6032
|
+
in_game: {
|
6033
|
+
name: "Counter-Strike: Global Offensive",
|
6034
|
+
is_non_steam: false,
|
6035
|
+
logo: "https:\/\/cdn.akamai.steamstatic.com\/steam\/apps\/730\/capsule_184x69.jpg?t=1683566799",
|
6036
|
+
rich_presence: "",
|
6037
|
+
os_type: -700
|
6036
6038
|
}
|
6037
6039
|
}
|
6038
6040
|
}
|
@@ -6044,7 +6046,7 @@ class SteamUser {
|
|
6044
6046
|
data: "action=deauthorize&sessionid=" + this._sessionid,
|
6045
6047
|
headers: {
|
6046
6048
|
"content-type": "application/x-www-form-urlencoded",
|
6047
|
-
|
6049
|
+
Referer: "https://store.steampowered.com/twofactor/manage",
|
6048
6050
|
}
|
6049
6051
|
})
|
6050
6052
|
console.log(response.data);
|
@@ -6121,11 +6123,11 @@ class SteamUser {
|
|
6121
6123
|
return response
|
6122
6124
|
|
6123
6125
|
const resultExample = {
|
6124
|
-
|
6125
|
-
|
6126
|
-
|
6127
|
-
|
6128
|
-
|
6126
|
+
success: true,
|
6127
|
+
requires_confirmation: 1,
|
6128
|
+
needs_mobile_confirmation: true,
|
6129
|
+
needs_email_confirmation: false,
|
6130
|
+
email_domain: "gmail.com"
|
6129
6131
|
}
|
6130
6132
|
}
|
6131
6133
|
|
@@ -6241,6 +6243,219 @@ class SteamUser {
|
|
6241
6243
|
result && onPageCb?.(result)
|
6242
6244
|
} while (token)
|
6243
6245
|
}
|
6246
|
+
|
6247
|
+
async beginFileUpload(filePath) {
|
6248
|
+
const metadata = await new sharp(filePath).metadata()
|
6249
|
+
const stats = fs.statSync(filePath)
|
6250
|
+
|
6251
|
+
let sha1 = "";
|
6252
|
+
for (; sha1.length < 40;) {
|
6253
|
+
sha1 += Math.floor(16 * Math.random()).toString(16);
|
6254
|
+
}
|
6255
|
+
|
6256
|
+
const input = {
|
6257
|
+
l: 'english',
|
6258
|
+
file_size: stats.size,
|
6259
|
+
file_name: path.basename(filePath),
|
6260
|
+
file_sha: sha1,
|
6261
|
+
file_image_width: metadata.width,
|
6262
|
+
file_image_height: metadata.height,
|
6263
|
+
file_type: "image/" + metadata.format,
|
6264
|
+
sessionid: this.getSessionid()
|
6265
|
+
}
|
6266
|
+
|
6267
|
+
const form = new FormData();
|
6268
|
+
for (const key in input) {
|
6269
|
+
form.append(key, input[key].toString());
|
6270
|
+
}
|
6271
|
+
|
6272
|
+
const result = (await this._httpRequestAjax({
|
6273
|
+
url: "chat/beginfileupload/?l=english",
|
6274
|
+
data: form,
|
6275
|
+
method: 'POST',
|
6276
|
+
headers: {
|
6277
|
+
'Content-Type': 'multipart/form-data',
|
6278
|
+
},
|
6279
|
+
}))?.data
|
6280
|
+
|
6281
|
+
return result?.success === 1 ? {
|
6282
|
+
...result,
|
6283
|
+
result: {
|
6284
|
+
...result.result,
|
6285
|
+
...input
|
6286
|
+
}
|
6287
|
+
} : result
|
6288
|
+
const successExample = {
|
6289
|
+
success: 1,
|
6290
|
+
result: {
|
6291
|
+
ugcid: "2277199680653980183",
|
6292
|
+
timestamp: 1705578275,
|
6293
|
+
url_host: "steamcloud-ugc.storage.googleapis.com",
|
6294
|
+
url_path: "\/AC\/93\/61\/40\/744350\/07E_6_23D0B600_37217_1.dat?GoogleAccessId=1034790105812-5bdngop952i7sjvk3q8dm3nur4tlg4vb@developer.gserviceaccount.com&Expires=1705581875&Signature=qjLnq%2Bf4j86fxug7jO9rL0mBRZHEyKgM9U%2BeFShapk9J%2FvPXPLxpLxMHLFvy5yfl6qGbl7Tv%2FsMesXlqNRZLpCHnELmYuD3t6Dfi4IIRT32vlZGuNFC92vooXYM%2FRVmPzx1mGHkxz26p4huEqJj7%2B7qT%2FJT3%2F%2BTqNQYYFvGIwR4%3D",
|
6295
|
+
use_https: 1,
|
6296
|
+
request_headers: [
|
6297
|
+
{
|
6298
|
+
name: "Content-Type",
|
6299
|
+
value: "image\/png"
|
6300
|
+
},
|
6301
|
+
{
|
6302
|
+
name: "Content-Length",
|
6303
|
+
value: "48620"
|
6304
|
+
},
|
6305
|
+
{
|
6306
|
+
name: "Content-Disposition",
|
6307
|
+
value: "inline; filename*=UTF-8''26252_image.png;"
|
6308
|
+
}
|
6309
|
+
],
|
6310
|
+
success: 1,
|
6311
|
+
rwgrsn: -2
|
6312
|
+
},
|
6313
|
+
hmac: "0cbb56d9e8217943095b66f87997878a",
|
6314
|
+
timestamp: 1705578275
|
6315
|
+
}
|
6316
|
+
}
|
6317
|
+
|
6318
|
+
async doFileUpload({
|
6319
|
+
filePath,
|
6320
|
+
beginFileUploadResult,
|
6321
|
+
}) {
|
6322
|
+
const headers = beginFileUploadResult.request_headers.reduce(function (prev, currentValue) {
|
6323
|
+
const existedName = Object.keys(prev).find(k => k.toLowerCase() === currentValue.name.toLowerCase())
|
6324
|
+
if (existedName) {
|
6325
|
+
delete prev[existedName]
|
6326
|
+
}
|
6327
|
+
|
6328
|
+
if (["Content-Length", "Host"].some(k => k.toLowerCase() === currentValue.name.toLowerCase())) {
|
6329
|
+
return prev
|
6330
|
+
}
|
6331
|
+
|
6332
|
+
return {
|
6333
|
+
...prev,
|
6334
|
+
[currentValue.name]: currentValue.value
|
6335
|
+
}
|
6336
|
+
}, {});
|
6337
|
+
|
6338
|
+
const result = await axios.request({
|
6339
|
+
url: `${beginFileUploadResult.use_https === 1 ? "https" : "http"}://${beginFileUploadResult.url_host}${beginFileUploadResult.url_path}`,
|
6340
|
+
method: 'PUT',
|
6341
|
+
headers: headers,
|
6342
|
+
data: fs.createReadStream(filePath)
|
6343
|
+
})
|
6344
|
+
|
6345
|
+
return result
|
6346
|
+
}
|
6347
|
+
|
6348
|
+
async commitFileUpload({
|
6349
|
+
file_name,
|
6350
|
+
file_sha,
|
6351
|
+
file_image_width,
|
6352
|
+
file_image_height,
|
6353
|
+
file_type,
|
6354
|
+
hmac,
|
6355
|
+
timestamp,
|
6356
|
+
ugcid,
|
6357
|
+
friend_steamid,
|
6358
|
+
}) {
|
6359
|
+
|
6360
|
+
const input = {
|
6361
|
+
sessionid: this.getSessionid(),
|
6362
|
+
l: "english",
|
6363
|
+
file_name: file_name,
|
6364
|
+
success: 1,
|
6365
|
+
file_sha: file_sha,
|
6366
|
+
file_image_width: file_image_width,
|
6367
|
+
file_image_height: file_image_height,
|
6368
|
+
file_type: file_type,
|
6369
|
+
ugcid: ugcid,
|
6370
|
+
timestamp: timestamp,
|
6371
|
+
hmac: hmac,
|
6372
|
+
friend_steamid: friend_steamid,
|
6373
|
+
spoiler: 0,
|
6374
|
+
}
|
6375
|
+
|
6376
|
+
const form = new FormData();
|
6377
|
+
for (const key in input) {
|
6378
|
+
form.append(key, input[key].toString());
|
6379
|
+
}
|
6380
|
+
|
6381
|
+
const result = (await this._httpRequestAjax({
|
6382
|
+
url: "chat/commitfileupload/?l=english",
|
6383
|
+
data: form,
|
6384
|
+
method: 'POST',
|
6385
|
+
headers: {
|
6386
|
+
'Content-Type': 'multipart/form-data',
|
6387
|
+
},
|
6388
|
+
}))?.data
|
6389
|
+
|
6390
|
+
if (result?.result?.details?.url) {
|
6391
|
+
result.result.details.url = result.result.details.url.replace('https://steamusercontent-a.akamaihd.net', 'https://steamuserimages-a.akamaihd.net')
|
6392
|
+
}
|
6393
|
+
return result
|
6394
|
+
const successExample = {
|
6395
|
+
success: 1,
|
6396
|
+
result: {
|
6397
|
+
details: {
|
6398
|
+
appid: 744350,
|
6399
|
+
ugcid: null,
|
6400
|
+
filename: "26252_image.png",
|
6401
|
+
timestamp: "1705578275",
|
6402
|
+
file_size: 48620,
|
6403
|
+
url: "https:\/\/steamuserimages-a.akamaihd.net\/ugc\/2277199680653980183\/71FCD5C7180C630833FEE30B24B687B9D3E0B08A\/",
|
6404
|
+
steamid_creator: "76561199040402348",
|
6405
|
+
flags: 16,
|
6406
|
+
platforms_to_sync: [],
|
6407
|
+
file_sha: "71fcd5c7180c630833fee30b24b687b9d3e0b08a"
|
6408
|
+
},
|
6409
|
+
success: 1,
|
6410
|
+
rwgrsn: -2
|
6411
|
+
}
|
6412
|
+
}
|
6413
|
+
}
|
6414
|
+
|
6415
|
+
async sendImageMessage({
|
6416
|
+
imagePath,
|
6417
|
+
friend_steamid,
|
6418
|
+
}) {
|
6419
|
+
const beginFileUploadResult = await this.beginFileUpload(imagePath)
|
6420
|
+
if (beginFileUploadResult?.success !== 1) {
|
6421
|
+
return beginFileUploadResult
|
6422
|
+
}
|
6423
|
+
const uploadingResult = await this.doFileUpload({
|
6424
|
+
filePath: imagePath,
|
6425
|
+
beginFileUploadResult: beginFileUploadResult.result,
|
6426
|
+
})
|
6427
|
+
|
6428
|
+
const result = await this.commitFileUpload({
|
6429
|
+
...beginFileUploadResult.result,
|
6430
|
+
hmac: beginFileUploadResult.hmac,
|
6431
|
+
timestamp: beginFileUploadResult.timestamp,
|
6432
|
+
friend_steamid: friend_steamid
|
6433
|
+
})
|
6434
|
+
return result
|
6435
|
+
const successExample = {
|
6436
|
+
success: 1,
|
6437
|
+
result: {
|
6438
|
+
details: {
|
6439
|
+
appid: 744350,
|
6440
|
+
ugcid: null,
|
6441
|
+
filename: "26252_image.png",
|
6442
|
+
timestamp: "1705578275",
|
6443
|
+
file_size: 48620,
|
6444
|
+
url: "https:\/\/steamuserimages-a.akamaihd.net\/ugc\/2277199680653980183\/71FCD5C7180C630833FEE30B24B687B9D3E0B08A\/",
|
6445
|
+
steamid_creator: "76561199040402348",
|
6446
|
+
flags: 16,
|
6447
|
+
platforms_to_sync: [],
|
6448
|
+
file_sha: "71fcd5c7180c630833fee30b24b687b9d3e0b08a"
|
6449
|
+
},
|
6450
|
+
success: 1,
|
6451
|
+
rwgrsn: -2
|
6452
|
+
}
|
6453
|
+
}
|
6454
|
+
const errorExample = {
|
6455
|
+
success: 112,
|
6456
|
+
message: "Limited users cannot upload images."
|
6457
|
+
}
|
6458
|
+
}
|
6244
6459
|
}
|
6245
6460
|
|
6246
6461
|
function querySelectorAll($, selector, root) {
|
package/package.json
CHANGED
@@ -1,22 +1,23 @@
|
|
1
1
|
{
|
2
2
|
"name": "steamutils",
|
3
|
-
"version": "1.3.
|
3
|
+
"version": "1.3.37",
|
4
4
|
"main": "index.js",
|
5
5
|
"dependencies": {
|
6
6
|
"alpha-common-utils": "^1.0.5",
|
7
|
-
"axios": "^1.6.
|
7
|
+
"axios": "^1.6.5",
|
8
8
|
"bytebuffer": "^5.0.1",
|
9
9
|
"cheerio": "^1.0.0-rc.12",
|
10
10
|
"crypto-js": "^4.2.0",
|
11
11
|
"csgo-friendcode": "^3.0.3",
|
12
12
|
"form-data": "^4.0.0",
|
13
13
|
"lodash": "^4.17.21",
|
14
|
-
"moment": "^2.
|
15
|
-
"moment-timezone": "^0.5.
|
14
|
+
"moment": "^2.30.1",
|
15
|
+
"moment-timezone": "^0.5.44",
|
16
16
|
"node-bignumber": "^1.2.2",
|
17
|
-
"
|
18
|
-
"steam-
|
19
|
-
"
|
17
|
+
"sharp": "^0.33.2",
|
18
|
+
"steam-session": "^1.7.2",
|
19
|
+
"steam-user": "^5.0.7",
|
20
|
+
"steamcommunity": "^3.48.2",
|
20
21
|
"steamid": "^2.0.0",
|
21
22
|
"url-parse": "^1.5.10",
|
22
23
|
"uuid": "^9.0.1",
|