1.4.5 • Published 3 years ago
okaeri-sdk v1.4.5
Okaeri SDK for Node.js
Currently supported services:
Full documentation available on wiki.okaeri.eu in:
Installation
npm install okaeri-sdk
Example usage
OK! AI.Censor
See full docs in: Polish, English
const OkaeriSdk = require('okaeri-sdk');
const aicensor = new OkaeriSdk.AiCensor({token: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"});
aicensor.getPrediction("o cie k u r//w@!").then(response => {
const swear = response.general.swear;
console.log(swear ? "Tak, to jest wulgarne." : "Nie, to nie jest wulgarne");
}).catch(error => {
console.log(error);
});
OK! No.Proxy
See full docs in: Polish, English
const OkaeriSdk = require('okaeri-sdk');
const noproxy = new OkaeriSdk.NoProxy({token: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"});
noproxy.getInfo("1.1.1.1").then(response => {
const proxy = response.risks.proxy;
const verify = response.suggestions.verify;
const block = response.suggestions.block;
console.log(`proxy: ${proxy}, verify: ${verify}, block: ${block}`);
}).catch(error => {
console.log(error);
});
OK! GameData
See full docs in: Polish, English
const OkaeriSdk = require('okaeri-sdk');
const gamedata = new OkaeriSdk.GameData();
// const gamedata = new OkaeriSdk.GameData({token: "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"}); // for paid users
gamedata.getMinecraftJavaInfo("hypixel.net").then(response => {
const online = response.players.online;
const max = response.players.max;
const normalizedMotd = response.motd.normalized;
console.log(`${online}/${max}`);
console.log(normalizedMotd);
}).catch(error => {
console.log(error);
});
OK! OpenVote
See full docs in: Polish, English
const OkaeriSdk = require('okaeri-sdk');
const openvote = new OkaeriSdk.OpenVote();
openvote.getListVote("3fa85f64-5717-4562-b3fc-2c963f66afa6").then(response => {
const server = response.server;
const list = response.list;
console.log(`server=${server}, list=${list}`)
}).catch(error => {
console.log(error);
});
1.4.5
3 years ago
1.4.4
3 years ago
1.4.3
3 years ago
1.4.2
3 years ago
1.3.3
3 years ago
1.4.1
3 years ago
1.4.0
3 years ago
1.3.2
3 years ago
1.3.1
3 years ago
1.3.0
3 years ago
1.2.3
3 years ago
1.2.2
3 years ago
1.2.1
3 years ago
1.2.0
3 years ago
1.0.12
3 years ago
1.0.11
3 years ago
1.0.10
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago