-
Notifications
You must be signed in to change notification settings - Fork 224
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
Added League Function to get All Players #283
base: master
Are you sure you want to change the base?
Conversation
@troylee24 thanks for the PR, I like the idea! I plan on doing a large refactor in the next couple months which is going to be part of this package going to |
Is this still planned for integration prior to the 2022 football season start? I think this is a really nice change to allow fetching all players. Perhaps a set of wrapper helper functions could be created to grab subsets of the player types and maintain the existing function name (free_agents wraps the player function with the type specified)? |
Thanks @pete7863 for bringing this to my attention. I will relook at this in the next couple days! The player_info functionality recently got updated to take a list of playerIds which then can allow you to get as any players information needed in one call. |
I'm trying to get player data for all players. I'm using the playerId's from player_map. However, it fails with "header too long". Can you get player data for all players in one call? If so, can you share how you do it. Second, did you also add |
@Kjeldgaard For right now to get around that you can make a couple calls with the player_info and see if you can do half the players in the player_map. |
I did as follows to get all playerIds:
Thanks for making this possible, it has taken my NFL fantasy game to a new level! |
Thats great! I have been wanting to document the EspnFantasyRequests module for people that would like to get the raw data or just try out different ESPN calls. Just a FYI, you can also access the ESPN request in your league like this |
free_agents()
function to a more generalplayer()
option that accepts a new parametertype
to define what kind of players a user wants to fetch (i.e. "FREEAGENT", "WAIVERS", "ONTEAM")player()
functionNote: I noticed that when creating the
Player()
object, it omits theonTeamId
. It may be useful to retain that information so that one could go fromPlayer
toTeam
.