From 98532dc37ae9f72e8970d8d67e6bab9545596650 Mon Sep 17 00:00:00 2001 From: A Farzat Date: Mon, 2 Mar 2026 10:05:46 +0300 Subject: Add e-book metadata fetching --- src/models.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/models.rs (limited to 'src/models.rs') 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, +} + +#[derive(Debug, Deserialize)] +pub struct SearchResult { + pub title: String, + pub authors: Vec, + pub publishers: Vec, + 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 +} -- cgit v1.2.3-70-g09d2