Python
4
Вклад в тег
class Vehicle(API):
def _call_with_endpoint(self, lang, fields, account_id, endpoint):
if type(fields) is list:
fields = self._format_fields(fields)
return self._api_call(endpoint=endpoint,
fields=fields,
language=lang,
account_id=account_id)
def vehicle_stats(self, lang='ru', fields='', account_id=''):
endpoint = '/tanks/stats/'
return self._call_with_endpoint(lang=lang,
field=fields,
account_id=account_id,
endpoint=endpoint)
def vehicle_achievements(self, lang='ru', fields='', account_id=''):
endpoint = '/tanks/achievements/'
return self._call_with_endpoint(lang=lang,
field=fields,
account_id=account_id,
endpoint=endpoint)