Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/notify-events/php
PHP extension to integrate your project with Notify.Events service.
https://github.com/notify-events/php
alert call composer notification php php-extension slack teams telegram viber voice
Last synced: about 8 hours ago
JSON representation
PHP extension to integrate your project with Notify.Events service.
- Host: GitHub
- URL: https://github.com/notify-events/php
- Owner: notify-events
- License: mit
- Created: 2020-04-25T21:09:12.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-13T11:10:06.000Z (about 2 years ago)
- Last Synced: 2024-09-20T04:48:23.424Z (about 2 months ago)
- Topics: alert, call, composer, notification, php, php-extension, slack, teams, telegram, viber, voice
- Language: PHP
- Homepage: https://notify.events/source/61
- Size: 23.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PHP client for Notify.Events
A simple PHP extension that simplifies the process of integrating your project with the [Notify.Events](https://notify.events) service to send messages to your channels.
#### Instruction on another languages
- [Русский](/docs/ru-RU/README.md)
# Installation
The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
Either run
```
php composer.phar require --prefer-dist notify-events/php
```or add
```
"notify-events/php": "~1.0"
```to the require section of your composer.json.
# Usage
To use this extension, you need to import the Message class into your PHP script.
If you used composer for installation, it will be enough to include the autoload.php file:
```php
require_once "vendor/autoload.php";
```Otherwise, if you added the extension manually, you need to import the Message class by yourself:
```php
require_once "path/to/notify-events/php/Message.php";
```After that, you can create a message object, set the necessary parameters and send the message to the channel.
### Usage example
```php
important message', 'Title', Message::PRIORITY_HIGH, Message::LEVEL_ERROR);// Attach the file to the message.
$message->addFile('path\to\local\file');
// Send a message to your channel in Notify.Events.
$message->send($myChannelToken);
?>
```[List of all available functions](/docs/en-US/Message.md)