steamutils 1.2.44 → 1.2.45
Sign up to get free protection for your applications and to get access to all the features.
- package/.idea/deployment.xml +21 -0
- package/.idea/steamutils.iml +1 -1
- package/.idea/vcs.xml +1 -1
- package/index.js +24 -5
- package/package.json +1 -1
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
@@ -0,0 +1,21 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project version="4">
|
3
|
+
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
|
4
|
+
<serverData>
|
5
|
+
<paths name="steamsupport">
|
6
|
+
<serverdata>
|
7
|
+
<mappings>
|
8
|
+
<mapping local="$PROJECT_DIR$" web="/" />
|
9
|
+
</mappings>
|
10
|
+
</serverdata>
|
11
|
+
</paths>
|
12
|
+
<paths name="steamsupportui">
|
13
|
+
<serverdata>
|
14
|
+
<mappings>
|
15
|
+
<mapping local="$PROJECT_DIR$" web="/" />
|
16
|
+
</mappings>
|
17
|
+
</serverdata>
|
18
|
+
</paths>
|
19
|
+
</serverData>
|
20
|
+
</component>
|
21
|
+
</project>
|
package/.idea/steamutils.iml
CHANGED
@@ -2,8 +2,8 @@
|
|
2
2
|
<module type="WEB_MODULE" version="4">
|
3
3
|
<component name="NewModuleRootManager">
|
4
4
|
<content url="file://$MODULE_DIR$">
|
5
|
-
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
6
5
|
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
6
|
+
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
7
7
|
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
8
8
|
</content>
|
9
9
|
<orderEntry type="inheritedJdk" />
|
package/.idea/vcs.xml
CHANGED
package/index.js
CHANGED
@@ -5175,6 +5175,7 @@ class SteamUser {
|
|
5175
5175
|
let result = {}
|
5176
5176
|
const assets = []
|
5177
5177
|
const descriptions = []
|
5178
|
+
const steamId = this.getSteamidUser()
|
5178
5179
|
|
5179
5180
|
do {
|
5180
5181
|
for (let i = 0; i < 10; i++) {
|
@@ -5199,7 +5200,7 @@ class SteamUser {
|
|
5199
5200
|
if (Array.isArray(result?.assets)) {
|
5200
5201
|
result.assets.forEach(function (asset) {
|
5201
5202
|
const description = descriptions.find(description => description.classid === asset.classid)
|
5202
|
-
assets.push({...description, ...asset})
|
5203
|
+
assets.push({...description, ...asset, steamId})
|
5203
5204
|
})
|
5204
5205
|
}
|
5205
5206
|
} while (result.more_items)
|
@@ -5248,6 +5249,7 @@ class SteamUser {
|
|
5248
5249
|
}
|
5249
5250
|
|
5250
5251
|
async getInventoryTrading (appID, contextid = 2) {
|
5252
|
+
const steamId = this.getSteamidUser()
|
5251
5253
|
for (let i = 0; i < 10; i++) {
|
5252
5254
|
const url = `${this.getMyProfileURL()}/inventory/json/${appID}/${contextid}?l=english&trading=1`;
|
5253
5255
|
const _result = (await this._httpRequestAjax(url))?.data
|
@@ -5258,14 +5260,22 @@ class SteamUser {
|
|
5258
5260
|
console.error(_result)
|
5259
5261
|
await sleep(5000)
|
5260
5262
|
} else {
|
5261
|
-
Object.values(_result.rgDescriptions).forEach(r =>
|
5263
|
+
_result.rgDescriptions && Object.values(_result.rgDescriptions).forEach(r => {
|
5264
|
+
r.contextid = contextid;
|
5265
|
+
r.steamId = steamId
|
5266
|
+
})
|
5267
|
+
_result.rgInventory && Object.values(_result.rgInventory).forEach(r => {
|
5268
|
+
r.contextid = contextid;
|
5269
|
+
r.steamId = steamId
|
5270
|
+
})
|
5262
5271
|
return _result
|
5263
5272
|
break
|
5264
5273
|
}
|
5265
5274
|
}
|
5266
5275
|
|
5267
5276
|
const exampleResult = {
|
5268
|
-
success: true,
|
5277
|
+
success: true,
|
5278
|
+
rgInventory: {
|
5269
5279
|
30494845811: {
|
5270
5280
|
id: "30494845811",
|
5271
5281
|
classid: "1989278680",
|
@@ -5314,7 +5324,9 @@ class SteamUser {
|
|
5314
5324
|
category_name: "Type"
|
5315
5325
|
},]
|
5316
5326
|
},
|
5317
|
-
},
|
5327
|
+
},
|
5328
|
+
more: false,
|
5329
|
+
more_start: false
|
5318
5330
|
}
|
5319
5331
|
}
|
5320
5332
|
|
@@ -5334,7 +5346,14 @@ class SteamUser {
|
|
5334
5346
|
console.error(_result)
|
5335
5347
|
await sleep(5000)
|
5336
5348
|
} else {
|
5337
|
-
Object.values(_result.rgDescriptions).forEach(r =>
|
5349
|
+
_result.rgDescriptions && Object.values(_result.rgDescriptions).forEach(r => {
|
5350
|
+
r.contextid = contextid;
|
5351
|
+
r.steamId = partner
|
5352
|
+
})
|
5353
|
+
_result.rgInventory && Object.values(_result.rgInventory).forEach(r => {
|
5354
|
+
r.contextid = contextid;
|
5355
|
+
r.steamId = partner
|
5356
|
+
})
|
5338
5357
|
return _result
|
5339
5358
|
break
|
5340
5359
|
}
|
package/package.json
CHANGED