Crates.io | geolocation |
lib.rs | geolocation |
version | 0.2.1 |
source | src |
created_at | 2022-03-08 15:18:50.745738 |
updated_at | 2022-03-09 20:00:34.295858 |
description | A library to get geolocation information of an IP. Its simple |
homepage | |
repository | https://github.com/yasirarafat28/geolocation.git |
max_upload_size | |
id | 546363 |
size | 4,506 |
Get geolocation information of an IP. Its simple.
geolocation = "0.2.1"
Add this line to your Cargo.toml.
Using geolocation is really quite easy and simple:
use geolocation;
fn main() {
let ip = "<Put your IP address Here>";
let info = geolocation::find(ip).unwrap();
println!("{:?}", info.city);
}
This and more examples are found in the examples directory.
You can send 45 requests per minute.
The API can get these fields about IP addresses.
ip
latitude
longitude
city
region
country
timezone
location