Skip to content

Commit

Permalink
Update Get Player API Call
Browse files Browse the repository at this point in the history
  • Loading branch information
cwendt94 committed Sep 2, 2020
1 parent 0d606de commit 31644b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion espn_api/requests/espn_requests.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import requests
import json
from .constant import FANTASY_BASE_ENDPOINT, FANTASY_SPORTS
from ..utils.logger import Logger

Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 31644b5

Please sign in to comment.