mirror of
https://github.com/MedzikUser/imgurs
synced 2024-08-15 00:03:19 +00:00
1bd632e906
Add configuration for tls using features (rustls-tls or native-tls).
25 lines
504 B
Rust
25 lines
504 B
Rust
macro_rules! api_url (
|
|
($path: expr) => (
|
|
format!("{}{}", "https://api.imgur.com/3/", $path)
|
|
);
|
|
);
|
|
|
|
use std::fmt;
|
|
|
|
pub(crate) use api_url;
|
|
use reqwest::Client;
|
|
|
|
/// Imgur Client
|
|
#[derive(Clone)]
|
|
pub struct ImgurClient {
|
|
/// Imgur API Client ID
|
|
pub client_id: String,
|
|
/// 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)
|
|
}
|
|
}
|