csgo.js
TypeScript icon, indicating that this package has built-in type declarations

1.5.41 • Public • Published

csgo.js

CodeFactor NPM-Version NPM-Downloads Github Stars Issues

A CSGO/CS2 Stats library that uses the official Steam API.

Dependencies

axios

Instalattion

To install use:

npm i csgo.js

You'll need a Steam API Key, you can get one free here

Available Methods for user

You must call API.fetchUser before using any other method.

Method Description More info
info() User related Info info.md
stats() General Stats stats.md
maps() Map related Stats maps.md
weapons() Weapons Stats weapons.md
lastMatch() lastMatch Stats lastMatch.md
unknown() Unknown Stats unknown.md
raw raw data collected so far raw.md

Example usage

For more example usages go into the docs folder or click the links in the table above

// requires
const { API } = require('csgo.js');
// imports
import { API } from 'csgo.js';

const STEAM_TOKEN = ''; // replace your token

const user = await API.fetchUser('iFraan_', STEAM_TOKEN);
const { kills, deaths, time_played, damage_done } = user.stats();
console.log(kills, deaths, time_played, damage_done);

Disclaimer

This project is fully for educational purposes.

Package Sidebar

Install

npm i csgo.js

Weekly Downloads

2

Version

1.5.41

License

GPL-3.0

Unpacked Size

253 kB

Total Files

9

Last publish

Collaborators

  • ifraan_