Skip to main content

fut14 is a simple library for managing Fifa 14 Ultimate Team.

Project description

fut14
=====

.. image:: https://travis-ci.org/oczkers/fut14.png?branch=master
:target: https://travis-ci.org/oczkers/fut14

fut14 is a simple library for managing Fifa 14 Ultimate Team.
It is written entirely in Python.



Documentation
-------------
Documentation is available at http://fut14.readthedocs.org/.

Players database: http://cdn.content.easports.com/fifa/fltOnlineAssets/C74DDF38-0B11-49b0-B199-2E2A11D1CC13/2014/fut/items/web/players.json



Usage
-----

.. code-block:: pycon

>>> import fut14
>>> fut = fut14.Core('email', 'password', 'secret answer', platform='xbox', emulate='and', debug=True)
>>> # PLATFORM: pc / ps3 / xbox / and / ios (pc default)
>>> # EMULATE: and / ios (use this feature to avoid webapp errors [BE WARE IT'S HIGH RISK])
>>> # DEBUG: save http response to fut14.log)

>>> items = fut.searchAuctions('development', # search items
... level='gold', category='fitness', min_price=300, # optional parametrs
... max_price=600, min_buy=300, max_buy=400, # optional parametrs
... start=0, page_size=50) # optional parametrs

>>> for item in items:
... trade_id = item['tradeId']
... buy_now_price = item['buyNowPrice']
... trade_state = item['tradeState']
... bid_state = item['bidState']
... starting_bid = i['startingBid']
... item_id = i['id']
... timestamp = i['timestamp'] # auction start
... rating = i['rating']
... asset_id = i['assetId']
... resource_id = i['resourceId']
... item_state = i['itemState']
... rareflag = i['rareflag']
... formation = i['formation']
... injury_type = i['injuryType']
... suspension = i['suspension']
... contract = i['contract']
... playStyle = i['playStyle'] # used only for players
... discardValue = i['discardValue']
... itemType = i['itemType']
... owners = i['owners']
... offers = i['offers']
... current_bid = i['currentBid']
... expires = i['expires'] # seconds left

>>> fut.credits # returns credits amount
600

>>> fut.bid(items[0]['trade_id'], 600) # make a bid

>>> fut.credits # it's updated automatically on every request
0
>>> fut.tradepile_size # tradepile size (slots)
80
>> len(fut.tradepile()) # tradepile fulfilment (number of cards in tradepile)
20
>>> fut.watchlist_size # watchlist size (slots)
30
>> len(fut.watchlist()) # watchlist fulfilment (number of cards in watchlist)
10

>>> items = fut.tradepile() # get all items from trade pile
>>> items = fut.unassigned() # get all unassigned items

>>> for item in items:
... fut.sell(item['item_id'], 150, # put item on auction
... buy_now=0, duration=3600) # optional parametrs

>>> fut.sendToTradepile(trade_id, item_id) # add card to tradepile
>>> fut.sendToClub(trade_id, item_id) # add card to club
>>> fut.sendToWatchlist(trade_id) # add card to watchlist
>>> fut.tradepileDelete(trade_id) # removes item from tradepile
>>> fut.watchlistDelete(trade_id) # removes item from watch list
>>> fut.quickSell(item_id) # quicksell item

>>> fut.relist() # relist all expired cards in tradepile

>>> fut.keepalive() # send keepalive ping to avoid timeout (send at least one request every ~10 minutes)

to be continued ;-)
...


CLI examples
------------
.. code-block:: bash

not yet
...


License
-------

GNU GPLv3


.. :changelog:

Changelog
---------


0.0.16 (2014-08-31)
++++++++++++++++++
* #76 fix buying (thanks to arthurnn)


0.0.15 (2014-08-29)
++++++++++++++++++
* add new exceptions: doLoginFail, MaxSessions, Captcha
* add changelog
* NullHandler is default logging handler
* core: bump clientVersion (8->9)


0.0.14 (2014-07-06)
++++++++++++++++++

* core: relist returns number of delted/sold if clean parameter was set
* add new exception FeatureDisabled
* core: add emulate
* core: add stats
* core: add clubInfo


0.0.13 (2014-04-19)
++++++++++++++++++

* core: add sendToWatchlist


0.0.12 (2014-02-23)
++++++++++++++++++

* exceptions: add Unauthorized & MultipleSession
* fix quicksell


0.0.11 (2014-02-15)
++++++++++++++++++

* fix logger
* setup.py is now executable


0.0.10 (2014-02-15)
++++++++++++++++++

* core: add clean ability to relist (remove sold cards)
* core: keepalive returns credit amount


0.0.9 (2014-01-26)
++++++++++++++++++

* fix relist


0.0.8 (2014-01-26)
++++++++++++++++++

* add new exception Conflict
* init docs
* core: add relist
* core: add sendToClub


0.0.7 (2014-01-13)
++++++++++++++++++

* add few exceptions


0.0.6 (2013-12-30)
++++++++++++++++++

* core: add DEBUG feature
* add multiplatform support (xbox/ps3/and/ios)


0.0.5 (2013-12-23)
++++++++++++++++++

* core: add assetId param to searchAuction method
* core: add pileSize
* core: add leagueId to item data parser


0.0.4 (2013-11-10)
++++++++++++++++++

* convert lowercase function/method names to mixedCase (send_to_tradepile -> sendToTradepile)
* drop python-2.5 (requests)
* core: python 3 support


0.0.3 (2013-10-25)
++++++++++++++++++

* core: move requests session init & headers from login to init
* core: update credits on every request (only if it is avaible included in response)


0.0.2 (2013-10-17)
++++++++++++++++++

* core: add watchlist
* core: add card_info function
* core: add alias for base_id & card_info


0.0.1 (2013-10-15)
++++++++++++++++++

* init

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fut14-0.0.16.tar.gz (29.6 kB view details)

Uploaded Source

File details

Details for the file fut14-0.0.16.tar.gz.

File metadata

  • Download URL: fut14-0.0.16.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for fut14-0.0.16.tar.gz
Algorithm Hash digest
SHA256 ca8ac3bf298aeec7fecd14317989b4b5a65b7c6efe138d75abfdb185d66a527a
MD5 e95d599b633ab1ea534fa04c73d8efa1
BLAKE2b-256 f0bc135b13ed381ba37bbc6053998e6ee57b317993613b6a5c3ac5487738ac90

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page