acyka api

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

fieldtypewhat it is
limit may be absentnumber | undefinedhow many rows, 1-100; 30 by default
offset may be absentnumber | undefinedwhere 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 #

fieldtypewhat it is
id PostIdA string for the reason [`Me::id`] is one.
body string
shikimori_id may be absentnumber | undefined
title may be absentstring | undefined
episode may be absentnumber | undefined
parent may be absentPostId | 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.