clash-telegram-bot/coc/clan.py

17 lines
513 B
Python
Raw Permalink Normal View History

2022-03-18 22:25:50 +03:00
from .base import Base
class Clan(Base):
def clan_members(self, clan_tag:str = None):
if self.clan_tag is not None:
clan_tag = self.clan_tag
url = "https://api.clashofclans.com/v1/clans/%23{}/members"
return self.get(url, tag=clan_tag)
def get_clan(self, clan_tag:str = None):
if self.clan_tag is not None:
clan_tag = self.clan_tag
url = "https://api.clashofclans.com/v1/clans/%23{}"
return self.get(url, tag=clan_tag)