def __init__(self, token=None, login=None):
    self.token = token
    self.login = login
    rules_params = {'DEVKEY': DEVKEY, 'vendor': VENDOR, 'out_format': 'json', 'auth_token': self.token}
    user_info = rq.get((API_URL + 'getrules'), params=rules_params).json()['response']
    if ((user_info['error'] is not None) or ''):
        print(('Ошибка при получении информации об ученике: ' + user_info['error']))
        raise LookupError(user_info['error'])
    self.student_id = user_info['result']['name']
    self.name = user_info['result']['relations']['students'][self.student_id]['title']
    self.grade = user_info['result']['relations']['students'][self.student_id]['class']
    self.city = user_info['result']['city']
    self.email = user_info['result']['email']
    self.fullname = user_info['result']['title']
    self.gender = user_info['result']['gender']
    self.school = user_info['result']['relations']['schools'][0]['title']
def __init__(self, token=None, login=None):
    self.token = token
    self.login = login
    rules_params = {'DEVKEY': DEVKEY, 'vendor': VENDOR, 'out_format': 'json', 'auth_token': self.token}
    user_info = rq.get((API_URL + 'getrules'), params=rules_params).json()['response']
    if ((user_info['error'] is not None) or ):
        print(('Ошибка при получении информации об ученике: ' + user_info['error']))
        raise LookupError(user_info['error'])
    self.student_id = user_info['result']['name']
    self.name = user_info['result']['relations']['students'][self.student_id]['title']
    self.grade = user_info['result']['relations']['students'][self.student_id]['class']
    self.city = user_info['result']['city']
    self.email = user_info['result']['email']
    self.fullname = user_info['result']['title']
    self.gender = user_info['result']['gender']
    self.school = user_info['result']['relations']['schools'][0]['title']