jobstreet/js-push-notification
Composer 安装命令:
composer require jobstreet/js-push-notification
包简介
JS Push Notification SDK
关键字:
README 文档
README
JobStreet.com Push Notification Service
##Installation
Using Composer:
composer require jobstreet/js-push-notification 1.0.0
##Usage
This is the minimal example that you'll need to have:
require_once 'vendor/autoload.php';
$client = new JSPNClient(array(
'applicationId' => 'YOUR_APPLICATION_ID',
'isSandbox' => true
));
$response = $client->publishMessage(12345, 'This is the notification message', array(
'customParameter1' => 'parameter'
), array(
'notificationOptions' => 'options'
));
if($response == 1) {
echo 'Successfully publish message';
}
else {
echo 'Failed to publish message. Error message ' . $response->error->message;
}
##Configuration File You may want to create a client config file in other place. Here is the example of defining the config file:
define('JSPN_CONFIG_PATH', 'path/to/config.php');
require_once 'vendor/autoload.php';
$client = new JSPNClient();
config.php
return array(
'applicationId' => 'YOUR_APPLICATION_ID',
'isSandbox' => true
);
##Documentation
More information and example are available at JSPushNotification SDK Wiki
统计信息
- 总下载量: 11.78k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2014-08-26