imgurs/src/imgur/client.rs

27 lines
505 B
Rust
Raw Normal View History

macro_rules! api_url (
($path: expr) => (
format!("{}{}", "https://api.imgur.com/3/", $path)
);
);
pub(crate) use api_url;
2022-06-12 15:28:25 +00:00
2022-06-17 21:00:45 +00:00
use std::fmt;
2022-06-12 15:28:25 +00:00
use reqwest::Client;
2022-06-12 15:28:25 +00:00
/// Imgur Client
#[derive(Clone)]
pub struct ImgurClient {
2022-07-08 09:54:48 +00:00
/// Imgur API Client ID
pub client_id: String,
2022-06-12 15:28:25 +00:00
/// HTTP Client
pub client: Client,
}
impl fmt::Debug for ImgurClient {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "ImgurClient - client_id: {}", self.client_id)
}
}