aboutsummaryrefslogtreecommitdiff
path: root/API.md
diff options
context:
space:
mode:
authorrr-2016-04-28 19:04:44 +0200
committerrr-2016-04-28 19:04:44 +0200
commit83cc7a568d387c80a301c4e22148089c95d18e9a (patch)
tree8eb9b631e925c5e5cafbf2b6ef9c41755f7280b2 /API.md
parent0b20132a2f4726023fb63e8aeec0830fd9c4e827 (diff)
server/posts: add post (un)favoriting
Diffstat (limited to 'API.md')
-rw-r--r--API.md42
1 files changed, 40 insertions, 2 deletions
diff --git a/API.md b/API.md
index a6564b6..3da187e 100644
--- a/API.md
+++ b/API.md
@@ -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**

© 2015 - 2026 Jakob L. Kreuze