Pushover Client
, (*1)
❗️ Provides functionality to send messages via Pushover, (*2)
Requirements
Installation
composer require brunty/pushover
, (*3)
You will also need to require your adapter of choice http://docs.php-http.org/en/latest/clients.html, (*4)
Usage
As per the Pushover API Documentation - user
and token
form your credentials., (*5)
Messages are made up of a message body and a title in a Brunty\Pushover\Message
object., (*6)
Optionally you can specify a device to send the message to as well, if you don't specify this, it'll send to all devices., (*7)
<?php
use Brunty\Pushover\Client;
use Brunty\Pushover\Credentials;
use Brunty\Pushover\Message;
use Http\Mock\Client as MockClient;
// Mock client here wouldn't send a request, it's used for testing
// substitute with your own real client from the adapters above
$client = new Client(new MockClient, new Credentials('user', 'token'));
$client->pushMessage(new Message('message', 'optional title'), 'optional device');
The following are not (yet) supported, but will be in the near future:, (*8)
url
url_title
priority
timestamp
sound
Contributing
This started as a small personal project., (*9)
Although this project is small, openness and inclusivity are taken seriously. To that end a code of conduct (listed in the contributing guide) has been adopted., (*10)
Contributor Guide, (*11)