The API for OSRS Tracker.
Endpoint: GET /icon/:id
Possible status codes: 200
and 404
.
Returns:
An 96x96 image in GIF format.
Endpoint: GET /item/:id
Possible status codes: 201
, 404
and 500
.
Returns:
Items: [{
id: number,
name: string,
description: string,
current: string,
today: string
}]
Endpoint: GET /item?query=[string]
Possible status codes: 200
, 204
and 500
.
Returns:
Items: [{
id: number,
name: string,
description: string,
current: string,
today: string
}, ...]
Endpoint: GET /player/:username
Possible status codes: 200
, 404
and 500
.
Returns:
player: {
username: string,
playerType: PlayerType,
deIroned: boolean,
dead: boolean,
lastChecked: Date,
}
Endpoint: POST /player
Possible status codes: 201
, 204
and 500
.
Expected payload:
{
username: string,
playerType: PlayerType,
deIroned: boolean,
dead: boolean,
}
Endpoint: GET /news/:id?uuid=[string]
The uuid
is used to check if the user has up or downvoted this post.
Possible status codes: 200
, 404
and 500
.
Returns:
NewsPost: {
id: number,
title: string,
date: Date,
category: string,
content: string,
upvotes: number,
downvotes: number,
vote: number
}
Endpoint: GET /news?uuid=[string]&offset=[number]
The uuid
is used to check if the user has up or downvoted posts.
Possible status codes: 200
, 404
and 500
.
Returns:
NewsPosts: [{
id: number,
title: string,
date: Date,
category: string,
content: string,
upvotes: number,
downvotes: number,
vote: number
}, ...]
Endpoint: POST /news/upvote
Possible status codes: 204
and 500
.
Expected payload:
{
newsId: number,
uuid: string
}
Endpoint: POST /news/downvote
Possible status codes: 204
and 500
.
Expected payload:
{
newsId: number,
uuid: string
}
Endpoint: POST /xp/:username/initialDatapoint
Possible status codes: 204
, 403
and 500
.
Expected payload:
{
username: string,
xpString: string
}
Endpoint: GET /exp/:username(/:period)?offset=[number]
The period
route parameter is optional, defaults to 7
.
Possible status codes: 200
, 404
and 500
.
Returns:
XpDatapoints: [{
date: Date,
xpString: string
}, ...]