-
-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add user/workshop/curator follow & unfollow support #320
Conversation
I have also added support for following & unfollowing curators; it uses a different endpoint. I added the two functions to Documentation for the SteamCommunity wiki page:
Don't forget to fill out the version number should you copy and paste this. To quickly test this, call the function with the |
You prob want to merge it into #230 |
Yeah I thought about that but ultimately decided against it as DoctorMcKay merged my previous PRs into v4 afterwards anyway and the v4 branch seems a bit stale. |
components/users.js
Outdated
return; | ||
} | ||
|
||
if (body.success) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is body.success
a number? If so, it might be an eresult rather than boolean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, this should be an eresult. I'll fix this real quick
Should be correct like this. |
components/groups.js
Outdated
if (body.success && body.success.success != SteamCommunity.EResult.OK) { | ||
let err = new Error(body.message || SteamCommunity.EResult[body.success.success]); | ||
err.eresult = err.code = body.success.success; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Helpers.eresultError
does all this for you.
Let's target this at master. |
Like this? There are quite a few functions which do not use the eresultError() helper... |
Yeah, looks good. I'll merge & deploy this later tonight, once I can get some docs written.
Those predate the helper, most likely. |
Hey, it's me again.
This PR adds support for following and unfollowing a user.
Following a user from their profile dropdown or from the user's "Workshop Items" page does the same thing, that's why I mentioned both in the title.
Documentation for the CSteamUser wiki page:
Don't forget to fill out the version number should you copy and paste this.
That's it, I hope the amount of PRs by me don't get on your nerves too much (warning: there is probably one more coming soon because I want to add support for reviews).
Have a nice day :)