steamutils 1.1.61 → 1.1.62

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +6 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -4984,9 +4984,9 @@ class SteamUser {
4984
4984
  }
4985
4985
  }
4986
4986
 
4987
- async getInventoryTrading (appID) {
4987
+ async getInventoryTrading (appID, contextid = 2) {
4988
4988
  for (let i = 0; i < 10; i++) {
4989
- const url = `${this.getMyProfileURL()}/inventory/json/${appID}/2?l=english&trading=1`;
4989
+ const url = `${this.getMyProfileURL()}/inventory/json/${appID}/${contextid}?l=english&trading=1`;
4990
4990
  const _result = (await this._httpRequestAjax(url))?.data
4991
4991
  if (!_result) {
4992
4992
  await sleep(5000)
@@ -4995,6 +4995,7 @@ class SteamUser {
4995
4995
  console.error(_result)
4996
4996
  await sleep(5000)
4997
4997
  } else {
4998
+ Object.values(_result.rgDescriptions).forEach(r => r.contextid = contextid)
4998
4999
  return _result
4999
5000
  break
5000
5001
  }
@@ -5054,9 +5055,9 @@ class SteamUser {
5054
5055
  }
5055
5056
  }
5056
5057
 
5057
- async getInventoryTradingPartner (appID, partner) {//partner steamID not accountid
5058
+ async getInventoryTradingPartner (appID, partner, contextid = 2) {//partner steamID not accountid
5058
5059
  for (let i = 0; i < 10; i++) {
5059
- const url = `https://steamcommunity.com/tradeoffer/new/partnerinventory/?sessionid=${this,this._sessionid}&partner=${partner}&appid=${appID}&contextid=2&l=english`;
5060
+ const url = `https://steamcommunity.com/tradeoffer/new/partnerinventory/?sessionid=${this,this._sessionid}&partner=${partner}&appid=${appID}&contextid=${contextid}&l=english`;
5060
5061
  const _result = (await this._httpRequestAjax({
5061
5062
  url,
5062
5063
  headers: {
@@ -5070,6 +5071,7 @@ class SteamUser {
5070
5071
  console.error(_result)
5071
5072
  await sleep(5000)
5072
5073
  } else {
5074
+ Object.values(_result.rgDescriptions).forEach(r => r.contextid = contextid)
5073
5075
  return _result
5074
5076
  break
5075
5077
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.1.61",
3
+ "version": "1.1.62",
4
4
  "main":"index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.3.4",