1.2.0 • Published 3 years ago

elucidat-api v1.2.0

Weekly downloads
5
License
ISC
Repository
github
Last release
3 years ago

Elucidat API Integration

A library for connecting to the Elucidat API. Find out more about Elucidat at www.elucidat.com

Installation

Using npm:

$ npm install elucidat-api 

Usage

An example for returning the HTML of a course using Node.js:

const elucidatAPI = require('elucidat-api');
const https = require('https');

const parameters = {
    path: 'releases/launch',
    consumer_key: '',
    consumer_secret: '',
    fields: {
        'release_code': '',
        'name': '',
        'email_address': ''
    }
};

elucidatAPI(parameters, function (statusCode, response) {
    if (response.url) {
        // finally load the contents of the page
        https.get(response.url, function (res) {
            var pageContent = '';
            res.on('data', function (chunk) {
                pageContent += chunk;
            }).on('end', function () {
                process.stdout.write(pageContent);
            });
        }).on('error', function (e) {
            console.error(e.message);
        }).end();
    } else {
        console.error(response);
    }
});

For other methods see the API documentation at help.elucidat.com.

1.2.0

3 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago