Skip to content

Commit

Permalink
Making struct fields pub, variable name typo fix and docs improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
GilOliveira committed Sep 17, 2023
1 parent 53e0848 commit 7410074
Show file tree
Hide file tree
Showing 9 changed files with 232 additions and 112 deletions.
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/omglolrs.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "omglol"
authors = ["Gil Poiares-Oliveira <gil@poiares-oliveira.com>"]
version = "0.0.1"
version = "0.0.2"
edition = "2021"
repository = "https://git.sr.ht/~gpo/omglolrs"
readme = "README.md"
Expand Down
10 changes: 5 additions & 5 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ impl OmglolClient<Auth> {
pub async fn get_account_info(
&self,
email: &EmailAddress,
) -> Result<RequestResponse<AcccountResponse>, Box<dyn std::error::Error>> {
self.send_request::<AcccountResponse>(
) -> Result<RequestResponse<AccountResponse>, Box<dyn std::error::Error>> {
self.send_request::<AccountResponse>(
true,
Method::GET,
format!("account/{}/info", email).as_ref(),
Expand Down Expand Up @@ -390,8 +390,8 @@ impl OmglolClient<NoAuth> {
///
/// Example:
/// ```rust
/// let client = OmglolClient::new()
/// let client = client.auth("YOUR_API_KEY".to_string())
/// let client = OmglolClient::new();
/// let client = client.auth("YOUR_API_KEY".to_string());
/// ```
pub fn auth(&self, api_key: String) -> OmglolClient<Auth> {
OmglolClient {
Expand All @@ -410,7 +410,7 @@ impl OmglolClient {
///
/// Usage:
/// ```rust
/// let client = OmglolClient::new()
/// let client = OmglolClient::new();
/// ```
pub fn new() -> OmglolClient<NoAuth> {
OmglolClient {
Expand Down
2 changes: 2 additions & 0 deletions src/email.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ This Source Code Form is subject to the terms of the Mozilla Public License, v.
You can obtain one at https://mozilla.org/MPL/2.0/.
*/

//! Helper to format email addresses in the format that the API expects

use email_address::EmailAddress;

/// Format a `Vec<EmailAddress>` to a String in the JSON format the API expects
Expand Down
Loading

0 comments on commit 7410074

Please sign in to comment.