Skip to content

grazumkov/onlinepbx-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP client for http api onlinepbx.ru

Http api documentation onlinepbx.ru

Install

Manual

Download zip archive and require Autoloader.php

require_once 'lib/Autoloader.php';

Composer (guide)

Add require item to your project composer.json:

"xtratio/onlinepbx-api": "~1.0"

or command line:

composer require xtratio/onlinepbx-api

Use

// Create new client object
$api = new xtratio\Onpbx\ApiClient(
            "yourdomain.onpbx.ru",
            "api key"
        );
        
// Get call history
$from = (new DateTime())->modify("-1 day")->format("r");
$to = (new DateTime())->format("r");
$result = $api->callHistory(array("date_from"=>$from,"date_to"=>$to));