mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 13:14:28 +00:00
Document the new pin/unpin API endpoint
This commit is contained in:
parent
f7a5f56955
commit
7cf6027bf9
1 changed files with 44 additions and 0 deletions
44
README.md
44
README.md
|
@ -152,6 +152,50 @@ $ http POST https://microblog.pub/api/note/delete Authorization:'Bearer <token>'
|
|||
}
|
||||
```
|
||||
|
||||
### 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 <token>' id=http://microblob.pub/outbox/<note_id>/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 <token>' id=http://microblob.pub/outbox/<note_id>/activity
|
||||
```
|
||||
|
||||
#### Response
|
||||
|
||||
```json
|
||||
{
|
||||
"pinned": false
|
||||
}
|
||||
```
|
||||
|
||||
### POST /api/like{?id}
|
||||
|
||||
Likes the given activity.
|
||||
|
|
Loading…
Reference in a new issue