List a game's photos
const url = 'https://api.thebgdb.org/v1/games/5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77/photos?kind=box_back&limit=50';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.thebgdb.org/v1/games/5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77/photos?kind=box_back&limit=50'The photos members added to the game and a moderator approved, oldest first, each with what it shows (kind). A member signed in also sees their own photos waiting for review. The game’s cover from its source is not a photo: it is image on the game, with imageKind.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The game’s id, as returned in every game object. The game’s slug is accepted too, and so is an address it had before: a slug changed when the game was renamed by the addressing rule, or the id or slug of an entry merged into it because both were the same game. The answer is the game under its current id and slug; compare them with what you sent to update a stored link.
Example
5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77Query Parameters
Section titled “Query Parameters”Only photos that show this. box_front the whole front of the box; box_back its back; box_partial the box at an angle, cropped, or an overall shot of it; board_traditional the board of a traditional game that never had a box (chess, go); setup the game laid out ready to play; in_play a game in progress, nobody visible; components the pieces, boards and tokens; cards cards; people people playing, or any person, face or hand in the picture; rulebook a page of the rules; logo a title or logo alone; other anything else. New words may be added; treat an unknown one as other.
Example
box_backThe nextCursor of the previous page.
Responses
Section titled “Responses”A page of photos.
object
object
Members who liked it.
Members who disliked it. Once dislikes outnumber likes by 3 or more, with at least 5 votes, it is hidden until a moderator looks at it.
Path of the file on this API.
What the photo shows, as its uploader said and a moderator checked. Photos added before members were asked carry what a vision model saw. Null when nothing has said yet. box_front the whole front of the box; box_back its back; box_partial the box at an angle, cropped, or an overall shot of it; board_traditional the board of a traditional game that never had a box (chess, go); setup the game laid out ready to play; in_play a game in progress, nobody visible; components the pieces, boards and tokens; cards cards; people people playing, or any person, face or hand in the picture; rulebook a page of the rules; logo a title or logo alone; other anything else. New words may be added; treat an unknown one as other.
The language of the edition the photo shows, as a code such as “en” or “pt-BR”. Null when its uploader did not say.
The edition the photo shows, when its uploader said.
An edition of the game, as GET /v1/games/{id}/editions lists it.
object
Null for the original edition.
This edition’s own barcode (EAN-13), when a source states it. Null for the original edition: its barcode is the game’s ean.
The titles this edition is sold under, such as “Dominion (Second Edition)”. They are this edition’s, so they are not among the game’s names. Empty when it has none of its own.
Display name of the member who added it.
pending only appears to the member who uploaded it.
The game’s official cover, sent by a verified representative of one of its publishers.
Pass as cursor to get the next page. Null on the last page.
Example
{ "data": [ { "kind": "box_front", "edition": { "titles": [ "Dominion (Second Edition)" ] }, "name": { "id": "3f9c0b1e2d4a5b6c7d8e9f0a1b2c3d4e", "name": "Les Colons de Catane", "language": "fr" }, "status": "approved" } ]}kind is not one of the words listed (invalid_photo_kind), or cursor is not an accepted value.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}No game has this id.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}Over a request limit. rate_limited: without a token, 60 a minute and 2,000 a UTC day per address (more with a token; see Limits above). weekly_limit: the week’s requests or game details are used up (params.max is the cap). The retry-after header says how many seconds to wait: 60 for a minute’s limit, until midnight UTC for a day’s, until Monday 00:00 UTC for a week’s.
object
What went wrong, in plain English words. The wording may change: act on code.
A stable name for this refusal, for programs and for showing the message in another language. A code is never renamed; new ones may be added.
The numbers the sentence names, when it names any: for example { "max": 20 } with daily_photo_limit.
object
Example
{ "error": "Game not found", "code": "game_not_found"}