0.0.18 • Published 10 months ago

talentlms-js v0.0.18

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.18

10 months ago

0.0.17

10 months ago

0.0.3

10 months ago

0.0.1

10 months ago