PUT /api/v1/lists/{shikimori_id}/score
rateListEntry
needs lists:write
The same `plans::domain::rate` the site calls, so the two doors cannot come to disagree about what a score is — which is the whole reason the domain exists. What differs is what this surface always differs by: 404 where the site answers 204 for a delete that removed nothing.
curl https://api.acyka.cc/api/v1/lists/52991/score \
-X PUT \
-H "Authorization: Bearer $ACYKA_TOKEN" \
-H "Content-Type: application/json" \
-d '{ }' Asking #
In the address
| field | type | what it is |
|---|---|---|
shikimori_id | number | the shikimori id |
The body
ScoreBody, sent as JSON. Every field it has is under the shapes below.
Answering #
200 ListEntry
The shapes #
ListEntry #
One row of somebody's list.
One shape for a caller's own list and for somebody else's, because it is one thing. Two shapes differing by a field would be two unwrappers in every SDK for a row that means exactly the same in both places.
| field | type | what it is |
|---|---|---|
shikimori_id | number | |
title | string | |
poster may be absent | string | undefined | |
status | string | `planned` | `watching` | `rewatching` | `paused` | `done` | `dropped` |
episode | number | how many they have watched |
episodes may be absent | number | undefined | How many the catalogue holds, so a counter knows where the series stops. Absent where the catalogue does not carry it or does not know — an announcement, and a good half of what is airing — and absent means "no ceiling" rather than "none". |
score may be absent | number | undefined | what they thought of it; null for a title they have not judged |
at | string | RFC 3339, and a string rather than a timestamp type for a reason that is about having one shape: this row comes from two places, and the site's own reader already formats it. A parse on this side to fit a stricter type would need something to do when it failed, and every honest answer to that is a lie about when somebody watched something. |
ScoreBody #
| field | type | what it is |
|---|---|---|
score | number | |
title may be absent | string | undefined | |
poster may be absent | string | undefined |
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.