Adds generalized book data connectors

This commit is contained in:
Mouse Reeve
2020-03-07 12:22:28 -08:00
parent d501e707ee
commit 6f765bd6f4
11 changed files with 249 additions and 144 deletions

View File

@ -0,0 +1,11 @@
''' select and call a connector for whatever book task needs doing '''
from fedireads.connectors import OpenLibraryConnector
openlibrary = OpenLibraryConnector()
def get_or_create_book(key):
''' pull up a book record by whatever means possible '''
return openlibrary.get_or_create_book(key)
def search(query):
''' ya '''
return openlibrary.search(query)