npm version Downloads GitHub issues

CSGO NodeJS wrapper

A nodeJS lib to provide CSGO Player stats.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Installing

Run the following command in npm

npm install --save csgostatsnode

Example/Deployment

Require in the module as follows

const csgoStats = require('csgoStatsNode');
const cStats = new csgoStats({"apikey":"<Put your Steam API key here >"});

Here is an example of getting a players K/D

csStats.whatIsMyKD('76561198138999275', function(data){
  console.log("Your K/D is: " + data);
})

Here is another example of getting a players Steam ID from their vanity URL

csStats.getMySteamID('xserv', function(data){
  console.log("Your Steam ID is: " + data);
});

Options

when creating a new instance of the class eg:

const cStat = new csgoStats();

You must pass through your Steam API key

You can obtain one at https://steamcommunity.com/dev

you can pass through options such as:

to set the options all you have to do is put a JSON object when creating the class instance

const cStat = new csgoStats({"quiet":"1", "vanity":"true", "apikey":"<Put your Steam API key here >"});

Available Commands

All of these functions take the Steam ID or Vanity URL if the option is set with the exception of getMySteamID which only takes a Vanity URL

Built With

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details