def login(self, name, password):
"""Authenticates user.
:param str name: account name
:param str password: account password
.. note::
Throws :class:`exceptions.RequestFailed` (20, 'badCreadentials') if bad credentials are passed.
"""
self.session = requests.session()
remember = True
data = self._request('login', [name, password, int(remember)], hmethod='POST')
return LoggedUser(fw=self, uid=data[3], name=data[0], img=common.img_path_to_relative(data[1]), sex=data[4], birth_date=data[5])
# This method is one big TODO.
评论列表
文章目录