----------------------
We are making changes due to the `2.0.1 API update <https://forums.wynncraft.com/threads/2-0-1-full-changelog.304461/>`_
which brings some changes around player classes. We have also changed initialization procedure so client constructor doesn't need to
be called in async context anymore. We are introducing a concept like other async libraries. You now need to call ``start()``
function to initialize the client.
- :bdg-danger-line:`BREAKING` :py:class:`Corkus` initialization procedure have been changed. You now need to call
:py:func:`Corkus.start() <Corkus.start>` to initialize the client.
.. code-block:: python
:emphasize-lines: 4
corkus = Corkus(timeout=60)
async def main():
await corkus.start()
player = await corkus.player.get("MrBartusekXD")
print(player.best_character.combat.level) 102
await corkus.close()
- :bdg-danger-line:`BREAKING` Due to recent API changes ``Character.name`` (formerly: ``PlayerClass.name``) was removed.
- :bdg-danger-line:`BREAKING` Ability to pass custom ``ClientSession`` to :py:class:`Corkus` was removed.
- :bdg-danger-line:`BREAKING` :py:class:`Corkus` configuration option ``ratelimit_enable`` and ``cache_enable``
were renamed to ``disable_ratelimit`` and ``disable_cache`` respectively. Their function were reversed and
are both now respectively disabled by default.
- :bdg-warning-line:`Deprecated` ``Player.classes`` and ``Player.best_class`` were deprecated,
use :py:attr:`Player.characters <corkus.objects.Player.characters>` and
:py:attr:`Player.best_character <corkus.objects.Player.best_character>` instead. These will now return instancies
of :py:class:`Character <corkus.objects.Character>` which are identical to ``PlayerClass`` excluding the ``name`` property.
- ``PlayerClass`` was renamed to :py:class:`Character <corkus.objects.Character>` to match new API schema.
- ``ClassType`` was renamed to :py:class:`CharacterType <corkus.objects.CharacterType>` to match new API schema.
- Add :py:attr:`uuid <corkus.objects.Character.uuid>` property to :py:class:`Character <corkus.objects.Character>` (formerly: ``PlayerClass``).
- Project now uses ``characters`` instead of ``classes`` in documentation.
- Default request timeout was changed to ``60`` seconds.
- Add support for `Python 3.11 <https://docs.python.org/3/whatsnew/3.11.html>`_.
- Update dependencies. You can now use ``aiohttp 3.8.x`` and ``iso8601 1.x``.
- Fix :py:exc:`CorkusTimeoutError <corkus.errors.CorkusTimeoutError>` returning invalid url.
.. py:currentmodule:: corkus.objects