Last active
March 4, 2021 23:27
-
-
Save docapotamus/364767c7dd27b7f6252a to your computer and use it in GitHub Desktop.
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
AUTH | |
---- | |
TODO | |
USERS | |
----- | |
Note: /user and /users are defined seperatley. | |
'user' refers to yourself, the authenticated user | |
'users' refers to other users and means one or more other users | |
/user | |
GET Return authenticated user | |
/users | |
GET Return list of all users | |
/users/:username | |
GET Return user with :username | |
/user/following | |
GET Return list of users authenticated user is following | |
/user/following/:username | |
GET Returns true if following user with :target_username | |
PUT Follow user with :username | |
DELETE Unfollow user with :username | |
/users/:username/following | |
GET Return list of users user with :username is following | |
/users/:username/following/:target_username | |
GET Returns true if user with :username is following user with | |
:target_username | |
/user/followers | |
GET Returns list of all users who are following you | |
/users/:username/followers | |
GET Returns list of all users who are following user with :username | |
POSTS | |
----- | |
/posts | |
GET Return list of all the authenticated users posts | |
POST Create a new post | |
/posts/:username | |
GET Return list of all posts of user with :username | |
/posts/:post_id | |
GET Return post with :post_id | |
DELETE Remove post with :post_id, owner of post only | |
/posts/:post_id/upvote | |
POST Increment karma for post with :post_id and user who authored | |
/posts/:post_id/downvote | |
POST Decrement karma for post with :post_id and user who authored | |
/posts/:post_id/comments | |
GET Return list of all comments for post with :post_id | |
POST Create a new comment on post with :post_id | |
/posts/:post_id/comments/:comment_id | |
GET Return comment with :comment_id | |
DELETE Remove coment with :comment_id, owner of post or comment only | |
/posts/:post_id/comments/:comment_id/upvote | |
GET Increment karma for comment with :comment_id and user who | |
authored | |
/posts/:post_id/comments/:comment_id/downvote | |
GET Decrement karma for comment with :comment_id and user who | |
authored |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment