morphatic/qualtrics

This package is abandoned and no longer maintained. No replacement package was suggested.

Provides access to the Qualtrics API in Laravel 4

1.1.0-beta 2014-08-16 03:17 UTC

This package is not auto-updated.

Last update: 2020-01-20 03:33:10 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version Build Status Coverage Status Dependency Status License

The Qualtrics REST API allows you to query the Qualtrics system using a simple URL syntax. All requests are simple GET or POST requests that return XML or JSON. The REST API allows you to interact with any part of the Qualtrics system allowing for full integration with client systems.

This Qualtrics API wrapper for Laravel 4 provides access to the API via a PHP wrapper.

Installation

To install the Qualtrics API wrapper for Laravel 4, add the following to the "require" element of your composer.json file:

    "morphatic/qualtrics": "1.1.*@dev"

Then run composer update from the command line.

In config.app under providers add:

    'Morphatic\Qualtrics\QualtricsServiceProvider',

Finally, from the command line run:

    php artisan config:publish morphatic/qualtrics

And in the app/config/packages/morphatic/qualtrics/config.php file update your username and API token. Optionally you may also add a library ID to the config file.

Basic usage

You can create a basic instance of the class with just a username and API token. Here's an example:

// Qualtrics login email 
$user  = 'someuser@test.com';

// Qualtrics API Token
$token = 'RmvGK6vjF3Izx8Ea2pCisDDSpqE4dELw9AzheBDc';

// create the instance
$qtrx  = new Qualtrics( $user, $token );

// get the user info (no additional parameters necessary)
$info  = $qtrx->getUserInfo();

// accessible libraries
$libraries = $info->Libraries;

// get a particular survey (requires ID of desired survey)
$mysurvey = $qtrx->getSurvey( [ 'SurveyID' => 'SV_9EQYOts8KmOle04' ] );                       

Any additional parameters required by the call (see the official API documentation) should be passed as an associative array of key/value pairs. The keys are case sensitive and follow the naming convention of the official docs.

Disclaimer

I am in no way, shape, or form affiliated with Qualtrics. In order to gain access to the Qualtrics REST API, your organization or institution must subscribe to this service. In my case, it meant contacting an IT administrator at my university and asking them to do so.

License

Qualtrics API wrapper for Laravel 4 is open-sourced software licensed under the MIT license