From 31644b548815794efe04f364dad5d0510620f167 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 1 Sep 2020 18:17:18 -0700 Subject: [PATCH 1/2] Update Get Player API Call --- espn_api/requests/espn_requests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/espn_api/requests/espn_requests.py b/espn_api/requests/espn_requests.py index 97bf011d..5247826d 100644 --- a/espn_api/requests/espn_requests.py +++ b/espn_api/requests/espn_requests.py @@ -1,4 +1,5 @@ import requests +import json from .constant import FANTASY_BASE_ENDPOINT, FANTASY_SPORTS from ..utils.logger import Logger @@ -71,7 +72,9 @@ def get_pro_players(self): params = { 'view': 'players_wl' } - data = self.get(extend='/players', params=params) + filters = {"filterActive":{"value":True}} + headers = {'x-fantasy-filter': json.dumps(filters)} + data = self.get(extend='/players', params=params, headers=headers) return data def get_league_draft(self): From 8dafd62484e7963c66640c59efbf90f3932bcba6 Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 1 Sep 2020 18:17:51 -0700 Subject: [PATCH 2/2] bump version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b103ba79..4cd172d4 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='espn_api', packages=find_packages(), - version='0.4.0', + version='0.4.1', author='Christian Wendt', description='ESPN API', install_requires=['requests>=2.0.0,<3.0.0'],