loevgaard/linkmobility-php-sdk

PHP SDK for Linkmobility API

v1.1.0 2018-05-29 11:43 UTC

This package is auto-updated.

Last update: 2024-04-06 08:14:40 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score

PHP SDK for the Linkmobility REST API v2

Install

Via Composer

$ composer require loevgaard/linkmobility-php-sdk

Usage

<?php
require_once 'vendor/autoload.php';

use Loevgaard\Linkmobility\Client;
use Loevgaard\Linkmobility\Request\PostMessageRequest;
use Loevgaard\Linkmobility\Response\BatchStatusResponse;
use Loevgaard\Linkmobility\ValueObject\Sender;
use Loevgaard\Linkmobility\ValueObject\Message;
use Loevgaard\Linkmobility\ValueObject\Recipient;

$request = new PostMessageRequest(new Sender('Sender'), new Message('Message'), [new Recipient('+4511223344')]);

$client = new Client('insert api key');

/** @var BatchStatusResponse $response */
$response = $client->request($request);

print_r($response);

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

License

The MIT License (MIT). Please see License File for more information.