Skip to content

Conversation

@alperenekin
Copy link

Fixes #64
Might also help for #60

  • Also added "team_stats" to the same method to return stats for H2H leagues.
  • Refactored query method to handle response creation dynamically so it shouldn't fail in case any of the keys in data_key_list is missing in the response.

So the response in my case looks like:
image

Tests seem to work fine afterwards:
image

Edit:

I also added a new feature to get stats from multiple team in one request for given week:
def get_teams_stats_by_week(self, team_ids: List[Union[str, int]], chosen_week: Union[int, str] = "current") -> List[Team]:

Which also returns TeamRemainingGames as part of the request. I added relevant model class to parse the response.

Edit2:
Also added get_team_matchup_by_week method to get a specific matchup for the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_team_stats_by_week returning error

1 participant