📁
KSoft.rs
  • KSoft.rs
  • Shared types
  • Images
    • Types
    • Endpoints
  • Bans
    • Types
    • Endpoints
  • Kumo
    • Types
    • Endpoints
  • Music
    • Types
    • Endpoints
  • Events
    • Types
    • Examples
Powered by GitBook
On this page
  • Perform currency conversion
  • Get data from a given IP

Was this helpful?

  1. Kumo

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
        }
    }
}
PreviousTypesNextTypes

Last updated 4 years ago

Was this helpful?