Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/traitify/traitify-node
https://github.com/traitify/traitify-node
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/traitify/traitify-node
- Owner: traitify
- Created: 2014-04-16T17:47:09.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-07T23:21:03.000Z (almost 9 years ago)
- Last Synced: 2024-04-25T18:03:10.528Z (8 months ago)
- Language: JavaScript
- Size: 242 KB
- Stars: 3
- Watchers: 12
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Traitify
=========A small library providing access to traitify's api
## Installation
```shell
npm install -g traitify
```## Usage
#### Config
```js
var traitify = require('traitify');traitify.setHost("lvh.me");
traitify.setVersion("v1");
traitify.setSecretKey("fakeKey");
```#### Create Assessment
```js
var deckId = "Your Deck Id";
traitify.createAssessment(deckId, function(assessment){
// Use assessment here.
console.log(assessment);
});
```#### Get Assessment
```js
var assessmentId = "Your Assessment Id";traitify.getAssessment(assessmentId, function(assessment){
// Use assessment here.
console.log(assessment);
});
```#### Get Assessment Slides
```js
var assessmentId = "Your Assessment Id";traitify.getSlides(assessmentId, function(assessment){
// Use assessment here.
console.log(assessment);
});
```#### Set Assessment Slide
```js
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
```js
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
```js
var assessmentId = "Your Assessment Id";traitify.getPersonalityTypes(assessmentId, function(assessment){
// Use assessment here.
console.log(assessment);
});
```## Tests
```shell
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