Skip to content

Commit

Permalink
Auth clients access non-authenticated methods
Browse files Browse the repository at this point in the history
  • Loading branch information
GilOliveira committed May 2, 2023
1 parent 121ccb0 commit a417490
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,25 @@ impl OmglolClient<NoAuth> {
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,
Expand Down Expand Up @@ -513,25 +532,6 @@ impl OmglolClient<NoAuth> {
}
}

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,
}
}
}


/// OmglolClient allows you to make authenticated or unauthenticated REST API
/// requests.
Expand Down

0 comments on commit a417490

Please sign in to comment.