adl-xapiwrapper

ADL's Experience API wrapper

ADL xAPI Wrapper - Node

ADL's Experience API wrapper for nodejs. The wrapper simplifies the process of communicating with an xAPI LRS.

Install the module with: npm install adl-xapiwrapper

var adl = require('adl-xapiwrapper');
var opts = {
    "url":"https://lrs.adlnet.gov/xapi/",
    "auth":{
        "user":"tom",
        "pass":"1234"
    },
};
var mylrs = new adl.XAPIWrapper(opts);
 
mylrs.getStatements(null, null, function(errrespbdy) {
    console.log(resp.statusCode);
    console.log(JSON.parse(bdy));
});
>> 200
>> {statements:[..], more:""}

Sha1 hash of a string. Used for hashing contents sent to the document endpoints (state, activity profile, agent profile) to use for concurrency checks. hash(str)

var doc = "This is my activity profile";
var myhash = adl.hash(doc)

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

(Nothing yet)

Copyright (c) 2013 ADL
Licensed under the Apache, 2.0 licenses.