PHP code example of pashamesh / comagic-api

1. Go to this page and download the library: Download pashamesh/comagic-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/ */

    

pashamesh / comagic-api example snippets


$config = [
    // t_login_here',
    'password' => 'put_password_here',
    // 

$config = [
    // t_login_here',
    'password' => 'put_password_here',
    'endpoint' => [
        'rest_api' => 'https://api.uiscom.ru/api/'
    ],
    // 

use CoMagic\RestApiClient;

$restApi = new RestApiClient($config);
var_dump(
    $restApi->call(['date_from' => '2017-01-10', 'date_till' => '2017-01-13'])
);

$callApi = new CallApiClient($config);
var_dump($callApi->listCalls());

var_dump($callApi->metadata());