PHP code example of gufy / livechat-api
1. Go to this page and download the library: Download gufy/livechat-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/ */
gufy / livechat-api example snippets
Gufy\LivechatApi\LivechatApi;
use Gufy\LivechatApi\Models\Agent;
$api = new LivechatApi('your-user-name', 'your-api-key');
// retrieving all agents
$agents = $api->agent->get();
print_r($agents);
// or the other way, and of course you have to declare LivechatApi configuration first before using class below
$class = new Agent;
$agents = $class->get();
// it will have the same result as the code above
print_r($agents);