Adding automatic IP address, some refactor and better texts. Upgrading version.
This commit is contained in:
1 parent
3bd55576ce
commit
01ac2ca7b7
12 files changed
+496
-149
No files matched your search
@@ -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)
|
||||
}
|
||||
Reference in new issue
Block a user