Skip to content

traitify/traitify-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Traitify Api PHP Library

This is a helper library for the Traitify API - https://developer.traitify.com/

Installing via Composer

The recommended way to install the Traitify library is through Composer.

# Install Composer
curl -sS https://getcomposer.org/installer | php

# Add the library as a dependency
php composer.phar require traitify/client dev-master

or alternatively, you can add it directly to your composer.json file.

{
    "require": {
        "traitify/client": "dev-master"
    }
}

Then install via Composer:

composer install

Finally, require Composer's autoloader in your PHP script:

require __DIR__.'/vendor/autoload.php';

This library is best used with Traitify JS

http://traitify.github.io/traitify-js/

Secret Key Required

For instructions on obtaining a public key visit: https://developer.traitify.com

Using The Traitify PHP Client Library:

Create an instance of the Client

$client = new Traitify\Client([
  'host'=>'api-sandbox.traitify.com', /* Example Host */ 
  'version'=>'v1', /* Example Version */
  'secretKey'=>'34aeraw23-3a43a32-234a34as42' /* Example Secret Key */
]);
$client->createAssessment("career-deck");

Get Slides

$client = new Traitify\Client([
  'host'=>'api-sandbox.traitify.com', /* Example Host */ 
  'version'=>'v1', /* Example Version */
  'secretKey'=>'34aeraw23-3a43a32-234a34as42' /* Example Secret Key */
]);
$client->getSlides('a45rasw3-45s3a32-234aas45'); /* Example Assessment Id */

Get Decks

$client = new Traitify\Client([
  'host'=>'api-sandbox.traitify.com', /* Example Host */ 
  'version'=>'v1', /* Example Version */
  'secretKey'=>'34aeraw23-3a43a32-234a34as42' /* Example Secret Key */
]);
$client->getDecks();

Get Personality Types

$client = new Traitify\Client([
  'host'=>'api-sandbox.traitify.com', /* Example Host */ 
  'version'=>'v1', /* Example Version */
  'secretKey'=>'34aeraw23-3a43a32-234a34as42' /* Example Secret Key */
]);
$client->getPersonalityTypes('a45rasw3-45s3a32-234aas45'); /* Example Assessment Id */

Get Personality Traits

$client = new Traitify\Client([
  'host'=>'api-sandbox.traitify.com', /* Example Host */ 
  'version'=>'v1', /* Example Version */
  'secretKey'=>'34aeraw23-3a43a32-234a34as42' /* Example Secret Key */
]);
$client->getPersonalityTraits('a45rasw3-45s3a32-234aas45'); /* Example Assessment Id */

Contributing

Building, Testing and Bundling:

Installing PHPUnit https://phpunit.de/manual/current/en/installation.html

$ composer install
$ phpunit tests/traitify_client.php

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages