A TypeScript/JavaScript wrapper for the TalentLMS API, making it easy to interact with TalentLMS from your Node.js applications.
Important Note: This wrapper is for https://www.talentlms.com/ We have no affiliation with TalentLMS; we built this TypeScript version to help us support our clients. For any questions about the TalentLMS API, please check their support resources.
npm install talentlms-js
Configure the TalentLms API wrapper with your API key and domain:
import TalentLms from 'talentlms-js';
const talentlms = new TalentLms({
apiKey: 'your_api_key', // as provided by TalentLMS
subdomain: 'your_subdomain', // the subdomain part of your TalentLMS instance e.g. if your instance is at https://company.talentlms.com, then your subdomain is "company"
// alternatively you can pass in the entire domain as a string e.g. "https://company.talentlms.com"
domain: 'company.talentlms.com'
});
async function example() {
const users = await api.getAllUsers();
console.log(users);
const course = await api.getCourseByCode('COURSE001');
console.log(course);
const usersByPhone = await api.getUserByPhone('1234567890');
console.log(usersByPhone);
}
example().catch(console.error);
We welcome contributions to the TalentLMS API Wrapper! Please see our Contributing Guidelines for more information on how to get started.
This project is licensed under the MIT License. See the LICENSE file for more details.