Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
swar committed Apr 21, 2019
2 parents f265b11 + 18b37e6 commit 1f81598
Show file tree
Hide file tree
Showing 6 changed files with 4,434 additions and 4,386 deletions.
5 changes: 3 additions & 2 deletions docs/nba_api/stats/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ lebron_james = {
'id': 2544,
'full_name': 'LeBron James',
'first_name': 'LeBron',
'last_name': 'James'
'last_name': 'James',
'is_active': True
}
```

Expand All @@ -109,7 +110,7 @@ players.find_players_by_last_name('^(james|love)$')
players.get_players()
```

In addition, you can find players by ID by using `find_player_by_id()`.
In addition, you can find players by ID by using `find_player_by_id()`. `get_active_players()` and `get_inactive_players()` will return a list of only active and only inactive players, respectively.


### Teams
Expand Down
2 changes: 2 additions & 0 deletions docs/nba_api/stats/library/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ This is a list of lists of player information.

`player_index_full_name` = `3`

`player_index_is_active` = `4`



### list `teams`
Expand Down
11 changes: 10 additions & 1 deletion docs/nba_api/stats/static/players.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ player = {
'full_name': full_name,
'first_name': first_name,
'last_name': last_name,
'is_active': True or False
}
```
This a protected function that will parse a player list row into a friendly `dictionary`.
Expand All @@ -34,6 +35,14 @@ Returns a list of players where last names match the provided `regex pattern`.

Returns a player that matches the player id provided. Function will fail on any multiple matches. This means our player list has a duplicate or there's an error in the function. No matches will return a `null` value.

## `get_players`(_`regex_pattern`_, _`row_id`_)
## `get_players`()

Returns a list of all players.

## `get_active_players`()

Returns a list of all active players.

## `get_inactive_players`()

Returns a list of all inactive players.
Loading

0 comments on commit 1f81598

Please sign in to comment.