@mattplays/csgo-api

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

Usage no npm install needed!

<script type="module">
  import mattplaysCsgoApi from 'https://cdn.skypack.dev/@mattplays/csgo-api';
</script>

README

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

Usage

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

Functions

GetPlayerStats

Retrieve career stats for an CSGO player.

Input
Parameter Type Required Description
playerIdentifier string Yes The 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
```javascript
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
Input Type Required Description
------------- ------------- ------------- -------------
playerIdentifier string Yes The user's handle on Steam, ie. a Steam ID, Steam Community URL, Steam Vanity Username, etc.
segmentType string Yes The type of segment you want to return, ie. 'map', or 'weapon'.
##### Output
The GetStatSegment function returns a Promise<SegmentResponse> type
##### Usage
```javascript
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
Input Type Required Description
------------- ------------- ------------- -------------
query string Yes The 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
```javascript
const API = new CSGOAPI("DUMYMAPIKEY");
API.SearchForPlayer("DUMMY-STEAM-ID").then((data) => {
// Your Code Here :D
});
```