Skip to content

Commit abc2a95

Browse files
committed
write migration guide
1 parent d378fb3 commit abc2a95

File tree

1 file changed

+49
-2
lines changed

1 file changed

+49
-2
lines changed

docs/miscellaneous/migrating_to_v3.rst

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,53 @@ Most of the outward facing library is the same, with a few changes detailed belo
88
by builder base 2.0 update.
99

1010
Logging in
11-
---------------------
12-
The functions coc.login and coc.login_with_keys were removed.
11+
----------
1312

13+
The functions :func:`coc.login` and :func:`coc.login_with_keys` were removed.
14+
Use :func:`coc.Client.login` or :func:`coc.Client.login_with_tokens` instead.
15+
16+
Builder Base v2
17+
---------------
18+
19+
The builder base revamp has caused a bunch of breaking changes.
20+
The most significant change is renaming all the `versus` things to `builder_base` things,
21+
but there were some additions and a removal as well:
22+
23+
- :func:`coc.Client.get_location_clans_versus` -> :func:`coc.Client.get_location_clans_builder_base`
24+
- :func:`coc.Client.get_location_players_versus` -> :func:`coc.Client.get_location_players_builder_base`
25+
- :func:`coc.Clan.versus_points` -> :func:`coc.Clan.builder_base_points`
26+
- :func:`coc.RankedClan.versus_points` -> :func:`coc.RankedClan.builder_base_points`
27+
- :func:`coc.ClanMember.versus_trophies` -> :func:`coc.ClanMember.builder_base_trophies`
28+
- :func:`coc.ClanMember.versus_rank` -> :func:`coc.ClanMember.builder_base_rank`
29+
- :func:`coc.RankedPlayer.versus_trophies` -> :func:`coc.RankedPlayer.builder_base_trophies`
30+
- :func:`coc.Player.versus_trophies` -> :func:`coc.Player.builder_base_trophies`
31+
- :func:`coc.Player.best_versus_trophies` -> :func:`coc.Player.best_builder_base_trophies`
32+
- :func:`coc.LegendStatistics.previous_versus_season` -> :func:`coc.LegendStatistics.previous_builder_base_season`
33+
- :func:`coc.LegendStatistics.best_versus_season` -> :func:`coc.LegendStatistics.best_builder_base_season`
34+
- :func:`coc.Player.versus_attack_wins` was removed
35+
- :func:`coc.Clan.required_builder_base_trophies` was added
36+
- :func:`coc.ClanMember.builder_base_league` was added
37+
- :func:`coc.Client.search_builder_base_leagues` was added
38+
- :func:`coc.Client.get_builder_base_league` was added
39+
- :func:`coc.Client.get_builder_base_league_named` was added
40+
41+
Game Objects
42+
------------
43+
44+
The latest game updates brought some troop changes which are reflected in the following changes in coc.py game data:
45+
46+
- :class:`coc.HOME_TROOP_ORDER` now knows the "Apprentice Warden"
47+
- :class:`coc.SUPER_TROOP_ORDER` now knows the "Super Hog Rider"
48+
- in the :class:`coc.BUILDER_TROOPS_ORDER`, "Super P.E.K.K.A" got renamed to "Power P.E.K.K.A"
49+
- :class:`coc.BUILDER_TROOPS_ORDER` now knows the "Electrofire Wizard"
50+
51+
Furthermore
52+
-----------
53+
54+
In order to get more in line with our coding style, the following methods were renamed:
55+
56+
- :func:`coc.Client.get_warlog` -> :func:`coc.Client.get_war_log`
57+
- :func:`coc.Client.get_raidlog` -> :func:`coc.Client.get_raid_log`
58+
59+
:class:`coc.ClanMember` has a new cached property: :func:`player_house_elements`
60+
:class:`coc.RaidDistrict` has a new `stars` attribute

0 commit comments

Comments
 (0)