VGA Planets

Introduction

How The Website Works

Races

Dashboard

Starmap

Planets

Starships

General Information

Guides

Contributions

Searchable Documentation

API set turn ready


Introduction —> How The Website Works —> API —> API set turn ready

API - request to /game/turnready

The /game/turnready API call is used by a player to set the status of their turn. It is mostly used to set the turn to a "DONE" state, but can also be used to set the turn to a "Not Ready" state. The player provides a security key called the apikey (from the account login API), along with information on the game, player slot and desired turn state.

Data Sent

The following data is accepted by the interface:

Data Required Description
API Key Yes Player's API key from a login request.
gameid Yes The unique number that identifies the game.
playerid Yes The slot number for the player. This is a value between 1 and 35. This must be the player that the API Key is for.
ready Yes The desired state for the turn after this API call completes. This value should be either "True" or "False".

Data Returned

The following data is returned by the interface:

Data Description
success True

Notes

None

Failures

This API call is not as polite as many of the other API calls. It informs you that there is an error, but fails to inform you as to which field is missing.

{"success":false,"error":"An API error has occurred - Value cannot be null."}

Back