steamutils 1.1.98 → 1.1.99

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 +27 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2318,6 +2318,33 @@ class SteamUser {
2318
2318
  return await this.getFollowingPlayersList(steamID)
2319
2319
  }
2320
2320
 
2321
+ async getSentFriendRequestList() {
2322
+ const result = await this._httpRequest(`${this._myProfile}/friends/pending`)
2323
+ if (!result?.data || typeof result._$ !== 'function') return null
2324
+ const $ = result._$()
2325
+
2326
+ const data = []
2327
+ $('#search_results_sentinvites > div').each(function () {
2328
+ const el = $(this)
2329
+ const steamId = el.attr('data-steamid')
2330
+ const accountid = parseInt(el.attr('data-accountid'))
2331
+ if (steamId && accountid) {
2332
+ const invite_block_nameEl = el.find('.invite_block_name > a.linkTitle')
2333
+ const name = invite_block_nameEl.text()
2334
+ const link = invite_block_nameEl.attr('href')
2335
+ const avatar = el.find('.playerAvatar a > img[data-miniprofile="' + accountid + '"]').attr('src')
2336
+ data.push({
2337
+ name,
2338
+ link,
2339
+ avatar,
2340
+ steamId,
2341
+ accountid,
2342
+ })
2343
+ }
2344
+ })
2345
+ return data
2346
+ }
2347
+
2321
2348
  async getMatchHistory_initial (matchHistoryType) {
2322
2349
  if (!matchHistoryType) {
2323
2350
  return
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.1.98",
3
+ "version": "1.1.99",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.3.4",