diff --git a/weboob/backends/aum/backend.py b/weboob/backends/aum/backend.py index d3ae6e4f..a19a9330 100644 --- a/weboob/backends/aum/backend.py +++ b/weboob/backends/aum/backend.py @@ -69,6 +69,7 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh STORAGE = {'profiles_walker': {'viewed': []}, 'queries_queue': {'queue': []}, 'sluts': {}, + 'notes': {}, } BROWSER = AuMBrowser @@ -437,6 +438,21 @@ class AuMBackend(BaseBackend, ICapMessages, ICapMessagesPost, ICapDating, ICapCh if not self.browser.send_charm(id): raise QueryError('No enough charms available') return Query(id, 'A charm has been sent') + + def get_notes(self, id): + if isinstance(id, Contact): + id = id.id + + return self.storage.get('notes', id) + + def save_notes(self, id, notes): + if isinstance(id, Contact): + id = id.id + + self.storage.set('notes', id, notes) + self.storage.save() + + # ---- ICapChat methods --------------------- diff --git a/weboob/capabilities/contact.py b/weboob/capabilities/contact.py index a392cbdd..d15baae24 100644 --- a/weboob/capabilities/contact.py +++ b/weboob/capabilities/contact.py @@ -129,3 +129,21 @@ class ICapContact(IBaseCap): @except QueryError """ raise NotImplementedError() + + def get_notes(self, id): + """ + Get personal notes about a contact + + @param id the ID of the contact + @return a unicode object + """ + raise NotImplementedError + + def save_notes(self, id, notes): + """ + Set personal notes about a contact + + @param id the ID of the contact + @param notes the unicode object to save as notes + """ + raise NotImplementedError