Skip to content

Tempus.xyz API Documentation

Luke Parker edited this page Jul 9, 2020 · 5 revisions

The most complete documentation - info sourced from personal use, Jayess, limited documentation, and tempus.xyz source code

Data Type Definitions

The data types used in the definitions, and their meanings/notes here.

The use of T means that it is a generic, and is a stand in for all types

Name Definition Notes
string Standard array of chars
int Signed 32-bit integer
List<T> The API gives a list of data type T Implementing this as an Array of T is fine
T? Nullable type of T This means the API might not respond with the value
double 64-bit precision floating point **The API returns varying levels of precision (e.g. sometimes returning 12 d.p. vs 14 d.p.). Its recommended to allow tollerance past 12 dp i.e. `
long Signed 64-bit integer
bool Boolean (true or false)
object Could be any type (unknown) From the property name, it should be a string, but has not been verified

Additional Data Type notes

  • For Dates, the value is stored as a double - in milliseconds since the Unix epoch
  • For Durations, the value is stored as a double - in milliseconds
  • For Class information as a number, 3 => Soldier, and 4 => Demoman

API Routes

  • All routes omit the base URL: https://tempus.xyz/api. The listed route should be appended to the base for the true url
  • The API returns JSON
  • All requests made should be HTTP GET
  • Any paths including {x} should replace the part with the related value

Data files linked, have the Attribute [JsonProperty(PropertyName = "x")] or [JsonProperty("x")], where x is the key given by the API. The line following it, will contain datatype, after the public keyword.

If a line is not prefixed by the [JsonProperty] attribute, then it is not returned by the API. Most likely, I have given it the additional data on TempusHub.

If the class has the following public class x : y, then the class x inherits class y's data.

General

/activity

Model


/search/playersAndMaps/{query}

Model


/records/id/{runId}/overview

Model

Map

/maps/list

Model


/maps/detailedList

Model


/maps/name/{full_map_name}}/fullOverview

Model


/maps/name/{mapName}/zones/typeindex/{zoneType}/{zoneIndex}/records/list

Model

Can optionally add the parameter ?limit=x where x is the number of results you want. (This parameter may work for other endpoints, but untested)

Server + Demos

/servers/statusList

Model


/servers/{serverId}/demos

Model


/demos/id/{demoId}/overview

Model

Rank Leaderboards

/ranks/overall

Model


/ranks/class/4

Model


/ranks/class/3

Model

Player

/players/id/{id}/rank

Model


/players/id/{id}/stats

Model

Clone this wiki locally