steamutils 1.2.70 → 1.2.71
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +20 -13
- package/package.json +1 -1
package/index.js
CHANGED
@@ -5446,6 +5446,7 @@ class SteamUser {
|
|
5446
5446
|
}
|
5447
5447
|
|
5448
5448
|
async getInventoryHistory(cursor) {
|
5449
|
+
const steamId = this.getSteamidUser()
|
5449
5450
|
if (!cursor) {
|
5450
5451
|
cursor = {
|
5451
5452
|
time: parseInt(new Date().getTime() / 1000),
|
@@ -5606,6 +5607,7 @@ class SteamUser {
|
|
5606
5607
|
classid,
|
5607
5608
|
instanceid,
|
5608
5609
|
contextid,
|
5610
|
+
steamId,
|
5609
5611
|
plusminus: items_plusminus
|
5610
5612
|
})
|
5611
5613
|
}
|
@@ -5616,19 +5618,24 @@ class SteamUser {
|
|
5616
5618
|
})
|
5617
5619
|
})
|
5618
5620
|
|
5619
|
-
|
5620
|
-
.map(item => item.
|
5621
|
-
|
5622
|
-
|
5623
|
-
|
5624
|
-
|
5625
|
-
|
5626
|
-
|
5627
|
-
|
5628
|
-
|
5629
|
-
|
5630
|
-
|
5631
|
-
|
5621
|
+
if(tradehistory_items.length){
|
5622
|
+
const id = [timestamp, description, plusminus, tradehistory_items.map(item => (item.classid || '0') + "_" + (item.instanceid || '0')).join('|')]
|
5623
|
+
.map(item => item.toString().replaceAll(/[^a-zA-Z0-9-+_|]/gi, ''))
|
5624
|
+
.join('_').toLowerCase()
|
5625
|
+
|
5626
|
+
tradehistory.push({
|
5627
|
+
id,
|
5628
|
+
timestamp,
|
5629
|
+
timestampStr,
|
5630
|
+
description,
|
5631
|
+
plusminus,
|
5632
|
+
tradehistory_items,
|
5633
|
+
steamId,
|
5634
|
+
...(!!tradePeople && {tradePeople})
|
5635
|
+
})
|
5636
|
+
} else {
|
5637
|
+
console.error("tradehistory_items empty", steamId);
|
5638
|
+
}
|
5632
5639
|
})
|
5633
5640
|
|
5634
5641
|
return {cursor: result.cursor, tradehistory}
|