GET /api/v1/titles
listTitles
needs catalog:read
curl https://api.acyka.cc/api/v1/titles?lang=en&limit=10 \
-H "Authorization: Bearer $ACYKA_TOKEN" Asking #
Narrowing it
| field | type | what it is |
|---|---|---|
lang may be absent | string | undefined | which of a title's three names leads: `en` (romaji), `ru`, `ja`, `uk`, `uz`. Defaults to `en`. |
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 |
q may be absent | string | undefined | what to search for |
order may be absent | string | undefined | `ranked` by score, `aired_on` by year, `trending` by what is being watched right now; by how watched it is overall otherwise |
status may be absent | string | undefined | `ongoing` | `released` | `announced` |
kind may be absent | string | undefined | `tv` | `movie` | `ova` | `ona` | `special` | `music` |
genre may be absent | string | undefined | comma-separated; every named genre must be on the title |
score may be absent | number | undefined | at least this |
year_from may be absent | number | undefined | |
year_to may be absent | number | undefined | |
rating may be absent | string | undefined | the age rating |
Answering #
200 Page<TitleCard> 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 #
TitleCard #
A title as it appears in a list.
`id` is the shikimori id and is the only key this catalogue has ever had. It is a number here rather than a string, unlike the ids above: these are five and six digits and always will be, since they are somebody else's sequence and not ours to outgrow.
| field | type | what it is |
|---|---|---|
id | number | |
title | string | |
title_orig may be absent | string | undefined | |
poster may be absent | string | undefined | |
year may be absent | number | undefined | |
kind | string | `tv` | `movie` | `ova` | `ona` | `special` | `music` |
episodes | number | |
score may be absent | number | undefined | The one number a reader sees: what the people here think of it and what the outside number said, weighed against each other. |
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.