Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/seven-io/php-client

PHP API Client for seven.io
https://github.com/seven-io/php-client

api-client cnam composer hlr mnp rcs sdk sms text2speech

Last synced: 2 months ago
JSON representation

PHP API Client for seven.io

Awesome Lists containing this project

README

        

# Official PHP API Client

## Installation

**Via Composer:**

```shell script
composer require seven.io/api
```

Alternatively you
can [download as *.ZIP](https://github.com/seven-io/php-client/releases/latest "download as *.ZIP")
if you don't use Composer.

### Usage

```php
use Seven\Api\Client;
use Seven\Api\Resource\Sms\SmsParams;
use Seven\Api\Resource\Sms\SmsResource;

$client = new Client('MY_VERY_SECRET_API_KEY!');
$smsResource = new SmsResource($client);
$smsParams = new SmsParams('HI2U', '+4901234567890');
$res = $smsResource->dispatch($smsParams);
var_dump($res);
```

See [docs](/docs) for more details.

##### Tests

Some basic tests are implemented. You can run them like this:

```shell script
SEVEN_API_KEY= php vendor/bin/phpunit tests
```

or

```shell script
SEVEN_API_KEY_SANDBOX= php vendor/bin/phpunit tests
```

Make sure to fill in the values.

###### Support

Need help? Feel free to [contact us](https://www.seven.io/en/company/contact/).

[![MIT](https://img.shields.io/badge/License-MIT-teal.svg)](LICENSE)