Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grazumkov/onlinepbx-api
Onlinebpx php http api client
https://github.com/grazumkov/onlinepbx-api
api api-client composer http-client php
Last synced: 2 days ago
JSON representation
Onlinebpx php http api client
- Host: GitHub
- URL: https://github.com/grazumkov/onlinepbx-api
- Owner: grazumkov
- License: mit
- Created: 2016-04-27T16:02:31.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-02-19T16:06:18.000Z (almost 6 years ago)
- Last Synced: 2024-04-20T01:43:22.313Z (9 months ago)
- Topics: api, api-client, composer, http-client, php
- Language: PHP
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP client for http api onlinepbx.ru
Http api documentation [onlinepbx.ru](https://api.onlinepbx.ru/#page-nav-http)Install
---------### Manual
Download zip archive and require Autoloader.php
```php
require_once 'lib/Autoloader.php';
```
### Composer ([guide](https://packagist.org/))
Add require item to your project composer.json:
```json
"xtratio/onlinepbx-api": "~1.0"
```
or command line:
```sh
composer require xtratio/onlinepbx-api
```Use
---------```php
// 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));
```