Skip to content

Commit 1c8dd22

Browse files
committed
Version bump to v0.1.3 and update changelog
1 parent e4dd33a commit 1c8dd22

File tree

3 files changed

+60
-2
lines changed

3 files changed

+60
-2
lines changed

coc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
__version__ = '0.1.2'
3+
__version__ = '0.1.3'
44

55
from .client import Client
66
from .dataclasses import (

docs/changelog.rst

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,64 @@ Changelog
66
This page keeps a fairly detailed, human readable version
77
of what has changed, and whats new for each version of the lib.
88

9+
v0.1.3
10+
--------
11+
BugFixes
12+
~~~~~~~~~
13+
- TypeError will no longer be raised if no tags were found
14+
- Iterators will continue to search for next item if one fails
15+
16+
Important
17+
~~~~~~~~~~
18+
New Properties/Attributes
19+
20+
- :attr:`WarMember.is_opponent` indicates if the member is a clanmate (false) or opponent (true)
21+
- :attr:`SearchPlayer.ordered_home_troops`, :attr:`SearchPlayer.ordered_builder_troops` - returns an
22+
:class:`collections.OrderedDict` of players troops, in the order found in game.
23+
Note: Siege Machines are included at the end of this.
24+
- :attr:`SearchPlayer.ordered_spells` - same, but for spells
25+
- :attr:`SearchPlayer.ordered_heroes` - same, but for heroes.
26+
- :attr:`BaseWar.clan_tag` - all wars now have a permenant `clan_tag` attribute regardless of war state.
27+
- :attr:`cache.fully_populated` - helper bool to indicate if all possible items are cached,
28+
for eg. with locations and leagues - static information
29+
30+
New Methods:
31+
32+
- :meth:`client.get_league_named()` - get a league (ie. Bronze III etc.) by name.
33+
- :meth:`client.get_location_named()` - get a location (ie. Australia etc.) by name.
34+
- :meth:`cache.clear()` - reset the cache and clear all objects inside for that instance.
35+
- :meth:`cache.get_all_values()` - returns all values in the cache.
36+
- :meth:`cache.get_limit(limit)` - get the first limit number of items in cache.
37+
38+
New Iterators:
39+
40+
- :class:`PlayerIterator`, :class:`ClanIterator`, :class:`WarIterator` - returned when a function eg.
41+
:meth:`client.get_players(tags)` is called. These allow normal dot notion to be used inside `async for`,
42+
eg. `async for clan in client.get_clans(tags): print(clan.name)`.
43+
- :meth:`Iterator.flatten()` will return a list of all objects inside the iterator. Note: operation may be slow.
44+
45+
Changed Attribute:
46+
47+
- :attr:`SearchPlayer.troops_dict` has been changed to both :attr:`SearchPlayer.home_troops_dict` and
48+
:attr:`SearchPlayer.builder_troops_dict`, returning a dict of either home, or builder troops respectively.
49+
50+
- :attr:`SearchPlayer.ordered_troops_dict` has been changed to both :attr:`SearchPlayer.ordered_home_troops_dict`
51+
and :attr:`SearchPlayer.ordered_builder_troops_dict`, returning a dict of either home, or builder troops respectively.
52+
53+
Removed Dependency:
54+
55+
- `lru-dict` has been removed as a dependency due to a few windows problems while installing,
56+
and utilising :class:`collections.OrderedDict` appears to be faster.
57+
58+
59+
Documentation
60+
~~~~~~~~~~~~~~
61+
62+
- Many type-hints were added to functions to aid IDE integration
63+
- Documentation was re-written to use the NumPy style.
64+
- Discord Bot examples were updated
65+
66+
967
v0.1.2
1068
--------
1169
BugFixes

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
with open(os.path.join(os.getcwd(), 'requirements.txt')) as f:
66
requirements = f.read().splitlines()
77

8-
version = '0.1.2'
8+
version = '0.1.3'
99

1010
readme = ''
1111
with open('README.rst') as f:

0 commit comments

Comments
 (0)