From 7cf6027bf9d0e4fabcec67d062385dc7d4f0c929 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 22 Jul 2018 22:28:40 +0200 Subject: [PATCH] Document the new pin/unpin API endpoint --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/README.md b/README.md index 338016a..32a26fa 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,50 @@ $ http POST https://microblog.pub/api/note/delete Authorization:'Bearer ' } ``` +### POST /api/note/pin{?id} + +Adds the given note `id` (the note must from the instance outbox) to the featured collection (and pins it on the homepage). + +Answers a **201** (Created) status code. + +You can pass the `id` via JSON, form data or query argument. + +#### Example + +```shell +$ http POST https://microblog.pub/api/note/pin Authorization:'Bearer ' id=http://microblob.pub/outbox//activity +``` + +#### Response + +```json +{ + "pinned": true +} +``` + +### POST /api/note/unpin{?id} + +Removes the given note `id` (the note must from the instance outbox) from the featured collection (and un-pins it). + +Answers a **201** (Created) status code. + +You can pass the `id` via JSON, form data or query argument. + +#### Example + +```shell +$ http POST https://microblog.pub/api/note/unpin Authorization:'Bearer ' id=http://microblob.pub/outbox//activity +``` + +#### Response + +```json +{ + "pinned": false +} +``` + ### POST /api/like{?id} Likes the given activity.