diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-04 17:22:51 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-06-04 17:22:51 +0200 |
commit | 3c7b7eaa189dd030712290fea2b2655b69fd6c05 (patch) | |
tree | 4585351f6bd6d69c5508e746a9e20b5eaae05391 /module/plugins/Account.py | |
parent | epydoc config file, please use rest syntax for the more detailed documentatio... (diff) | |
download | pyload-3c7b7eaa189dd030712290fea2b2655b69fd6c05.tar.xz |
x7.to plugin, by ernieb
Diffstat (limited to 'module/plugins/Account.py')
-rw-r--r-- | module/plugins/Account.py | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/module/plugins/Account.py b/module/plugins/Account.py index 557689fe9..732133d3a 100644 --- a/module/plugins/Account.py +++ b/module/plugins/Account.py @@ -35,9 +35,9 @@ class Account(): __author_name__ = ("mkaay") __author_mail__ = ("mkaay@mkaay.de") - # after that time [in minutes] pyload will relogin the account + #: after that time [in minutes] pyload will relogin the account login_timeout = 600 - # account data will be reloaded after this time + #: account data will be reloaded after this time info_threshold = 600 @@ -54,6 +54,12 @@ class Account(): pass def login(self, user, data, req): + """login into account, the cookies will be saved so user can be recognized + + :param user: loginname + :param data: data dictionary + :param req: `Request` instance + """ pass def _login(self, user, data): @@ -120,7 +126,13 @@ class Account(): del self.timestamps[user] def getAccountInfo(self, name, force=False): - """ return dict with infos, do not overwrite this method! """ + """retrieve account infos for an user, do **not** overwrite this method!\\ + just use it to retrieve infos in hoster plugins. see `loadAccountInfo` + + :param name: username + :param force: reloads cached account information + :return: dictionary with information + """ data = Account.loadAccountInfo(self, name) if force or not self.infos.has_key(name): @@ -152,6 +164,13 @@ class Account(): return info["premium"] def loadAccountInfo(self, name, req=None): + """this should be overwritten in account plugin,\ + and retrieving account information for user + + :param name: + :param req: `Request` instance + :return: + """ return { "validuntil": None, # -1 for unlimited "login": name, |