phrlog / zvonok-client
Client for Zvonok(calltools) API
v1.1.0
2019-11-14 14:06 UTC
Requires
- php: >=7.2
- ext-json: *
- netresearch/jsonmapper: ^1.4
- nyholm/psr7: ^1.2
- php-http/curl-client: ^1.7
- php-http/discovery: ^1.7
- php-http/httplug: ^1.1
- php-http/message: ^1.7
- php-http/message-factory: ^1.0
Requires (Dev)
- phpunit/phpunit: ^5.7
This package is auto-updated.
Last update: 2024-11-15 20:42:15 UTC
README
Description
Library for interacting with Zvonok(CallTools) API
Installation
composer require phrlog/zvonok-client
Examples
Client initialization
$client = new \Phrlog\Zvonok\Client(\Phrlog\Zvonok\Config::createCalltools('your_public_key'));
Add call
$request = new \Phrlog\Zvonok\Phone\Request\AddCallRequest('+79857777777', 'campaign_id'); $response = $client->execute($request);
Get call by id
$request = new \Phrlog\Zvonok\Phone\Request\GetCallByIdRequest('234'); $response = $client->execute($request);
Get call by phone
$request = new \Phrlog\Zvonok\Phone\Request\GetCallByPhoneRequest('+79857777777', 'campaign_id'); $response = $client->execute($request);
Get region by phone
$request = new \Phrlog\Zvonok\Phone\Request\GetRegionByPhoneRequest('+79857777777'); $response = $client->execute($request);
License
This project is licensed under the MIT License - see the LICENSE.md file for details