Created
May 29, 2017 03:12
-
-
Save flesch/0aaf8daacc57c7a0fad4245764e68aab to your computer and use it in GitHub Desktop.
⚾️ MLB Master Scoreboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require('node-fetch'); | |
const format = require('date-fns/format'); | |
const [ year, month, day ] = format(new Date(), 'YYYY-MM-DD').split('-'); | |
const scoreboard = `http://mlb.mlb.com/gdcross/components/game/mlb/year_${year}/month_${month}/day_${day}/master_scoreboard.json`; | |
fetch(scoreboard).then(res => res.json()).then(json => { | |
console.log(json); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment