Skip to content
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

API does not allow following/unfollowing users or shakes #686

Open
spaceninja opened this issue Apr 16, 2023 · 1 comment
Open

API does not allow following/unfollowing users or shakes #686

spaceninja opened this issue Apr 16, 2023 · 1 comment

Comments

@spaceninja
Copy link
Member

There is no mechanism provided in the API to follow or unfollow a user or a shake.

@spaceninja
Copy link
Member Author

spaceninja commented May 1, 2023

Suggestion: Add the following endpoint (Since you can't follow a user, only the user's shake, this can be solved with one endpoint):

`POST /api/shake_id/(int: shakeid)/follow

(this should also be available on the /api/shake_name and /api/shake_user endpoints.)

Follows the given shake as the authorized user. The contents of this shake will then be included in the user's Friends shake.

Parameters

  • shakeid – the shake’s numeric ID

Status Codes

  • 200 OK – the shake was followed, and the response is the followed shake
    • If the shake was already followed, then it should be unfollowed. (Question: what should be returned if a shake is unfollowed?)
  • 400 Bad Request – the shake could not be followed
  • 403 Forbidden – the shake could not be followed due to permission issues
  • 404 Not Found – no such shake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant