Screenshots
The owner's captures.
Publishing one is the single place this API takes a form instead of JSON, because a picture is bytes.
Every capture has two pictures: image_url, the whole one, for whoever opens the capture, and thumbnail_url, a WebP of at most 640 pixels across with thumbnail_width and thumbnail_height, for grids and cards. A capture published before thumbnails, or one whose thumbnail could not be made, has those three fields null: show image_url.
/api/ v1/ screenshots/ {id}A visible screenshot and its author. Removed screenshots do not appear. It carries the thumbnail as the owner's listing does: thumbnail_url, thumbnail_width and thumbnail_height, or null.
/api/ v1/ screenshotsThe owner's screenshots, newest first. Removed ones are left out. Each carries image_url, the whole picture, and thumbnail_url with thumbnail_width and thumbnail_height: a WebP of at most 640 pixels across for grids and cards, or null on a capture that has none yet, when image_url is the one to use.
/api/ v1/ screenshotsPublish a picture, as multipart/form-data rather than JSON. It is shrunk to fit 1920 by 1080, never enlarged, and stored as an AVIF of about 650 KB; one still over 2 MB after that is refused. A WebP thumbnail of at most 640 pixels across is stored beside it. Answers 201 with the capture, thumbnail_url, thumbnail_width and thumbnail_height included, which are null when the thumbnail could not be made: the capture is published anyway. An account may publish twenty an hour, counted apart from the key's allowance because a picture costs storage rather than a row.
Body
| Field | Type | Notes |
|---|---|---|
imagerequired | file | JPEG, PNG, WebP, GIF or AVIF, up to 15 MB and 40 million pixels, its content of the type sent. An animated picture is refused. |
igdb_idrequired | integer | The game's catalog id. |
game_slugrequired | string | The game's slug. |
description | string | Up to 2200 characters. |
visibility | string | PUBLIC, FOLLOWERS or PRIVATE. |
contains_spoilers | string | Form fields are text, so this is the word "true" rather than a boolean. |
sensitive | string | Likewise the word "true". |
Example response
curl https://uloggd.com/api/v1/screenshots \
-H "Authorization: Bearer ulg_live_..." \
-F [email protected] \
-F igdb_id=14593 \
-F game_slug=hollow-knight \
-F "description=The first time the city opens up"/api/ v1/ screenshots/ {id}Change the description, the warnings, the visibility or comments_scope. The picture itself does not change: to replace it, publish another and remove this one.
Body
| Field | Type | Notes |
|---|---|---|
description | string | Up to 2200 characters. |
contains_spoilers | boolean | This one is JSON, so it is a real boolean. |
sensitive | boolean | This one is JSON, so it is a real boolean. |
visibility | string | PUBLIC, FOLLOWERS or PRIVATE. |
/api/ v1/ screenshots/ {id}Remove a picture, from the listing and from the image host it was stored on.