0.0.15 • Published 10 months ago

@baobabtech/talentlms-js v0.0.15

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

TalentLMS API Wrapper

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 version License: MIT semantic-release: angular

Installation

npm install talentlms-js

Usage

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);
0.0.15

10 months ago

0.0.14

10 months ago

0.0.13

10 months ago

0.0.12

10 months ago

0.0.11

10 months ago

0.0.10

10 months ago