Skip to content

Commit 6b9a476

Browse files
committed
Add function that returns information on every team
Fixes #16
1 parent c73bf79 commit 6b9a476

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mlbgame/__init__.py

+6
Original file line numberDiff line numberDiff line change
@@ -276,3 +276,9 @@ def league():
276276
"""Return Info object that contains league information"""
277277
info = mlbgame.info.league_info()
278278
return mlbgame.info.Info(info)
279+
280+
def teams():
281+
"""Return list of Info objects for each team"""
282+
info = mlbgame.info.team_info()
283+
output = [mlbgame.info.Info(x) for x in info]
284+
return output

0 commit comments

Comments
 (0)