Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/denuxplays/ip-api4rs
A Rust library for the ip-api.com API.
https://github.com/denuxplays/ip-api4rs
Last synced: about 2 months ago
JSON representation
A Rust library for the ip-api.com API.
- Host: GitHub
- URL: https://github.com/denuxplays/ip-api4rs
- Owner: DenuxPlays
- License: apache-2.0
- Created: 2023-11-06T19:45:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-18T06:59:37.000Z (about 2 months ago)
- Last Synced: 2024-11-18T07:45:32.858Z (about 2 months ago)
- Language: Rust
- Size: 246 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ip-api4rs [![Build Status]][actions] [![Latest Version]][crates.io] [![Docs]][docs.rs]
[Build Status]: https://img.shields.io/github/actions/workflow/status/DenuxPlays/ip-api4rs/rust.yml?branch=main&style=flat-square
[actions]: https://github.com/DenuxPlays/ip-api4rs/actions?query=branch%3Amain
[Latest Version]: https://img.shields.io/crates/v/ip-api4rs.svg?style=flat-square
[crates.io]: https://crates.io/crates/ip-api4rs
[docs.rs]: https://docs.rs/ip-api4rs
[Docs]: https://img.shields.io/badge/docs.rs-ip--api4rs-66c2a5?style=flat-square&color=blueA simple but powerful wrapper for the [ip-api](https://ip-api.com/) 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.
```rust
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