Propose a game's tutorial
const url = 'https://api.thebgdb.org/v1/games/5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77/tutorials/proposals';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"edition":"5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77:original","language":"en","steps":[{"text":"Lay out the island.","video":"https://www.youtube.com/watch?v=dQw4w9WgXcQ"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.thebgdb.org/v1/games/5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77/tutorials/proposals \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "edition": "5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77:original", "language": "en", "steps": [ { "text": "Lay out the island.", "video": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" } ] }'A confirmed member sends every step of one edition’s tutorial in one language, new or changed (1 to 40 steps). Each step has text (1,000 characters) and at most one of imageId (from POST /games/{id}/tutorials/images) or video (a YouTube or Vimeo link). base is the version you started from (the latest history entry’s id), so a moderator can tell when it changed meanwhile. A moderator accepts or rejects it. 20 a day.
Authorizations
Section titled “Authorizations”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.
Example
5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77Request Bodyrequired
Section titled “Request Bodyrequired”object
A language code such as “en”, “fr” or “pt-BR”.
object
Example
{ "edition": "5c9b0f43-7a39-4f0c-8a4e-2f2d2b1d9a77:original", "language": "en", "steps": [ { "text": "Lay out the island.", "video": "https://www.youtube.com/watch?v=dQw4w9WgXcQ" } ]}Responses
Section titled “Responses”Sent. It waits for a moderator (pending); a moderator’s own change is written at once (accepted).
object
object
Example
{ "data": { "id": "3f0c5d2e-1b4a-4c3d-9e8f-7a6b5c4d3e2f", "status": "pending" }}The steps, the language or the edition are not accepted, or nothing changed.
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"}The request has no valid session token.
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"}The member has not confirmed their email address.
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, or it has no such edition.
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"}Too many requests, or too many of these sent today (code says which).
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"}