traitify
v2.2.0
Published
A small library providing access to traitify's api
Downloads
3
Readme
Traitify
A small library providing access to traitify's api
Installation
npm install -g traitify
Usage
Config
var traitify = require('traitify');
traitify.setHost("lvh.me");
traitify.setVersion("v1");
traitify.setSecretKey("fakeKey");
Create Assessment
var deckId = "Your Deck Id";
traitify.createAssessment(deckId, function(assessment){
// Use assessment here.
console.log(assessment);
});
Get Assessment
var assessmentId = "Your Assessment Id";
traitify.getAssessment(assessmentId, function(assessment){
// Use assessment here.
console.log(assessment);
});
Get Assessment Slides
var assessmentId = "Your Assessment Id";
traitify.getSlides(assessmentId, function(assessment){
// Use assessment here.
console.log(assessment);
});
Set Assessment Slide
var assessmentId = "Your Assessment Id";
traitify.addSlide(assessmentId, {response: true, response_time: 1000}, function(assessment){
// Use assessment here.
console.log(assessment);
});
Bulk Set Assessment Slides
var assessmentId = "Your Assessment Id";
traitify.addSlides(assessmentId, [{id: "slide-uuid", "response":true, response_time: 1000}], function(assessment){
// Use assessment here.
console.log(assessment);
})
Get Assessment Personality Types
var assessmentId = "Your Assessment Id";
traitify.getPersonalityTypes(assessmentId, function(assessment){
// Use assessment here.
console.log(assessment);
});
Tests
npm test
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. test your code.
Release History
- 0.1.0 Initial release