all repos — omglolrs @ a417490fd74dac46002004417f97ccf2c8bdf0a7

A Rust wrapper for api.omg.lol.

Auth clients access non-authenticated methods
Gil Poiares-Oliveira gil@poiares-oliveira.com
Tue, 02 May 2023 19:29:11 +0100
commit

a417490fd74dac46002004417f97ccf2c8bdf0a7

parent

121ccb07f1bbbe90d0137e9b41a1a5e20cdffa01

1 files changed, 19 insertions(+), 19 deletions(-)

jump to
M src/client.rssrc/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, - } } }