aboutsummaryrefslogtreecommitdiff
path: root/src/models.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/models.rs')
-rw-r--r--src/models.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/models.rs b/src/models.rs
new file mode 100644
index 0000000..77afeb2
--- /dev/null
+++ b/src/models.rs
@@ -0,0 +1,25 @@
+use serde::Deserialize;
+
+// --- Models for the Search API ---
+
+#[derive(Debug, Deserialize)]
+pub struct SearchResponse {
+ pub results: Vec<SearchResult>,
+}
+
+#[derive(Debug, Deserialize)]
+pub struct SearchResult {
+ pub title: String,
+ pub authors: Vec<String>,
+ pub publishers: Vec<String>,
+ pub cover_url: String,
+}
+
+// --- Models for the EPUB API ---
+
+#[derive(Debug, Deserialize)]
+pub struct EpubResponse {
+ pub publication_date: String,
+ pub chapters: String, // This is a URL to the chapters list
+ pub files: String, // This is a URL to the resource files
+}