Skip to content

Commit

Permalink
Add function that returns information on every team
Browse files Browse the repository at this point in the history
Fixes #16
  • Loading branch information
panzarino committed Nov 9, 2016
1 parent c73bf79 commit 6b9a476
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mlbgame/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,9 @@ def league():
"""Return Info object that contains league information"""
info = mlbgame.info.league_info()
return mlbgame.info.Info(info)

def teams():
"""Return list of Info objects for each team"""
info = mlbgame.info.team_info()
output = [mlbgame.info.Info(x) for x in info]
return output

0 comments on commit 6b9a476

Please sign in to comment.