GET /api/v1/posts
listMyPosts
needs social:read
Not the feed: `social:read` is permission to read *this person's* social life, not everybody's. A timeline of other people's writing is a different question with a different answer about who may see what, and it is not behind this word.
curl https://api.acyka.cc/api/v1/posts?limit=10 \
-H "Authorization: Bearer $ACYKA_TOKEN" Asking #
Narrowing it
| field | type | what it is |
|---|---|---|
limit may be absent | number | undefined | how many rows, 1-100; 30 by default |
offset may be absent | number | undefined | where to carry on from |
Answering #
200 Page<Post> a page: items, and total beside it
It pages by limit and offset. Every library has a paginator that
walks it — see Paging, which is also where the reason it stops on a
short page rather than on total is written down.
The shapes #
Post #
| field | type | what it is |
|---|---|---|
id | PostId | A string for the reason [`Me::id`] is one. |
body | string | |
shikimori_id may be absent | number | undefined | |
title may be absent | string | undefined | |
episode may be absent | number | undefined | |
parent may be absent | PostId | undefined | |
at | string |
When it says no #
A refusal is { "message": "errors.something" } — a phrase name and never a
sentence, because one screen can be read in five languages. Every library turns the name into a
type, so you catch the class you can do something about. Errors has
the list.