BurntSushi / nflgame

An API to retrieve and read NFL Game Center JSON data. It can work with real-time data, which can be used for fantasy football.
http://pdoc.burntsushi.net/nflgame
The Unlicense
1.27k stars 413 forks source link

Most accurate way to detect game start? #319

Closed derek-adair closed 7 years ago

derek-adair commented 7 years ago

I am buliding a simple pickem pool with this api. I am locking in users picks for based on nflgame.games() returning games as active up to 15 minutes prior to kickoff. I had planned on using nflgame.live, but celery isn't an option unless I upgrade my hosting plan.

I tried to mimic nflgame.live... but I'm not sure if i did it right. I noticed last night that the chiefs/pats game wasn't included in nflgame.games() until about 5 mins after kickoff.

It's a low traffic app so I am relying on using nflgame.game() every time a user loads a form.

Is there a more accurate way to check what games are active? Do i need to provide started=True?

Cheers, very happy w/ the codebase so far.

derek-adair commented 7 years ago

It was actually an issue w/ my logic. I was reading .is_playing(). Switching my script to just read the presence of the game in nflgame.games() does work as intended.