0.3.0 • Published 2 years ago

@maytha8/compassedu v0.3.0

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
2 years ago

CompassEdu

npm GitHub package.json version GitHub issues GitHub pull requests Linux build MacOS build Windows build Coveralls branch

Currently under development! A package for interacting with Compass Education.

Installation

The latest stable release is on npm, so you can use:

npm install @maytha8/compassedu

To install straight from the GitHub repository, use the following:

npm install https://github.com/Maytha8/CompassEdu

For contributing to this project, then use this:

git clone https://github.com/Maytha8/CompassEdu.git
cd CompassEdu
npm install

Usage

Promise syntax

const compassedu = require('compassedu');
const app = new compassedu('https://example.compass.education');

app.auth.authenticate('myUsername', 'myPassword')
    .then(function() {
      // your code here
    })
    .catch(function(err) {
      // your error handling here
    });

Async/Await syntax

const compassedu = require('compassedu');
const app = new compassedu('https://example.compass.education');

(async ()=>{
  try {
    await app.auth.authenticate('myUsername', 'myPassword');
    // your code here
  } catch (e) {
    // your error handling here
  }
})();

Top level await syntax (needs to be an ES module)

import * from compassedu;
const app = new compassedu('https://example.compass.education');

try {
  await app.auth.authenticate('myUsername', 'myPassword');
  // your code here
} catch (e) {
  // your error handling here
}

The documentation and code reference can be found at https://maytha8.github.io/CompassEdu/.

What next?

0.3.0

2 years ago

0.2.2

2 years ago

0.1.1

2 years ago