google_place_api/nearby/
mod.rs

1mod request;
2mod response;
3
4pub use request::*;
5pub use response::*;
6
7use crate::fetch;
8use crate::models::Error;
9use crate::SearchParams;
10use crate::Send;
11use async_trait::async_trait;
12
13const URL: &'static str = "https://maps.googleapis.com/maps/api/place/nearbysearch/json";
14
15#[async_trait]
16impl Send<Response, Error> for Prominence {
17    async fn send(&self) -> Result<Response, Error> {
18        let response = fetch(URL, &self.get_params()).await?;
19
20        Ok(response)
21    }
22}
23
24#[async_trait]
25impl Send<Response, Error> for Distance {
26    async fn send(&self) -> Result<Response, Error> {
27        let response = fetch(URL, &self.get_params()).await?;
28
29        Ok(response)
30    }
31}