pub enum ApiHost {
Public,
Enterprise,
}Expand description
API host tier for the Odos API
Odos provides two API host tiers:
- Public: Standard API available to all users at https://api.odos.xyz
- Enterprise: Premium API with enhanced features at https://enterprise-api.odos.xyz
Use in combination with ApiVersion via the Endpoint type for complete
endpoint configuration.
§Examples
use odos_sdk::{ApiHost, ApiVersion, Endpoint};
// Use directly with Endpoint
let endpoint = Endpoint::new(ApiHost::Public, ApiVersion::V2);
// Or use convenience methods
let endpoint = Endpoint::public_v2();Variants§
Public
Public API endpoint https://docs.odos.xyz/build/api-docs
Standard API available to all users. Suitable for most use cases.
Enterprise
Enterprise API endpoint https://docs.odos.xyz/build/enterprise-api
Premium API with enhanced features, higher rate limits, and dedicated support. Requires an API key obtained through the Odos Enterprise program.
Implementations§
Source§impl ApiHost
impl ApiHost
Sourcepub fn base_url(&self) -> Url
pub fn base_url(&self) -> Url
Get the base URL for the API host
Returns the root URL for the selected host tier without any path segments.
§Examples
use odos_sdk::ApiHost;
let public = ApiHost::Public;
assert_eq!(public.base_url().as_str(), "https://api.odos.xyz/");
let enterprise = ApiHost::Enterprise;
assert_eq!(enterprise.base_url().as_str(), "https://enterprise-api.odos.xyz/");Trait Implementations§
Source§impl<'de> Deserialize<'de> for ApiHost
impl<'de> Deserialize<'de> for ApiHost
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for ApiHost
impl Ord for ApiHost
Source§impl PartialOrd for ApiHost
impl PartialOrd for ApiHost
impl Copy for ApiHost
impl Eq for ApiHost
impl StructuralPartialEq for ApiHost
Auto Trait Implementations§
impl Freeze for ApiHost
impl RefUnwindSafe for ApiHost
impl Send for ApiHost
impl Sync for ApiHost
impl Unpin for ApiHost
impl UnwindSafe for ApiHost
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more