acyka api

PUT /api/v1/lists/{shikimori_id}

saveListEntry

needs lists:write

curl https://api.acyka.cc/api/v1/lists/52991 \
  -X PUT \
  -H "Authorization: Bearer $ACYKA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ }'

Asking #

In the address

fieldtypewhat it is
shikimori_id numberthe shikimori id

The body

ListBody, 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.

fieldtypewhat it is
shikimori_id number
title string
poster may be absentstring | undefined
status string`planned` | `watching` | `rewatching` | `paused` | `done` | `dropped`
episode numberhow many they have watched
episodes may be absentnumber | undefinedHow 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 absentnumber | undefinedwhat they thought of it; null for a title they have not judged
at stringRFC 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.

ListBody #

fieldtypewhat it is
title string
poster may be absentstring | undefined
status may be absentstring | undefined
episode may be absentnumber | 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.