Account¶
It should held all the data about the account. Also it’s the only one who has the password and authenticated connection. All other object should use him. Objects which connected to Account are placed under account_object folder.
You can find there:
- account_objects.account_animes.AccountAnimes
- account_objects.account_mangas.AccountMangas
- account_objects.account_friends.AccountFriends
- account_objects.my_anime.MyAnime
- account_objects.my_manga.MyManga
- class Account(username: str, password: str=None)¶
Object that keeps all the account data in MAL.
- animes¶
Returns: list of account’s animes. Return type: account_objects.account_animes.AccountAnimes
- auth_connect(url: str, data: str=None, headers: dict=None) → str¶
Parameters: - url (str) – The url to get.
- data (str or None) – The data to pass (will change the request to “POST”)
- headers (dict or None) – Headers for the request.
Returns: data after using the account authenticate to get the data.
Return type: str
- change_password(password: str) → bool¶
Checking if the new password is valid
Parameters: password (str) – password Returns: True if password is right. Return type: bool Raises exceptions.FailedToParseError: when failed
- friends¶
Returns: list of account’s friends. Return type: account_objects.account_friends.AccountFriends
- get_image()¶
Returns: image of the account’s avatar Return type: PIL.Image.Image
- is_auth¶
Returns: True if the password is right (and able to authenticate). Return type: bool
- mangas¶
Returns: list of account’s mangas. Return type: account_objects.account_mangas.AccountMangas
- reload()¶
reloading account image (all the other things are already lazy load!
- search(search_line: str, is_anime: bool=True) → map¶
Searching like regular search but switching all the object in “my” lists to the “my” objects.
Parameters: - search_line (str) – the search line.
- is_anime (bool) – True is searching for anime, False for manga.
Returns: searched objects
Return type: map
- user_id¶
Returns: the user id. If unknown loading it. Return type: int
- username¶
Returns: the user name. Return type: str