> Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Stats tracking API for Titanfall 2 Northstar
Base URLs:
* https://tone.sleepycat.date/v1
Web: Legonzaur
License: The Unlicense
# Authentication
- HTTP Authentication, scheme: basic
Default
## get-server-list
> Code samples
```javascript
const headers = {
'Accept':'application/json'
};
fetch('https://tone.sleepycat.date/v1/client/servers',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
```
`GET /client/servers`
*List of servers*
An array containing the list of servers as objects
> Example responses
> OK
```json
[
{
"id": 1,
"name": "fvnknoots 7v7"
}
]
```
Status Code **200**
|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|» Server|object|false|none|none|
|»» id|integer|false|none|none|
|»» name|string|false|none|none|
## get-client-weapons
> Code samples
```javascript
const headers = {
'Accept':'application/json'
};
fetch('https://tone.sleepycat.date/v1/client/weapons',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
```
`GET /client/weapons`
*Statistics for all weapons*
A JSON Object with weapon IDs as key and weapon data as value
> Body parameter
Parameters
|Name|In|Type|Required|Description|
|---|---|---|---|---|
|server|query|number|false|Fetch data for specific server|
|player|query|number|false|Fetch data for specific player|
> Example responses
> OK
```json
{
"hemlock": {
"max_kill_distance": 0,
"avg_kill_distance": 0,
"kills": 0
},
"lstar": {
"max_kill_distance": 0,
"avg_kill_distance": 0,
"kills": 0
}
}
```
Status Code **200**
|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|» hemlock|object|false|none|none|
|»» max_kill_distance|integer|false|none|none|
|»» avg_kill_distance|number|false|none|none|
|»» kills|integer|false|none|none|
## get-client-weapons-weaponId
> Code samples
```javascript
const headers = {
'Accept':'application/json'
};
fetch('https://tone.sleepycat.date/v1/client/weapons/{weaponId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
```
`GET /client/weapons/{weaponId}`
*Statistics for a single weapon*
Data for a specific weapon
> Body parameter
Parameters
|Name|In|Type|Required|Description|
|---|---|---|---|---|
|server|query|number|false|Fetch data for specific server|
|player|query|number|false|Fetch data for specific player|
|weaponId|path|string|true|ID of a weapon|
> Example responses
> 200 Response
```json
{
"max_kill_distance": 0,
"avg_kill_distance": 0,
"kills": 0
}
```
Status Code **200**
*Weapon*
|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|» max_kill_distance|integer|false|none|none|
|» avg_kill_distance|number|false|none|none|
|» kills|integer|false|none|none|
## get-client-players
> Code samples
```javascript
const headers = {
'Accept':'application/json'
};
fetch('https://tone.sleepycat.date/v1/client/players',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
```
`GET /client/players`
*Statistics for all players*
A JSON Object with player IDs as key and player data as value
Parameters
|Name|In|Type|Required|Description|
|---|---|---|---|---|
|weapon|query|string|false|Fetch data for specific weapon|
|server|query|number|false|Fetch data for specific server|
> Example responses
> OK
```json
{
"2250125460": {
"name": "Legonzaur",
"deaths": 0,
"kills": 0,
"max_kill_distance": 0,
"avg_kill_distance": 0
}
}
```
Status Code **200**
|Name|Type|Required|Restrictions|Description|
|---|---|---|---|---|
|» 2250125460|object|false|none|none|
|»» name|string|false|none|none|
|»» deaths|integer|false|none|none|
|»» kills|integer|false|none|none|
|»» max_kill_distance|integer|false|none|none|
|»» avg_kill_distance|number|false|none|none|
## get-client-players-playerId
> Code samples
```javascript
const headers = {
'Accept':'application/json'
};
fetch('https://tone.sleepycat.date/v1/client/players/{playerId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
```
`GET /client/players/{playerId}`
*Statistics for a single player*
Data for a specific player
Parameters
|Name|In|Type|Required|Description|
|---|---|---|---|---|
|server|query|number|false|Fetch data for specific server|
|weapon|query|string|false|Fetch data for specific weapon|
|playerId|path|string|true|ID of a player|
> Example responses
> 200 Response
```json
{
"name": "Legonzaur",
"deaths": 0,
"kills": 0,
"max_kill_distance": 0,
"avg_kill_distance": 0
}
```