Skip to content

Commit

Permalink
Document the new pin/unpin API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
tsileo committed Jul 22, 2018
1 parent f7a5f56 commit 7cf6027
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 7cf6027

Please sign in to comment.