use reqwest_middleware::reqwest::StatusCode;
use std::error::Error;
use strum::Display;
pub mod client;
pub mod illusts;
pub mod models;
pub mod search;
pub mod tokens;
pub mod ugoira;
pub mod users;
#[cfg(feature = "clap")]
pub use clap;
pub use reqwest_middleware::reqwest;
#[cfg(feature = "sqlx")]
pub use sqlx;
#[derive(Debug, Clone, Display)]
pub enum PixivAppError {
#[strum(to_string = "Requested endpoint not found")]
TargetNotFound,
#[strum(to_string = "Request failed, check request parameters!")]
RequestFailed,
#[strum(to_string = "Request failed because of missing authorization!")]
MissingLogin,
#[strum(to_string = "Too many requests, try again later")]
RateLimitReached,
#[strum(to_string = "{0}")]
UnhandledStatus(StatusCode),
#[strum(to_string = "An unknown error happened and no data was returned.")]
Unknown,
}
impl Error for PixivAppError {}