geocodio

Crates.iogeocodio
lib.rsgeocodio
version0.1.3
sourcesrc
created_at2022-04-15 19:46:09.207407
updated_at2022-10-11 17:58:59.788142
descriptionA client wrapper for the Geocodio API
homepagehttps://github.com/populist-vote/geocodio
repositoryhttps://github.com/populist-vote/geocodio
max_upload_size
id568674
size14,077
Wiley McKay Conte (wileybaba)

documentation

https://docs.rs/geocodio

README

Geocodio

A client library for the Geocodio API

Usage

Geocode

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
    )
}
Commit count: 15

cargo fmt