Difference between revisions of "API"

From Tycoon Gaming
tycoon>Tycoon.community
(Adding categories)
 
m (1 revision imported: Move from Fandom to here)
(No difference)

Revision as of 17:06, 19 September 2019

Transport Tycoon API

Root API URI is the servers address

API is available per server instance

Legend

type name (data type and a property name)
type? name (data type may vary based on data context)
type! name (data might not exist based on data context)

Note: Array data types do not contain named properties, the names used here are for clarifiation

Get world information for online players

GET /status/map/positions.json
object
- int time
- array[array player] data
-- string name
-- int source
-- int user_id
-- vec3 position
-- object vehicle
--- int vehicle_class
--- string vehicle_type
--- int! model
--- string! vehicle_label
--- string! vehicle_name
-- object job
--- string group
--- string name

Get server details and online players

GET /status/widget/players.json
object
- object server
-- string name
-- string motd
-- string number
-- string region
-- string beta
-- int limit
- array[array player] players
-- string name
-- int source
-- int user_id
-- string? avatar
-- bool staff
-- string job_name
-- bool whitelist