Skip to content

Releases: mathsman5133/coc.py

v3.8.0

02 Jan 19:58
5b6772c
Compare
Choose a tag to compare

Additions:

- Added the new Lavaloon & Electro Boots equipment to :class:`coc.EQUIPMENT`
- Added :func:`coc.Client.get_equipment`
- Added new Minion Prince hero to :class:`Hero`
- Updated static data & enums for TH17
- Added explicit cache control to every endpoint
   - Use :attr:`coc.Client.lookup_cache` (default `True`) or pass it as a kwarg to API calling methods (default `None`) to control whether a lookup in the cache is performed. If `None`, it defaults to :attr:`client.lookup_cache`.
   - Use :attr:`coc.Client.update_cache` to control whether the cache is updated after a request.
   - Use :attr:`coc.Client.ignore_cached_errors` to specify status codes to ignore in the cache. For example, cached `404 Not Found` responses can be bypassed by setting `ignore_cached_errors=[404]`.
- Moved `cls` functionality from `EventClient` to `Client` via :func:`coc.Client.set_object_cls`
   - Previously, `cls` could only be set at the `EventClient` level and applied to every event automatically. Now, it can be set directly in the normal `Client` when initializing and can override the API call if needed. This eliminates the need to change `cls` for every individual API call.

Bugs Fixed:
  • Fixed a bug that would cause the first war of CWL to not appear while it was in prep & caused an index error appearing in output/logs
  • :func:coc.Client.verify_player_token requests are no longer cached

v3.7.2 Enable gzip & deflate compression

12 Sep 15:22
1446b3d
Compare
Choose a tag to compare

Additions:

  • Supercell enabled compression for all endpoints. coc.py will now request compression for every request.

v3.7.1: Merge pull request #244 from mathsman5133/release/3.7.1

13 Aug 21:21
6e77203
Compare
Choose a tag to compare

Additions:

  • Added the new Magic Mirror equipment to coc.EQUIPMENT
  • updated static data

Bugs Fixed:

  • Fixed a bug that would cause coc.py to break if a request was sent with an empty string for a tag

v3.7.0: June 20204 Update

17 Jun 19:57
6dbb043
Compare
Choose a tag to compare

Additions:

  • Added inheritance of classes into the docs to make it easier to see what classes inherit from others.
  • Added the new BattleModifier to ClanWar.battle_modifier and ClanWarLogEntry.battle_modifier.
  • Added the new troop and equipment in June 2024 update to the static data.

Changes:

  • Changed the way the ClanWar and ClanWarLogEntry classes handles the state and result
    attribute, respectively. It now returns a WarState/WarResult enumeration object instead of a string
    to allow better type hinting and easier comparison.
  • Updated the static data to reflect the June 2024 update changes.

v3.6.0

17 May 16:51
e72a313
Compare
Choose a tag to compare

Bugs Fixed:

  • Issues causing the documentation to not build properly have been fixed.
  • Fixed a few spelling errors in the documentation.

Additions:

  • Added coc.Client.ip to manually overwrite the IP address used for generating API keys. This is especially useful for using the API with a proxy.

v3.5.3

14 May 18:23
a477898
Compare
Choose a tag to compare

Bugs Fixed:

  • coc.Badge.url and :coc.Icon.url now use differently sized fallbacks if the default URL is not available. The same is true if coc.Badge.save or coc.Icon.save are called without the optional size parameter
  • corrected the default value for the league_id parameter of coc.Client.get_seasons to point at Legends league and fixed a type hint in coc.Client.get_season_rankings as well as a few doc strings

v3.5.2

27 Apr 17:31
3e9d95b
Compare
Choose a tag to compare

Additions:

  • added the option to change the base url of the API in coc.Client to allow an easier use of proxies
  • added the new events coc.PlayerEvents.equipment_change and coc.PlayerEvents.active_equipment_change
  • added the new names for builder base related events to coc.ClanEvents and coc.PlayerEvents
  • added the change in the api model for ClanMembers. coc.ClanMember now has a new attribute town_hall which is the town hall level.

Fixes:

  • Fixed an issue with the renaming of versus_trophies to builder_base_trophies and similar name changes in the event related code

v3.5.1

27 Apr 16:53
46d66bd
Compare
Choose a tag to compare

Additions:

  • added the option to change the base url of the API in coc.Client to allow an easier use of proxies
  • added the new events coc.PlayerEvents.equipment_change and coc.PlayerEvents.active_equipment_change
  • added the new names for builder base related events to coc.ClanEvents and coc.PlayerEvents
  • added the change in the api model for ClanMembers. coc.ClanMember now has a new attribute town_hall which is the town hall level.

Fixes:

  • Fixed an issue with the renaming of versus_trophies to builder_base_trophies and similar name changes in the event related code

v3.4.2: April 2024 update

20 Apr 10:59
898ea49
Compare
Choose a tag to compare

Additions:

  • added the new Angry Jelly pet to coc.PETS_ORDER
  • updated static data to reflect the April 2024 update

v3.4.1

31 Mar 12:43
2dd3c98
Compare
Choose a tag to compare

Additions:

  • added the missing achievements to coc.ACHIEVEMENT_ORDER
  • updated static data to reflect the March 26th balance patch