acyka api

PUT /api/v1/collections/{code}/items/{shikimori_id}

addCollectionItem

needs lists:write

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

Asking #

In the address

fieldtypewhat it is
code stringthe shelf's code
shikimori_id numberthe shikimori id

The body

EntryBody, sent as JSON. Every field it has is under the shapes below.

Answering #

200 CollectionItem

The shapes #

CollectionItem #

fieldtypewhat it is
shikimori_id number
title string
poster may be absentstring | undefined
added_by may be absentstring | undefined
at string

EntryBody #

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