NOTE: The following documentation applies only to the Drupal 7 version of this module.

This module integrates with OneSignal, which is a free multi-platform push notification service for mobile apps.

This module wraps the PHP library written by @norkunas providing a simple user interface to setup the basic configurations to initialize the OneSignal class.

NOTE: This is not an end user module. This is for developers.

Requirements

This module depends on Composer Manager to deal with the external library mentioned above so you don't have to download it manually. Please check its documentation to know how to install properly.

Installation

You only need to run this drush command:

drush en -y onesignal

It will download and install all dependent libraries.

How to use

Once you installed the module, you can use this function in your code to initialize the OneSignal class:

$config = onesignal_initialize();
$api = new OneSignal($config);

Now you can use $api object to handle the whole API. You can see some examples in the PHP library documentation: