1.0.0 • Published 3 years ago

@mattplays/csgo-api v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

CSGOAPI

This package is a wrapper for the unofficial CSGOAPI 1. Counter Strike Global Offensive 1. Usage 2. Functions 1. GetPlayerStats 1. Input 2. Output 3. Usage 2. GetStatSegment 1. Inputs 2. Output 3. Usage 3. SearchForPlayer 1. Input 2. Output 3. Usage

Counter Strike Global Offensive

This is an Unoffical API [Unoffical Docs](https://tracker.gg/developers/docs/titles/csgo)

Usage

const {CSGOAPI} = require("@mattplays/csgo-api");
const API = new CSGOAPI("DUMYMAPIKEY");

Functions

GetPlayerStats

Retrieve career stats for an CSGO player.

Input
ParameterTypeRequiredDescription
playerIdentifierstringYesThe user's handle on Steam, ie. a Steam ID, Steam Community URL, Steam Vanity Username, etc.
Output

The GetPlayerStats function returns a Promise<Profile> type

Usage
const API = new CSGOAPI("DUMYMAPIKEY");
API.GetPlayerStats("DUMMY-PLAYER-IDENTIFIER").then((data) => {
// Your Code Here :D
});

GetStatSegment

Retrieve a portion of the stats for a CSGO player. We divide stats into logical segments, such as playlists, seasons, heroes, etc. (whatever happens to be useful for a specific game.)

Inputs
InputTypeRequiredDescription
playerIdentifierstringYesThe user's handle on Steam, ie. a Steam ID, Steam Community URL, Steam Vanity Username, etc.
segmentTypestringYesThe type of segment you want to return, ie. 'map', or 'weapon'.
Output

The GetStatSegment function returns a Promise<SegmentResponse> type

Usage
const API = new CSGOAPI("DUMYMAPIKEY");
API.GetStatSegment("DUMMY-PLAYER-IDENTIFIER", "map").then((data) => {
// Your Code Here :D
});

SearchForPlayer

Allows you to perform a search for a CSGO player using a unique identifier (a Steam ID, Steam Community URL, Steam Vanity Username, etc.) The result set is not guaranteed to be an exhaustive list of players that match the search.

Input
InputTypeRequiredDescription
querystringYesThe user's handle on Steam, ie. a Steam ID, Steam Community URL, Steam Vanity Username, etc.
Output

The SearchForPlayer function returns a Promise<SearchResult[]> type

Usage
const API = new CSGOAPI("DUMYMAPIKEY");
API.SearchForPlayer("DUMMY-STEAM-ID").then((data) => {
// Your Code Here :D
});
1.0.0

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago