Get more data out of openlibrary
This commit is contained in:
parent
5c475e448a
commit
51e7a50b86
5 changed files with 143 additions and 28 deletions
|
@ -26,6 +26,15 @@ class AbstractConnector(ABC):
|
|||
return False
|
||||
return True
|
||||
|
||||
|
||||
def has_attr(self, obj, key):
|
||||
''' helper function to check if a model object has a key '''
|
||||
try:
|
||||
return hasattr(obj, key)
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
|
||||
@abstractmethod
|
||||
def search(self, query):
|
||||
''' free text search '''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue