csgo-api

1.3.2 • Public • Published

CSGO API

API for getting data from CSGO servers. Playcount, Maps, Player info, etc.

Installation

Install Package: npm i csgo-api

Usage

Examples

Get All Server Stats (object)

const CSGO = require("csgo-api") // Import the npm package.
const srv = new CSGO.Server('IP', 'PORT') // Set the IP with port.
 
srv.getServer().then(data => console.log(data)) // Get & log the data!

Get Player Count (in number)

const CSGO = require("csgo-api") // Import the npm package.
const srv = new CSGO.Server('IP', 'PORT') // Set the IP with port.
 
srv.getPlayerCount().then(data => console.log(data)) // Get & log the data!

See if the server is password protected

const CSGO = require("csgo-api") // Import the npm package.
const srv = new CSGO.Server('IP', 'PORT') // Set the IP with port.
 
srv.getPasswordProtected().then(data => console.log(data)) // Get & log the data!

To use any of the things below, just do the same as the example above.

ALL FUNCTION REQUESTS

  • getServer - (object)
  • getServerName - (string)
  • getMaxPlayers - (number)
  • getPlayerCount - (number)
  • getFolder - (string)
  • getAppID - (number)
  • getMap - (string)
  • getServer - (string)
  • getGame - (string)
  • getVersion - (number)
  • getResponseType - (number)
  • getProtocol - (number)
  • getBotCount - (number)
  • getServerType - (string)
  • getPlatform - (string)
  • getPasswordProtected - (number) 1/0
  • getVacEnabled - (number) 1/0

Package Sidebar

Install

npm i csgo-api

Homepage

crisp.codes

Weekly Downloads

2

Version

1.3.2

License

ISC

Unpacked Size

8.47 kB

Total Files

3

Last publish

Collaborators

  • jackcrispy