diff options
Diffstat (limited to 'module/plugins/accounts/RPNetBiz.py')
-rw-r--r-- | module/plugins/accounts/RPNetBiz.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/module/plugins/accounts/RPNetBiz.py b/module/plugins/accounts/RPNetBiz.py index be456f2d7..d103e918d 100644 --- a/module/plugins/accounts/RPNetBiz.py +++ b/module/plugins/accounts/RPNetBiz.py @@ -7,16 +7,16 @@ from module.common.json_layer import json_loads class RPNetBiz(Account): __name__ = "RPNetBiz" __type__ = "account" - __version__ = "0.13" + __version__ = "0.14" __description__ = """RPNet.biz account plugin""" __license__ = "GPLv3" __authors__ = [("Dman", "dmanugm@gmail.com")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): #: Get account information from rpnet.biz - res = self.getAccountStatus(user, req) + res = self.get_account_status(user, req) try: if res['accountInfo']['isPremium']: #: Parse account info. Change the trafficleft later to support per host info. @@ -26,7 +26,7 @@ class RPNetBiz(Account): account_info = {"validuntil": None, "trafficleft": None, "premium": False} except KeyError: - #handle wrong password exception + # handle wrong password exception account_info = {"validuntil": None, "trafficleft": None, "premium": False} return account_info @@ -34,18 +34,18 @@ class RPNetBiz(Account): def login(self, user, data, req): #: Get account information from rpnet.biz - res = self.getAccountStatus(user, req) + res = self.get_account_status(user, req) #: If we have an error in the res, we have wrong login information if 'error' in res: - self.wrongPassword() + self.wrong_password() - def getAccountStatus(self, user, req): + def get_account_status(self, user, req): #: Using the rpnet API, check if valid premium account res = self.load("https://premium.rpnet.biz/client_api.php", - get={"username": user, "password": self.getAccountData(user)['password'], + get={"username": user, "password": self.get_account_data(user)['password'], "action": "showAccountInformation"}) - self.logDebug("JSON data: %s" % res) + self.log_debug("JSON data: %s" % res) return json_loads(res) |