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 12, 2017
2 parents e13571c + a22e9cc commit 1fe0556
Show file tree
Hide file tree
Showing 15 changed files with 668 additions and 433 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ python:
- 3.6
- 3.7-dev
- pypy
- pypy3
install:
- pip install -r requirements.txt codecov pytest-cov responses
- pip install -r requirements.txt codecov pytest-cov codacy-coverage responses
script:
- py.test --verbose --cov-report term --cov-report xml --cov=fut tests
after_success:
- codecov
- python-codacy-coverage
notifications:
email: oczkers@gmail.com
2 changes: 2 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ Patches and Suggestions
- spacedlevo
- pulkitsharma
- xAranaktu
- LasseRegin
- kirov
14 changes: 14 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ Changelog
---------


0.3.0 (2017-10-12)
^^^^^^^^^^^^^^^^^^

* initial release for fifa 18
* bump useragent
* add ability to login via sms code or totp authenticator (fully automatic)
* pinEvents

0.2.19 (2017-09-21)
^^^^^^^^^^^^^^^^^^^

* searchAuctions: add ability to search rare (special) cards #280
* fix addition request to send code (#285)

0.2.18 (2017-05-25)
^^^^^^^^^^^^^^^^^^^

Expand Down
63 changes: 45 additions & 18 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,18 @@ fut
:target: https://codecov.io/github/oczkers/fut
:alt: codecov.io

.. image:: https://api.codacy.com/project/badge/Grade/f599808fba2447c98253cf44cca86a1b
:target: https://www.codacy.com/app/oczkers/fut?utm_source=github.com&utm_medium=referral&utm_content=oczkers/fut&utm_campaign=Badge_Grade

.. image:: https://cdn.worldvectorlogo.com/logos/slack.svg
:height: 20px
:target: https://futapi.slack.com

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

`Click here to get Slack invitation <https://gentle-everglades-93932.herokuapp.com>`_



Documentation
Expand All @@ -30,7 +39,15 @@ Documentation will be available soon at http://fut.readthedocs.org/.

Players database: https://www.easports.com/uk/fifa/ultimate-team/fut/database

Players database (json): http://cdn.content.easports.com/fifa/fltOnlineAssets/CC8267B6-0817-4842-BB6A-A20F88B05418/2017/fut/items/web/players.json
Players database (json): https://www.easports.com/fifa/ultimate-team/web-app/content/B1BA185F-AD7C-4128-8A64-746DE4EC5A82/2018/fut/items/web/players_meta.json

Consumables database provided by koolaidjones: https://github.com/koolaidjones/FUT-Consumables-Resource-IDs

.. image:: https://cdn.worldvectorlogo.com/logos/slack.svg
:height: 100px
:target: https://futapi.slack.com

`Click here to get Slack invitation <https://gentle-everglades-93932.herokuapp.com>`_


AutoBuyer GUI
Expand All @@ -49,11 +66,12 @@ Login

Optional parameters:

- CODE: [string] email/sms code for two-step verification (make sure to use string if your code starts with 0).
- PLATFORM: [pc/ps3/ps4/xbox/xbox360] pc default.
- EMULATE: [and/ios] use this feature to avoid webapp errors (BE WARE IT'S HIGH RISK).
- DEBUG: [True/False] enables debug.
- COOKIES: [filename] saves cookies after every request and load it from given file when restaring app (just like browser).
- code: [string] email/sms code for two-step verification (make sure to use string if your code starts with 0).
- platform: [pc/ps3/ps4/xbox/xbox360] pc default.
- emualte: [and/ios] use this feature to avoid webapp errors (BE WARE IT'S HIGH RISK).
- debug: [True/False] enables debug.
- cookies: [filename] saves cookies after every request and load it from given file when restaring app (just like browser).
- proxies: [dict] http/socks proxies in requests's format http://docs.python-requests.org/en/master/user/advanced/#proxies

.. code-block:: python
Expand All @@ -65,14 +83,23 @@ Search

Optional parameters:

- LEVEL: ['?'/'?'/gold'] Card level.
- CATEGORY: ['fitness'/'?'] Card category.
- MIN_PRICE: [int] Minimal price.
- MAX_PRICE: [int] Maximum price.
- MIN_BUY: [int] Minimal buy now price.
- MAX_BUY: [int] Maximum buy now price.
- START: [int] Start page number.
- PAGE_SIZE: [int] Amount of cards on single page (changing this might be risky).
- min_price: [int] Minimal price.
- max_price: [int] Maximum price.
- min_buy: [int] Minimal buy now price.
- max_buy: [int] Maximum buy now price.
- level: ['bronze'/'silver'/gold'] Card level.
- rare: [bool] False for non-rare only results.
- start: [int] Start page number.
- category: ['fitness'/'?'] Card category.
- assetId: [int] assetId.
- defId: [int] defId.
- league: [int] League id.
- club: [int] Club id.
- position: [int?/str?] Position.
- nationality: [int] Nation id.
- rare: [boolean] True for searching special cards.
- playStyle: [str?] playStyle.
- page_size: [int] Amount of cards on single page (changing this might be risky).

.. code-block:: python
Expand All @@ -94,8 +121,8 @@ Sell

Optional parameters:

- BUY_NOW: [int] Buy now price.
- DURATION: [int] Auction duration in seconds (3600 default).
- buy_now: [int] Buy now price.
- duration: [int] Auction duration in seconds (3600 default).

.. code-block:: python
Expand Down Expand Up @@ -168,8 +195,8 @@ Apply consumable

Apply consumable on player.

- ITEM_ID: [int] Player's item_id.
- RESOURCE_ID: [int] Consumable's resource_id.
- item_id: [int] Player's item_id.
- resource_id: [int] Consumable's resource_id.

.. code-block:: python
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.18'
__version__ = '0.3.0'
__author__ = 'Piotr Staroszczyk'
__author_email__ = 'piotr.staroszczyk@get24.org'
__license__ = 'GNU GPL v3'
Expand Down
7 changes: 3 additions & 4 deletions fut/config.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# chrome 56 @ win10
# chrome 58 @ win10
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'Accept-Encoding': 'gzip,deflate,sdch',
'Accept-Encoding': 'gzip,deflate,sdch, br',
'Accept-Language': 'en-US,en;q=0.8',
# 'Accept-Charset': 'utf-8, iso-8859-1, utf-16, *;q=0.1',
'Connection': 'keep-alive',
Expand Down Expand Up @@ -36,7 +36,6 @@
# 'X-Requested-With': 'com.ea.fifaultimate_row', # ultimate app identifier?
}

flash_agent = 'ShockwaveFlash/24.0.0.221'

cookies_file = 'cookies.txt'
timeout = 15 # defaulf global timeout
Expand Down
Loading

0 comments on commit 1fe0556

Please sign in to comment.