def get_clan_members(self, connection, clan_id, app_id): url = 'http://api.worldoftanks.eu/wgn/clans/info/?application_id={app_id}&clan_id={clan_id}' \ .format(app_id=app_id, clan_id=clan_id) data = RequestUtils.retrieve_json(url) clan_data = data['data'][clan_id] members = clan_data['members'] clan_details = {'clan_name': clan_data['name'], 'clan_tag': clan_data['tag'], 'clan_id': clan_id, 'emblems': clan_data['emblems']} return members, clan_details
def get_clan_members(self, connection, clan_id, app_id): url = 'http://api.worldoftanks.eu/wgn/clans/info/?application_id={app_id}&clan_id={clan_id}' \ .format(app_id=app_id, clan_id=clan_id) data = RequestUtils.retrieve_json(url) clan_data = data['data'][clan_id] members = clan_data['members'] clan_details = { 'clan_name': clan_data['name'], 'clan_tag': clan_data['tag'], 'clan_id': clan_id, 'emblems': clan_data['emblems'] } return members, clan_details
def _retrieve_personal_stats(self, account_id, app_id): url = 'http://api.worldoftanks.eu/wot/account/info/?application_id={app_id}&account_id={account_id}&' \ 'extra=statistics.globalmap_absolute,statistics.globalmap_champion,statistics.globalmap_middle' \ .format(app_id=app_id, account_id=account_id) return RequestUtils.retrieve_json(url)
def _retrieve_account_stats(self, account_id, app_id): url = 'http://api.worldoftanks.eu/wot/stronghold/accountstats/?application_id={app_id}&account_id={account_id}' \ .format(app_id=app_id, account_id=account_id) return RequestUtils.retrieve_json(url)
def find_clan(self, clan_name): url = 'http://api.worldoftanks.eu/wgn/clans/list/?application_id={app_id}&search={clan_name}&limit=20' \ .format(app_id=self.app_id, clan_name=clan_name) json = RequestUtils.retrieve_json(url) return json['data']
def find_clan(self, clan_name): url = 'http://api.worldoftanks.eu/wgn/clans/list/?application_id={app_id}&search={clan_name}&limit=20' \ .format(app_id=self.app_id, clan_name=clan_name) json = RequestUtils.retrieve_json(url) return json['data']
def _retrieve_personal_stats(self, account_id, app_id): url = 'http://api.worldoftanks.eu/wot/account/info/?application_id={app_id}&account_id={account_id}&' \ 'extra=statistics.globalmap_absolute,statistics.globalmap_champion,statistics.globalmap_middle' \ .format(app_id=app_id, account_id=account_id) return RequestUtils.retrieve_json(url)
def _retrieve_account_stats(self, account_id, app_id): url = 'http://api.worldoftanks.eu/wot/stronghold/accountstats/?application_id={app_id}&account_id={account_id}' \ .format(app_id=app_id, account_id=account_id) return RequestUtils.retrieve_json(url)