Skip to content

KaniRobinson/tpns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Push Notification Service Library

Installation

$ composer require KaniRobinson/tpns dev-master

Usage

<?php

require __DIR__.'/vendor/autoload.php';

use TPNS\TPNS;

$tpns = new TPNS();

// Create a Application 
$app = $tpns->app([
    'url' => 'https://facebook.com'
])->create();

// Create a User
$user = $tpns->user([
    'user_id' => '1',
    'key' => $app->result->key,
    'app_id' => $app->result->app_id,
    'token' => '21982198989128jdij9d8nmdbnj3jdu=32did3n'
])->create();

// Create a Push Notification for specific user
$notification = $tpns->notification([
    'token' => $user->result->token,
    'key' => $app->result->key,
    'title' => 'This is a notification title',
    'body' => 'This is the notification body contents!!!',
    'action' => 'FUNC_KEY',
])->create();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages