Skip to content
This repository has been archived by the owner on Jun 12, 2021. It is now read-only.

Commit

Permalink
Add nba.stats example
Browse files Browse the repository at this point in the history
TODO - add more examples
  • Loading branch information
kashav committed Oct 15, 2016
1 parent d7587bc commit ab382f2
Showing 1 changed file with 40 additions and 27 deletions.
67 changes: 40 additions & 27 deletions docs/EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,47 @@

- Get a list of all players:

```js
nba.stats.allPlayers((err, res) => {
if (err) {
console.error(err);
return;
}

console.log(res);
});
```

```js
nba.stats.allPlayers({ IsOnlyCurrentSeason: 0 })
.then(res => console.log(res))
.catch(err => console.error(err));
```

```js
nba.stats.allPlayers({ Season: '2014-2015' }, (err, res) => {
if (err) {
console.error(err);
return;
}

console.log(res);
});
```
```js
nba.stats.allPlayers((err, res) => {
if (err) {
console.error(err);
return;
}

console.log(res);
});
```

```js
nba.stats.allPlayers({ IsOnlyCurrentSeason: 0 })
.then(res => console.log(res))
.catch(err => console.error(err));
```

```js
nba.stats.allPlayers({ Season: '2014-2015' }, (err, res) => {
if (err) {
console.error(err);
return;
}

console.log(res);
});
```

### <a name='data'>Data, `nba.data`</a>

- [List of methods](api/DATA.md#method-reference).

- Get a list of standings:

```js
nba.data.standings((err, res) => {
if (err) {
console.error(err);
return;
}

console.log(res);
})
```

0 comments on commit ab382f2

Please sign in to comment.