Statistics

Request

➔ For the base of the request, I invite you to go to the following page:

post
Statistics

https://arcane-botcenter.xyz/api/:id/stats
Allows you to post these statistics (servers, shards) on the website.
Request
Response
Request
Path Parameters
id
required
string
Bot ID
Headers
Authorization
required
string
Your API access token
Body Parameters
server_count
optional
number
Value guilds
shard_count
optional
number
Value shards
Response
200: OK
OK

Exemple

➔ Here are different examples to make a request in different languages.

JavaScript
Java
Python
JavaScript
const {
post
} = require('axios');
const apiKey = 'TOKEN API';
const payload = {
server_count: Number,
shard_count: Number
};
post('https://arcane-center.xyz/api/[BOT ID]/stats', payload, {
headers: {
'Content-Type': 'application/json',
'Authorization': apiKey
}
}).then(res => {
console.log(res.status);
}).catch(err => {
console.error(err.message);
});
Java
public static void main(String... args) {
JSONObject object = new JSONObject();
object.put("server_count", Number);
object.put("shard_count", Number);
final String token = "";
final String bot_id = "";
final String url = "https://arcane-center.xyz/api/" + bot_id + "/stats";
CloseableHttpClient client = HttpClients.createDefault();
try {
StringEntity entity = new StringEntity(object.toString(4));
HttpUriRequest request = RequestBuilder
.create("POST")
.setUri(url)
.addHeader("Authorization", token)
.addHeader("Content-Type", "application/json")
.setEntity(entity)
.build();
HttpResponse response = client.execute(request);
if (response.getStatusLine().getStatusCode() != 200) {
System.out.println(("error: " + response.getStatusLine().getStatusCode()));
}
client.close();
} catch (IOException e) {
e.printStackTrace();
}
}
Python
# Use python3
import requests
import json
TOKEN = ""
BOT_ID = ""
URL = "https://arcane-center.xyz/api/" + BOT_ID + "/stats"
headers = {
'Authorization': TOKEN,
'Content-Type': "application/json",
}
payload = {
"server_count": Number,
"shard_count": Number
}
data = json.dumps(payload, sort_keys=True, indent=4, separators=(',', ': '))
requests.request("POST", URL, data=data, headers=headers)