Crates.io | geo-ip |
lib.rs | geo-ip |
version | 0.1.0 |
source | src |
created_at | 2023-08-29 08:33:18.189693 |
updated_at | 2023-08-29 08:33:18.189693 |
description | Acquire geography location by IP address |
homepage | https://github.com/xmh0511 |
repository | https://github.com/xmh0511/geo-ip |
max_upload_size | |
id | 957794 |
size | 32,094 |
use geo_ip;
use serde_json::Value;
#[tokio::main]
async fn main() {
let r = geo_ip::geo_ip::<Value>(None).await.unwrap();
println!("{r:#?}");
let r = geo_ip::geo_ip::<Value>(Some("1.1.1.1".to_owned())).await.unwrap();
}