summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/FreeWayMe.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts/FreeWayMe.py')
-rw-r--r--module/plugins/accounts/FreeWayMe.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/module/plugins/accounts/FreeWayMe.py b/module/plugins/accounts/FreeWayMe.py
index b9a0acea7..95977bd0f 100644
--- a/module/plugins/accounts/FreeWayMe.py
+++ b/module/plugins/accounts/FreeWayMe.py
@@ -7,21 +7,21 @@ from module.common.json_layer import json_loads
class FreeWayMe(Account):
__name__ = "FreeWayMe"
__type__ = "account"
- __version__ = "0.15"
+ __version__ = "0.16"
__description__ = """FreeWayMe account plugin"""
__license__ = "GPLv3"
__authors__ = [("Nicolas Giese", "james@free-way.me")]
- def loadAccountInfo(self, user, req):
- status = self.getAccountStatus(user, req)
+ def load_account_info(self, user, req):
+ status = self.get_account_status(user, req)
- self.logDebug(status)
+ self.log_debug(status)
account_info = {"validuntil": -1, "premium": False}
if status['premium'] == "Free":
- account_info['trafficleft'] = self.parseTraffic(status['guthaben'] + "MB")
+ account_info['trafficleft'] = self.parse_traffic(status['guthaben'] + "MB")
elif status['premium'] == "Spender":
account_info['trafficleft'] = -1
elif status['premium'] == "Flatrate":
@@ -33,20 +33,20 @@ class FreeWayMe(Account):
def login(self, user, data, req):
- status = self.getAccountStatus(user, req)
+ status = self.get_account_status(user, req)
#: Check if user and password are valid
if not status:
- self.wrongPassword()
+ self.wrong_password()
- def getAccountStatus(self, user, req):
+ def get_account_status(self, user, req):
answer = self.load("http://www.free-way.bz/ajax/jd.php", #@TODO: Revert to `https` in 0.4.10
- get={"id": 4, "user": user, "pass": self.getAccountData(user)['password']})
+ get={"id": 4, "user": user, "pass": self.get_account_data(user)['password']})
- self.logDebug("Login: %s" % answer)
+ self.log_debug("Login: %s" % answer)
if answer == "Invalid login":
- self.wrongPassword()
+ self.wrong_password()
return json_loads(answer)