diff --git a/weboob/applications/boobooks/boobooks.py b/weboob/applications/boobooks/boobooks.py index 0a44ed77..b28e895c 100644 --- a/weboob/applications/boobooks/boobooks.py +++ b/weboob/applications/boobooks/boobooks.py @@ -64,3 +64,18 @@ class Boobooks(ReplApplication): } COLLECTION_OBJECTS = (Book, ) + + def do_renew(self, id): + """ + renew ID + + Renew a book + """ + + id, backend_name = self.parse_id(id) + if not id: + print >>sys.stderr, 'Error: please give a book ID (hint: use ls command)' + return 2 + names = (backend_name,) if backend_name is not None else None + + self.do('renew_book', id, backends=names) diff --git a/weboob/capabilities/library.py b/weboob/capabilities/library.py index 21cf3ace..2f1b1ed7 100644 --- a/weboob/capabilities/library.py +++ b/weboob/capabilities/library.py @@ -52,6 +52,9 @@ class ICapBook(ICapCollection): def get_booked(self, _id): raise NotImplementedError() + def renew_book(self, _id): + raise NotImplementedError() + def get_rented(self, _id): raise NotImplementedError()