1. Go to this page and download the library: Download survos/platform-api-php 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/ */
survos / platform-api-php example snippets
use Survos\Client\SurvosClient;
$client = new SurvosClient('https://demo.survos.com/api1.0/');
if (!$client->authorize('otest', 'tt')) {
throw new \Exception('Wrong credentials!');
}
use Survos\Client\Resource\UserResource;
$data = [
'username' => 'john85210101',
'email' => '[email protected]',
'name' => 'Nick',
];
$resource = new UserResource($client);;
if ($resource->register($data)) {
//user has been created
}