feat(readarr): fetch Readarr book history and expose it on the CLI
This commit is contained in:
6 files changed
+435
-4
No files matched your search
@@ -46,6 +46,21 @@ pub enum ReadarrListCommand {
|
||||
)]
|
||||
book_id: i64,
|
||||
},
|
||||
#[command(about = "Fetch all history events for the book with the given ID")]
|
||||
BookHistory {
|
||||
#[arg(
|
||||
long,
|
||||
help = "The Readarr ID of the author who wrote the book whose history you wish to fetch",
|
||||
required = true
|
||||
)]
|
||||
author_id: i64,
|
||||
#[arg(
|
||||
long,
|
||||
help = "The Readarr ID of the book whose history you wish to fetch",
|
||||
required = true
|
||||
)]
|
||||
book_id: i64,
|
||||
},
|
||||
#[command(about = "List all books for the author with the given ID")]
|
||||
Books {
|
||||
#[arg(
|
||||
@@ -138,6 +153,13 @@ impl<'a, 'b> CliCommandHandler<'a, 'b, ReadarrListCommand> for ReadarrListComman
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
ReadarrListCommand::BookHistory { author_id, book_id } => {
|
||||
let resp = self
|
||||
.network
|
||||
.handle_network_event(ReadarrEvent::GetBookHistory(author_id, book_id).into())
|
||||
.await?;
|
||||
serde_json::to_string_pretty(&resp)?
|
||||
}
|
||||
ReadarrListCommand::Books { author_id } => {
|
||||
let resp = self
|
||||
.network
|
||||
|
||||
Reference in new issue
Block a user