Skip to content

Commit

Permalink
Merge pull request #103 from cwendt94/UpdateGetPlayerApiCall_#102
Browse files Browse the repository at this point in the history
Update get player api call #102
  • Loading branch information
cwendt94 authored Sep 2, 2020
2 parents 0d606de + 8dafd62 commit 85a755e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down

0 comments on commit 85a755e

Please sign in to comment.