Knowledge Anywhere LMS API SDK
SDK for Interacting with the Knowledge Anywhere LMS API.
contact Documentation if you would like more information.
Installation and Getting Started
- You will need Audience and Secret keys for authorization. These can be obtained by going to into the admin panel for your LMS and navigating to Site > External API keys.
- run the cmd
npm i knowledgeanywhere --save
to get the package. - The SDK expects the constants
LMS_AUDIENCE
,LMS_SECRET
to be present as process variables. The easiest way to accomplish this is to use an .env file that is loaded via Foreman or dotenv. If you are directed to use a different API url, use theLMS_API_URL
environment variable.
Usage
- Refer to Documentation to see available method calls.
- All methods. return a promise and are async/await friendly.
Issues
- Bugs related to the SDK should be filed under this Github Repository. Be sure to include your Node version and any relevant error information.
- Issues with the LMS API itself should be emailed to support@knowledgeanywhere.com
Contributing
- Clone repo onto your machine
- Create a .env file with
LMS_AUDIENCE
,LMS_SECRET
keys. Fill inLMS_AUDIENCE
andLMS_SECRET
from the values that are attained in the admin section of your LMS under the Site Menu. Set environment tostage
. - Run
npm install
- To run tests run
npm tests
To update documentation, run npm run-script generate-docs
Debugging in VS Code
The recommended editor for working on the SDK is Visual Studio code, which is has a debug configuration already setup.
In the specs folder, modify the file manual-tests.js
to run through the code you desire to debug. When you're ready, select the "debug" icon in the pane and click "launch program" and it will hit any breakpoints you set.
See also: Visual Studio Code - Debugger Documentation