Nuanced Pumpkin Mavens

    okaeri-sdk
    TypeScript icon, indicating that this package has built-in type declarations

    1.4.5 • Public • Published

    Okaeri SDK for Node.js

    License Total lines Repo size npm Contributors Discord

    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);
    });

    Keywords

    none

    Install

    npm i okaeri-sdk

    DownloadsWeekly Downloads

    0

    Version

    1.4.5

    License

    MIT

    Unpacked Size

    36.4 kB

    Total Files

    26

    Last publish

    Collaborators

    • okaeri