aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client.rs b/src/client.rs
index 57734de..87fbc79 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -15,6 +15,15 @@ pub enum Endpoint {
Sandbox,
}
+impl From<Endpoint> for &str {
+ fn from(endpoint: Endpoint) -> &'static str {
+ match endpoint {
+ Endpoint::Production => "https://api.domrobot.com/xmlrpc/",
+ Endpoint::Sandbox => "https://api.ote.domrobot.com/xmlrpc/",
+ }
+ }
+}
+
impl From<Endpoint> for String {
fn from(endpoint: Endpoint) -> String {
match endpoint {