@trainlyhq/client
v3.0.0
Published
TypeScript client for the Trainly API
Readme
@trainlyhq/client
⚠️ DISCLAIMER: V3 SUPPORT ONLY ⚠️
This client is written specifically for the upcoming v3 version of the Trainly API. It does not work with the current v2 API and is therefore not publicly usable at this time.
Installation
npm install @trainlyhq/clientUsage
Create a new instance of TrainlyClient with your API key.
import { TrainlyClient } from "@trainlyhq/client";
const client = new TrainlyClient({
apiKey: "YOUR_API_KEY",
});
async function run() {
const result = await client.v3.metaHealthList();
console.log(result);
}
run();Example App
Check out the runnable example app located in examples/basic.
To run the example from source (requires ts-node or equivalent to compile on the fly):
cd examples/basic
TRAINLY_API_KEY="YOUR_API_KEY" npx ts-node index.ts