ESPN-Fantasy-Football-API icon indicating copy to clipboard operation
ESPN-Fantasy-Football-API copied to clipboard

League Status should be available

Open travisryan opened this issue 6 years ago • 3 comments

I'm going to code something up right now to get league status, but I wanted to put this out here. Every request has a "status" object that provides great detail about the league and the current week, etc. I think that should be available in every request, but should also be it's own request with no scoring period, etc. I'm using it to get the current week status, but there is alot of great info in there that can be passed along easily.

travisryan avatar Aug 30 '19 14:08 travisryan

@travisryan What data do you want to see from there specifically?

mkreiser avatar Oct 12 '19 18:10 mkreiser

I'm just returning the entire status, but as stated above, at the moment, I'm only using it to get the current week status, etc.

getStatus({ seasonId }) {
    const routeBase = `${seasonId}/segments/0/leagues/${this.leagueId}`;
    const routeParams = ``;
    const route = `${routeBase}${routeParams}`;

    return axios.get(route, this._buildAxiosConfig()).then((response) => {
      return _.get(response.data, 'status');
      
    });
  }

travisryan avatar Oct 12 '19 18:10 travisryan

@travisryan What properties specifically? I don't see a whole lot of useful stuff in there for me, so I'm curious as to what you are using from that object.

mkreiser avatar Oct 12 '19 19:10 mkreiser