2 releases

0.0.3 Mar 2, 2024
0.0.2 Aug 14, 2022

#871 in #api-client

Download history 14/week @ 2024-02-22 178/week @ 2024-02-29 15/week @ 2024-03-07 2/week @ 2024-03-14

209 downloads per month

MIT/Apache

8KB
129 lines

Remitano API Client

Usage

[dependencies]
remitano-api = "0.0.2"

#[derive(Deserialize, Debug)]
pub struct User {
    pub id: u64,
    pub username: String,
}

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    let remitano_api = RemitanoApiBuilder::default()
        .key(dotenv!("REMITANO_API_KEY").to_string())
        .secret(dotenv!("REMITANO_API_SECRET").to_string())
        .build()?;

    let user: User = remitano_api
        .request(Method::GET, "users/me", None, None)
        .await?;

    println!("user: {:?}", &user);

    Ok(())
}

Dependencies

~7–20MB
~313K SLoC