espn-fantasy-baseball
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

espn-fantasy-baseball

ESPN Fantasy Baseball Actions
A node wrapper that encompasses the ESPN Fantasy Baseball API. This is an ongoing project and documentation is subject to change rapidly.

Current Discovered Endpoints:

{
    "executionType": "EXECUTE",
    "isLeagueManager": false,
    "items": [
        {
            "playerId": 32758,
            "type": "ADD",
            "toTeamId": 15
        }
    ],
    "scoringPeriodId": 16,
    "teamId": 15,
    "type": "FREEAGENT"
}  
{
    "watchList": [31094, 30862, 39807, 32758]
}

Example Param and Header Options:

view (Type: QueryParam):

mTeam
mBoxscore
mRoster
mSettings
kona_player_info
player_wl
mSchedule
mMatchup
mScoreboard
scoreboard

x-fantasy-filter (Type: Header):

{
  "players": {
    "filterStatus": { "value": ["FREEAGENT", "WAIVERS"] },
    "filterSlotIds": { "value": [2] },
    "filterRanksForScoringPeriodIds": { "value": [19] },
    "limit": 2000,
    "offset": 0,
    "sortPercOwned": { "sortAsc": false, "sortPriority": 1 },
    "sortDraftRanks": {
      "sortPriority": 100,
      "sortAsc": true,
      "value": "STANDARD"
    },
    "filterRanksForRankTypes": { "value": ["STANDARD"] },
    "filterStatsForTopScoringPeriodIds": {
      "value": 5,
      "additionalValue": [
        "002022",
        "102022",
        "002021",
        "012022",
        "022022",
        "032022",
        "042022",
        "062022",
        "010002022"
      ]
    }
  }
}

Resources:

Authenticating for private leagues:
https://github.com/cwendt94/espn-api/discussions/150
Inspired by:
https://github.com/cwendt94/espn-api

Package Sidebar

Install

npm i espn-fantasy-baseball

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

65.9 kB

Total Files

53

Last publish

Collaborators

  • jabronious