@an2tha/open-fitness-data
v0.1.0
Published
Type-safe TypeScript client for the Open Fitness Data API
Readme
@an2tha/open-fitness-data
Type-safe TypeScript client for the Open Fitness Data API.
Docs
Install
npm i @an2tha/open-fitness-dataQuick start
import { createOfdClient } from '@an2tha/open-fitness-data';
const client = createOfdClient({
apiKey: process.env.OFD_API_KEY,
});
const foods = await client.foods.search({ q: 'kale' });Type-safe requests
import { createOfdClient, foodSchema } from '@an2tha/open-fitness-data';
const client = createOfdClient();
const food = await client.request('/foods/123', foodSchema);Build
bun run build