-
Notifications
You must be signed in to change notification settings - Fork 7
Endpoints
Create a new post
- 201: Succesfully created post
- 400: If your input was invalid in some way
- 401: If not logged in
- 409: If the title is already in use or the index already exists
- 500: Server Error
Gets all unverified posts
- 200: Success
Gets all work in progress posts
- 200: Success
Gets information about a post with given hash
- 200: Success
- 404: Hash not found
Edits a post
- 200: Success
- 204: Nothing to change
- 401: not logged in
- 404: Hash not found
- 500: Server error
Gets a posts content
-
X-Post-Version
: If this version matches latest you will not receive any HTML.
- 200: Success
- 404: Hash not found
- 410: Post has been deleted
- 500: server error
Gets a posts edits
-
X-Exclude-Last-Edit
: If true server will not send you the latest edit.
- 200: Success
- 500: server error
Squashes given edits together.
- 204: Success
- 400: If any user input is wrong
- 401: Unauthorized
- 500: server error
Forcefully saves a given post.
- 200: Success
- 401: Unauthorized
- 500: server error
Where :action
is one of: hide
, favorite
and wip
.
Performs the action on the given post
- 200: Success
- 400: If any user input is wrong
- 401: Not logged in
- 403: Unauthorized
- 500: server error
gets all topics
-
X-Topic-Version
: If it matches the servers version you will receive a 304.
- 200: Success
- 304: If
X-Topic-Version
matches - 500: server error
Create a new topic
- 201: Created
- 400: User error
- 401: Unauthorized
- 409: topic already exists
- 500: server error
Gets list of posts for specified topic
- 200: Created
- 400: User error
- 500: server error
Gets list of posts for specified topic
- 200: Created
- 400: User error
- 500: server error
Logs user in.
- 200: Logged in (or Incorrect pass)
- 400: User error
- 500: server error
Creates a user
- 201: Created
- 400: User error
- 500: server error
Verifies the jwt.
- 200: Valid
- 400: Invalid
Gets all users paginated by :page
and rowsPerPage
- 200: Success
- 403: Forbidden
Verifies an email with secret hash i
and account id j
- 200: Success
- 500: Server error
Sends a forgot password email to given mail.
- 200: Success
- 400 - user error
Resets the password and verifies with given UUID
- 200: Success
- 400: Invalid input
Changes a users avatar
- 200: Success
- 400: invalid image
- 401: invalid token
Gets profile picture by userid
- 200: Success
- 400: userid is NaN
- 404: User does not exist
Gets list of posts for dashboard of type myposts
or favorites
- 200: Success
- 401: Invalid token
Searches for posts given a query
- 200: Success
- 400: Query is less than 3 chars
- 500: Server error
//TODO: add example request and response
# Category
## /endpoint - METHOD
Explanation
### Returns
* 200: Success