Closed
Conversation
Mr-VIT
suggested changes
Apr 21, 2021
Co-authored-by: Mr-VIT <vit@v1t.su>
Revadike
reviewed
May 29, 2021
Co-authored-by: Revadike <revadike@outlook.com>
Revadike
approved these changes
May 29, 2021
Revadike
reviewed
Jun 4, 2021
Comment on lines
+86
to
+106
| SteamCommunity.prototype.getBlockedList = function (callback) { | ||
| this.httpRequestGet("https://steamcommunity.com/my/friends/blocked?ajax=1", function (err, res, body) { | ||
| if (res.req.path.substring(0,6) == "/login") { | ||
| callback(new Error("Not Logged In")); | ||
| return; | ||
| } | ||
| if (!body) { | ||
| callback(new Error("Malformed response")); | ||
| return; | ||
| } | ||
|
|
||
| var blocked = [], | ||
| regex=/\bdata-steamid="(\d+)"/g, | ||
| matches; | ||
| while (matches = regex.exec(body)) { | ||
| blocked.push( new SteamID(matches[1]) ); | ||
| } | ||
| callback(null, blocked); | ||
| }, "steamcommunity") | ||
| }; | ||
|
|
Contributor
There was a problem hiding this comment.
This is probably not the correct place for this function, because all other functions are meant for a single user and take userID as argument.
Contributor
There was a problem hiding this comment.
I think it fits best in index.js
Revadike
reviewed
Jun 4, 2021
| @@ -83,6 +83,27 @@ SteamCommunity.prototype.removeFriend = function(userID, callback) { | |||
| }, "steamcommunity"); | |||
| }; | |||
|
|
|||
Merged
Contributor
|
I'm sorry, while I was making a get friends list function I discovered that this endpoint also includes your blocked list, thus making this PR not needed. |
Owner
|
Closing in favor of #267. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the function requested in issue #255