hevy 0.1.0

An async Rust client library for the Hevy public API (https://api.hevyapp.com/docs/)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::client::HevyClient;
use crate::error::Result;
use crate::models::UserInfo;
use crate::models::UserInfoResponse;

impl HevyClient {
    /// Gets info about the authenticated user.
    pub async fn get_user_info(&self) -> Result<UserInfo> {
        let response: UserInfoResponse = self.get("/v1/user/info", &[]).await?;
        Ok(response.data)
    }
}