use reqwest::Client;
pub const BASE_URL: &str = "https://plausible.io";
#[derive(Debug, Clone)]
pub struct Plausible {
pub(crate) client: Client,
pub(crate) base_url: String,
}
impl Plausible {
#[must_use]
pub fn new() -> Self {
Self {
client: Client::new(),
base_url: BASE_URL.to_string(),
}
}
#[must_use]
pub fn new_with_client(client: Client) -> Self {
Self {
client,
base_url: BASE_URL.to_string(),
}
}
}
impl Default for Plausible {
fn default() -> Self {
Self::new()
}
}