Push Notification Delivery & Analytics for Websites and Mobile
PHP
Latest commit 1161587 Apr 28, 2016 @PushAssistTeam PushAssistTeam README changed
Permalink
Failed to load latest commit information.
LICENSE Initial commit Apr 26, 2016
PushAssist.php Bug fixed Apr 26, 2016
README.md README changed Apr 28, 2016
composer.json Fixed Apr 26, 2016

README.md

web-push-notifications

Push Notification Delivery & Analytics for Websites and Mobile

Web Push Notifications is a PHP Library to quickly integrate and send push notifications with PushAssist REST API. Setup is easy just create a Free Account, verify your email address and login to your PushAssist Control Panel to get the API & Secret Keys.

Initialization

Simply require and initialize the PushAssist class like:

require_once 'PushAssist.php';

Composer Installation

To install PushAssist Class, simply:

$ composer require PushAssist/Web-Push-Notifications 

Sending Out Notifications

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$notification_array = array("notification" => array(                                    
                            "title" => 'YOUR NOTIFICATION TITLE',
                            "message" => 'YOUR NOTIFICATION TITLE',
                            "redirect_url" => 'URL TO REDIRECT IF MESSAGE IS CLICKED',
                            "image" => 'MESSAGE IMAGE FULL PATH'),
                            //UTM is optional Keep it empty if you are not passing utm_params.
                            "utm_params" => array("utm_source" => $utm_source,  
                            "utm_medium" => $utm_medium,
                            "utm_campaign" => $utm_campaign),
                            //Segments is optional notification send only for those who subscribers by this  segment.
                            "segments" => ('Sports', 'Hockey'); 
                        );

$push_notification->pushassist_send_notification($notification_array)

Sending Out Campaigns

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$campaign_array = array("campaign" => array(                                    
                            "title" => 'YOUR CAMPAIGN TITLE',
                            "message" => 'YOUR CAMPAIGN TITLE',
                            "redirect_url" => 'URL TO REDIRECT IF MESSAGE IS CLICKED',
                            "timezone" => 'TIME ZONE FORMAT(Y-M-D) 24 HOUR FORMAT',
                            "image" => 'MESSAGE IMAGE FULL PATH'),
                            //UTM is optional Keep it empty if you are not passing utm_params.
                            "utm_params" => array("utm_source" => $utm_source,  
                            "utm_medium" => $utm_medium,
                            "utm_campaign" => $utm_campaign),
                            //Segments is optional Campaign send only for those who subscribers by this  segment.
                            "segments" => ('Sports', 'Hockey'); 
                        );

$push_notification->pushassist_create_campaigns($campaign_array)

Add Segment

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$segment_array = array("segment" => array(
                                "segment_name" => 'YOUR SEGMENT NAME')
                            );

$push_notification->pushassist_create_segments($segment_array);

Get Account Details

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$push_notification->pushassist_account_details();

Get Dashboard Details

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$push_notification->pushassist_dashboard_details();

Get Notification History

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$push_notification->pushassist_notification_history();

Get Notification Details By Id

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$push_notification->pushassist_notification_details_by_id(ID);

Get Notification Details By Account Name

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$push_notification->pushassist_notification_details_by_subdomain('ACCOUNT NAME');

Get Campaign History

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$push_notification->pushassist_campaigns_history();

Get Campaign Details By Id

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$push_notification->pushassist_campaigns_details_by_id(ID);

Get Campaign Details By Account Name

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$push_notification->pushassist_campaigns_details_by_subdomain('ACCOUNT NAME');

Get Segment Details

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$push_notification->pushassist_segment_details();

Get Segment Details By Id

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$push_notification->pushassist_segment_details_by_id(ID);

Get Segment Details By Name

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$push_notification->pushassist_segment_details_by_name('SEGMENT NAME');

Get Segment Counts

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$push_notification->pushassist_segment_count();

Get Subscribers Details

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$push_notification->pushassist_subscribers_details();

Get Subscribers Details By Account Name

// Create an object
$push_notification = new PushAssist('YOUR API KEY', 'YOUR SECRET KEY');

$push_notification->pushassist_subscribers_details_by_subdomain('ACCOUNT NAME');

Feel free to integrate web-push-notification by PushAssist into your favorite PHP Framework. If you need any assistance just let us know.

About PushAssist

PushAssist is a Push Notification SaaS service for sites. You can contact us by email at support@pushassist.com.