7 releases (stable)

2.0.4 Dec 28, 2023
2.0.3 Dec 11, 2023
2.0.1 Nov 27, 2023
1.0.0 Nov 8, 2023
0.1.0 Nov 8, 2023

#652 in Web programming

Download history 10/week @ 2024-01-23 12/week @ 2024-01-30 2/week @ 2024-02-13 8/week @ 2024-02-20 12/week @ 2024-02-27 7/week @ 2024-03-05 10/week @ 2024-03-12 8/week @ 2024-03-26 29/week @ 2024-04-02

119 downloads per month

Apache-2.0

29KB
439 lines

ip-api4rs   Build Status Latest Version Docs

A simple but powerful wrapper for the ip-api API.

Usage

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);
}

Features

  • fully async api (or blocking with the blocking feature)
  • simple to use
  • supply custom structs to only get want you want
  • Api-Token support
  • SSL support

Features that won't be added

**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.

  • Batch requests
  • non Json responses
  • DNS Api support

Dependencies

~8–22MB
~356K SLoC