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
26
pub mod auth;
pub mod book;
pub mod file;

mod client;

pub use client::Client;

pub use auth::AuthClient;
pub use book::BookClient;
pub use file::FileClient;

pub fn response_error(
    error: reqwest::Error,
    method: &str,
    url: &str,
    data: String,
) -> anyhow::Error {
    anyhow::Error::msg(format!(
        "{} {}\n{}\n{}",
        method,
        url,
        error.status().unwrap(),
        data
    ))
}