Skip to content

Commit 36084af

Browse files
committed
update readme and fix copy/paste error
1 parent 0b17b51 commit 36084af

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ If you install manually, be sure to also install requests.
3434

3535
* `statsapi.standings()` - generate a formatted list of standings for a given league/date
3636

37+
* `statsapi.team_leaders()` - generate a list of a team's leaders for a given stat
38+
39+
* `statsapi.league_leaders()` - generate a list of stat leaders for all-time (single season) or a given season
40+
3741
## Example Use
3842

3943
### Print the number of games won by the Oakland Athletics in 2018
@@ -94,3 +98,15 @@ Use `statsapi.standings()` with the `date` parameters
9498
```
9599
print(statsapi.standings(date='07/04/2018'))
96100
```
101+
102+
### Print the top 5 team leaders in walks for the 2008 Phillies
103+
104+
```
105+
print(statsapi.team_leaders(143,'walks',limit=5,season=2008))
106+
```
107+
108+
### Print the top 10 all time single season leaders in doubles
109+
110+
```
111+
print(statsapi.league_leaders('doubles',statGroup='hitting',limit=10))
112+
```

statsapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ def league_leaders(leaderCategories,season=None,limit=10,statGroup=None,leagueId
761761
if playerPool: params.update({'playerPool':playerPool})
762762
params.update({'fields' : 'leagueLeaders,leaders,rank,value,team,name,league,name,person,fullName'})
763763

764-
r = get('league_leaders',params)
764+
r = get('stats_leaders',params)
765765

766766
leaders = ''
767767
lines = []

0 commit comments

Comments
 (0)