You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- This can be a script that you run and will continue to run forever, calling your functions as events come through,
40
+
it doesn't have to be integrated into a bot. To ease this use-case, :meth:`EventsClient.run_forever` is handy.
41
+
42
+
Other Importants
43
+
~~~~~~~~~~~~~~~~~
44
+
- Cache has had another overhaul about how it works, is called and default operational use.
45
+
46
+
- From above, ``default_cache`` is a kwarg, and method of :class:`Client`. It defaults to the inbuilt method,
47
+
however you can pass your own function into this.
48
+
49
+
- Logging in: the new recommended way of logging in is via ``client = coc.login(email, pass, **kwargs)`` with ``client``
50
+
being one of these kwargs: pass in either :class:`EventsClient` or :class:`Client` to use respective clients. This
51
+
makes both Client class creation and HTTP logging in easy through one function. Any additional kwargs passed will become
52
+
kwargs for the client you are using.
53
+
54
+
- ``CurrentWar`` has been renamed, revamped and relooked at. A regular clan-war is now a :class:`ClanWar`, with
55
+
``WarIterator`` being renamed to ``ClanWarIterator``. ``LeagueWarIterator`` and ``CurrentWarIterator`` now exist,
56
+
Current wars being a mix of either clan or league wars.
57
+
58
+
- :meth:`Client.get_clan_war` now retrieves the current :class:`ClanWar`
59
+
60
+
- :meth:`Client.get_current_war` now attempts to retrieve the current :class:`ClanWar`, and if in the ``notInWar`` state,
61
+
will attempt to search for a leauge war and return that, if found. This makes getting league wars and
62
+
clan wars from the API much easier than before.
63
+
- :attr:`ClanWar.type` and :attr:`LeagueWar.type` now return a string of either ``cwl, friendly, random`` - which war type it is.
64
+
- :attr:`Timestamp.time` has been renamed to :attr:`Timestamp.raw_time`, and replaced with :attr:`Timestamp.utc_timestamp` (now called :attr:`Timestamp.time`)
65
+
- Add :attr:`ClanWar.status` returns a string ``winning, losing, tied, won, lost, tie`` depending on stars + destruction.
66
+
67
+
BugFixes
68
+
~~~~~~~~~
69
+
- Lots of little ones with cache
70
+
- Performance upgrades with use of ``__slots__`` on more classes
0 commit comments