API Reference: Difference between revisions
(Initial Paragraph) |
m (fix formatting of list) |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
Skyblock has an extensive API designed for internal use. A rewrite is in progress, and expected to be released soon<sup>[citation needed]</sup>. Currently, all endpoints require no authorisation. While most endpoints have ratelimits, these figures are not known. | Skyblock has an extensive API designed for internal use. A rewrite is in progress, and expected to be released soon<sup>[citation needed]</sup>. Currently, all endpoints require no authorisation. While most endpoints have ratelimits, these figures are not known. | ||
__TOC__ | |||
== Get player list == | |||
This endpoint is originally used for the player lists on the [https://skyblock.net forums index]. | |||
=== Values === | |||
* <code>{server id}</code>: A numerical ID representing the subserver you are querying. | |||
** <code>7</code> for Skywars. | |||
** <code>6</code> for Skyblock Economy. | |||
** <code>4</code> for Skyblock Survival. | |||
=== Request === | |||
Send a POST request to <code><nowiki>https://skyblock.net/index.php?server-status/{server id}/query</nowiki></code> | |||
; Request Body | |||
<code>_xfRequestUri=%2F&_xfNoRedirect=1&_xfResponseType=json</code> | |||
; Required Headers | |||
<pre> | |||
Content-Type: application/x-www-form-urlencoded; charset=UTF-8 | |||
Accept: application/json, text/javascript, */*; q=0.01 | |||
</pre> | |||
=== Response === | |||
<pre> | |||
{ | |||
"serverStatus": { | |||
"online": true, | |||
"players_online": "4", | |||
"max_players": "250", | |||
"player_list": [ | |||
"ZanyZandMrB", | |||
"SteelersDieHard", | |||
"Haberson", | |||
"IslandDiscounts" | |||
] | |||
}, | |||
} | |||
</pre> | |||
== Examples == | |||
* [https://github.com/AnotherPillow/skyblock.js Javascript] - Complete API wrapper | |||
* [https://github.com/AnotherPillow/skyblock-python Python] - Supports player listing on a server | |||
Latest revision as of 16:15, 19 January 2025
Skyblock has an extensive API designed for internal use. A rewrite is in progress, and expected to be released soon[citation needed]. Currently, all endpoints require no authorisation. While most endpoints have ratelimits, these figures are not known.
Get player list
This endpoint is originally used for the player lists on the forums index.
Values
{server id}: A numerical ID representing the subserver you are querying.7for Skywars.6for Skyblock Economy.4for Skyblock Survival.
Request
Send a POST request to https://skyblock.net/index.php?server-status/{server id}/query
- Request Body
_xfRequestUri=%2F&_xfNoRedirect=1&_xfResponseType=json
- Required Headers
Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Accept: application/json, text/javascript, */*; q=0.01
Response
{
"serverStatus": {
"online": true,
"players_online": "4",
"max_players": "250",
"player_list": [
"ZanyZandMrB",
"SteelersDieHard",
"Haberson",
"IslandDiscounts"
]
},
}
Examples
- Javascript - Complete API wrapper
- Python - Supports player listing on a server