diff --git a/README.md b/README.md index 48ac27f..8c55998 100644 --- a/README.md +++ b/README.md @@ -150,4 +150,4 @@ print( statsapi.game_scoring_plays(567074) ) ## Copyright Notice -This API wrapper interfaces with MLB's Stats API. Use of MLB data is subject to the notice posted at http://gdx.mlb.com/components/copyright.txt. +This package and its author are not affiliated with MLB or any MLB team. This API wrapper interfaces with MLB's Stats API. Use of MLB data is subject to the notice posted at http://gdx.mlb.com/components/copyright.txt. diff --git a/docs/endpoints.m.html b/docs/endpoints.m.html index 8189054..a3e80c2 100644 --- a/docs/endpoints.m.html +++ b/docs/endpoints.m.html @@ -2029,8 +2029,9 @@

statsapi.endpoints module

'required': True } }, - 'query_params': ['season','sportIds','statGroup','gameType','stats','order','sortStat','fields'], - 'required_params': [['season','statGroup']] + 'query_params': ['season','sportIds','group','gameType','stats','order','sortStat','fields'], + 'required_params': [['season','group','stats']], + 'note': 'Use meta(\'statGroups\') to look up valid values for group, and meta(\'statTypes\') for valid values for stats.' }, 'teams_affiliates': { 'url': BASE_URL + '{ver}/teams/affiliates', diff --git a/docs/index.html b/docs/index.html index 1c811a2..cebe447 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1252,12 +1252,12 @@

MLB-StatsAPI

'game_num': game['gameNumber'], 'home_probable_pitcher': game['teams']['home'].get('probablePitcher',{}).get('fullName',''), 'away_probable_pitcher': game['teams']['away'].get('probablePitcher',{}).get('fullName',''), - 'home_pitcher_note': game['teams']['home'].get('probablePitcher').get('note',''), - 'away_pitcher_note': game['teams']['away'].get('probablePitcher').get('note',''), + 'home_pitcher_note': game['teams']['home'].get('probablePitcher',{}).get('note',''), + 'away_pitcher_note': game['teams']['away'].get('probablePitcher',{}).get('note',''), 'away_score': game['teams']['away'].get('score','0'), 'home_score': game['teams']['home'].get('score','0'), - 'current_inning': game['linescore'].get('currentInning',''), - 'inning_state': game['linescore'].get('inningState','') + 'current_inning': game.get('linescore',{}).get('currentInning',''), + 'inning_state': game.get('linescore',{}).get('inningState','') } if game_info['status'] in ['Final','Game Over']: if game.get('isTie'): @@ -4496,12 +4496,12 @@

56 P Zach Eflin

'game_num': game['gameNumber'], 'home_probable_pitcher': game['teams']['home'].get('probablePitcher',{}).get('fullName',''), 'away_probable_pitcher': game['teams']['away'].get('probablePitcher',{}).get('fullName',''), - 'home_pitcher_note': game['teams']['home'].get('probablePitcher').get('note',''), - 'away_pitcher_note': game['teams']['away'].get('probablePitcher').get('note',''), + 'home_pitcher_note': game['teams']['home'].get('probablePitcher',{}).get('note',''), + 'away_pitcher_note': game['teams']['away'].get('probablePitcher',{}).get('note',''), 'away_score': game['teams']['away'].get('score','0'), 'home_score': game['teams']['home'].get('score','0'), - 'current_inning': game['linescore'].get('currentInning',''), - 'inning_state': game['linescore'].get('inningState','') + 'current_inning': game.get('linescore',{}).get('currentInning',''), + 'inning_state': game.get('linescore',{}).get('inningState','') } if game_info['status'] in ['Final','Game Over']: if game.get('isTie'): diff --git a/docs/version.m.html b/docs/version.m.html index 90f9da3..aded8e9 100644 --- a/docs/version.m.html +++ b/docs/version.m.html @@ -1068,7 +1068,7 @@

statsapi.version module

#!/usr/bin/env python
 
-VERSION = '0.0.7'
+VERSION = '0.0.8'
 
diff --git a/statsapi/__init__.py b/statsapi/__init__.py index 7278833..a7c3914 100644 --- a/statsapi/__init__.py +++ b/statsapi/__init__.py @@ -141,12 +141,12 @@ def schedule(date=None, start_date=None, end_date=None, team='', opponent='', sp 'game_num': game['gameNumber'], 'home_probable_pitcher': game['teams']['home'].get('probablePitcher',{}).get('fullName',''), 'away_probable_pitcher': game['teams']['away'].get('probablePitcher',{}).get('fullName',''), - 'home_pitcher_note': game['teams']['home'].get('probablePitcher').get('note',''), - 'away_pitcher_note': game['teams']['away'].get('probablePitcher').get('note',''), + 'home_pitcher_note': game['teams']['home'].get('probablePitcher',{}).get('note',''), + 'away_pitcher_note': game['teams']['away'].get('probablePitcher',{}).get('note',''), 'away_score': game['teams']['away'].get('score','0'), 'home_score': game['teams']['home'].get('score','0'), - 'current_inning': game['linescore'].get('currentInning',''), - 'inning_state': game['linescore'].get('inningState','') + 'current_inning': game.get('linescore',{}).get('currentInning',''), + 'inning_state': game.get('linescore',{}).get('inningState','') } if game_info['status'] in ['Final','Game Over']: if game.get('isTie'): diff --git a/statsapi/endpoints.py b/statsapi/endpoints.py index 373b082..f8cc5cc 100644 --- a/statsapi/endpoints.py +++ b/statsapi/endpoints.py @@ -960,8 +960,9 @@ 'required': True } }, - 'query_params': ['season','sportIds','statGroup','gameType','stats','order','sortStat','fields'], - 'required_params': [['season','statGroup']] + 'query_params': ['season','sportIds','group','gameType','stats','order','sortStat','fields'], + 'required_params': [['season','group','stats']], + 'note': 'Use meta(\'statGroups\') to look up valid values for group, and meta(\'statTypes\') for valid values for stats.' }, 'teams_affiliates': { 'url': BASE_URL + '{ver}/teams/affiliates', diff --git a/statsapi/version.py b/statsapi/version.py index 4c99ccc..de3c8e2 100644 --- a/statsapi/version.py +++ b/statsapi/version.py @@ -1,3 +1,3 @@ #!/usr/bin/env python -VERSION = '0.0.7' +VERSION = '0.0.8'