Example #1
0
 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
Example #2
0
 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
Example #3
0
 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)
Example #4
0
 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)
Example #5
0
 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']
Example #6
0
 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']
Example #7
0
 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)
Example #8
0
 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)