The Users class is used to interact with the users section of the Hevy API. It provides methods for retrieving, creating, and managing users on the account.
Retrieves the current user's information from the Hevy API.
A promise that resolves to a UserInfo object containing the user's metadata.
Will throw an error if the API request fails or if the response is invalid.
import { HevyClient, HevyClientConfig, UserInfo } from 'hevy-sdk';const config: HevyClientConfig = { apiKey: 'your-api-key' };const client: HevyClient = new HevyClient(config);const userInfo: UserInfo = await client.users.getUserInfo(); Copy
import { HevyClient, HevyClientConfig, UserInfo } from 'hevy-sdk';const config: HevyClientConfig = { apiKey: 'your-api-key' };const client: HevyClient = new HevyClient(config);const userInfo: UserInfo = await client.users.getUserInfo();
The Users class is used to interact with the users section of the Hevy API. It provides methods for retrieving, creating, and managing users on the account.