diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api.md | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -70,13 +70,21 @@ Returns `ApiHomeResponse`. ## Assets -All asset endpoints redirect to the asset that you need. Returned images are -coded with AVIF. The `width` parameter is the width of the resolution you want -to image to be. +Endpoints like `.../poster` redirect to the asset that you need and +automatically choose fallbacks. Alternatively you can directly request assets +with `/asset/<token>`, but there you need to implement the fallback behaviour +yourself. Returned images are coded with AVIF. The `width` parameter is the +width of the resolution you want to image to be. > [!WARNING] The actual returned resolution must not be exactly what you > requested. Currently it is rounded up to the next power of two. +### GET* `/asset/<token>?<width>` + +This is the final asset endpoint where images are returned from. Other endpoints +redirect here. The `token` part is an opaque string that you obtain from +somewhere else like a redirect or from within the `Node` struct. + ### GET* `/n/<id>/poster?<width>` ### GET* `/n/<id>/backdrop?<width>` |