Replies: 1 comment
-
Are you trying to directly call the API itself to get player stats? These are the headers the package uses to get them additional_value = ["00{}".format(self.year), "10{}".format(self.year)]
{'players':{'filterIds':{'value': playerIds}, 'filterStatsForTopScoringPeriodIds':{'value': max_scoring_period, 'additionalValue': additional_value}}} This also can be added to hockey league class to get all of a players stats. It would follow footballs |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi I've got access to the API but I'm trying to find how to get player stats and use the API, because right now all i'm getting is the first and last name and ownership information. I'm looking for stats like goals, assists, hits, etc.
Any direction would be helpful.
ESPN API Request: url: https://lm-api-reads.fantasy.espn.com/apis/v3/games/fhl/seasons/2025/segments/0/leagues/640637199 params: {'view': ['mTeam', 'mRoster', 'mMatchup', 'mSettings', 'mStandings']} headers: None
https://lm-api-reads.fantasy.espn.com/apis/v3/games/fhl/seasons/2025/players params: {'view': 'players_wl'} headers: {'x-fantasy-filter': '{"filterActive": {"value": true}}'}
ESPN API Response: [{"defaultPositionId": 2, "droppable": true, "eligibleSlots": [3, 1, 6, 7, 8], "firstName": "Calle", "fullName": "Calle Jarnkrok", "id": 2555316, "lastName": "Jarnkrok", "ownership": {"percentOwned": 0.10742913808776135}, "proTeamId": 21, "universeId": 1}, {"defaultPositionId": 1, "droppable": true, "eligibleSlots": [3, 0, 6, 7, 8], "firstName": "Charlie", "fullName": "Charlie Coyle", "id": 2555315, "lastName": "Coyle", "ownership": {"percentOwned": 61.67093628625734}, "proTeamId": 1, "universeId": 1}, {"defaultPositionId": 5, "droppable": true, "eligibleSlots": [5, 7, 8], "firstName": "Georgi", "fullName": "Georgi Romanov", "id": 5144058, "lastName": "Romanov", "ownership": {"percentOwned": 0.07120148364021724}, "proTeamId": 18, "universeId": 2}, {"defaultPositionId": 5, "droppable": true, "eligibleSlots": [5, 7, 8], "firstName": "Charlie", "fullName": "Charlie Lindgren", "id": 3095975, "lastName": "Lindgren", "ownership": {"percentOwned": 63.23972580057622}, "proTeamId": 23, "universeId": 1},
Beta Was this translation helpful? Give feedback.
All reactions