#![doc = include_str!("../README.md")]
mod api_calls;
mod request;
pub mod structures;
pub use api_calls::fingerprint_calls::cf_fingerprint;
#[derive(thiserror::Error, Debug)]
#[error(transparent)]
pub enum Error {
ReqwestError(#[from] reqwest::Error),
JsonError(#[from] serde_json::Error),
UrlParseError(#[from] url::ParseError),
}
pub(crate) type Result<T> = std::result::Result<T, Error>;
#[derive(Clone, Debug)]
pub struct Furse {
client: reqwest::Client,
api_key: String,
}
impl Furse {
pub fn new(api_key: impl Into<String>) -> Self {
Self {
client: reqwest::Client::new(),
api_key: api_key.into(),
}
}
}