Skip to content

Commit a12c91b

Browse files
authored
Revert "add clan capital leaderboards"
1 parent 75ed90c commit a12c91b

File tree

3 files changed

+2
-43
lines changed

3 files changed

+2
-43
lines changed

coc/clans.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,9 @@ class RankedClan(BaseClan):
4848
member_count: :class:`int`
4949
The number of members in the clan.
5050
points: :class:`int`
51-
The clan's trophy-count. If retrieving info for capital or versus leader-boards, this will be ``None``.
51+
The clan's trophy-count. If retrieving info for versus leader-boards, this will be ``None``.
5252
versus_points: :class:`int`
53-
The clan's versus trophy count. If retrieving info for regular or capital leader boards, this will be ``None``.
54-
capital_points: :class:`int`
55-
The clan's capital trophy count. If retrieving info for regular or versus leader boards, this will be ``None``.
53+
The clan's versus trophy count. If retrieving info for regular leader boards, this will be ``None``.
5654
rank: :class:`int`
5755
The clan's rank in the leader board.
5856
previous_rank: :class:`int`
@@ -64,7 +62,6 @@ class RankedClan(BaseClan):
6462
"member_count",
6563
"points",
6664
"versus_points",
67-
"capital_points",
6865
"rank",
6966
"previous_rank",
7067
)
@@ -78,7 +75,6 @@ def _from_data(self, data: dict) -> None:
7875

7976
self.points: int = data_get("clanPoints")
8077
self.versus_points: int = data_get("clanVersusPoints")
81-
self.capital_points: int = data_get("clanCapitalPoints")
8278
self.member_count: int = data_get("members")
8379
self.location = try_enum(Location, data=data_get("location"))
8480
self.rank: int = data_get("rank")

coc/client.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,40 +1240,6 @@ async def get_location_clans(
12401240
data = await self.http.get_location_clans(location_id, limit=limit, before=before, after=after)
12411241
return [RankedClan(data=n, client=self) for n in data["items"]]
12421242

1243-
async def get_location_clans_capital(
1244-
self, location_id: int = "global", *, limit: int = None, before: str = None, after: str = None
1245-
) -> List[RankedClan]:
1246-
"""Get clan capital rankings for a specific location
1247-
1248-
Parameters
1249-
-----------
1250-
location_id : int
1251-
The Location ID to search for. Defaults to all locations (``global``).
1252-
limit : int
1253-
The number of results to fetch.
1254-
before : str, optional
1255-
For use with paging. Not implemented yet.
1256-
after: str, optional
1257-
For use with paging. Not implemented yet.
1258-
1259-
Raises
1260-
------
1261-
Maintenance
1262-
The API is currently in maintenance.
1263-
1264-
GatewayError
1265-
The API hit an unexpected gateway exception.
1266-
1267-
1268-
Returns
1269-
--------
1270-
List[:class:`RankedClan`]
1271-
The top clans for the requested location.
1272-
"""
1273-
1274-
data = await self.http.get_location_clans_capital(location_id, limit=limit, before=before, after=after)
1275-
return [RankedClan(data=n, client=self) for n in data["items"]]
1276-
12771243
async def get_location_players(
12781244
self, location_id: int = "global", *, limit: int = None, before: str = None, after: str = None
12791245
) -> List[RankedPlayer]:

coc/http.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,6 @@ def get_location_players(self, location_id, **kwargs):
396396
def get_location_clans_versus(self, location_id, **kwargs):
397397
return self.request(Route("GET", "/locations/{}/rankings/clans-versus".format(location_id), **kwargs))
398398

399-
def get_location_clans_capital(self, location_id, **kwargs):
400-
return self.request(Route("GET", "/locations/{}/rankings/capitals".format(location_id), **kwargs))
401-
402399
def get_location_players_versus(self, location_id, **kwargs):
403400
return self.request(Route("GET", "/locations/{}/rankings/players-versus".format(location_id), **kwargs))
404401

0 commit comments

Comments
 (0)