mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-01 22:11:16 +00:00
Corrects activitypub fields to camelcase in Book
This commit is contained in:
parent
1df5b2d481
commit
69a6644011
2 changed files with 29 additions and 29 deletions
|
@ -7,23 +7,23 @@ from .base_activity import ActivityObject, Image
|
||||||
@dataclass(init=False)
|
@dataclass(init=False)
|
||||||
class Book(ActivityObject):
|
class Book(ActivityObject):
|
||||||
''' serializes an edition or work, abstract '''
|
''' serializes an edition or work, abstract '''
|
||||||
authors: List[str]
|
|
||||||
first_published_date: str
|
|
||||||
published_date: str
|
|
||||||
|
|
||||||
title: str
|
title: str
|
||||||
sort_title: str
|
sortTitle: str = ''
|
||||||
subtitle: str
|
subtitle: str = ''
|
||||||
description: str
|
description: str = ''
|
||||||
languages: List[str]
|
languages: List[str]
|
||||||
series: str
|
series: str = ''
|
||||||
series_number: str
|
seriesNumber: str = ''
|
||||||
subjects: List[str]
|
subjects: List[str]
|
||||||
subject_places: List[str]
|
subjectPlaces: List[str]
|
||||||
|
|
||||||
openlibrary_key: str
|
authors: List[str]
|
||||||
librarything_key: str
|
firstPublishedDate: str = ''
|
||||||
goodreads_key: str
|
publishedDate: str = ''
|
||||||
|
|
||||||
|
openlibraryKey: str = ''
|
||||||
|
librarythingKey: str = ''
|
||||||
|
goodreadsKey: str = ''
|
||||||
|
|
||||||
attachment: List[Image] = field(default_factory=lambda: [])
|
attachment: List[Image] = field(default_factory=lambda: [])
|
||||||
type: str = 'Book'
|
type: str = 'Book'
|
||||||
|
@ -32,12 +32,12 @@ class Book(ActivityObject):
|
||||||
@dataclass(init=False)
|
@dataclass(init=False)
|
||||||
class Edition(Book):
|
class Edition(Book):
|
||||||
''' Edition instance of a book object '''
|
''' Edition instance of a book object '''
|
||||||
isbn_10: str
|
isbn10: str
|
||||||
isbn_13: str
|
isbn13: str
|
||||||
oclc_number: str
|
oclcNumber: str
|
||||||
asin: str
|
asin: str
|
||||||
pages: str
|
pages: str
|
||||||
physical_format: str
|
physicalFormat: str
|
||||||
publishers: List[str]
|
publishers: List[str]
|
||||||
|
|
||||||
work: str
|
work: str
|
||||||
|
|
|
@ -70,30 +70,30 @@ class Book(ActivitypubMixin, BookWyrmModel):
|
||||||
ActivityMapping('id', 'remote_id'),
|
ActivityMapping('id', 'remote_id'),
|
||||||
|
|
||||||
ActivityMapping('authors', 'ap_authors'),
|
ActivityMapping('authors', 'ap_authors'),
|
||||||
ActivityMapping('first_published_date', 'first_published_date'),
|
ActivityMapping('firstPublishedDate', 'firstpublished_date'),
|
||||||
ActivityMapping('published_date', 'published_date'),
|
ActivityMapping('publishedDate', 'published_date'),
|
||||||
|
|
||||||
ActivityMapping('title', 'title'),
|
ActivityMapping('title', 'title'),
|
||||||
ActivityMapping('sort_title', 'sort_title'),
|
ActivityMapping('sortTitle', 'sort_title'),
|
||||||
ActivityMapping('subtitle', 'subtitle'),
|
ActivityMapping('subtitle', 'subtitle'),
|
||||||
ActivityMapping('description', 'description'),
|
ActivityMapping('description', 'description'),
|
||||||
ActivityMapping('languages', 'languages'),
|
ActivityMapping('languages', 'languages'),
|
||||||
ActivityMapping('series', 'series'),
|
ActivityMapping('series', 'series'),
|
||||||
ActivityMapping('series_number', 'series_number'),
|
ActivityMapping('seriesNumber', 'series_number'),
|
||||||
ActivityMapping('subjects', 'subjects'),
|
ActivityMapping('subjects', 'subjects'),
|
||||||
ActivityMapping('subject_places', 'subject_places'),
|
ActivityMapping('subjectPlaces', 'subject_places'),
|
||||||
|
|
||||||
ActivityMapping('openlibrary_key', 'openlibrary_key'),
|
ActivityMapping('openlibraryKey', 'openlibrary_key'),
|
||||||
ActivityMapping('librarything_key', 'librarything_key'),
|
ActivityMapping('librarythingKey', 'librarything_key'),
|
||||||
ActivityMapping('goodreads_key', 'goodreads_key'),
|
ActivityMapping('goodreadsKey', 'goodreads_key'),
|
||||||
|
|
||||||
ActivityMapping('work', 'ap_parent_work'),
|
ActivityMapping('work', 'ap_parent_work'),
|
||||||
ActivityMapping('isbn_10', 'isbn_10'),
|
ActivityMapping('isbn10', 'isbn_10'),
|
||||||
ActivityMapping('isbn_13', 'isbn_13'),
|
ActivityMapping('isbn13', 'isbn_13'),
|
||||||
ActivityMapping('oclc_number', 'oclc_number'),
|
ActivityMapping('oclcNumber', 'oclc_number'),
|
||||||
ActivityMapping('asin', 'asin'),
|
ActivityMapping('asin', 'asin'),
|
||||||
ActivityMapping('pages', 'pages'),
|
ActivityMapping('pages', 'pages'),
|
||||||
ActivityMapping('physical_format', 'physical_format'),
|
ActivityMapping('physicalFormat', 'physical_format'),
|
||||||
ActivityMapping('publishers', 'publishers'),
|
ActivityMapping('publishers', 'publishers'),
|
||||||
|
|
||||||
ActivityMapping('lccn', 'lccn'),
|
ActivityMapping('lccn', 'lccn'),
|
||||||
|
|
Loading…
Reference in a new issue