diff options
Diffstat (limited to 'src/strava.rs')
-rw-r--r-- | src/strava.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/strava.rs b/src/strava.rs index 284d8b1..ff59c66 100644 --- a/src/strava.rs +++ b/src/strava.rs @@ -36,12 +36,12 @@ impl From<&models::StravaToken> for Token { } } -pub trait StravaApi { - fn get<T: Serialize + ?Sized>( +pub trait StravaApi: Sync + Send { + fn get( &self, method: &str, access_token: &str, - parasm: &T, + params: &[(&str, &str)], ) -> Result<Value, Error>; fn refresh_token( @@ -70,11 +70,11 @@ impl StravaImpl { } impl StravaApi for StravaImpl { - fn get<T: Serialize + ?Sized>( + fn get( &self, method: &str, access_token: &str, - params: &T, + params: &[(&str, &str)], ) -> Result<Value, Error> { let uri = format!("{}{}{}", self.base_url, self.api_url, method); let response = self |