superbalist/php-localytics-push

This package is abandoned and no longer maintained. No replacement package was suggested.

A PHP client for sending push notifications via the Localytics Push Notification service

1.0.0 2016-10-19 08:08 UTC

This package is auto-updated.

Last update: 2024-08-12 00:24:35 UTC


README

A PHP client for sending push notifications via the Localytics Push Notification service

Author Build Status StyleCI Software License Packagist Version Total Downloads

Installation

composer require superbalist/php-localytics-push

Integrations

Want to get started quickly? Check out some of these integrations:

Usage

$client = new GuzzleHttp\Client();
$appID = 'your-app-id';
$apiKey = 'your-api-key';
$apiSecret = 'your-api-secret';

$localytics = new \Superbalist\LocalyticsPush\LocalyticsPush($client, $appID, $apiKey, $apiSecret);
$message = [
    'target' => [
        'profile' => [
            'criteria' => [
                [
                    'key' => '$email',
                    'scope' => 'Organization',
                    'type' => 'string',
                    'op' => 'in',
                    'values' => [
                        'matthew@superbalist.com',
                    ]
                ]
            ],
            'op' => 'and',
        ],
    ],
    'alert' => [
        'title' => 'Message Title',
        'body' => 'This is my message content!',
    ]
];
$response = $localytics->pushMessage('profile', $message);