VGA Planets

Introduction

How The Website Works

Races

Dashboard

Starmap

Planets

Starships

General Information

Guides

Contributions

Searchable Documentation

API games list


Main Documentation —> Website —> API —> API /games/list/

Overview of /games/list API call

The /games/list API call is used to get a list of games that match a search pattern.

The data returned by this call is fairly limited, but it does include a list of gameids that matches the search pattern. These gameids can then be used to collect more information with other calls as needed.

Examples of searches that you can perform with this call:

It can't be used directly to do more complex searches such as:

For these more complex searches you would have to get all games fitting the general search pattern, and then write a script to filter down to your exact match.

This is a public API call and does not require an apikey.

Data sent

Data Description
username (optional) Find all games with username in.

(Encode spaces and non-alphanumeric characters).
(Ignores all other search terms).
ids (optional) Find games by gameid(s).

(Comma separated if multiple).
(Ignores all other search terms).
status (optional)
  • 0.  Interest
  • 1.  Joining
  • 2.  Running
  • 3.  Finished
  • 4.  On Hold
(Comma separated if multiple).
(Default= "1,2")
type (optional)
  1. Training
  2. Classic / Standard / Custom
  3. Team / Mentor vs. Midshipmen
  4. Giant Melee
  5. Blitz
  6. Championship
  7. Academy
(Comma separated if multiple).
(Default= "2,3,4")
scope (optional) 0= Public
1= Custom/Private

(Comma separated if multiple).
(Default= "0")
limit (optional) Maximum number of games to return.

(Default= 0 = all)

Notes

Data returned

Data Description
array of Game objects. (Array can be empty if no matching games are found).

Game Object

Game object Description
name Game short name. e.g. "Sector"
description "This is a battle for the Forel Sector ..."
shortdescription "Classic", "Teams of 3", "Senior Officers", "Campaign", "Mentor vs Midshipmen" etc.
status 0= Interest,
1= Joining,
2= Running,
3= Finished,
4= On Hold
datecreated Date of creation. e.g. "6/26/2016 10:24:34 PM"
dateended Date game ended,
or "1/1/0001 12:00:00 AM" for not ended.
maptype -1= Blitz / Training level,
1= Alpha/Beta/old military games (No longer used),
2= System generated game,
3= Hosted / custom game.
gametype 1= Training
2= Classic / Standard / Custom
3= Team / Mentor vs. Midshipmen
4= Giant Melee
5= Blitz
6= Championship
7= Academy
wincondition 0= (No longer used),
1= Diplomatic planets,
2= Total planets,
3= Military score,
4= Fixed turn,
5= All planets.
difficulty Difficulty modifier. e.g. 0.5537 ...
tutorialid (Unused by client).
requiredlevelid Minimum officer rank to join.
maxlevelid Maximum officer rank to join.
masterplanetid (Related to sector name for system generated games).
quadrant (Unknown integer. Unused by client).
mintenacity Minimum tenacity to join.
faststart Turns at fast start (once per day) e.g. 15
turnsperweek Turns per week after fast start e.g. 3
yearstarted Nu year game started. e.g. 66
isprivate True if this is a private game,
False if this is a public game.
scenarioid -1= Blitz
0= All other games
createdby Host of the game or "none" for system generated.
turn Current turn number e.g. 1
slots Number of player slots e.g. 11
turnstatus Current status of all player's turns.

"_"= not viewed or not finished
"o"= open
"x"= dead
"c"= computer
raceID= done
e.g. "_ox4x67oxxx"
hostdays Current host days. During fast start will be "SMTWTFS".
slowhostdays Host days after fast start period. e.g. "_M_W_F_".
hosttime Time host will run (in UTC) e.g. "12:19"
lastbackuppath (For admin use only).
nexthost Next host date and time. e.g. "1/1/2016 12:00:00 AM",
allturnsin True if all turns are in (and host is ready to run),
False if not
lastnotified (Unused by client).
ishosting True if host is turning,
False if not
lastloadeddate Date that the game was last loaded by a player e.g. "6/27/2016 1:49:35 AM"
deletedate (Not used)
lasthostdate Date that the host last ran.
password (Always blank).
haspassword True if the game is password protected,
False if not
statusname e.g. "Joining", "Running", "Finished"
justended True if the game ended in the last day,
False if not.
iscustom True if a custom (non system generated) game,
False if system generated.
timetohost Minutes or hours to next host, "Turning", "Turns when you are ready.", "Joining" or "On Hold".
id Gameid e.g. 184630


Failures

{"success":false,"error":"Game Ids in incorrect format"}

Back