PUBQ is a pub/sub channels cloud and this is the official PHP client library including only REST interface.
To meet PUBQ and see more info and examples, please read the documentation.
Follow these steps to just start building with PUBQ in PHP or see the Quickstart guide which covers more programming languages.
The PHP SDK is available as composer package on Packagist:
$ composer require pubq/pubq-phpOr manually add to composer.json:
"require": {
"pubq/pubq-php": "^1.0.1"
}Then run:
$ composer updateGet your application API key from PUBQ dashboard by creating a new app or use existing one.
Construct REST interface of PUBQ PHP SDK:
<?php
$rest = new Pubq\REST(["key" => "YOUR_API_KEY"]);Publish a message with REST interface:
$channel = $rest->channels->get('my-channel');
$channel->publish('Hello!');Please, read the contribution guide.
git clone git@github.com:pubqio/pubq-php.git
cd ./pubq-php/
composer installTo run tests using PHPUnit:
vendor/bin/phpunit tests