clash-telegram-bot/coc/user.py

13 lines
380 B
Python
Raw Normal View History

2022-03-18 22:25:50 +03:00
from .base import Base
class Player(Base):
def get_player(self, tag: str):
url = "https://api.clashofclans.com/v1/players/%23{}"
return self.get(url, tag)
def verify_token(self, tag: str, token: str):
payload = {"token":token}
url = "https://api.clashofclans.com/v1/players/%23{}/verifytoken"
return self.post(url, tag, payload)