mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-20 15:17:06 +00:00
Tidy up self connector
This commit is contained in:
parent
7220a17840
commit
2a98093ebe
2 changed files with 12 additions and 14 deletions
|
@ -9,8 +9,7 @@ import requests
|
|||
|
||||
from fedireads import models
|
||||
from .abstract_connector import AbstractConnector, SearchResult
|
||||
from .abstract_connector import get_date, get_data
|
||||
from .abstract_connector import match_from_mappings, update_from_mappings
|
||||
from .abstract_connector import update_from_mappings, get_date, get_data
|
||||
|
||||
|
||||
class Connector(AbstractConnector):
|
||||
|
@ -97,7 +96,6 @@ class Connector(AbstractConnector):
|
|||
return [image_name, image_content]
|
||||
|
||||
|
||||
|
||||
def get_authors_from_data(self, data):
|
||||
authors = []
|
||||
|
||||
|
@ -128,6 +126,7 @@ class Connector(AbstractConnector):
|
|||
|
||||
|
||||
def expand_book_data(self, book):
|
||||
# TODO
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
@ -39,16 +39,6 @@ class Connector(AbstractConnector):
|
|||
return search_results
|
||||
|
||||
|
||||
def get_authors_from_data(self, data):
|
||||
return None
|
||||
|
||||
def get_cover_from_data(self, data):
|
||||
return None
|
||||
|
||||
def parse_search_data(self, data):
|
||||
return data
|
||||
|
||||
|
||||
def format_search_result(self, book):
|
||||
return SearchResult(
|
||||
book.title,
|
||||
|
@ -77,9 +67,18 @@ class Connector(AbstractConnector):
|
|||
pass
|
||||
|
||||
|
||||
def parse_search_data(self, data):
|
||||
''' it's already in the right format, don't even worry about it '''
|
||||
return data
|
||||
|
||||
def get_authors_from_data(self, data):
|
||||
return None
|
||||
|
||||
def get_cover_from_data(self, data):
|
||||
return None
|
||||
|
||||
def update_book(self, book_obj, data=None):
|
||||
pass
|
||||
|
||||
|
||||
def expand_book_data(self, book):
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue