Endpoints
Perform currency conversion
async fn convert_currency<C: ToString>(&self, value: f64, from: C, to: C) -> HttpResult<CurrencyConversionResponse, KumoError>
if let Ok(res) = client.kumo.convert_currency(120.0, "USD", "EUR").await {
match res {
Ok(conversion) => {
//do something with conversion info
},
Err(why) => {
//do something with the <KumoError> struct
}
}
}
Get data from a given IP
async fn geoip(&self, ip: impl ToString) -> HttpResult<GeoIPResponse, KumoError>
if let Ok(res) = client.kumo.geoip("AmazingNonExistingIP").await {
match res {
Ok(ip) => {
//do something with ip info
},
Err(why) => {
//do something with the <KumoError> struct
}
}
}
Last updated