Giter Site home page Giter Site logo

izexi / krunker.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xazz/krunker.js

0.0 0.0 0.0 44 KB

A simple, easy to use module for interacting with the Krunker.io Social Page

Home Page: https://krunker.io

License: Apache License 2.0

JavaScript 100.00%

krunker.js's Introduction

A simple, easy to use module for interacting with the Krunker.io Social Page

Setup and Installation

$ npm i krunker.js

Promise-based Example Usage

// Require the NPM Module
const KrunkerJS = require('krunker.js');
// Create a new instance
const Krunker = new KrunkerJS();

// Get the stats of the user
Krunker.getUser('Helinho').then(data => {
	// Console log the user stats as an object
	console.log(data);
	// [V1.2^ Feature] Gets all stats ready as an object
	console.log(data.simplified);

	// Convert Player Score to Level
	Krunker.getLevel(data);
	// Convert Time Played
	Krunker.getPlayTime(data);
	// Get user KDR
	Krunker.getKDR(data);
	// Get W/L
	Krunker.getWL(data);
	// Get SPK
	Krunker.getSPK(data);
}).catch(console.error);

async/await-Based Example

// Require the NPM Module
const KrunkerJS = require('krunker.js');
// Create a new instance
const Krunker = new KrunkerJS();

(async () => {
	try {
		// Get the stats of the user
		const user = await Krunker.getUser('Helinho');
		// Console log the user stats as an object
		console.log(user);
		// [V1.2^ Feature] Gets all stats ready as an object
		console.log(user.simplified);
	} catch (e) {
		console.error(e);
	}
})();

Help

If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join my Development Server.

krunker.js's People

Contributors

xazz avatar izexi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.