Getting Started
Labs API (JavaScript / TypeScript), v1
Install
Shell
npm install @conscherry/labs-api
Set your API key (authenticated endpoints)
Recommended: store your key in the environment as LABS_API_KEY.
Shell
npm install dotenv
JavaScript
import 'dotenv/config';console.log(process.env.LABS_API_KEY ? 'Key loaded' : 'Key missing');
Initialize the client
Create a LabsApiClient and start calling endpoints.
TypeScript
1import { LabsApiClient } from '@conscherry/labs-api';23const client = new LabsApiClient({ apiKey: process.env.LABS_API_KEY });45const result = await client.listBots({ limit: 5 });6console.log(result.data);
Without an explicit apiKey, the client reads LABS_API_KEY from the environment.
Post bot stats (requires API key)
TypeScript
1const res = await client.postStats({2 botId: 'YOUR_BOT_CLIENT_ID',3 guildCount: 1500,4 userCount: 250000,5});6console.log(res.data);
Need more help?
Ask in our Discord or email support@conscherry.com.