WebAPI:Galaxies
From Starsonata Wiki
This returns a list of all galaxies in the game that have been discovered or otherwise marked as public knowledge. Galaxies will show up 24h after their initial in-game discovery, unless they are located in W0 space (in which case they will show up immediately).
Contents
Parameters
https://www.starsonata.com/webapi/galaxies/v1
No parameters.
Response
Returns an array galaxies with members keyed by their galaxy ID. Each galaxy has the following attributes.
-
ID
- The galaxy ID. This is unique per galaxy in a universe. -
name
- The galaxy name. -
lastUpdate
- The last time the galaxy was updated in the api. -
x
- The x coordinate for the map. -
y
- The y coordinate for the map. -
links
- An array of galaxy IDs that this galaxy has wormholes leading to. -
layer
- The layer of the map that this galaxy resides in. -
df
- The df of the map that this galaxy resides in. This is on a slightly different scale and is 1/10th of the value you normally see in-game. -
special
- true if the galaxy is marked as "special". -
anchor
- true if the galaxy is marked as an anchor. This means that the map should render it in its own layer as well as layers of galaxies that it is linked to. -
owningTeamID
- The team ID of a Userteam that owns the galaxy. Use the teams api to get more details on the team. -
owningTeam
- The name of an ai team that owns the galaxy. Mutually exclusive with owningTeamID. -
protected
- true if the galaxy is protected by the team that owns it. -
aibases
- The number of aibases in the galaxy. -
userbases
- The number of userbasesin the galaxy. -
mapable
- false if the galaxy is not rendered on the normal map
The above values are trimmed if they are an empty string or false, with the exception of mapable which is trimmed if it is true.
Example
A couple galaxies as they would appear in the galaxies array.
{ "32812": { "ID": 32812, "name": "Rigel", "lastUpdate": 1618234241, "x": 1.14028, "y": 1.39111, "links": [32858, 32836, 33086, 53850], "layer": 0, "df": 0.6, "aibases": 1, "userbases": 3 }, "32818": { "ID": 32818, "name": "Vulpis Plethoris", "lastUpdate": 1618219811, "x": 0.946635, "y": 0.462609, "links": [32786, 32824, 32776, 52647, 53184, 90171], "layer": 0, "df": 0.1, "aibases": 3, "userbases": 8 } }