Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
oczkers committed Oct 3, 2016
2 parents c290d32 + 14796b7 commit 284a471
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 25 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ Changelog
---------


0.2.0 (2016-09-?)
0.2.1 (2016-10-03)
++++++++++++++++++
* fix tradepile/watchlist when consumable in pile (#194)
* fix card info url & bump default year in leagues/teams
* fix credits resetting to 0 on search (thanks to hunterjm #198)

0.2.0 (2016-09-26)
++++++++++++++++++
* fifa 17 & dump versions (thanks to rafaelget #192)

Expand Down
2 changes: 1 addition & 1 deletion fut/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"""

__title__ = 'fut'
__version__ = '0.2.0'
__version__ = '0.2.1'
__author__ = 'Piotr Staroszczyk'
__author_email__ = 'piotr.staroszczyk@get24.org'
__license__ = 'GNU GPL v3'
Expand Down
42 changes: 21 additions & 21 deletions fut/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,27 +80,27 @@ def itemParse(item_data, full=True):
}
if full:
return_data.update({
'timestamp': item_data['itemData']['timestamp'], # auction start
'rating': item_data['itemData']['rating'],
'assetId': item_data['itemData']['assetId'],
'resourceId': item_data['itemData']['resourceId'],
'itemState': item_data['itemData']['itemState'],
'rareflag': item_data['itemData']['rareflag'],
'formation': item_data['itemData']['formation'],
'timestamp': item_data['itemData'].get('timestamp'), # auction start
'rating': item_data['itemData'].get('rating'),
'assetId': item_data['itemData'].get('assetId'),
'resourceId': item_data['itemData'].get('resourceId'),
'itemState': item_data['itemData'].get('itemState'),
'rareflag': item_data['itemData'].get('rareflag'),
'formation': item_data['itemData'].get('formation'),
'leagueId': item_data['itemData'].get('leagueId'),
'injuryType': item_data['itemData'].get('injuryType'),
'injuryGames': item_data['itemData']['injuryGames'],
'lastSalePrice': item_data['itemData']['lastSalePrice'],
'fitness': item_data['itemData']['fitness'],
'training': item_data['itemData']['training'],
'suspension': item_data['itemData']['suspension'],
'contract': item_data['itemData']['contract'],
'injuryGames': item_data['itemData'].get('injuryGames'),
'lastSalePrice': item_data['itemData'].get('lastSalePrice'),
'fitness': item_data['itemData'].get('fitness'),
'training': item_data['itemData'].get('training'),
'suspension': item_data['itemData'].get('suspension'),
'contract': item_data['itemData'].get('contract'),
# 'position': item_data['itemData']['preferredPosition'],
'playStyle': item_data['itemData'].get('playStyle'), # used only for players
'discardValue': item_data['itemData']['discardValue'],
'itemType': item_data['itemData']['itemType'],
'discardValue': item_data['itemData'].get('discardValue'),
'itemType': item_data['itemData'].get('itemType'),
'cardType': item_data['itemData'].get("cardsubtypeid"), # used only for cards
'owners': item_data['itemData']['owners'],
'owners': item_data['itemData'].get('owners'),
})
return return_data

Expand Down Expand Up @@ -128,7 +128,7 @@ def nations():
return nations


def leagues(year=2016):
def leagues(year=2017):
"""Return all leagues in dict {id0: league0, id1: legaue1}.
:params year: Year.
Expand All @@ -141,7 +141,7 @@ def leagues(year=2016):
return leagues


def teams(year=2016):
def teams(year=2017):
"""Return all teams in dict {id0: team0, id1: team1}.
:params year: Year.
Expand Down Expand Up @@ -438,7 +438,7 @@ def __request__(self, method, url, *args, **kwargs):
raise Conflict(err_code, err_reason, err_string)
else:
raise UnknownError(rc.__str__())
if 'credits' in rc:
if 'credits' in rc and rc['credits']:
self.credits = rc['credits']
self.saveSession()
return rc
Expand Down Expand Up @@ -506,15 +506,15 @@ def nations(self):
return nations()

@property
def leagues(self, year=2016):
def leagues(self, year=2017):
"""Return all leagues in dict {id0: league0, id1: league1}.
:params year: Year.
"""
return leagues(year)

@property
def teams(self, year=2016):
def teams(self, year=2017):
"""Return all teams in dict {id0: team0, id1: team1}.
:params year: Year.
Expand Down
2 changes: 1 addition & 1 deletion fut/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def urls(platform, cl=None):

'shards': 'https://www.easports.com/iframe/fut17/p/ut/shards', # add timestamp
'acc_info': 'https://www.easports.com/iframe/fut17/p/ut/game/fifa16/user/accountinfo',
'card_info': 'https://fifa17.content.easports.com/fifa/fltOnlineAssets/B488919F-23B5-497F-9FC0-CACFB38863D0/2016/fut/items/web/',
'card_info': 'https://fifa17.content.easports.com/fifa/fltOnlineAssets/CC8267B6-0817-4842-BB6A-A20F88B05418/2017/fut/items/web/',
'messages': 'https://www.easports.com/iframe/fut17/bundles/futweb/web/flash/xml/localization/messages.en_US.xml', # add cl
}
# urls['login'] = requests.get(urls['fut_home']).url
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


__title__ = 'fut'
__version__ = '0.2.0'
__version__ = '0.2.1'
__author__ = 'Piotr Staroszczyk'
__author_email__ = 'piotr.staroszczyk@get24.org'
__license__ = 'GNU GPL v3'
Expand Down

0 comments on commit 284a471

Please sign in to comment.