2 releases
0.0.3 | Mar 2, 2024 |
---|---|
0.0.2 | Aug 14, 2022 |
#1624 in #api-client
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–18MB
~262K SLoC