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.28k stars 413 forks source link

Amazing Package! 3 Questions #292

Open shazbak opened 7 years ago

shazbak commented 7 years ago

Hi, Just started learning the package and how to use it, 3 things i'm trying to understand, probably missing something:

  1. All the historical JSONs - contains each play data in a structure model (all the numeric fields which described exactly what happened in each play). I'm trying to understand whether (a) this is how it gets the feed or (b) the data was extracted from the textual play. If the answer is (b) - then I can't find the code which is doing that.
  2. In the same context - what really interests me is how would i get this structured data for new\live games (games which are not in the historical data).
  3. Do i need to register to get the live feed?

Thanks!

BurntSushi commented 7 years ago
  1. Data is not extracted from textual feed.
  2. Use nflgame.live or even better, nfldb.
  3. No. The "feed" is provided by NFL.com. Except it's not a "feed." It's an undocumented internal API that I reverse engineered.
shazbak commented 7 years ago

Thanks for the quick resonpse! So,

  1. The undocumented internal API returning the data in the exact strtucture of the historical data, so you just saved it as is to the files. Is that correct?
  2. When i use the live module, i'll get it in the same structure?
  3. Do you think they might block it, or maybe change it?

Thanks again...

BurntSushi commented 7 years ago
  1. Yes.
  2. Yes. Note that nflgame doesn't expose the JSON directly. It works hard to put it in a more reasonable structure.
  3. I don't know. I assume they will eventually.
shazbak commented 7 years ago

1+3. Got it.

  1. But i still have access to all the structured data of each play, right? Also when the game is still live or only after? And when does it store new games to the file system?
BurntSushi commented 7 years ago

When the game is live, yes. Please see the wiki for docs. The wiki for nfldb is extensive.