Crates.io | ip-api4rs |
lib.rs | ip-api4rs |
version | 3.0.0 |
source | src |
created_at | 2023-11-08 11:43:53.930298 |
updated_at | 2024-11-07 10:50:02.599625 |
description | A Rust library for the ip-api.com API. |
homepage | https://github.com/DenuxPlays/ip-api4rs |
repository | https://github.com/DenuxPlays/ip-api4rs |
max_upload_size | |
id | 1028986 |
size | 50,239 |
A simple but powerful wrapper for the ip-api API.
In the example below we use tokio to convert our async main function into a sync one.
Tokio itself is not needed when using this crate.
use ip_api4rs::IpApiClient;
#[tokio::main]
async fn main() {
let client = IpApiClient::new();
let response = client.query_api_default("8.8.8.8").await.unwrap();
println!("{:#?}", response);
}
blocking
feature)This doesn't mean that we would not implement features listed here.
We just won't implement them ourselves.
Feel free to open a pull request if you want to add more features.