aboutsummaryrefslogtreecommitdiff
path: root/src/models.rs
blob: 77afeb223d170eef53d0c26dd62d5de85b75450a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
}