aboutsummaryrefslogtreecommitdiff
path: root/src/models.rs
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused models, fields, and endpointsA Farzat24 hours1-27/+3
| | | | | | If they are ever needed again, they can be added back. Also set API endpoints fields to Url type instead of String.
* Add EPUB descriptions to OPF filesA Farzat30 hours1-0/+8
|
* Fix chapter contents to proper xmlA Farzat3 days1-0/+2
| | | | | | | Change resource URLs using attribute matching (only img src for now, should add more later). Add respective stylesheets to chapters.
* Gather stylesheet file entries for each chapterA Farzat4 days1-1/+1
| | | | This prepares them to be added to their xhtml content.
* Add stylesheets to Chapter modelA Farzat4 days1-0/+7
| | | | | This allows these stylesheets to be added to the chapter contents later during zipping.
* Deserialize URLs to Url type directlyA Farzat4 days1-1/+2
| | | | | This saves the effort of having to do it manually later on. Also avoids duplication in parsing.
* Initiate full_path as RelativePathBufA Farzat4 days1-1/+2
| | | | | | | This is better than having it as string then converting it to path whenever we want to use it. It also ensures better interoperability between operating systems (though it would probably worked fine beforehand, but better be safe for the future).
* Remove the search endpointA Farzat7 days1-9/+1
| | | | | | | | | | | It is not the best idea as it is non-deterministic, working on the assumption that searching by ISBN would return the book and in a consistent way. The contents previously extracted from it, such as authors and publishers, are already included in the OPF file which can be fetched from the files list. Further items such as description can be fetched from the metadata endpoint later if needed.
* Add fetching of the spine and table of contentsA Farzat7 days1-2/+23
|
* Refactor away SearchResponse modelA Farzat7 days1-15/+7
| | | | | | | | | | Its functionality is covered by Paginated. The fetch_metadata function was also replaced by the more generic fetch_all_pages. Given that we are searching by the isbn, we should presumably get only 1 result, so only one call will be made even when fetch_all_pages is used. This behaviour is not documented though, so switching to the metadata endpoint in the future is recommended.
* Add file and chapter details fetchingA Farzat7 days1-0/+27
| | | | | | | | | | Fetching file details allows us to download them to the correct location later. Chapter details are currently limited to is_skippable, which might be used to determine whether to make the corresponding spine item non-linear. Other details such as the title shall be fetched from the spine and table-of-contents endpoints later.
* Add e-book metadata fetchingA Farzat7 days1-0/+25