Added ties data to the data returned by the get_standings() method an…#17
Added ties data to the data returned by the get_standings() method an…#17kodarfour wants to merge 2 commits intodtsong:masterfrom
Conversation
…d Updated documentation to reflect such changes (README and CONTRIBUTORS)
|
apologies if this project doesn't want PR asking to merge. new programmer and just wanted to help. |
…umentation to maintain consistency with Sleeper API
|
|
||
| def get_all_players(self): | ||
| return self._call("https://api.sleeper.app/v1/players/nfl") | ||
| def get_all_players(self, sport): |
There was a problem hiding this comment.
I think we should probably have sport="nfl" as the default argument since this would change functionality for people and I assume most users are using the package for NFL data and not NBA or LCS.
There was a problem hiding this comment.
@dtsong meant to tag you here. Any thoughts on adding support for these other sports?
There was a problem hiding this comment.
Given that the Sleeper API has those support, enabling that in the wrapper would be a good idea since the scope of this wrapper is primarily around the Sleeper API itself.
| def get_all_players(self, sport): | ||
| if sport == "nfl": | ||
| return self._call("https://api.sleeper.app/v1/players/nfl") | ||
| if sport == "nba": |
There was a problem hiding this comment.
IMO this should be elif sport == "nba" and then there should be an else statement with some sort of logging to let the user know if they provided a sport argument that is not supported by the API. I did double check and this call does return NBA players. lcs is also supported, so if we're gonna add one, then we should probably add both.
| ### Players.get_all_players(sport) | ||
| Gets all of the players in fantasy football or basketaball (Recommended to use once per day). Data returned looks like: https://docs.sleeper.app/#fetch-all-players | ||
|
|
||
| - sport: (str) The sport to get. Only "nfl" or "nba" right now. |
There was a problem hiding this comment.
Assuming we add it, need lcs here to match line 342
…d Updated documentation to reflect such changes (README and CONTRIBUTORS)