Skip to content

Instantly share code, notes, and snippets.

@flesch
Created May 29, 2017 03:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flesch/0aaf8daacc57c7a0fad4245764e68aab to your computer and use it in GitHub Desktop.
Save flesch/0aaf8daacc57c7a0fad4245764e68aab to your computer and use it in GitHub Desktop.
⚾️ MLB Master Scoreboard
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