Skip to content

Commit

Permalink
fix #348 - consumables item data parse
Browse files Browse the repository at this point in the history
  • Loading branch information
oczkers committed Dec 1, 2017
1 parent cd32d92 commit 45b16f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ Changelog
---------


0.3.7 (2017-12-01)
^^^^^^^^^^^^^^^^^^

* allow init with None cookies (fix #345 by kirov)
* fix clubConsumables (#347, #348)
* remove path value check in remoteConfig

0.3.6 (2017-11-12)
^^^^^^^^^^^^^^^^^^

Expand Down
4 changes: 3 additions & 1 deletion fut/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,16 @@ def itemParse(item_data, full=True):
'tradeState': item_data.get('tradeState'),
'bidState': item_data.get('bidState'),
'startingBid': item_data.get('startingBid'),
'id': item_data.get('itemData', {'id': None})['id'],
'id': item_data.get('itemData', {'id': None})['id'] or item_data.get('item', {'id': None})['id'],
'offers': item_data.get('offers'),
'currentBid': item_data.get('currentBid'),
'expires': item_data.get('expires'), # seconds left
'sellerEstablished': item_data.get('sellerEstablished'),
'sellerId': item_data.get('sellerId'),
'sellerName': item_data.get('sellerName'),
'watched': item_data.get('watched'),
'resourceId': item_data.get('resourceId'), # consumables only?
'discardValue': item_data.get('discardValue'), # consumables only?
}
if full:
if 'itemData' in item_data:
Expand Down

0 comments on commit 45b16f2

Please sign in to comment.