Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.

Latest commit

 

History

History
58 lines (48 loc) · 1.65 KB

README.md

File metadata and controls

58 lines (48 loc) · 1.65 KB

Heads-up

This plugin has moved to → wtf_wikipedia/plugins/sports

this repo is now deprecated.

a plugin for wtf_wikipedia

npm install wtf-plugin-mlb

wtf-mlb gets structured data for mlb baseball teams, supports a bunch of different variants of mlb game log variations, and tries to cleanup some complicated parts of wikipedia sometimes in the wild.

const plugin = require('wtf-plugin-mlb')
wtf.extend(plugin)
wtf.getSeason('Toronto Blue Jays', 2018).then((data) => {
  console.log(data)
  /*{
  games: [{
      date: 'April 1',
      team: 'Reds',
      home: false,
      result: { us: 6, them: 5, win: true },
      record: { wins: 3, losses: 0, games: 3
    },
    ...
  ],
  postseason: [...],
  roster: [],
  draftPicks: [],
  playerStats: [] 
}*/
})

MIT