From 0e1ef9bc01579328e17e79416fa3c1c7b77adcc8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 06:08:01 +0200 Subject: Update everything --- module/plugins/accounts/LetitbitNet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 7f973d2d3..e5c61e35f 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -1,13 +1,13 @@ # -*- 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.03" __description__ = """Letitbit.net account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From c1764e2fea0bb05164c83a876e8cd58b97f58f25 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 16 Jun 2015 17:31:38 +0200 Subject: Update all --- module/plugins/accounts/LetitbitNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index e5c61e35f..6b538c1f0 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -18,7 +18,7 @@ class LetitbitNet(Account): ## 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)}) + # api_rep = self.load('http://api.letitbit.net/json', post={'r': json_dumps(json_data)}, req=req) # self.logDebug("API Key Info: " + api_rep) # api_rep = json_loads(api_rep) # -- cgit v1.2.3 From 20b6a2ec022202b0efb6cb69415239fb8f4d1445 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:59:20 +0200 Subject: Spare code cosmetics (2) --- module/plugins/accounts/LetitbitNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 6b538c1f0..811abd971 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -30,5 +30,5 @@ class LetitbitNet(Account): def login(self, user, data, req): - # API_KEY is the username and the PREMIUM_KEY is the password + #: 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")) -- cgit v1.2.3 From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/accounts/LetitbitNet.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 811abd971..6b8fcf960 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -7,23 +7,23 @@ from module.plugins.internal.Account import Account class LetitbitNet(Account): __name__ = "LetitbitNet" __type__ = "account" - __version__ = "0.03" + __version__ = "0.04" __description__ = """Letitbit.net account plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): ## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ## - # api_key = self.getAccountData(user)['password'] + # api_key = self.get_account_data(user)['password'] # json_data = [api_key, ['key/info']] # api_rep = self.load('http://api.letitbit.net/json', post={'r': json_dumps(json_data)}, req=req) - # self.logDebug("API Key Info: " + api_rep) + # self.log_debug("API Key Info: " + api_rep) # api_rep = json_loads(api_rep) # # if api_rep['status'] == 'FAIL': - # self.logWarning(api_rep['data']) + # self.log_warning(api_rep['data']) # return {'valid': False, 'premium': False} return {"premium": True} @@ -31,4 +31,4 @@ class LetitbitNet(Account): 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")) + self.log_info(_("You must use your API KEY as username and the PREMIUM KEY as password")) -- cgit v1.2.3 From d2e2b127651a5a44b56337eb6d9ca246c97a208a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 17 Jul 2015 03:03:26 +0200 Subject: Spare fixes and code cosmetics --- module/plugins/accounts/LetitbitNet.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 6b8fcf960..a26e895c4 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -18,7 +18,9 @@ class LetitbitNet(Account): ## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ## # api_key = self.get_account_data(user)['password'] # json_data = [api_key, ['key/info']] - # api_rep = self.load('http://api.letitbit.net/json', post={'r': json_dumps(json_data)}, req=req) + # api_rep = self.load("http://api.letitbit.net/json", + # post={'r': json_dumps(json_data)}, + # req=req) # self.log_debug("API Key Info: " + api_rep) # api_rep = json_loads(api_rep) # -- cgit v1.2.3 From 1f5a55ae2133a782bdcca334ecbcdbde50dbcf99 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 17 Jul 2015 15:29:48 +0200 Subject: No more need to use the req argument when call load method --- module/plugins/accounts/LetitbitNet.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index a26e895c4..4702648a3 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -19,8 +19,7 @@ class LetitbitNet(Account): # api_key = self.get_account_data(user)['password'] # json_data = [api_key, ['key/info']] # api_rep = self.load("http://api.letitbit.net/json", - # post={'r': json_dumps(json_data)}, - # req=req) + # post={'r': json_dumps(json_data)}) # self.log_debug("API Key Info: " + api_rep) # api_rep = json_loads(api_rep) # -- cgit v1.2.3 From dad722ac7255640e7e0541c4094a4d2e4de79cd3 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 00:05:58 +0200 Subject: Code cosmetics (2) --- module/plugins/accounts/LetitbitNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 4702648a3..45295d379 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -16,10 +16,10 @@ class LetitbitNet(Account): def load_account_info(self, user, req): ## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ## - # api_key = self.get_account_data(user)['password'] + # api_key = self.get_account_data(user)['password'] # json_data = [api_key, ['key/info']] - # api_rep = self.load("http://api.letitbit.net/json", - # post={'r': json_dumps(json_data)}) + # 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) # -- cgit v1.2.3 From ff9383bfe06d14d23bc0ed6af79aa8967965d078 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 10:59:52 +0200 Subject: Code cosmetics (3) --- module/plugins/accounts/LetitbitNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 45295d379..2424496f9 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -27,7 +27,7 @@ class LetitbitNet(Account): # self.log_warning(api_rep['data']) # return {'valid': False, 'premium': False} - return {"premium": True} + return {'premium': True} def login(self, user, data, req): -- cgit v1.2.3 From d38e830b7c0b3c6561a0072c74bbccb5fcdf4a61 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/accounts/LetitbitNet.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 2424496f9..f7bf077fb 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -8,6 +8,7 @@ class LetitbitNet(Account): __name__ = "LetitbitNet" __type__ = "account" __version__ = "0.04" + __status__ = "stable" __description__ = """Letitbit.net account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- module/plugins/accounts/LetitbitNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index f7bf077fb..492d2db77 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -8,7 +8,7 @@ class LetitbitNet(Account): __name__ = "LetitbitNet" __type__ = "account" __version__ = "0.04" - __status__ = "stable" + __status__ = "testing" __description__ = """Letitbit.net account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 761ca5c66e07559925ebbdbc6531f9ca658b12ce Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 16:11:58 +0200 Subject: Code cosmetics --- module/plugins/accounts/LetitbitNet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 492d2db77..c4265761a 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -24,7 +24,7 @@ class LetitbitNet(Account): # self.log_debug("API Key Info: " + api_rep) # api_rep = json_loads(api_rep) # - # if api_rep['status'] == 'FAIL': + # if api_rep['status'] == "FAIL": # self.log_warning(api_rep['data']) # return {'valid': False, 'premium': False} -- cgit v1.2.3 From 8f17f875f6e28f73ddb10da59c6464bd04922222 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Jul 2015 04:59:27 +0200 Subject: Account rewritten --- module/plugins/accounts/LetitbitNet.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index c4265761a..2d0e1b236 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -15,9 +15,9 @@ class LetitbitNet(Account): __authors__ = [("stickell", "l.stickell@yahoo.it")] - def load_account_info(self, user, req): + def parse_info(self, user, password, data, req): ## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ## - # api_key = self.get_account_data(user)['password'] + # api_key = self.get_data(user)['password'] # json_data = [api_key, ['key/info']] # api_rep = self.load("http://api.letitbit.net/json", # post={'r': json_dumps(json_data)}) @@ -31,6 +31,6 @@ class LetitbitNet(Account): return {'premium': True} - def login(self, user, data, req): + 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")) -- cgit v1.2.3 From a95c217627a1cb651b24e69f20640df40797aff9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Jul 2015 09:34:18 +0200 Subject: Account rewritten (2) --- module/plugins/accounts/LetitbitNet.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 2d0e1b236..1fc9b76ba 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -17,8 +17,7 @@ class LetitbitNet(Account): def parse_info(self, user, password, data, req): ## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ## - # api_key = self.get_data(user)['password'] - # json_data = [api_key, ['key/info']] + # 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) -- cgit v1.2.3