Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

game_id #140

Open
bcurl21 opened this issue Nov 10, 2020 · 3 comments
Open

game_id #140

bcurl21 opened this issue Nov 10, 2020 · 3 comments

Comments

@bcurl21
Copy link

bcurl21 commented Nov 10, 2020

Where would I be able to find the game_id? MLB website?

@mkono87
Copy link

mkono87 commented Feb 14, 2021

Same im a bit confused about this

@David4Danger
Copy link

@bcurl21 @mkono87 you can retrieve game_id from other endpoints available on the API, such as the "day" or "games" resources.

@mastashake08
Copy link

Screen Shot 2021-07-31 at 6 13 46 PM
None of the game ids work

import mlbgame
IN_PROGRESS = 'IN_PROGRESS'


games = mlbgame.day(2021, 7, 31)
for game in games:
    if game.game_status != IN_PROGRESS:
        team_stats = mlbgame.team_stats(game.game_id)
        print(team_stats)
        prediction = {}
        prediction['home_team'] = game.home_team
        prediction['away_team'] = game.away_team
        prediction['game_id'] = game.game_id
        print(prediction)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants