Votes on a game's main cover
const url = 'https://api.thebgdb.org/v1/games/5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77/cover-votes';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/cover-votesHow members voted on the game’s main cover: to keep it (keep), for a better one (change), or for one of the game’s other box fronts (cover:<id> for another edition’s or language’s cover in covers, photo:<id> for a member’s approved photo of the box front).
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-2f2d2b1d9a77Responses
Section titled “Responses”The votes.
object
object
Votes to keep the cover.
Votes for a better cover.
Votes for each of the game’s other box fronts, most first.
object
The asking member’s vote; null for a visitor or a member who has not voted.
Votes one of the other box fronts needs, with more than keep, to become the main cover; change needs as many to have a better cover looked for.
The game’s other box fronts that may be voted for, each with its image on this API (as image and the photos give it).
object
Example
{ "data": { "keep": 1, "change": 0, "alternatives": [ { "choice": "cover:c-1", "votes": 2 } ], "mine": null, "threshold": 3, "candidates": [ { "choice": "cover:c-1", "image": "/v1/media/covers/abc.jpg" } ] }}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"}