regen docs to reflect change of ownership in repo. Added how to gen docs in readme

This commit is contained in:
2024-12-31 02:01:35 +00:00
parent bd252c3aed
commit 27b6abc928
46 changed files with 168 additions and 98 deletions
+28
View File
@@ -0,0 +1,28 @@
import D4H from '../lib/src/d4h'
import * as dotenv from 'dotenv';
dotenv.config()
const apiToken = process.env['apiToken']
if (!apiToken) {
throw new Error('apiToken is not defined in the environment variables.');
}
// console.log(`Your API Token is: ${apiToken}`);
const d4hInstance = new D4H(apiToken);
const getmembers = async (team: string, contextId: number) => {
const memberdata = await d4hInstance.getAnimals(team, contextId)
return memberdata
}
const logMember = async () => {
const members = await getmembers('team', 1614);
console.log(`${JSON.stringify(members, null, 2)}`);
}
logMember();