Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gigobyte authored Aug 29, 2018
1 parent c0ee927 commit 8ecf249
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Table of contents
- [getTeam](#getteam)
- [getTeamStats](#getteamstats)
- [getPlayer](#getplayer)
- [getEvent](#getevent)
- [connectToScorebot](#connecttoscorebot)

## Installation
Expand All @@ -43,7 +44,7 @@ const { HLTV } = require('hltv')
You can create an instance of HLTV with a custom config.

```javascript
const myHLTV = HLTV.createInstance({hltvUrl: 'my-proxy-server'})
const myHLTV = HLTV.createInstance({hltvUrl: 'my-proxy-server', loadPage: /* my custom request library */})
```

**[See config schema](https://github.com/gigobyte/HLTV/blob/master/src/models/HLTVConfig.ts)**
Expand Down Expand Up @@ -252,6 +253,24 @@ HLTV.getPlayer({id: 6137}).then(res => {

***

### getEvent

Parses the info from the `hltv.org/event/` page

Option | Type | Default value | Description |
:---:|:---:|:---:|:---:|
id | int | - | The event id

```javascript
HLTV.getEvent({id: 3389}).then(res => {
...
})
```

**[See schema](https://github.com/gigobyte/HLTV/blob/master/src/models/FullEvent.ts)**

***

#### connectToScorebot

Presents an interface to receive data when the HLTV scorebot updates
Expand Down

0 comments on commit 8ecf249

Please sign in to comment.