Crates.io | remitano-api |
lib.rs | remitano-api |
version | 0.0.3 |
source | src |
created_at | 2022-08-14 07:54:21.251786 |
updated_at | 2024-03-02 12:51:40.821609 |
description | Remitano API Rust Client |
homepage | https://blog.botbie.io/ |
repository | https://github.com/nguquen/remitano-api-rs |
max_upload_size | |
id | 645273 |
size | 7,222 |
[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(())
}