PHP code example of survease / php-lib
1. Go to this page and download the library: Download survease/php-lib 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/ */
survease / php-lib example snippets
$httpClient = \Survease\Api\HttpClientFactory::make('apikey');
$client = new \Survease\Api\Client($httpClient);
// Add a single invitation to dispatch
$resource = $client->survey('surveyId')
->invitations()
->add(new \Survease\Api\DTO\InvitationRecipient('[email protected]', 'John', 'Snow', 'ru'));
$response = $client->makeRequest($resource);
if ($response->isSuccessful()) {
echo "Well done";
}
composer