survease/php-lib

Survease API PHP Library

0.1.1 2021-06-03 11:05 UTC

This package is auto-updated.

Last update: 2024-03-29 04:19:55 UTC


README

Join Survease platform here: https://www.survease.com/

Installation

composer require survease/php-lib

Example

<?php

$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@email.com', 'John', 'Snow', 'ru'));
    
$response = $client->makeRequest($resource);
    
if ($response->isSuccessful()) {
    echo "Well done";
}