From 7b8c458cca7d21a029620f98e453f746fce69cd1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 14 Jul 2014 16:10:01 +0200 Subject: Prefer single quote for dict key name --- 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 e37c860a6..e4601ccbb 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -29,7 +29,7 @@ class LetitbitNet(Account): def loadAccountInfo(self, user, req): ## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ## # api_key = self.accounts[user]['password'] - # json_data = [api_key, ["key/info"]] + # 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) # api_rep = json_loads(api_rep) -- cgit v1.2.3 From 8e47b0de30a25d0fd5dfb518bfe4e1e7beff93fd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 15 Jul 2014 16:27:44 +0200 Subject: Key attributes cleanup for account, container and crypter plugins --- module/plugins/accounts/LetitbitNet.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index e4601ccbb..3bd096d55 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -22,10 +22,12 @@ class LetitbitNet(Account): __name__ = "LetitbitNet" __version__ = "0.01" __type__ = "account" + __description__ = """Letitbit.net account plugin""" __author_name__ = "stickell" __author_mail__ = "l.stickell@yahoo.it" + def loadAccountInfo(self, user, req): ## DISABLED BECAUSE IT GET 'key exausted' EVEN IF VALID ## # api_key = self.accounts[user]['password'] -- cgit v1.2.3 From ba916633f2bedb04c7358000b91aed69f52e8e43 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 Aug 2014 19:35:59 +0200 Subject: Remove trailing whitespaces + remove license headers + import urllib methods directly + sort and fix key attributes + use save_join instead join + sort some import declarations + other minor code cosmetics --- module/plugins/accounts/LetitbitNet.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 3bd096d55..c849f9d2d 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -1,18 +1,4 @@ # -*- coding: utf-8 -*- -############################################################################ -# This program is free software: you can redistribute it and/or modify # -# it under the terms of the GNU Affero General Public License as # -# published by the Free Software Foundation, either version 3 of the # -# License, or (at your option) any later version. # -# # -# This program is distributed in the hope that it will be useful, # -# but WITHOUT ANY WARRANTY; without even the implied warranty of # -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # -# GNU Affero General Public License for more details. # -# # -# You should have received a copy of the GNU Affero General Public License # -# along with this program. If not, see . # -############################################################################ from module.plugins.Account import Account # from module.common.json_layer import json_loads, json_dumps @@ -20,8 +6,8 @@ from module.plugins.Account import Account class LetitbitNet(Account): __name__ = "LetitbitNet" - __version__ = "0.01" __type__ = "account" + __version__ = "0.01" __description__ = """Letitbit.net account plugin""" __author_name__ = "stickell" -- cgit v1.2.3 From 0d220d634e512d89bda540f91c643b361c82ea8a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 27 Sep 2014 01:38:32 +0200 Subject: Logging string cosmetics --- 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 c849f9d2d..b3f9fb532 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -19,7 +19,7 @@ class LetitbitNet(Account): # api_key = self.accounts[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) + # self.logDebug("API Key Info: " + api_rep) # api_rep = json_loads(api_rep) # # if api_rep['status'] == 'FAIL': @@ -30,4 +30,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.logInfo("You must use your API KEY as username and the PREMIUM KEY as password.") -- cgit v1.2.3 From b0868ae6446078bacf1635dde5e4ab316b4a94cb Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Oct 2014 18:57:59 +0200 Subject: New __authors__ key replaces __author_name__ and __author_mail__ + Whitespaces and EOF fixup --- 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 b3f9fb532..c0441460b 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -10,8 +10,7 @@ class LetitbitNet(Account): __version__ = "0.01" __description__ = """Letitbit.net account plugin""" - __author_name__ = "stickell" - __author_mail__ = "l.stickell@yahoo.it" + __authors__ = [("stickell", "l.stickell@yahoo.it")] def loadAccountInfo(self, user, req): -- cgit v1.2.3 From ae7a7e66981456e5bbe2b54006d79b6f907be7a4 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 8 Oct 2014 20:18:13 +0200 Subject: Add __license__ key attribute to plugins --- 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 c0441460b..ca6360068 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -10,6 +10,7 @@ class LetitbitNet(Account): __version__ = "0.01" __description__ = """Letitbit.net account plugin""" + __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] -- cgit v1.2.3 From 6a0fb7fdd4ea2749be44625225d8a235a78f032f Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 11 Oct 2014 15:42:39 +0200 Subject: [accounts] Code cosmetics --- 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 ca6360068..fba599078 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -28,6 +28,7 @@ class LetitbitNet(Account): 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.") -- cgit v1.2.3 From 9f2ebe486a3e155fb6a60e07cccb77ab6a772eb2 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 26 Oct 2014 02:31:54 +0200 Subject: Extend translation support in plugins + a lot of code cosmetics and typo fixes --- 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 fba599078..3ca9e44da 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -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.logInfo(_("You must use your API KEY as username and the PREMIUM KEY as password")) -- cgit v1.2.3 From 34984dae733c3f3d47b41a0acfba3724d53c65a1 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 28 Oct 2014 16:52:10 +0100 Subject: Code cosmetics: plugin class attributes --- module/plugins/accounts/LetitbitNet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/LetitbitNet.py') diff --git a/module/plugins/accounts/LetitbitNet.py b/module/plugins/accounts/LetitbitNet.py index 3ca9e44da..b8244a06d 100644 --- a/module/plugins/accounts/LetitbitNet.py +++ b/module/plugins/accounts/LetitbitNet.py @@ -5,13 +5,13 @@ from module.plugins.Account import Account class LetitbitNet(Account): - __name__ = "LetitbitNet" - __type__ = "account" + __name__ = "LetitbitNet" + __type__ = "account" __version__ = "0.01" __description__ = """Letitbit.net account plugin""" - __license__ = "GPLv3" - __authors__ = [("stickell", "l.stickell@yahoo.it")] + __license__ = "GPLv3" + __authors__ = [("stickell", "l.stickell@yahoo.it")] def loadAccountInfo(self, user, req): -- cgit v1.2.3