Add user/workshop/curator follow & unfollow support#320
Add user/workshop/curator follow & unfollow support#320DoctorMcKay merged 5 commits intoDoctorMcKay:masterfrom
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.
Is body.success a number? If so, it might be an eresult rather than boolean.
There was a problem hiding this comment.
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.
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 :)