1. Home
  2. Docs
  3. Disc0rd.exe
  4. API

API

The bot offers an open API which works on a json basis. The API can be used simply with GET and POST requests.

A request can contain data in two ways.

1) Via the url
2a) Via POST (application/x-www-form-urlencoded)
2b) Via POST (application/json)

In some queries both are even used.

All requests that are intended for the public are listed below:

URLTYPEDESCRIPTIONDOCUMENTATION
https://disc0rd.me/api/v1/versionGETGet the currently bot version.Version
https://disc0rd.me/api/v1/leaderboard/getGETGet the leaderboard statistics from a guild.Leaderboard
https://disc0rd.me/api/v1/leaderboard/imgGETGet an svg image from an users rank in a guild.Leaderboard

Almost all inquiries are answered as follows:

If a request was successful you will receive a JSON string containing an object with the name “status”. The “status” object tells you whether there were problems with the request or whether everything went as it was intended. An example answer for a successful inquiry would be:

{
	"status": "ok",
	"data": "some example data"
}

If there was an error with the request, the answer looks like this as an example:

{
	"status": "error",
	"error": "error description here"
}

Articles

Was this article helpful to you? Yes No

How can we help?

Leave a Reply

Your email address will not be published. Required fields are marked *