2017 © Pedro Peláez
 

library messagebird-guzzle-client

A guzzle specific client implementation for the Message Bird API.

image

phlib/messagebird-guzzle-client

A guzzle specific client implementation for the Message Bird API.

  • Friday, March 10, 2017
  • by letssurf
  • Repository
  • 4 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

phlib/messagebird-guzzle-client

Build Status Codecov Latest Stable Version Total Downloads Licence, (*1)

MessageBird Guzzle HTTP client implementation., (*2)

Allows you to replace the Message Bird HTTP Client with an implementation that uses the Guzzle HTTP Client. This means there is a more control over certain options in the client., (*3)

Install

Via Composer, (*4)

``` bash $ composer require phlib/messagebird-guzzle-client, (*5)


## Creating a HTTP Client ``` php <?php use Phlib\MbGuzzleClient\Http\Client; use GuzzleHttp\Client as GuzzleClient; $guzzleClient = new GuzzleClient($options = []); $httpClient = new Client(MessageBird\Client::ENDPOINT, $guzzleClient);

Using the HTTP Client with MessageBird

``` php, (*6)

$messageBird = new \MessageBird\Client('YOUR_ACCESS_KEY', $httpClient);, (*7)

// OR, (*8)

$messageBird = new \Phlib\MbGuzzleClient\Client('YOUR_ACCESS_KEY');, (*9)

// Get you balance $balance = $messageBird->balance->read();, (*10)

```, (*11)

Problems

HTTPClient injection through constructor is wrongfully reused, (*12)

When constructing the MessageBird client with a custom HTTP client implementation, as is done here, the side effect is that the same client is used for API and Chat API endpoints., (*13)

License

This package is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version., (*14)

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details., (*15)

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/., (*16)

The Versions

10/03 2017

dev-master

9999999-dev

A guzzle specific client implementation for the Message Bird API.

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by Luke Richards

http client guzzle message bird

09/03 2017

1.0.0

1.0.0.0

A guzzle specific client implementation for the Message Bird API.

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by Luke Richards

http client guzzle message bird