Crates.io | geocodio |
lib.rs | geocodio |
version | 0.1.3 |
source | src |
created_at | 2022-04-15 19:46:09.207407 |
updated_at | 2022-10-11 17:58:59.788142 |
description | A client wrapper for the Geocodio API |
homepage | https://github.com/populist-vote/geocodio |
repository | https://github.com/populist-vote/geocodio |
max_upload_size | |
id | 568674 |
size | 14,077 |
A client library for the Geocodio API
use geocodio::GeocodioProxy;
fn main() {
let geocodio = GeocodioProxy::new().unwrap());
let response = geocodio
.geocode(
AddressParams::AddressInput(AddressInput {
line_1: "Black Rock Desert".to_string(),
line_2: None,
city: "Gerlach".to_string(),
state: "NV".to_string(),
country: "US".to_string(),
postal_code: "89412".to_string(),
}),
Some(&["acs-economics", "zip4"]),
)
.await
.unwrap();
println!(
"Burning Man is located at the coordinates: ({}, {})",
response.results[0].location.latitude, response.results[0].location.longitude
)
}