eve-esi-api 0.0.4

This library provides an authentication to Eve-esi API and some endpoints to call.
Documentation
1
2
3
4
5
6
7
8
9
use crate::{domain::wallet::WalletBalance, ApiClient, Int32, Result};

/// Call balance API for a given character id
pub async fn balance(client: &ApiClient, char_id: Int32) -> Result<Option<WalletBalance>> {
    let res = client
        .query_esi(format!("characters/{}/wallet/", char_id))
        .await?;
    Ok(res.map(|r: f64| Into::<WalletBalance>::into(r)))
}