nidux/app4less-push

There is no license information available for the latest version (v1.0) of this package.

Provides a way to send push notifications to App4Less API and obtain the application token when using the mobile app

v1.0 2019-05-14 20:08 UTC

This package is auto-updated.

Last update: 2024-04-26 19:43:26 UTC


README

Provides a way to send push notifications to App4Less API and obtain the application token when using the mobile app. This is not an official package supported by App4less

Installation

You can install the package via composer:

composer require nidux/app4less-push

Usage

Send Notifications

Initialize App4Less API Client

    use Nidux\App4LessPush\APIClient;
    $client = new APIClient('USERNAME','PASSWORD');

Send push notifications:

    $result = $client->sendPushNotification(
                'TOKEN1;TOKEN2;TOKEN3',
                'A NICE TTTLE',
                'A VALID URL',
                'utm'
            );

Check if your site is being accessed within an App4Less app

    use Nidux\App4LessPush\Utils;
    $result = Utils::isApp4Less(); // True if yes

Get Token App

    use Nidux\App4LessPush\Utils;
    $token = Utils::getAppUUID();

Get UUID App

    use Nidux\App4LessPush\Utils;
    $uuid = Utils::getAppUUID();