-class Kamaki:
- __init__(self, account, token):
- self.username = username
+class Kamaki(object):
+
+ @staticmethod
+ def get_account():
+ config = Config()
+ return config.get('store', 'account') or \
+ config.get('global', 'account')
+
+ @staticmethod
+ def get_token():
+ config = Config()
+ return config.get('global', 'token')
+
+ @staticmethod
+ def save_account(account):
+ config = Config()
+ config.set('store', 'account', account)
+ config.write()
+
+ @staticmethod
+ def save_token(token):
+ config = Config()
+ config.set('global', 'token', token)
+ config.write()
+
+ def __init__(self, account, token, output):
+ self.account = account