Creates a new routine.
The routine object to create.
A promise that resolves to the newly created routine data.
ValidationError if the provided routine data is invalid.
import { HevyClient, HevyClientConfig, CreateRoutineRequest, Routine } from 'hevy-sdk';
const config: HevyClientConfig = { apiKey: 'your-api-key' };
const client: HevyClient = new HevyClient(config);
// Construct a valid routine object
const validRoutineObject: CreateRoutineRequest = { ... };
const newRoutine: Routine = await client.routines.createRoutine(validRoutineObject);
Retrieves a specific routine by routineID.
The unique ID of the routine to retrieve.
A promise that resolves to the routine data for the specified routine ID.
Retrieves a list of routines from the API.
The page number for pagination. Must be a positive integer.
The number of routines per page. Must be a positive integer and no greater than 10.
A promise that resolves to a list of routines.
Updates an existing routine.
The unique ID of the routine to update.
The updated routine data.
A promise that resolves to the updated routine data.
ValidationError if the provided routine data is invalid.
import { HevyClient, HevyClientConfig, UpdateRoutineRequest, Routine } from 'hevy-sdk';
const config: HevyClientConfig = { apiKey: 'your-api-key' };
const client: HevyClient = new HevyClient(config);
// Construct a valid update object
const validUpdateObject: UpdateRoutineRequest = { ... };
const updatedRoutine: Routine = await client.routines.updateRoutine("routine-id", validUpdateObject);
The Routines class is used to interact with the routines section of the Hevy API. It provides methods for retrieving, creating, and managing routines on the account.