AI Gaming
Search…
REST API

API Call Result Values

All API calls return a string Result value as the first field in the returned data. Possible values are:
Result
Description
SUCCESS
CALL_ALREADY_IN_PROCESS
WAITING_FOR_GAME
GAME_ALREADY_STARTED
GAME_HAS_ENDED
INVALID_LOGIN_OR_PASSWORD
INVALID_PLAYER_KEY
BOT_IS_SUSPENDED
BOT_IS_INACTIVE
INSUFFICIENT_BALANCE
NOT_YOUR_MOVE
INVALID_MOVE

GameStatus Values

Value
Description
STARTING_SOON
Game will start shortly
RUNNING
Game is in progress
WON
Game is over and this client won
WON_BY_TIMEOUT
This client won by the other player timing out
LOST
This client lost
LOST_BY_TIMEOUT
This client lost by timing out
DRAWN
The game ended in a draw

Schema

All API access is over HTTPS, and accessed through:
All data is sent and received as JSON.
post
/prod/GM-GetListOfGameStyles
Get List Of Game Styles
post
/prod/GM-OfferGame
Offer Game
post
/prod/GM-CancelGameOffer
Cancel Game Offer
post
/prod/GM-PollForGameState
Poll For Game State
post
/prod/GM-MakeMove
Make Move

Test the API with Postman

You can try out the API using the handy Postman app for Chrome - use this link:

Demo API Program

We have created a complete GUI app in Python that uses the REST API to play games on our site. This provides a great example of how each REST API call should be implemented.
You can find out more details about this and how to download it on our Test harness using the REST API page.
Last modified 2yr ago