diff options
| author | rr- | 2016-04-28 19:04:44 +0200 |
|---|---|---|
| committer | rr- | 2016-04-28 19:04:44 +0200 |
| commit | 83cc7a568d387c80a301c4e22148089c95d18e9a (patch) | |
| tree | 8eb9b631e925c5e5cafbf2b6ef9c41755f7280b2 /API.md | |
| parent | 0b20132a2f4726023fb63e8aeec0830fd9c4e827 (diff) | |
server/posts: add post (un)favoriting
Diffstat (limited to 'API.md')
| -rw-r--r-- | API.md | 42 |
1 files changed, 40 insertions, 2 deletions
@@ -34,8 +34,8 @@ - [Getting post](#getting-post) - [Deleting post](#deleting-post) - [Rating post](#rating-post) - - ~~Adding post to favorites~~ - - ~~Removing post from favorites~~ + - [Adding post to favorites](#adding-post-to-favorites) + - [Removing post from favorites](#removing-post-from-favorites) - [Getting featured post](#getting-featured-post) - [Featuring post](#featuring-post) - Comments @@ -590,6 +590,44 @@ data. and 1. +## Adding post to favorites +- **Request** + + `POST /post/<id>/favorite` + +- **Output** + + A [detailed post resource](#detailed-post). + +- **Errors** + + - post does not exist + - privileges are too low + +- **Description** + + Marks the post as favorite for authenticated user. + + +## Removing post from favorites +- **Request** + + `DELETE /post/<id>/favorite` + +- **Output** + + A [detailed post resource](#detailed-post). + +- **Errors** + + - post does not exist + - privileges are too low + +- **Description** + + Unmarks the post as favorite for authenticated user. + + ## Getting featured post - **Request** |