scormcloud-api-wrapper icon indicating copy to clipboard operation
scormcloud-api-wrapper copied to clipboard

getCourseMetaData

Open springcode opened this issue 6 years ago • 0 comments

Can this be added to the API Wrapper?

I have fashioned my own for testing ...

SCORMCloud.prototype.getCourseMetaData = function (courseid, callback) {

var url = new URL('api?method=rustici.course.getMetadata', this.serviceUrl);

// The id used to identify this course.
if (courseid) url.searchParams.set('courseid', courseid);

this._request(url, function (error, json) {

    if (error) return callback(error, json);

    let data = json.rsp.package;

    return callback(error, data);
});

}

springcode avatar Jun 07 '19 15:06 springcode