pubq / pubq-php
PUBQ PHP SDK
1.0.1
2024-01-13 19:10 UTC
Requires
- php: >=5.4
- guzzlehttp/guzzle: ^7.6
- nesbot/carbon: ^2.72
Requires (Dev)
- phpunit/phpunit: ^10.3
README
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.
Getting Started
Follow these steps to just start building with PUBQ in PHP or see the Quickstart guide which covers more programming languages.
Install with package manager
The PHP SDK is available as composer package on Packagist:
$ composer require pubq/pubq-php
Or manually add to composer.json
:
"require": { "pubq/pubq-php": "^1.0.1" }
Then run:
$ composer update
Interacting with PUBQ
Get 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!');
Development
Please, read the contribution guide.
Setup
git clone git@github.com:pubqio/pubq-php.git
cd ./pubq-php/
composer install
Tests
To run tests using PHPUnit:
vendor/bin/phpunit tests