mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-12 12:21:34 +00:00
Cleaned up BookMetadata schema
This commit is contained in:
parent
cc4bc4c2d2
commit
ad528681b7
2 changed files with 272 additions and 505 deletions
|
|
@ -3425,7 +3425,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bookMetadata": {
|
"bookMetadataBase": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"title": {
|
"title": {
|
||||||
|
|
@ -3443,28 +3443,6 @@
|
||||||
"null"
|
"null"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"authors": {
|
|
||||||
"description": "The authors of the book.",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/authorMinified"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"narrators": {
|
|
||||||
"description": "The narrators of the audiobook.",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "Sam Tsoutsouvas"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"series": {
|
|
||||||
"description": "The series the book belongs to.",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/seriesSequence"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"genres": {
|
"genres": {
|
||||||
"description": "The genres of the book.",
|
"description": "The genres of the book.",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
|
|
@ -3533,247 +3511,139 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"bookMetadata": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "The metadata for a book in the database.",
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/bookMetadataBase"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"authors": {
|
||||||
|
"description": "The authors of the book.",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/authorMinified"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"narrators": {
|
||||||
|
"description": "The narrators of the audiobook.",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Sam Tsoutsouvas"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"series": {
|
||||||
|
"description": "The series the book belongs to.",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/seriesSequence"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"bookMetadataMinified": {
|
"bookMetadataMinified": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"description": "The minified metadata for a book in the database.",
|
||||||
"title": {
|
"allOf": [
|
||||||
"description": "The title of the book. Will be null if unknown.",
|
{
|
||||||
"type": [
|
"$ref": "#/components/schemas/bookMetadataBase"
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
],
|
|
||||||
"example": "Wizards First Rule"
|
|
||||||
},
|
},
|
||||||
"titleIgnorePrefix": {
|
{
|
||||||
"description": "The title of the book with any prefix moved to the end.",
|
"type": "object",
|
||||||
"type": "string"
|
"properties": {
|
||||||
},
|
"titleIgnorePrefix": {
|
||||||
"subtitle": {
|
"description": "The title of the book with any prefix moved to the end.",
|
||||||
"description": "The subtitle of the book. Will be null if there is no subtitle.",
|
"type": "string"
|
||||||
"type": [
|
},
|
||||||
"string",
|
"authorName": {
|
||||||
"null"
|
"description": "The name of the book's author(s).",
|
||||||
]
|
"type": "string",
|
||||||
},
|
"example": "Terry Goodkind"
|
||||||
"authorName": {
|
},
|
||||||
"description": "The name of the book's author(s).",
|
"authorNameLF": {
|
||||||
"type": "string",
|
"description": "The name of the book's author(s) with last names first.",
|
||||||
"example": "Terry Goodkind"
|
"type": "string",
|
||||||
},
|
"example": "Goodkind, Terry"
|
||||||
"authorNameLF": {
|
},
|
||||||
"description": "The name of the book's author(s) with last names first.",
|
"narratorName": {
|
||||||
"type": "string",
|
"description": "The name of the audiobook's narrator(s).",
|
||||||
"example": "Goodkind, Terry"
|
"type": "string",
|
||||||
},
|
"example": "Sam Tsoutsouvas"
|
||||||
"narratorName": {
|
},
|
||||||
"description": "The name of the audiobook's narrator(s).",
|
"seriesName": {
|
||||||
"type": "string",
|
"description": "The name of the book's series.",
|
||||||
"example": "Sam Tsoutsouvas"
|
"type": "string",
|
||||||
},
|
"example": "Sword of Truth"
|
||||||
"seriesName": {
|
}
|
||||||
"description": "The name of the book's series.",
|
|
||||||
"type": "string",
|
|
||||||
"example": "Sword of Truth"
|
|
||||||
},
|
|
||||||
"genres": {
|
|
||||||
"description": "The genres of the book.",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "Fantasy"
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"publishedYear": {
|
|
||||||
"description": "The year the book was published. Will be null if unknown.",
|
|
||||||
"type": [
|
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
],
|
|
||||||
"example": "2008"
|
|
||||||
},
|
|
||||||
"publishedDate": {
|
|
||||||
"description": "The date the book was published. Will be null if unknown.",
|
|
||||||
"type": [
|
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"publisher": {
|
|
||||||
"description": "The publisher of the book. Will be null if unknown.",
|
|
||||||
"type": [
|
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
],
|
|
||||||
"example": "Brilliance Audio"
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"description": "A description for the book. Will be null if empty.",
|
|
||||||
"type": [
|
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
],
|
|
||||||
"example": "The masterpiece that started Terry Goodkind's New York Times bestselling epic Sword of Truth In the aftermath of the brutal murder of his father, a mysterious woman, Kahlan Amnell, appears in Richard Cypher's forest sanctuary seeking help...and more. His world, his very beliefs, are shattered when ancient debts come due with thundering violence. In a dark age it takes courage to live, and more than mere courage to challenge those who hold dominion, Richard and Kahlan must take up that challenge or become the next victims. Beyond awaits a bewitching land where even the best of their hearts could betray them. Yet, Richard fears nothing so much as what secrets his sword might reveal about his own soul. Falling in love would destroy them - for reasons Richard can't imagine and Kahlan dare not say. In their darkest hour, hunted relentlessly, tormented by treachery and loss, Kahlan calls upon Richard to reach beyond his sword - to invoke within himself something more noble. Neither knows that the rules of battle have just changed...or that their time has run out. Wizard's First Rule is the beginning. One book. One Rule. Witness the birth of a legend."
|
|
||||||
},
|
|
||||||
"isbn": {
|
|
||||||
"description": "The ISBN of the book. Will be null if unknown.",
|
|
||||||
"type": [
|
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"asin": {
|
|
||||||
"description": "The ASIN of the book. Will be null if unknown.",
|
|
||||||
"type": [
|
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
],
|
|
||||||
"example": "B002V0QK4C"
|
|
||||||
},
|
|
||||||
"language": {
|
|
||||||
"description": "The language of the book. Will be null if unknown.",
|
|
||||||
"type": [
|
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"explicit": {
|
|
||||||
"description": "Whether the book has been marked as explicit.",
|
|
||||||
"type": "boolean",
|
|
||||||
"example": false
|
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
},
|
},
|
||||||
"bookMetadataExpanded": {
|
"bookMetadataExpanded": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"description": "The expanded metadata for a book in the database.",
|
||||||
"title": {
|
"allOf": [
|
||||||
"description": "The title of the book. Will be null if unknown.",
|
{
|
||||||
"type": [
|
"$ref": "#/components/schemas/bookMetadataBase"
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
],
|
|
||||||
"example": "Wizards First Rule"
|
|
||||||
},
|
},
|
||||||
"titleIgnorePrefix": {
|
{
|
||||||
"description": "The title of the book with any prefix moved to the end.",
|
"type": "object",
|
||||||
"type": "string"
|
"properties": {
|
||||||
},
|
"titleIgnorePrefix": {
|
||||||
"subtitle": {
|
"description": "The title of the book with any prefix moved to the end.",
|
||||||
"description": "The subtitle of the book. Will be null if there is no subtitle.",
|
"type": "string"
|
||||||
"type": [
|
},
|
||||||
"string",
|
"authorName": {
|
||||||
"null"
|
"description": "The name of the book's author(s).",
|
||||||
]
|
"type": "string",
|
||||||
},
|
"example": "Terry Goodkind"
|
||||||
"authorName": {
|
},
|
||||||
"description": "The name of the book's author(s).",
|
"authorNameLF": {
|
||||||
"type": "string",
|
"description": "The name of the book's author(s) with last names first.",
|
||||||
"example": "Terry Goodkind"
|
"type": "string",
|
||||||
},
|
"example": "Goodkind, Terry"
|
||||||
"authorNameLF": {
|
},
|
||||||
"description": "The name of the book's author(s) with last names first.",
|
"narratorName": {
|
||||||
"type": "string",
|
"description": "The name of the audiobook's narrator(s).",
|
||||||
"example": "Goodkind, Terry"
|
"type": "string",
|
||||||
},
|
"example": "Sam Tsoutsouvas"
|
||||||
"narratorName": {
|
},
|
||||||
"description": "The name of the audiobook's narrator(s).",
|
"seriesName": {
|
||||||
"type": "string",
|
"description": "The name of the book's series.",
|
||||||
"example": "Sam Tsoutsouvas"
|
"type": "string",
|
||||||
},
|
"example": "Sword of Truth"
|
||||||
"seriesName": {
|
},
|
||||||
"description": "The name of the book's series.",
|
"authors": {
|
||||||
"type": "string",
|
"description": "The authors of the book.",
|
||||||
"example": "Sword of Truth"
|
"type": "array",
|
||||||
},
|
"items": {
|
||||||
"authors": {
|
"$ref": "#/components/schemas/authorMinified"
|
||||||
"description": "The authors of the book.",
|
}
|
||||||
"type": "array",
|
},
|
||||||
"items": {
|
"narrators": {
|
||||||
"$ref": "#/components/schemas/authorMinified"
|
"description": "The narrators of the audiobook.",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string",
|
||||||
|
"example": "Sam Tsoutsouvas"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"series": {
|
||||||
|
"description": "The series the book belongs to.",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/seriesSequence"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"narrators": {
|
|
||||||
"description": "The narrators of the audiobook.",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "Sam Tsoutsouvas"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"series": {
|
|
||||||
"description": "The series the book belongs to.",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"$ref": "#/components/schemas/seriesSequence"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"genres": {
|
|
||||||
"description": "The genres of the book.",
|
|
||||||
"type": "array",
|
|
||||||
"items": {
|
|
||||||
"type": "string",
|
|
||||||
"example": "Fantasy"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"publishedYear": {
|
|
||||||
"description": "The year the book was published. Will be null if unknown.",
|
|
||||||
"type": [
|
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
],
|
|
||||||
"example": "2008"
|
|
||||||
},
|
|
||||||
"publishedDate": {
|
|
||||||
"description": "The date the book was published. Will be null if unknown.",
|
|
||||||
"type": [
|
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"publisher": {
|
|
||||||
"description": "The publisher of the book. Will be null if unknown.",
|
|
||||||
"type": [
|
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
],
|
|
||||||
"example": "Brilliance Audio"
|
|
||||||
},
|
|
||||||
"description": {
|
|
||||||
"description": "A description for the book. Will be null if empty.",
|
|
||||||
"type": [
|
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
],
|
|
||||||
"example": "The masterpiece that started Terry Goodkind's New York Times bestselling epic Sword of Truth In the aftermath of the brutal murder of his father, a mysterious woman, Kahlan Amnell, appears in Richard Cypher's forest sanctuary seeking help...and more. His world, his very beliefs, are shattered when ancient debts come due with thundering violence. In a dark age it takes courage to live, and more than mere courage to challenge those who hold dominion, Richard and Kahlan must take up that challenge or become the next victims. Beyond awaits a bewitching land where even the best of their hearts could betray them. Yet, Richard fears nothing so much as what secrets his sword might reveal about his own soul. Falling in love would destroy them - for reasons Richard can't imagine and Kahlan dare not say. In their darkest hour, hunted relentlessly, tormented by treachery and loss, Kahlan calls upon Richard to reach beyond his sword - to invoke within himself something more noble. Neither knows that the rules of battle have just changed...or that their time has run out. Wizard's First Rule is the beginning. One book. One Rule. Witness the birth of a legend."
|
|
||||||
},
|
|
||||||
"isbn": {
|
|
||||||
"description": "The ISBN of the book. Will be null if unknown.",
|
|
||||||
"type": [
|
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"asin": {
|
|
||||||
"description": "The ASIN of the book. Will be null if unknown.",
|
|
||||||
"type": [
|
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
],
|
|
||||||
"example": "B002V0QK4C"
|
|
||||||
},
|
|
||||||
"language": {
|
|
||||||
"description": "The language of the book. Will be null if unknown.",
|
|
||||||
"type": [
|
|
||||||
"string",
|
|
||||||
"null"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"explicit": {
|
|
||||||
"description": "Whether the book has been marked as explicit.",
|
|
||||||
"type": "boolean",
|
|
||||||
"example": false
|
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
},
|
},
|
||||||
"bookChapter": {
|
"bookChapter": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
@ -3796,7 +3666,7 @@
|
||||||
"title": {
|
"title": {
|
||||||
"description": "The title of the chapter.",
|
"description": "The title of the chapter.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"example": "Wizards First Rule 01"
|
"example": "Wizards First Rule 01 Chapter 1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -6,262 +6,159 @@ const parseNameString = require('../../utils/parsers/parseNameString')
|
||||||
* @openapi
|
* @openapi
|
||||||
* components:
|
* components:
|
||||||
* schemas:
|
* schemas:
|
||||||
|
* bookMetadataBase:
|
||||||
|
* type: object
|
||||||
|
* properties:
|
||||||
|
* title:
|
||||||
|
* description: The title of the book. Will be null if unknown.
|
||||||
|
* type: [string, 'null']
|
||||||
|
* example: Wizards First Rule
|
||||||
|
* subtitle:
|
||||||
|
* description: The subtitle of the book. Will be null if there is no subtitle.
|
||||||
|
* type: [string, 'null']
|
||||||
|
* genres:
|
||||||
|
* description: The genres of the book.
|
||||||
|
* type: array
|
||||||
|
* items:
|
||||||
|
* type: string
|
||||||
|
* example: Fantasy
|
||||||
|
* publishedYear:
|
||||||
|
* description: The year the book was published. Will be null if unknown.
|
||||||
|
* type: [string, 'null']
|
||||||
|
* example: '2008'
|
||||||
|
* publishedDate:
|
||||||
|
* description: The date the book was published. Will be null if unknown.
|
||||||
|
* type: [string, 'null']
|
||||||
|
* publisher:
|
||||||
|
* description: The publisher of the book. Will be null if unknown.
|
||||||
|
* type: [string, 'null']
|
||||||
|
* example: Brilliance Audio
|
||||||
|
* description:
|
||||||
|
* description: A description for the book. Will be null if empty.
|
||||||
|
* type: [string, 'null']
|
||||||
|
* example: >-
|
||||||
|
* The masterpiece that started Terry Goodkind's New York Times bestselling
|
||||||
|
* epic Sword of Truth In the aftermath of the brutal murder of his father,
|
||||||
|
* a mysterious woman, Kahlan Amnell, appears in Richard Cypher's forest
|
||||||
|
* sanctuary seeking help...and more. His world, his very beliefs, are
|
||||||
|
* shattered when ancient debts come due with thundering violence. In a
|
||||||
|
* dark age it takes courage to live, and more than mere courage to
|
||||||
|
* challenge those who hold dominion, Richard and Kahlan must take up that
|
||||||
|
* challenge or become the next victims. Beyond awaits a bewitching land
|
||||||
|
* where even the best of their hearts could betray them. Yet, Richard
|
||||||
|
* fears nothing so much as what secrets his sword might reveal about his
|
||||||
|
* own soul. Falling in love would destroy them - for reasons Richard can't
|
||||||
|
* imagine and Kahlan dare not say. In their darkest hour, hunted
|
||||||
|
* relentlessly, tormented by treachery and loss, Kahlan calls upon Richard
|
||||||
|
* to reach beyond his sword - to invoke within himself something more
|
||||||
|
* noble. Neither knows that the rules of battle have just changed...or
|
||||||
|
* that their time has run out. Wizard's First Rule is the beginning. One
|
||||||
|
* book. One Rule. Witness the birth of a legend.
|
||||||
|
* isbn:
|
||||||
|
* description: The ISBN of the book. Will be null if unknown.
|
||||||
|
* type: [string, 'null']
|
||||||
|
* asin:
|
||||||
|
* description: The ASIN of the book. Will be null if unknown.
|
||||||
|
* type: [string, 'null']
|
||||||
|
* example: B002V0QK4C
|
||||||
|
* language:
|
||||||
|
* description: The language of the book. Will be null if unknown.
|
||||||
|
* type: [string, 'null']
|
||||||
|
* explicit:
|
||||||
|
* description: Whether the book has been marked as explicit.
|
||||||
|
* type: boolean
|
||||||
|
* example: false
|
||||||
* bookMetadata:
|
* bookMetadata:
|
||||||
* type: object
|
* type: object
|
||||||
* properties:
|
* description: The metadata for a book in the database.
|
||||||
* title:
|
* allOf:
|
||||||
* description: The title of the book. Will be null if unknown.
|
* - $ref : '#/components/schemas/bookMetadataBase'
|
||||||
* type: [string, 'null']
|
* - type: object
|
||||||
* example: Wizards First Rule
|
* properties:
|
||||||
* subtitle:
|
* authors:
|
||||||
* description: The subtitle of the book. Will be null if there is no subtitle.
|
* description: The authors of the book.
|
||||||
* type: [string, 'null']
|
* type: array
|
||||||
* authors:
|
* items:
|
||||||
* description: The authors of the book.
|
* $ref: '#/components/schemas/authorMinified'
|
||||||
* type: array
|
* narrators:
|
||||||
* items:
|
* description: The narrators of the audiobook.
|
||||||
* $ref: '#/components/schemas/authorMinified'
|
* type: array
|
||||||
* narrators:
|
* items:
|
||||||
* description: The narrators of the audiobook.
|
* type: string
|
||||||
* type: array
|
* example: Sam Tsoutsouvas
|
||||||
* items:
|
* series:
|
||||||
* type: string
|
* description: The series the book belongs to.
|
||||||
* example: Sam Tsoutsouvas
|
* type: array
|
||||||
* series:
|
* items:
|
||||||
* description: The series the book belongs to.
|
* $ref: '#/components/schemas/seriesSequence'
|
||||||
* type: array
|
|
||||||
* items:
|
|
||||||
* $ref: '#/components/schemas/seriesSequence'
|
|
||||||
* genres:
|
|
||||||
* description: The genres of the book.
|
|
||||||
* type: array
|
|
||||||
* items:
|
|
||||||
* type: string
|
|
||||||
* example: Fantasy
|
|
||||||
* publishedYear:
|
|
||||||
* description: The year the book was published. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* example: '2008'
|
|
||||||
* publishedDate:
|
|
||||||
* description: The date the book was published. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* publisher:
|
|
||||||
* description: The publisher of the book. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* example: Brilliance Audio
|
|
||||||
* description:
|
|
||||||
* description: A description for the book. Will be null if empty.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* example: >-
|
|
||||||
* The masterpiece that started Terry Goodkind's New York Times bestselling
|
|
||||||
* epic Sword of Truth In the aftermath of the brutal murder of his father,
|
|
||||||
* a mysterious woman, Kahlan Amnell, appears in Richard Cypher's forest
|
|
||||||
* sanctuary seeking help...and more. His world, his very beliefs, are
|
|
||||||
* shattered when ancient debts come due with thundering violence. In a
|
|
||||||
* dark age it takes courage to live, and more than mere courage to
|
|
||||||
* challenge those who hold dominion, Richard and Kahlan must take up that
|
|
||||||
* challenge or become the next victims. Beyond awaits a bewitching land
|
|
||||||
* where even the best of their hearts could betray them. Yet, Richard
|
|
||||||
* fears nothing so much as what secrets his sword might reveal about his
|
|
||||||
* own soul. Falling in love would destroy them - for reasons Richard can't
|
|
||||||
* imagine and Kahlan dare not say. In their darkest hour, hunted
|
|
||||||
* relentlessly, tormented by treachery and loss, Kahlan calls upon Richard
|
|
||||||
* to reach beyond his sword - to invoke within himself something more
|
|
||||||
* noble. Neither knows that the rules of battle have just changed...or
|
|
||||||
* that their time has run out. Wizard's First Rule is the beginning. One
|
|
||||||
* book. One Rule. Witness the birth of a legend.
|
|
||||||
* isbn:
|
|
||||||
* description: The ISBN of the book. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* asin:
|
|
||||||
* description: The ASIN of the book. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* example: B002V0QK4C
|
|
||||||
* language:
|
|
||||||
* description: The language of the book. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* explicit:
|
|
||||||
* description: Whether the book has been marked as explicit.
|
|
||||||
* type: boolean
|
|
||||||
* example: false
|
|
||||||
* bookMetadataMinified:
|
* bookMetadataMinified:
|
||||||
* type: object
|
* type: object
|
||||||
* properties:
|
* description: The minified metadata for a book in the database.
|
||||||
* title:
|
* allOf:
|
||||||
* description: The title of the book. Will be null if unknown.
|
* - $ref : '#/components/schemas/bookMetadataBase'
|
||||||
* type: [string, 'null']
|
* - type: object
|
||||||
* example: Wizards First Rule
|
* properties:
|
||||||
* titleIgnorePrefix:
|
* titleIgnorePrefix:
|
||||||
* description: The title of the book with any prefix moved to the end.
|
* description: The title of the book with any prefix moved to the end.
|
||||||
* type: string
|
* type: string
|
||||||
* subtitle:
|
* authorName:
|
||||||
* description: The subtitle of the book. Will be null if there is no subtitle.
|
* description: The name of the book's author(s).
|
||||||
* type: [string, 'null']
|
* type: string
|
||||||
* authorName:
|
* example: Terry Goodkind
|
||||||
* description: The name of the book's author(s).
|
* authorNameLF:
|
||||||
* type: string
|
* description: The name of the book's author(s) with last names first.
|
||||||
* example: Terry Goodkind
|
* type: string
|
||||||
* authorNameLF:
|
* example: Goodkind, Terry
|
||||||
* description: The name of the book's author(s) with last names first.
|
* narratorName:
|
||||||
* type: string
|
* description: The name of the audiobook's narrator(s).
|
||||||
* example: Goodkind, Terry
|
* type: string
|
||||||
* narratorName:
|
* example: Sam Tsoutsouvas
|
||||||
* description: The name of the audiobook's narrator(s).
|
* seriesName:
|
||||||
* type: string
|
* description: The name of the book's series.
|
||||||
* example: Sam Tsoutsouvas
|
* type: string
|
||||||
* seriesName:
|
* example: Sword of Truth
|
||||||
* description: The name of the book's series.
|
|
||||||
* type: string
|
|
||||||
* example: Sword of Truth
|
|
||||||
* genres:
|
|
||||||
* description: The genres of the book.
|
|
||||||
* type: array
|
|
||||||
* items:
|
|
||||||
* type: string
|
|
||||||
* example: Fantasy
|
|
||||||
* publishedYear:
|
|
||||||
* description: The year the book was published. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* example: '2008'
|
|
||||||
* publishedDate:
|
|
||||||
* description: The date the book was published. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* publisher:
|
|
||||||
* description: The publisher of the book. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* example: Brilliance Audio
|
|
||||||
* description:
|
|
||||||
* description: A description for the book. Will be null if empty.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* example: >-
|
|
||||||
* The masterpiece that started Terry Goodkind's New York Times bestselling
|
|
||||||
* epic Sword of Truth In the aftermath of the brutal murder of his father,
|
|
||||||
* a mysterious woman, Kahlan Amnell, appears in Richard Cypher's forest
|
|
||||||
* sanctuary seeking help...and more. His world, his very beliefs, are
|
|
||||||
* shattered when ancient debts come due with thundering violence. In a
|
|
||||||
* dark age it takes courage to live, and more than mere courage to
|
|
||||||
* challenge those who hold dominion, Richard and Kahlan must take up that
|
|
||||||
* challenge or become the next victims. Beyond awaits a bewitching land
|
|
||||||
* where even the best of their hearts could betray them. Yet, Richard
|
|
||||||
* fears nothing so much as what secrets his sword might reveal about his
|
|
||||||
* own soul. Falling in love would destroy them - for reasons Richard can't
|
|
||||||
* imagine and Kahlan dare not say. In their darkest hour, hunted
|
|
||||||
* relentlessly, tormented by treachery and loss, Kahlan calls upon Richard
|
|
||||||
* to reach beyond his sword - to invoke within himself something more
|
|
||||||
* noble. Neither knows that the rules of battle have just changed...or
|
|
||||||
* that their time has run out. Wizard's First Rule is the beginning. One
|
|
||||||
* book. One Rule. Witness the birth of a legend.
|
|
||||||
* isbn:
|
|
||||||
* description: The ISBN of the book. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* asin:
|
|
||||||
* description: The ASIN of the book. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* example: B002V0QK4C
|
|
||||||
* language:
|
|
||||||
* description: The language of the book. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* explicit:
|
|
||||||
* description: Whether the book has been marked as explicit.
|
|
||||||
* type: boolean
|
|
||||||
* example: false
|
|
||||||
* bookMetadataExpanded:
|
* bookMetadataExpanded:
|
||||||
* type: object
|
* type: object
|
||||||
* properties:
|
* description: The expanded metadata for a book in the database.
|
||||||
* title:
|
* allOf:
|
||||||
* description: The title of the book. Will be null if unknown.
|
* - $ref : '#/components/schemas/bookMetadataBase'
|
||||||
* type: [string, 'null']
|
* - type: object
|
||||||
* example: Wizards First Rule
|
* properties:
|
||||||
* titleIgnorePrefix:
|
* titleIgnorePrefix:
|
||||||
* description: The title of the book with any prefix moved to the end.
|
* description: The title of the book with any prefix moved to the end.
|
||||||
* type: string
|
* type: string
|
||||||
* subtitle:
|
* authorName:
|
||||||
* description: The subtitle of the book. Will be null if there is no subtitle.
|
* description: The name of the book's author(s).
|
||||||
* type: [string, 'null']
|
* type: string
|
||||||
* authorName:
|
* example: Terry Goodkind
|
||||||
* description: The name of the book's author(s).
|
* authorNameLF:
|
||||||
* type: string
|
* description: The name of the book's author(s) with last names first.
|
||||||
* example: Terry Goodkind
|
* type: string
|
||||||
* authorNameLF:
|
* example: Goodkind, Terry
|
||||||
* description: The name of the book's author(s) with last names first.
|
* narratorName:
|
||||||
* type: string
|
* description: The name of the audiobook's narrator(s).
|
||||||
* example: Goodkind, Terry
|
* type: string
|
||||||
* narratorName:
|
* example: Sam Tsoutsouvas
|
||||||
* description: The name of the audiobook's narrator(s).
|
* seriesName:
|
||||||
* type: string
|
* description: The name of the book's series.
|
||||||
* example: Sam Tsoutsouvas
|
* type: string
|
||||||
* seriesName:
|
* example: Sword of Truth
|
||||||
* description: The name of the book's series.
|
* authors:
|
||||||
* type: string
|
* description: The authors of the book.
|
||||||
* example: Sword of Truth
|
* type: array
|
||||||
* authors:
|
* items:
|
||||||
* description: The authors of the book.
|
* $ref: '#/components/schemas/authorMinified'
|
||||||
* type: array
|
* narrators:
|
||||||
* items:
|
* description: The narrators of the audiobook.
|
||||||
* $ref: '#/components/schemas/authorMinified'
|
* type: array
|
||||||
* narrators:
|
* items:
|
||||||
* description: The narrators of the audiobook.
|
* type: string
|
||||||
* type: array
|
* example: Sam Tsoutsouvas
|
||||||
* items:
|
* series:
|
||||||
* type: string
|
* description: The series the book belongs to.
|
||||||
* example: Sam Tsoutsouvas
|
* type: array
|
||||||
* series:
|
* items:
|
||||||
* description: The series the book belongs to.
|
* $ref: '#/components/schemas/seriesSequence'
|
||||||
* type: array
|
|
||||||
* items:
|
|
||||||
* $ref: '#/components/schemas/seriesSequence'
|
|
||||||
* genres:
|
|
||||||
* description: The genres of the book.
|
|
||||||
* type: array
|
|
||||||
* items:
|
|
||||||
* type: string
|
|
||||||
* example: Fantasy
|
|
||||||
* publishedYear:
|
|
||||||
* description: The year the book was published. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* example: '2008'
|
|
||||||
* publishedDate:
|
|
||||||
* description: The date the book was published. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* publisher:
|
|
||||||
* description: The publisher of the book. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* example: Brilliance Audio
|
|
||||||
* description:
|
|
||||||
* description: A description for the book. Will be null if empty.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* example: >-
|
|
||||||
* The masterpiece that started Terry Goodkind's New York Times bestselling
|
|
||||||
* epic Sword of Truth In the aftermath of the brutal murder of his father,
|
|
||||||
* a mysterious woman, Kahlan Amnell, appears in Richard Cypher's forest
|
|
||||||
* sanctuary seeking help...and more. His world, his very beliefs, are
|
|
||||||
* shattered when ancient debts come due with thundering violence. In a
|
|
||||||
* dark age it takes courage to live, and more than mere courage to
|
|
||||||
* challenge those who hold dominion, Richard and Kahlan must take up that
|
|
||||||
* challenge or become the next victims. Beyond awaits a bewitching land
|
|
||||||
* where even the best of their hearts could betray them. Yet, Richard
|
|
||||||
* fears nothing so much as what secrets his sword might reveal about his
|
|
||||||
* own soul. Falling in love would destroy them - for reasons Richard can't
|
|
||||||
* imagine and Kahlan dare not say. In their darkest hour, hunted
|
|
||||||
* relentlessly, tormented by treachery and loss, Kahlan calls upon Richard
|
|
||||||
* to reach beyond his sword - to invoke within himself something more
|
|
||||||
* noble. Neither knows that the rules of battle have just changed...or
|
|
||||||
* that their time has run out. Wizard's First Rule is the beginning. One
|
|
||||||
* book. One Rule. Witness the birth of a legend.
|
|
||||||
* isbn:
|
|
||||||
* description: The ISBN of the book. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* asin:
|
|
||||||
* description: The ASIN of the book. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* example: B002V0QK4C
|
|
||||||
* language:
|
|
||||||
* description: The language of the book. Will be null if unknown.
|
|
||||||
* type: [string, 'null']
|
|
||||||
* explicit:
|
|
||||||
* description: Whether the book has been marked as explicit.
|
|
||||||
* type: boolean
|
|
||||||
* example: false
|
|
||||||
* bookChapter:
|
* bookChapter:
|
||||||
* type: object
|
* type: object
|
||||||
* properties:
|
* properties:
|
||||||
|
|
@ -280,7 +177,7 @@ const parseNameString = require('../../utils/parsers/parseNameString')
|
||||||
* title:
|
* title:
|
||||||
* description: The title of the chapter.
|
* description: The title of the chapter.
|
||||||
* type: string
|
* type: string
|
||||||
* example: Wizards First Rule 01
|
* example: Wizards First Rule 01 Chapter 1
|
||||||
*/
|
*/
|
||||||
class BookMetadata {
|
class BookMetadata {
|
||||||
constructor(metadata) {
|
constructor(metadata) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue