-
Notifications
You must be signed in to change notification settings - Fork 29
Added ties data to the data returned by the get_standings() method an… #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,8 +4,11 @@ class Players(BaseApi): | |
| def __init__(self): | ||
| pass | ||
|
|
||
| def get_all_players(self): | ||
| return self._call("https://api.sleeper.app/v1/players/nfl") | ||
| def get_all_players(self, sport): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should probably have
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dtsong meant to tag you here. Any thoughts on adding support for these other sports?
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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. |
||
| if sport == "nfl": | ||
| return self._call("https://api.sleeper.app/v1/players/nfl") | ||
| if sport == "nba": | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO this should be |
||
| return self._call("https://api.sleeper.app/v1/players/nba") | ||
|
|
||
| def get_trending_players(self,sport, add_drop, hours=24, limit=25 ): | ||
| return self._call("https://api.sleeper.app/v1/players/{}/trending/{}?lookback_hours={}&limit={}".format(sport, add_drop, hours, limit)) | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming we add it, need
lcshere to match line 342