steamutils 1.1.19 → 1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +18 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -18,6 +18,7 @@ import url from 'url'
18
18
  import * as cherrio from "cheerio";
19
19
 
20
20
  const MAX_RETRY = 10
21
+ let requestTimestamp = 0
21
22
  export const MatchHistoryType = {
22
23
  matchhistoryscrimmage: 'matchhistoryscrimmage',
23
24
  matchhistorycompetitive: 'matchhistorycompetitive',
@@ -1502,6 +1503,14 @@ class SteamUser {
1502
1503
  maxRedirects: 0,
1503
1504
  url: redirectURL || params.url
1504
1505
  }
1506
+
1507
+
1508
+ let now = 0
1509
+ let diff = 0
1510
+ while ((diff = (now = new Date().getTime()) - requestTimestamp) < 500) {
1511
+ await sleep(diff + 10)
1512
+ }
1513
+ requestTimestamp = now
1505
1514
  response = await axios.request(config)
1506
1515
 
1507
1516
  this._cookies.setCookies(response.headers["set-cookie"])
@@ -5089,6 +5098,9 @@ class SteamUser {
5089
5098
  case "Purchased with Gems": {
5090
5099
  break
5091
5100
  }
5101
+ case "Unpacked Gems from Sack": {
5102
+ break
5103
+ }
5092
5104
  case "Earned by crafting": {
5093
5105
  break
5094
5106
  }
@@ -5101,6 +5113,12 @@ class SteamUser {
5101
5113
  case "Earned by sale purchases": {
5102
5114
  break
5103
5115
  }
5116
+ case "Unlocked a container": {
5117
+ break
5118
+ }
5119
+ case "Purchased from the store": {
5120
+ break
5121
+ }
5104
5122
  default: {
5105
5123
  if (description.startsWith("You traded with ")) {
5106
5124
  const peopleEl = tradehistory_event_description_el.find('a[href]')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.1.19",
3
+ "version": "1.1.21",
4
4
  "main":"index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.3.4",