diff options
author | lazlev <lazlev@yopmail.com> | 2015-08-09 00:50:54 +0200 |
---|---|---|
committer | lazlev <lazlev@yopmail.com> | 2015-08-09 00:50:54 +0200 |
commit | b0ef3f1673e1930916604bb1264ca3a38414bc8d (patch) | |
tree | c97936e4d2a4cd6eb1072c65c8a08a7d18816b18 /module/plugins/accounts/LetitbitNet.py | |
parent | [XFileSharingPro][XFileSharingProFolder] Added default __pattern__ (diff) | |
parent | Fix https://github.com/pyload/pyload/issues/1707 (diff) | |
download | pyload-b0ef3f1673e1930916604bb1264ca3a38414bc8d.tar.xz |
Merge pull request #1 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/accounts/LetitbitNet.py')
-rw-r--r-- | module/plugins/accounts/LetitbitNet.py | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 7f973d2d3..1fc9b76ba 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -1,34 +1,35 @@ # -*- coding: utf-8 -*- -from module.plugins.Account import Account +from module.plugins.internal.Account import Account # from module.common.json_layer import json_loads, json_dumps class LetitbitNet(Account): __name__ = "LetitbitNet" __type__ = "account" - __version__ = "0.02" + __version__ = "0.04" + __status__ = "testing" __description__ = """Letitbit.net account plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] - def loadAccountInfo(self, user, req): + def parse_info(self, user, password, data, req): ## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ## - # api_key = self.getAccountData(user)['password'] - # json_data = [api_key, ['key/info']] - # api_rep = req.load('http://api.letitbit.net/json', post={'r': json_dumps(json_data)}) - # self.logDebug("API Key Info: " + api_rep) + # json_data = [password, ['key/info']] + # api_rep = self.load("http://api.letitbit.net/json", + # post={'r': json_dumps(json_data)}) + # self.log_debug("API Key Info: " + api_rep) # api_rep = json_loads(api_rep) # - # if api_rep['status'] == 'FAIL': - # self.logWarning(api_rep['data']) + # if api_rep['status'] == "FAIL": + # self.log_warning(api_rep['data']) # return {'valid': False, 'premium': False} - return {"premium": True} + return {'premium': True} - def login(self, user, data, req): - # API_KEY is the username and the PREMIUM_KEY is the password - self.logInfo(_("You must use your API KEY as username and the PREMIUM KEY as password")) + def login(self, user, password, data, req): + #: API_KEY is the username and the PREMIUM_KEY is the password + self.log_info(_("You must use your API KEY as username and the PREMIUM KEY as password")) |