strava_wrapper/filters/
athlete_zones.rs1use crate::models::Zones;
2use crate::query::{get_with_query_and_path, Endpoint, ErrorWrapper, PathQuery, Query, Sendable};
3use async_trait::async_trait;
4use std::collections::HashMap;
5use strava_wrapper_macros::{Endpoint, PathQuery, Query};
6
7#[derive(Debug, Clone, Endpoint, Query, PathQuery)]
8#[must_use = "this request is not executed until you call .send().await"]
9pub struct GetAthleteZones {
10 url: String,
11 token: String,
12 path: String,
13 query: Vec<(String, String)>,
14 path_params: Vec<(String, String)>,
15}
16
17#[async_trait]
18impl Sendable<Zones> for GetAthleteZones {
19 async fn send(self) -> Result<Zones, ErrorWrapper> {
20 let token = self.token.clone();
21 get_with_query_and_path(self, &token).await
22 }
23}