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

spencermountain/wtf-plugin-mlb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published