Google Maps Places for Rust

Simple crate to get Google Maps Place results.

This library can be used to fetch details from Google Maps Places API using place_id from Place Search.

Getting started

  1. Add to [dependencies]

    toml google-maps-places = "0.1"

    Available features:

  2. Fetch place results

    ```rust use googlemapsplaces::{Places, Response};

    let places = &Places { apikey: "api-key" }; let res = match places.getmapplace("ChIJATaCWGU3zDER32mCAwDyY") { Ok(b) => b, Err(e) => { println!("Error {:?}", e); return; } }; match res { Response::Ok { result } => { println!("id : {}", result.placeid); println!("name : {}", result.name); println!("formattedaddress : {}", result.formattedaddress); println!("");

        println!("street_number : {}", result.street_number().unwrap_or(""),);
        println!("route         : {}", result.route().unwrap_or(""));
        println!("sublocality   : {}", result.sublocality().unwrap_or(""));
        println!("postal_code   : {}", result.postal_code().unwrap_or(""));
        println!("city          : {}", result.city().unwrap_or(""));
        println!("state         : {}", result.state().unwrap_or(""));
        println!("country       : {}", result.country().unwrap_or(""));
    }
    Response::ZeroResults => {
        println!("Zero results");
    }
    Response::InvalidRequest => {
        println!("Invalid Request");
    }
    Response::OverQueryLimit => {
        println!("Over Query Limit");
    }
    Response::RequestDenied { error_message } => {
        println!("Request Denied: {}", error_message);
    }
    Response::UnknownError => {
        println!("Unknown Error")
    }
    

    }; ```

Todo: