uberfastman / yfpy

Python API wrapper for the Yahoo Fantasy Sports public API (supports NFL, NHL, MLB, and NBA).
https://pypi.org/project/yfpy/
GNU General Public License v3.0
163 stars 44 forks source link

Player Data #16

Closed cuddebtj closed 2 years ago

cuddebtj commented 2 years ago

Within the query "get_league_players()" only the first 25 players are queried. To correct this problem, and allow to pull the full scope of the players. I added "start" variable within the function changing the query to:

def get_league_players(self, start): return self.query( "https://fantasysports.yahooapis.com/fantasy/v2/league/" + self.get_league_key() + "/players;start=" + str(start), ["league", "players"])

Start should occur in multiples of 25.

uberfastman commented 2 years ago

Thanks for the contribution @cuddebtj, my apologies for the extremely overdue reply. The upcoming update will have this fix in yfpy, and will include a limit parameter allowing you to configure how many players you wish to retrieve.

uberfastman commented 2 years ago

Just published v4.0.0 of YFPY which includes the above fix.