steamutils 1.1.41 → 1.1.43
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +150 -5
- package/package.json +1 -1
package/index.js
CHANGED
@@ -2516,7 +2516,7 @@ class SteamUser {
|
|
2516
2516
|
result = await this._getHistoryMatches(matchHistoryType, result?.continue_token)
|
2517
2517
|
stop = shouldStop({
|
2518
2518
|
maxPage,
|
2519
|
-
currentPage: page,
|
2519
|
+
currentPage: ++page,
|
2520
2520
|
continue_token: result.continue_token,
|
2521
2521
|
continue_text: result.continue_text,
|
2522
2522
|
matchHistoryType,
|
@@ -4967,6 +4967,151 @@ class SteamUser {
|
|
4967
4967
|
}
|
4968
4968
|
}
|
4969
4969
|
|
4970
|
+
async getInventoryTrading (appID) {
|
4971
|
+
for (let i = 0; i < 10; i++) {
|
4972
|
+
const url = `https://steamcommunity.com/${this._steamid_user}/inventory/json/${appID}/2?l=english&trading=1`;
|
4973
|
+
const _result = (await this._httpRequest(url))?.data
|
4974
|
+
if (!_result) {
|
4975
|
+
await sleep(5000)
|
4976
|
+
} else if (_result.success !== true) {
|
4977
|
+
console.error(url)
|
4978
|
+
console.error(_result)
|
4979
|
+
await sleep(5000)
|
4980
|
+
} else {
|
4981
|
+
return _result
|
4982
|
+
break
|
4983
|
+
}
|
4984
|
+
}
|
4985
|
+
|
4986
|
+
const exampleResult = {
|
4987
|
+
success: true, rgInventory: {
|
4988
|
+
30494845811: {
|
4989
|
+
id: "30494845811",
|
4990
|
+
classid: "1989278680",
|
4991
|
+
instanceid: "302028390",
|
4992
|
+
amount: "1",
|
4993
|
+
hide_in_china: 0,
|
4994
|
+
pos: 1
|
4995
|
+
},
|
4996
|
+
},
|
4997
|
+
rgCurrency: [],
|
4998
|
+
rgDescriptions: {
|
4999
|
+
1989278680_302028390: {
|
5000
|
+
appid: "730",
|
5001
|
+
classid: "1989278680",
|
5002
|
+
instanceid: "302028390",
|
5003
|
+
icon_url: "IzMF03bi9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdB2ozio1RrlIWFK3UfvMYB8UsvjiMXojflsZalyxSh31CIyHz2GZ-KuFpPsrTzBG0pe2BEHXlJjadf3HcTQswSrJbPD6IrTak5O6dQDjPRbklQVpSf_BR9zAfPsiNPRIjlNlc7Wa3m0tvEwMkZsxWfBbmyyIQZbxw7hyF-Lk",
|
5004
|
+
icon_url_large: "IzMF03bi9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdB2ozio1RrlIWFK3UfvMYB8UsvjiMXojflsZalyxSh31CIyHz2GZ-KuFpPsrTzBG0pe2BEHXlVzvFPSbcUglrRLdXYGnd9mX3sbyUS23BQO0qFl0HL6oBo2cYb5-JOUY60NUL_Gf2h0p6WBUnfspUfRq33n0DPaR4yXcRccpXZsIUY5w",
|
5005
|
+
icon_drag_url: "",
|
5006
|
+
name: "Sealed Graffiti | Keep the Change (Cash Green)",
|
5007
|
+
market_hash_name: "Sealed Graffiti | Keep the Change (Cash Green)",
|
5008
|
+
market_name: "Sealed Graffiti | Keep the Change (Cash Green)",
|
5009
|
+
name_color: "D2D2D2",
|
5010
|
+
background_color: "",
|
5011
|
+
type: "Base Grade Graffiti",
|
5012
|
+
tradable: 1,
|
5013
|
+
marketable: 1,
|
5014
|
+
commodity: 1,
|
5015
|
+
market_tradable_restriction: "7",
|
5016
|
+
descriptions: [{
|
5017
|
+
type: "html",
|
5018
|
+
value: "This is a sealed container of a graffiti pattern. Once this graffiti pattern is unsealed, it will provide you with enough charges to apply the graffiti pattern <b>50<\/b> times to the in-game world."
|
5019
|
+
}],
|
5020
|
+
owner_descriptions: "",
|
5021
|
+
actions: [{
|
5022
|
+
name: "Inspect in Game...",
|
5023
|
+
link: "steam:\/\/rungame\/730\/76561202255233023\/+csgo_econ_action_preview%20S%owner_steamid%A%assetid%D9965600949259903302"
|
5024
|
+
}],
|
5025
|
+
market_actions: [{
|
5026
|
+
name: "Inspect in Game...",
|
5027
|
+
link: "steam:\/\/rungame\/730\/76561202255233023\/+csgo_econ_action_preview%20M%listingid%A%assetid%D9965600949259903302"
|
5028
|
+
}],
|
5029
|
+
tags: [{
|
5030
|
+
internal_name: "CSGO_Type_Spray",
|
5031
|
+
name: "Graffiti",
|
5032
|
+
category: "Type",
|
5033
|
+
category_name: "Type"
|
5034
|
+
},]
|
5035
|
+
},
|
5036
|
+
}, more: false, more_start: false
|
5037
|
+
}
|
5038
|
+
}
|
5039
|
+
|
5040
|
+
async getInventoryTradingPartner (appID, partner) {//partner steamID not accountid
|
5041
|
+
for (let i = 0; i < 10; i++) {
|
5042
|
+
const url = `https://steamcommunity.com/tradeoffer/new/partnerinventory/?sessionid=${this,this._sessionid}&partner=${partner}&appid=${appID}&contextid=2&l=english`;
|
5043
|
+
const _result = (await this._httpRequest(url))?.data
|
5044
|
+
if (!_result) {
|
5045
|
+
await sleep(5000)
|
5046
|
+
} else if (_result.success !== true) {
|
5047
|
+
console.error(url)
|
5048
|
+
console.error(_result)
|
5049
|
+
await sleep(5000)
|
5050
|
+
} else {
|
5051
|
+
return _result
|
5052
|
+
break
|
5053
|
+
}
|
5054
|
+
}
|
5055
|
+
|
5056
|
+
const exampleResult = {
|
5057
|
+
success: true,
|
5058
|
+
rgInventory: {
|
5059
|
+
30348427188: {
|
5060
|
+
id: "30348427188",
|
5061
|
+
classid: "3035568051",
|
5062
|
+
instanceid: "302028390",
|
5063
|
+
amount: "1",
|
5064
|
+
hide_in_china: 0,
|
5065
|
+
pos: 1
|
5066
|
+
},
|
5067
|
+
},
|
5068
|
+
rgCurrency: [],
|
5069
|
+
rgDescriptions: {
|
5070
|
+
3035568051_302028390: {
|
5071
|
+
appid: "730",
|
5072
|
+
classid: "3035568051",
|
5073
|
+
instanceid: "302028390",
|
5074
|
+
icon_url: "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou7uifDhhwszbZThH4OO_moaOhfn7DLfYkWNFppEi27qXrNX3jgWyqUFtYTj3LYaScgVoYFmC-FHqkLzsgZG16c-cwCF9-n51emhCfk8",
|
5075
|
+
icon_url_large: "-9a81dlWLwJ2UUGcVs_nsVtzdOEdtWwKGZZLQHTxDZ7I56KU0Zwwo4NUX4oFJZEHLbXH5ApeO4YmlhxYQknCRvCo04DEVlxkKgpou7uifDhhwszbZThH4OO_moaOhfn7DLfYkWNF18lwmO7Eu9im2Qfi8ko-NWildoSUcFc6aFjX-lLowO-9h5bo7c_KzXVq73J37CzD30vgRSvO2Oo",
|
5076
|
+
icon_drag_url: "",
|
5077
|
+
name: "MAG-7 | Rust Coat",
|
5078
|
+
market_hash_name: "MAG-7 | Rust Coat (Minimal Wear)",
|
5079
|
+
market_name: "MAG-7 | Rust Coat (Minimal Wear)",
|
5080
|
+
name_color: "D2D2D2",
|
5081
|
+
background_color: "",
|
5082
|
+
type: "Consumer Grade Shotgun",
|
5083
|
+
tradable: 1,
|
5084
|
+
marketable: 1,
|
5085
|
+
commodity: 0,
|
5086
|
+
market_tradable_restriction: "7",
|
5087
|
+
descriptions: [{type: "html", value: "Exterior: Minimal Wear"}],
|
5088
|
+
actions: [{
|
5089
|
+
name: "Inspect in Game...",
|
5090
|
+
link: "steam:\/\/rungame\/730\/76561202255233023\/+csgo_econ_action_preview%20S%owner_steamid%A%assetid%D7964130800002776255"
|
5091
|
+
}],
|
5092
|
+
market_actions: [{
|
5093
|
+
name: "Inspect in Game...",
|
5094
|
+
link: "steam:\/\/rungame\/730\/76561202255233023\/+csgo_econ_action_preview%20M%listingid%A%assetid%D7964130800002776255"
|
5095
|
+
}],
|
5096
|
+
tags: [{
|
5097
|
+
internal_name: "CSGO_Type_Shotgun",
|
5098
|
+
name: "Shotgun",
|
5099
|
+
category: "Type",
|
5100
|
+
category_name: "Type"
|
5101
|
+
}]
|
5102
|
+
},
|
5103
|
+
},
|
5104
|
+
rgAppInfo: {
|
5105
|
+
appid: 730,
|
5106
|
+
name: "Counter-Strike: Global Offensive",
|
5107
|
+
icon: "https:\/\/cdn.akamai.steamstatic.com\/steamcommunity\/public\/images\/apps\/730\/69f7ebe2735c366c65c0b33dae00e12dc40edbe4.jpg",
|
5108
|
+
link: "https:\/\/steamcommunity.com\/app\/730"
|
5109
|
+
},
|
5110
|
+
more: false,
|
5111
|
+
more_start: false
|
5112
|
+
}
|
5113
|
+
}
|
5114
|
+
|
4970
5115
|
static async getPriceOverview(appID, market_hash_name) {
|
4971
5116
|
for (let i = 0; i < 10; i++) {
|
4972
5117
|
const url = `https://steamcommunity.com/market/priceoverview/?appid=${appID}¤cy=15&market_hash_name=${encodeURIComponent(market_hash_name)}`;
|
@@ -4986,10 +5131,10 @@ class SteamUser {
|
|
4986
5131
|
}
|
4987
5132
|
}
|
4988
5133
|
const exampleResult = {
|
4989
|
-
|
4990
|
-
|
4991
|
-
|
4992
|
-
|
5134
|
+
success: true,
|
5135
|
+
lowest_price: "33.269,34₫",
|
5136
|
+
volume: "110,882",
|
5137
|
+
median_price: "30.936,57₫"
|
4993
5138
|
}
|
4994
5139
|
}
|
4995
5140
|
|