Adding automatic IP address, some refactor and better texts. Upgrading version.

This commit is contained in:
midefos committed 2023-05-23 01:17:03 +02:00
1 parent 3bd55576ce
commit 01ac2ca7b7
12 files changed
+496 -149

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
pub fn extract_coords_and_city(ip: &str) -> Result<serde_json::Value, ureq::Error> {
let url = format!("http://ip-api.com/json/{}?fields=16592", ip);
let body: serde_json::Value = ureq::get(&url).call()?.into_json()?;
Ok(body)
}