pub struct GarminClient { /* private fields */ }Expand description
Garmin Connect API client
Implementations§
Source§impl GarminClient
impl GarminClient
Sourcepub async fn get(&self, token: &OAuth2Token, path: &str) -> Result<Response>
pub async fn get(&self, token: &OAuth2Token, path: &str) -> Result<Response>
Make an authenticated GET request and return the response
Sourcepub async fn get_json<T: DeserializeOwned>(
&self,
token: &OAuth2Token,
path: &str,
) -> Result<T>
pub async fn get_json<T: DeserializeOwned>( &self, token: &OAuth2Token, path: &str, ) -> Result<T>
Make an authenticated GET request and deserialize JSON response
Sourcepub async fn post_json(
&self,
token: &OAuth2Token,
path: &str,
body: &Value,
) -> Result<Value>
pub async fn post_json( &self, token: &OAuth2Token, path: &str, body: &Value, ) -> Result<Value>
Make an authenticated POST request with JSON body
Trait Implementations§
Source§impl Clone for GarminClient
impl Clone for GarminClient
Source§fn clone(&self) -> GarminClient
fn clone(&self) -> GarminClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GarminClient
impl !RefUnwindSafe for GarminClient
impl Send for GarminClient
impl Sync for GarminClient
impl Unpin for GarminClient
impl UnsafeUnpin for GarminClient
impl !UnwindSafe for GarminClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more