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 412 forks source link

NFLGame from a Nodejs Express App #249

Open keithfabean opened 7 years ago

keithfabean commented 7 years ago

Is there a way to use nflgame from a nodejs express app? I'm not a Python dev and I'm new to Nodejs so I'm not sure how to cross languages like this. I use to be a dev about 12 years ago and am really rusty. I'm trying my hand at something new. I've looked at nfldb and I know the data I want is there but the volume of data is just way too much for the level of Heroku/Postgres that I have set up, and I'm not at a state that warrants the cost to upgrade. That and I am having problems getting the data load portion of the nfldb scripts to work. I'm also having problems getting the Python app set up locally to keep the data synced.

Any insight or help would be appreciated.

BurntSushi commented 7 years ago

No, sorry, I don't know if a way. You're best bet is to use nfldb and hit the database with node.

On Oct 17, 2016 7:11 PM, "keithfabean" notifications@github.com wrote:

Is there a way to use nflgame from a nodejs express app? I'm not a Python dev and I'm new to Nodejs so I'm not sure how to cross languages like this. I use to be a dev about 12 years ago and am really rusty. I'm trying my hand at something new. I've looked at nfldb and I know the data I want is there but the volume of data is just way too much for the level of Heroku/Postgres that I have set up, and I'm not at a state that warrants the cost to upgrade. That and I am having problems getting the data load portion of the nfldb scripts to work. I'm also having problems getting the Python app set up locally to keep the data synced.

Any insight or help would be appreciated.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/BurntSushi/nflgame/issues/249, or mute the thread https://github.com/notifications/unsubscribe-auth/AAb34rCHbfNJ_gYTef3KvQCEGD7EZYYkks5q1ACqgaJpZM4KZNXy .

kingram6865 commented 7 years ago

You could use Node.js to read the json data being delivered by the api. Or as suggested use nfldb with node.

BurntSushi commented 7 years ago

Reading the JSON isn't straightforward unfortunately.

On Oct 24, 2016 18:19, "kingram6865" notifications@github.com wrote:

You could use Node.js to read the json data being delivered by the api. Or as suggested use nfldb with node.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/BurntSushi/nflgame/issues/249#issuecomment-255882789, or mute the thread https://github.com/notifications/unsubscribe-auth/AAb34ngvetezx5Yq443SsAj_iOSLPqabks5q3S8HgaJpZM4KZNXy .

kingram6865 commented 7 years ago

Ah. I see....

keithfabean commented 7 years ago

Yeah. I’ve seen the JSON. Not very friendly.

I have the DB loaded locally. Next up I’ll work on getting the Python module installed and working. My other issue is about volume of data. I have a Heroku/Postgres instance that I want to use for a small private app I’m creating for a group of guys I have a fantasy football league with. My Heroku/Postgres instance won’t allow me that volume of data. Is there a way to limit the data to just a year or 2? If I clear the DB of all the data prior to 2015 will the ‘update’ script just reload it when that runs?

On Oct 25, 2016, at 11:15 AM, Andrew Gallant notifications@github.com wrote:

Reading the JSON isn't straightforward unfortunately.

On Oct 24, 2016 18:19, "kingram6865" notifications@github.com wrote:

You could use Node.js to read the json data being delivered by the api. Or as suggested use nfldb with node.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/BurntSushi/nflgame/issues/249#issuecomment-255882789, or mute the thread https://github.com/notifications/unsubscribe-auth/AAb34ngvetezx5Yq443SsAj_iOSLPqabks5q3S8HgaJpZM4KZNXy .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BurntSushi/nflgame/issues/249#issuecomment-256117801, or mute the thread https://github.com/notifications/unsubscribe-auth/ASezvIxTeqeTNLCl9UfL3oAPeRltEeHAks5q3kc7gaJpZM4KZNXy.

shoesCodeFor commented 7 years ago

It is possible. Google 'Node and Django' integration. It will not be easy but it is possible. If I were you I would close this issue, as it is not really an issue per se. Just my two cents.