remitano-api

Crates.ioremitano-api
lib.rsremitano-api
version0.0.3
sourcesrc
created_at2022-08-14 07:54:21.251786
updated_at2024-03-02 12:51:40.821609
descriptionRemitano API Rust Client
homepagehttps://blog.botbie.io/
repositoryhttps://github.com/nguquen/remitano-api-rs
max_upload_size
id645273
size7,222
(nguquen)

documentation

README

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(())
}
Commit count: 6

cargo fmt