moved ICapDating.get_status() and ICapMessagesPost.get_status() into ICapAccount.get_account_status()
This commit is contained in:
parent
368ef37d5b
commit
c83c923e3d
8 changed files with 72 additions and 64 deletions
|
|
@ -32,8 +32,21 @@ class Account(CapBaseObject):
|
|||
self.add_field('password', basestring)
|
||||
self.add_field('properties', dict)
|
||||
|
||||
class StatusField(object):
|
||||
FIELD_TEXT = 0x001 # the value is a long text
|
||||
FIELD_HTML = 0x002 # the value is HTML formated
|
||||
|
||||
def __init__(self, key, label, value, flags=0):
|
||||
self.key = key
|
||||
self.label = label
|
||||
self.value = value
|
||||
self.flags = flags
|
||||
|
||||
|
||||
class ICapAccount(IBaseCap):
|
||||
ACCOUNT_REGISTER_PROPERTIES = []
|
||||
# This class constant may be a list of Value* objects. If the value remains
|
||||
# None, weboob considers that register_account() isn't supported.
|
||||
ACCOUNT_REGISTER_PROPERTIES = None
|
||||
|
||||
@staticmethod
|
||||
def register_account(account):
|
||||
|
|
@ -64,3 +77,11 @@ class ICapAccount(IBaseCap):
|
|||
Update the current account.
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def get_account_status(self):
|
||||
"""
|
||||
Get status of the current account.
|
||||
|
||||
@return a list of fields
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
|
|
|||
|
|
@ -45,24 +45,7 @@ class Optimization(object):
|
|||
def set_config(self, params):
|
||||
raise NotImplementedError()
|
||||
|
||||
class StatusField(object):
|
||||
FIELD_TEXT = 0x001 # the value is a long text
|
||||
FIELD_HTML = 0x002 # the value is HTML formated
|
||||
|
||||
def __init__(self, key, label, value, flags=0):
|
||||
self.key = key
|
||||
self.label = label
|
||||
self.value = value
|
||||
self.flags = flags
|
||||
|
||||
|
||||
class ICapDating(IBaseCap):
|
||||
def get_status(self):
|
||||
"""
|
||||
Get a list of fields
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def init_optimizations(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
|
|
|
|||
|
|
@ -117,13 +117,6 @@ class Thread(CapBaseObject):
|
|||
yield m
|
||||
|
||||
|
||||
class StatusField(object):
|
||||
def __init__(self, key, label, value):
|
||||
self.key = key
|
||||
self.label = label
|
||||
self.value = value
|
||||
|
||||
|
||||
class ICapMessages(IBaseCap):
|
||||
def iter_threads(self):
|
||||
"""
|
||||
|
|
@ -162,12 +155,6 @@ class CantSendMessage(Exception):
|
|||
pass
|
||||
|
||||
class ICapMessagesPost(IBaseCap):
|
||||
def get_status(self):
|
||||
"""
|
||||
Get a list of fields
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
def post_message(self, message):
|
||||
"""
|
||||
Post a message.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue