steamutils 1.0.66 → 1.0.67

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 +10 -10
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1808,17 +1808,17 @@ class SteamUser {
1808
1808
  return await this.getFriendsList()
1809
1809
  }
1810
1810
 
1811
- async getMyFriendsIDList() {
1812
- const { data } = await this._httpRequestAjax(`textfilter/ajaxgetfriendslist`)
1813
- if(!data) {
1814
- return []
1811
+ async getMyFriendsIDList () {
1812
+ for (let i = 0; i < 5; i++) {
1813
+ const { data } = await this._httpRequestAjax(`textfilter/ajaxgetfriendslist`) //{ success: 21 }
1814
+ if (data?.success === 1) {
1815
+ return data.friendslist.friends.filter(function (friend) {
1816
+ return EFriendRelationship.Friend === friend.efriendrelationship
1817
+ }).map(function (friend) {
1818
+ return friend.ulfriendid
1819
+ })
1820
+ }
1815
1821
  }
1816
- console.log(`data`, data)
1817
- return data.friendslist.friends.filter(function (friend) {
1818
- return EFriendRelationship.Friend === friend.efriendrelationship
1819
- }).map(function (friend) {
1820
- return friend.ulfriendid
1821
- })
1822
1822
  }
1823
1823
 
1824
1824
  async getMyFollowingPlayersList() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.0.66",
3
+ "version": "1.0.67",
4
4
  "dependencies": {
5
5
  "axios": "^1.3.4",
6
6
  "cheerio": "^1.0.0-rc.12",