@fasetto/krunker.io
UnOfficial Api for interacting the krunker.io social page
Last updated 2 months ago by fasetto .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @fasetto/krunker.io 
SYNC missed versions from official npm registry.


NPM version NPM downloads Dependencies

npm installnfo

UnOfficial Api for interacting with the Krunker.io Social Page

Setup and Installation

$ npm i @fasetto/krunker.io

Getting Started

Profile Informations

const { Krunker: Api, OrderBy, UserNotFoundError } = require("@fasetto/krunker.io")

const Krunker = new Api();

const PrintUserData = async () =>
{
    try
    {
        const user = await Krunker.GetProfile("fasetto");
        console.log(user);
    }
    catch (e)
    {
        if (e instanceof UserNotFoundError)
            console.log("Sorry ):\nWe couldn't find that user!");
        else
            console.log(e.message);
    }

}

// {
//   name: 'fasetto',
//   id: 124403,
//   score: 846605,
//   level: 27,
//   levelProgress: 60,
//   kills: 7935,
//   deaths: 5774,
//   kdr: '1.37',
//   kpg: '7.94',
//   spk: '106.69',
//   totalGamesPlayed: 1003,
//   wins: 413,
//   loses: 590,
//   wl: '0.41',
//   playTime: '3d 9h 44m',
//   funds: 550,
//   clan: 'PUSU',
//   featured: 'No',
//   hacker: false,
//   following: 1,
//   followers: 0,
//   shots: 1453,
//   hits: 554,
//   nukes: 0,
//   meleeKills: 0,
//   createdDate: '2018-07-09',
//   createdTime: '13:13:25',
//   lastPlayedClass: 'Vince',
//   elo: 0,
//   elo2: 0,
//   elo4: 0
// }

PrintUserData();

Leaderboard Informations

const { Krunker: Api, OrderBy } = require("@fasetto/krunker.io")

const PrintLeaderboard = async () =>
{
    try
    {
        const leaderboard = await Krunker.GetLeaderboard(OrderBy.Funds);
        console.log(leaderboard);

    }
    catch (e)
    {
        console.log(e.message);
    }
}

PrintLeaderboard();

Clan Informations

const { Krunker: Api, OrderBy, ClanNotFoundError } = require("@fasetto/krunker.io")

const PrintClan = async () =>
{
    try
    {
        const clan = await Krunker.GetClan("24/7");
        console.log(clan);
    }
    catch (e)
    {
        if (e instanceof ClanNotFoundError)
            console.log("Sorry ):\nWe couldn't find that clan!");
        else
            console.log(e.message);
    }
}

PrintClan();

Game Informations

const { Krunker: Api, GameNotFoundError } = require("@fasetto/krunker.io")

const PrintGameInfo = async () =>
{
    try
    {
        const gameInfo = await Krunker.GetGameInfo("FRA:piucd");
        console.log(gameInfo);
    }
    catch (e)
    {
        if (e instanceof GameNotFoundError)
            console.log("Game not found!");
        else
            console.log(e.message);
    }
}

// {
//   region: 'Frankfurt',
//   players: '8/8',
//   map: 'ffa_Subzero',
//   custom: false
// }

PrintGameInfo();

Contact

Discord: fasetto#5885

Current Tags

  • 0.4.2                                ...           latest (2 months ago)

19 Versions

  • 0.4.2                                ...           2 months ago
  • 0.4.1                                ...           2 months ago
  • 0.3.1                                ...           7 months ago
  • 0.2.3                                ...           a year ago
  • 0.2.2                                ...           a year ago
  • 0.2.1                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.13                                ...           a year ago
  • 0.1.12                                ...           a year ago
  • 0.1.11                                ...           a year ago
  • 0.1.10                                ...           a year ago
  • 0.1.9                                ...           a year ago
  • 0.1.8                                ...           a year ago
  • 0.1.7                                ...           a year ago
  • 0.1.6                                ...           a year ago
  • 0.1.5                                ...           a year ago
  • 0.1.4                                ...           a year ago
  • 0.1.3                                ...           a year ago
  • 0.1.2                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 19
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |