aboutsummaryrefslogtreecommitdiff
path: root/src/models.rs
diff options
context:
space:
mode:
authorA Farzat <a@farzat.xyz>2026-03-08 16:17:23 +0300
committerA Farzat <a@farzat.xyz>2026-03-08 16:17:23 +0300
commit506be822134c51300ab589256ad66a7e7eac3ae1 (patch)
tree3088523fd8cd5004f6bcdd1d0a4b31039fff030e /src/models.rs
parentb6a88532c1b8d8f011f0f80809d69e13e4057df6 (diff)
downloadoreilly-epub-506be822134c51300ab589256ad66a7e7eac3ae1.tar.gz
oreilly-epub-506be822134c51300ab589256ad66a7e7eac3ae1.zip
Add EPUB descriptions to OPF files
Diffstat (limited to 'src/models.rs')
-rw-r--r--src/models.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/models.rs b/src/models.rs
index 991224c..5f92d03 100644
--- a/src/models.rs
+++ b/src/models.rs
@@ -14,6 +14,7 @@ pub struct Paginated<T> {
pub struct EpubResponse {
pub publication_date: String,
pub title: String,
+ pub descriptions: Descriptions,
pub chapters: String, // This is a URL to the chapters list
pub files: String, // This is a URL to the resource files
pub spine: String, // This is a URL to the spine list
@@ -21,6 +22,13 @@ pub struct EpubResponse {
pub language: String,
}
+/// Sub-model of EpubResponse - descriptions.
+#[derive(Debug, Deserialize)]
+pub struct Descriptions {
+ #[serde(rename = "text/plain")]
+ pub plain: String,
+}
+
/// Model for chapters API.
#[derive(Debug, Deserialize)]
pub struct Chapter {