aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHimbeerserverDE <himbeerserverde@gmail.com>2022-10-21 17:25:44 +0200
committerHimbeerserverDE <himbeerserverde@gmail.com>2022-10-21 17:25:44 +0200
commite524ba7744f74856645e081f77d3ba9c09c862ca (patch)
treecd152757218d8f21f107454114dd9bdc5343a784 /src
parente332e9d4a468b3a97c4d8b91394070a5ac98c916 (diff)
add client
Diffstat (limited to 'src')
-rw-r--r--src/client.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/client.rs b/src/client.rs
index f0a06f3..3153254 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -1,5 +1,7 @@
use crate::{Error, Result};
+use std::sync::Arc;
+
use reqwest::Url;
/// The INWX environment to use. The Sandbox is good for testing
@@ -25,3 +27,18 @@ impl TryInto<Url> for Endpoint {
Ok(url)
}
}
+
+/// A synchronous client to make API calls with.
+/// You do **not** need to wrap it in an `Arc` or `Rc`
+/// because it already uses an `Arc` internally.
+/// [`Rc`]: std::rc::Rc
+pub struct Client {
+ inner: Arc<ClientRef>,
+}
+
+impl Client {}
+
+// The underlying data of a `Client`.
+struct ClientRef {
+ http: reqwest::Client,
+}