API Reference
Documentation
Build a voting game library app using this REST API. All endpoints return JSON. Generate a key below to start trying out endpoints immediately.
Your API Key
Generate a key to auto-fill all request fields below.
Your key identifies your session and is isolated from other users.
GET
/api-key
Generate your API key
Response
{ "key": "a3f9c2e1b7d4082f5a6e3c1d9b2f7e40" }
Visit /api-key to generate your key interactively.
Games
POST
/games/list
List all games in your library
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | required | Your API key |
Response
{ "games": [{ "id": 1, "name": "Zelda", "votes": 3 }] }
Try it
api_key
POST
/games/add
Add a game to your library
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | required | Your API key |
name |
string | required | The game name |
Response
{ "id": 1 }
Try it
api_key
name
POST
/games/search
Find a game by ID
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | required | Your API key |
id |
integer | required | Game ID |
Response
{ "id": 1, "name": "Zelda", "votes": 3 }
Try it
api_key
id
POST
/games/remove
Remove a game from your library
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | required | Your API key |
id |
integer | required | Game ID |
Response
{ "success": true }
Try it
api_key
id
POST
/games/vote
Vote for a game
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | required | Your API key |
id |
integer | required | Game ID |
Response
{ "success": true }
Try it
api_key
id
POST
/games/removeVote
Remove a vote from a game
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | required | Your API key |
id |
integer | required | Game ID |
Response
{ "success": true }
Try it
api_key
id
Utilities
GET
/lastGameId
Get the last assigned game ID
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | required | Your API key (sent as query string) |
Response
{ "id": 5 }
Try it
api_key (query string)
POST
/cache/flush
Clear your game data. Your key remains valid.
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | required | Your API key |
Response
{ "success": true }
Try it
api_key
GET
/cache/health
Check API connectivity
Response
["ok"]
Try it