Nidux / app4less-push

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

app4less-push

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();

About

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

License:GNU General Public License v3.0


Languages

Language:PHP 100.0%