Skip to content

traitify/traitify-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •