No description, website, or topics provided.
JavaScript Makefile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

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