Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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)