1. Go to this page and download the library: Download mrdth/decipher-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mrdth / decipher-api example snippets
$directory = 'selfserve/99d';
$survey_id = '12345';
\Decipher::setServerDirectory($directory)->setSurveyId($survey_id);
try {
$survey_structure = \Decipher::getSurveyStructure('json');
// Do whatever with $survey object
} catch (\GuzzleHttp\Exception\RequestException $e) {
echo 'Error making request, server responded: ' . $e->getCode();
}
use MrDth\DecipherApi\Factories\Client;
use MrDth\DecipherApi\Decipher;
$api_uri = 'https://v2.decipherinc.com/api/v1/';
$api_key = 'OBVIOUSLYFAKEAPIKEY';
$directory = 'selfserve/99d';
$survey_id = '12345';
$client = new Client($api_uri, $api_key);
$decipher = new Decipher($client, $api_uri, $api_key);
$decipher->setServerDirectory($directory)->setSurveyId($survey_id);
try {
$survey_structure = $decipher->getSurveyStructure('json');
// Do whatever with $survey object
} catch (\GuzzleHttp\Exception\RequestException $e) {
echo 'Error making request, server responded: ' . $e->getCode();
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.