Auth clients access non-authenticated methods
Gil Poiares-Oliveira gil@poiares-oliveira.com
Tue, 02 May 2023 19:29:11 +0100
1 files changed,
19 insertions(+),
19 deletions(-)
jump to
M
src/client.rs
→
src/client.rs
@@ -417,6 +417,25 @@ api_key: Some(api_key),
state: PhantomData, } } +} + +impl OmglolClient { + /// Create a new `OmglolClient`. + /// + /// The client is created in unauthenticated form, i.e. restricted to + /// methods that rely on public endpoints only. + /// + /// Usage: + /// ```rust + /// let client = OmglolClient::new() + /// ``` + pub fn new() -> OmglolClient<NoAuth> { + OmglolClient { + client: Client::new(), + api_key: None, + state: PhantomData, + } + } pub async fn get_profile_themes( &self,@@ -510,25 +529,6 @@ format!("address/{}/weblog/post/latest", address).as_ref(),
None, ) .await - } -} - -impl OmglolClient { - /// Create a new `OmglolClient`. - /// - /// The client is created in unauthenticated form, i.e. restricted to - /// methods that rely on public endpoints only. - /// - /// Usage: - /// ```rust - /// let client = OmglolClient::new() - /// ``` - pub fn new() -> OmglolClient<NoAuth> { - OmglolClient { - client: Client::new(), - api_key: None, - state: PhantomData, - } } }