Releases: mathsman5133/coc.py
v2.3.1
v2.3.1
-
Added back :func:
coc.Client.get_location_clans_capital
which was accidentally reverted in 2.3.0 -
Fixed some minor typos in the docs
What's Changed
- Release 2.3.1 by @Kuchenmampfer in #171
- bump version numbers by @Kuchenmampfer in #173
Full Changelog: v2.3.0...v2.3.1
Big Bug fix and feature Release v2.3.0
This release fixes multiple bugs.
Also multiple new features have been added like an event for new wars.
We worked on the docs, to improve their structure and readability.
Additions:
- Added new events
ClientEvents.raid_weekend_start
,ClientEvents.raid_weekend_end
,ClientEvents.clan_games_start
,ClientEvents.clan_games_end
,WarEvents.new_war
andClanEvents.member_versus_rank
- Added utility functions
utils.get_clan_games_start
,utils.get_clan_games_end
,utils.get_raid_weekend_start
andutils.get_raid_weekend_end
- Added clan capital leaderboards
- Added
Clan.capital_points
andClan.family_friendly
- Added
ClanMember.versus_rank
- Added
Client.raw_attribute
to control if the new_raw_data
attribute of various objects gets populated - Added
full_war_api
as an extension - Added
Client.login_with_tokens
offering the same functionality asClient.login_with_keys
as an asynchronous function
Changes:
- Rename of LRU to FIFO in order to match the cache type (this is only internal)
- Restructured the documentation
Client.login_with_keys
was marked as deprecated
Bugs Fixed:
- Fixed a bug which affected the key creation if there are 10 keys with at least one having the correct name but wrong ip range
- Fixed a memory leak caused by python not properly freeing disk space after the removal of cache entries
- Fixed a bug that prevented :
Client.http.stats
from collecting API response time stats - Fixed a bug that tried to use a cache when
max_cache_size
was set to 0 - Corrected order of elixir troops
- Fixed a bug when clans faced each other multiple times in one raid weekend
- Fixed a bug that caused automated tests on forks to fail
- Fixed a bug that prevented you from importing some classes as
coc.Class
Contributions
We want to say thank you to all those who contributed!
- Fix memory leak by @Kuchenmampfer in #154
- Fullwarapi public by @doluk in #164
- add missing classes to init.py by @Kuchenmampfer in #160
- Fix for only one raid per clan showing on atk/def log by @MagicTheDev in #158
- add clan capital leaderboards by @MagicTheDev in #157
- Moved "Electro Titan" at the end of elixir troops by @rreemmii-dev in #155
- Adds new clan class fields by @MagicTheDev in #159
- If less than 10 keys exist, at least 1 key can be made, but if 10 keys… by @AumJavalgikar in #119
- huge docs restructuring by @Kuchenmampfer in #166 and #167
Full Changelog: v2.2.3...v2.3.0
Bug fix
Bug fixes
v2.2.1
Bugs Fixed:
-
Moved "Recall Spell" at the end of elixir spells (rather than end of all spells)
-
Fixed a bug with CWL where the final war can be retrieved properly on the last day as
current_war
-
Fixed bug with iterators and comparing clan tags to skip wars.
This release includes:
#138 <https://github.com/mathsman5133/coc.py/pull/138>
,
#139 <https://github.com/mathsman5133/coc.py/pull/139>
,
#140 <https://github.com/mathsman5133/coc.py/pull/140>
_,
Support for CapitalRaidSeasons and Context Manager
This update has quite a bit of change without breaking backward compatibility.
For starters, support for the context manager was added #121 allowing the use of
async def main():
async with coc.Client() as client:
# do stuff...
if __name__ == "__main__":
asyncio.run(main())
Additionally, with the release of CapitalRaidSeasons we needed to improve the performance of fetching warlogs and capital raid logs. Previously, all records available from the API were fetched when in most cases, folks just needed the newest data. A limit
parameter has been added to both get_warlog
and get_raidlog
.
Additionally, support for async for warlog
has been added with the ability to fetch more data if needed.
raid_logs = await client.get_raidlog(clan_tag, page=True, limit=5)
# Set `paginate=True` to enable fetching beyond the limit value until
# there are more values to fetch
count = 0
async for i in raid_with_page:
print(f"[{count}]-async limit: 5 page: True {i.start_time.time}")
count += 1
Update fixes issue #125
Minor release fixes the order of pets from Player.hero_pets
Th15 Update!
The update contains updates from the TH15 release.
- Update troops, spells, and pet orders
- Update static json files
- Added script to automate updating the json files
- Removed the ResourceCost key from the json files
v2.1.1
Version bump to v2.1.1 to push to PyPi. See v2.1.0 release for detailed changelog.
Clan capitol support!
- Support for Clan Capitols!
- Updated our examples
- Bug fixes and improvements!
Fixed bug with iterating over clan.get_detailed_members where player objects were missing attributes #109
Cleaned up how the async loop was being managed by library #111
Please be sure to create issues for any bug fixes or feature requests!