steamutils 1.1.44 → 1.1.46
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +6 -6
- package/package.json +1 -1
package/index.js
CHANGED
@@ -1516,14 +1516,14 @@ class SteamUser {
|
|
1516
1516
|
|
1517
1517
|
let now = 0
|
1518
1518
|
let diff = 0
|
1519
|
-
while ((diff = (now = new Date().getTime()) - requestTimestamp) < 500) {
|
1520
|
-
await sleep(diff + 10)
|
1521
|
-
}
|
1522
1519
|
if (checkTooManyRequest) {
|
1523
1520
|
while ((diff = (now = new Date().getTime()) - tooManyRequestTimestamp) < 30000) {
|
1524
1521
|
await sleep(diff + 10)
|
1525
1522
|
}
|
1526
1523
|
}
|
1524
|
+
while ((diff = (now = new Date().getTime()) - requestTimestamp) < 500) {
|
1525
|
+
await sleep(diff + 10)
|
1526
|
+
}
|
1527
1527
|
requestTimestamp = now
|
1528
1528
|
response = await axios.request(config)
|
1529
1529
|
|
@@ -4969,8 +4969,8 @@ class SteamUser {
|
|
4969
4969
|
|
4970
4970
|
async getInventoryTrading (appID) {
|
4971
4971
|
for (let i = 0; i < 10; i++) {
|
4972
|
-
const url =
|
4973
|
-
const _result = (await this.
|
4972
|
+
const url = `${this.getMySteamUserProfileURL()}/inventory/json/${appID}/2?l=english&trading=1`;
|
4973
|
+
const _result = (await this._httpRequestAjax(url))?.data
|
4974
4974
|
if (!_result) {
|
4975
4975
|
await sleep(5000)
|
4976
4976
|
} else if (_result.success !== true) {
|
@@ -5040,7 +5040,7 @@ class SteamUser {
|
|
5040
5040
|
async getInventoryTradingPartner (appID, partner) {//partner steamID not accountid
|
5041
5041
|
for (let i = 0; i < 10; i++) {
|
5042
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.
|
5043
|
+
const _result = (await this._httpRequestAjax({
|
5044
5044
|
url,
|
5045
5045
|
headers: {
|
5046
5046
|
Referer: 'https://steamcommunity.com/tradeoffer/'
|