Skip to content

A JavaScript API for getting data from Official CSGO servers & custom ones.

Notifications You must be signed in to change notification settings

JackCrispy/csgo-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A JavaScript API for getting data from Official CSGO servers & custom ones.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published