Socket
Socket
Sign inDemoInstall

@fasetto/krunker.io

Package Overview
Dependencies
56
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @fasetto/krunker.io

UnOfficial Api for interacting the krunker.io social page


Version published
Weekly downloads
21
increased by2000%
Maintainers
1
Install size
4.10 MB
Created
Weekly downloads
 

Readme

Source


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

Keywords

FAQs

Last updated on 29 Mar 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc