Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,55 @@ There are a few useful read-only properties available to you.
### accountData

A big object containing account data and some statistics including players in-game. Undefined until `accountData` is emitted.
You can request this info to be populated by calling [requestMatchmakingStats()](#requestmatchmakingstats)

- `my_current_event_teams` - Always an empty array?
- `my_current_event_stages` - Always an empty array?
- `rankings` - Always an empty array?
- `account_id`
- `ongoingmatch`
- `global_stats`
- `search_statistics` - Array of MM queues with info
- `game_type`
- `search_time_avg` - Always `null`?
- `players_searching`
- `players_online`
- `servers_online`
- `players_searching`
- `servers_available`
- `ongoing_matches`
- `search_time_avg`
- `main_post_url`
- `required_appid_version`
- `pricesheet_version`
- `twitch_streams_version`
- `active_tournament_eventid`
- `active_survey_id`
- `rtime32_cur`
- `rtime32_event_start`
- `penalty_seconds`
- `penalty_reason`
- `vac_banned`
- `ranking`
- `account_id`
- `rank_id`
- `wins`
- `rank_change`
- `rank_type_id`
- `tv_control`
- `commendation`
- `cmd_friendly`
- `cmd_teaching`
- `cmd_leader`
- `medals`
- `my_current_event`
- `my_current_team`
- `survey_vote`
- `activity`
- `player_level`
- `player_cur_xp`
- `player_xp_bonus_flags`


### inventory

Expand Down Expand Up @@ -93,6 +142,11 @@ When instantiating your node-globaloffensive instance, you need to pass your act
var csgo = new GlobalOffensive(steamClient);
```

### requestMatchmakingStats()

Requests the GC for matchmaking data.
Listen for the `accountData` event to get your response or access the [accountData](#accountdata) propery after `accountData` was emitted

### requestGame(shareCodeOrDetails)
- `shareCodeOrDetails` - Either a share code as a string, or an object containing properties `matchId`, `outcomeId`, `token`

Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ GlobalOffensive.prototype.requestGame = function(shareCodeOrDetails) {
});
};

GlobalOffensive.prototype.requestMatchmakingStats = function() {
this._send(Language.MatchmakingClient2GCHello, Protos.CMsgGCCStrike15_v2_MatchmakingClient2GCHello , {});
};

GlobalOffensive.prototype.requestLiveGames = function() {
this._send(Language.MatchListRequestCurrentLiveGames, Protos.CMsgGCCStrike15_v2_MatchListRequestCurrentLiveGames, {});
};
Expand Down