acyka api

GET /api/v1/titles/{id}/similar

similarTitles

needs catalog:read

The weighting is the whole of what makes this useful rather than "the twelve most popular titles in the catalogue", and it is not a thing to have two of — so this is `similar_to`, the same shelf `/similar` in Discord is.

curl https://api.acyka.cc/api/v1/titles/52991/similar?lang=en \
  -H "Authorization: Bearer $ACYKA_TOKEN"

Asking #

In the address

fieldtypewhat it is
id numberthe shikimori id

Narrowing it

fieldtypewhat it is
lang may be absentstring | undefinedwhich of a title's three names leads: `en` (romaji), `ru`, `ja`, `uk`, `uz`. Defaults to `en`.

Answering #

200 Page<TitleCard> a page: items, and total beside it

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.

fieldtypewhat it is
id number
title string
title_orig may be absentstring | undefined
poster may be absentstring | undefined
year may be absentnumber | undefined
kind string`tv` | `movie` | `ova` | `ona` | `special` | `music`
episodes number
score may be absentnumber | undefinedThe 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.