This wiki is archived from 2021-09-05
Planetary Annihilation net API: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
== api.net.startGame( region, mode ) == | == api.net.startGame( region, mode ) == | ||
{| class="wikitable" | |||
!region | |||
|mandatory | |||
|string | |||
|uber region: Australia, USCentral or EUWest | |||
|- | |||
!mode | |||
|mandatory | |||
|string | |||
|Config or gw optionally prefixed with content eg PAExpansion1:Config for Titans | |||
|- | |||
!returns | |||
| | |||
|object | |||
| | |||
|- | |||
| | |||
!LobbyId | |||
|string | |||
|unique game identifier | |||
|- | |||
| | |||
!ServerHostName | |||
|string | |||
|hostname or IP address | |||
|- | |||
| | |||
!ServerPort | |||
|string | |||
|port number | |||
|- | |||
| | |||
!Ticket | |||
|string | |||
|uber game ticket | |||
|- | |||
| | |||
!Expires | |||
|string | |||
|ISO 8601 UTC timestamp | |||
|} | |||
== api.net.joinGame( params ) == | |||
= | Joins an Uber game based on a lobbyId. | ||
{| class="wikitable" | |||
!params | |||
|mandatory | |||
|object | |||
|only lobbyId is used | |||
|- | |||
!returns | |||
| | |||
|object | |||
| | |||
|- | |||
| | |||
!LobbyId | |||
|string | |||
|unique game identifier | |||
|- | |||
| | |||
!ServerHostName | |||
|string | |||
|hostname or IP address | |||
|- | |||
| | |||
!ServerPort | |||
|string | |||
|port number | |||
|- | |||
| | |||
!Ticket | |||
|string | |||
|uber game ticket | |||
|- | |||
| | |||
!Expires | |||
|string | |||
|ISO 8601 UTC timestamp | |||
|} | |||
Internally retries 5 times baaed on PollWaitTimeMS. | |||
returns | Currently never returns if invalid lobbyId. | ||
== api.net.connect( params ) == | == api.net.connect( params ) == | ||
Connects to a game server. | |||
{| class="wikitable" | |||
!params | |||
|mandatory | |||
|object | |||
| | |||
|- | |||
!host | |||
|mandatory | |||
|string | |||
|hostname or IP address | |||
|- | |||
!port | |||
|mandatory | |||
|string | |||
|port number | |||
|- | |||
!display_name | |||
|mandatory | |||
|string | |||
| | |||
|- | |||
!ticket | |||
|mandatory for uber servers | |||
|string | |||
|returned from startGame or joinGame | |||
|- | |||
!with_content | |||
|optional | |||
|string | |||
|PAExpansion1 for Titans | |||
|- | |||
!clientData | |||
|mandatory for uber servers | |||
|object | |||
| | |||
|} | |||
clientData: | |||
{| class="wikitable" | |||
!password | |||
|optional | |||
|object | |||
| | |||
|- | |||
!uberid | |||
|mandatory for uber servers | |||
|string | |||
|unique player identifier | |||
|- | |||
!uuid | |||
|optional | |||
|string | |||
|unique game identifier for invites to private game | |||
|} |
Revision as of 21:57, 17 April 2016
File:Titans-icon.png Planetary Annihilation net API
api.net.startGame( region, mode )
region | mandatory | string | uber region: Australia, USCentral or EUWest |
---|---|---|---|
mode | mandatory | string | Config or gw optionally prefixed with content eg PAExpansion1:Config for Titans |
returns | object | ||
LobbyId | string | unique game identifier | |
ServerHostName | string | hostname or IP address | |
ServerPort | string | port number | |
Ticket | string | uber game ticket | |
Expires | string | ISO 8601 UTC timestamp |
api.net.joinGame( params )
Joins an Uber game based on a lobbyId.
params | mandatory | object | only lobbyId is used |
---|---|---|---|
returns | object | ||
LobbyId | string | unique game identifier | |
ServerHostName | string | hostname or IP address | |
ServerPort | string | port number | |
Ticket | string | uber game ticket | |
Expires | string | ISO 8601 UTC timestamp |
Internally retries 5 times baaed on PollWaitTimeMS.
Currently never returns if invalid lobbyId.
api.net.connect( params )
Connects to a game server.
params | mandatory | object | |
---|---|---|---|
host | mandatory | string | hostname or IP address |
port | mandatory | string | port number |
display_name | mandatory | string | |
ticket | mandatory for uber servers | string | returned from startGame or joinGame |
with_content | optional | string | PAExpansion1 for Titans |
clientData | mandatory for uber servers | object |
clientData:
password | optional | object | |
---|---|---|---|
uberid | mandatory for uber servers | string | unique player identifier |
uuid | optional | string | unique game identifier for invites to private game |