zortje/boxcar-notifications-php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zortje/boxcar-notifications-php

最新稳定版本:1.0.0

Composer 安装命令:

composer require zortje/boxcar-notifications-php

包简介

A Boxcar api wrapper for sending notifications to a Boxcar account

README 文档

README

A Boxcar API wrapper for sending notifications to a Boxcar account without any dependencies except the cURL library.

Packagist Travis Code Coverage Scrutinizer Dependency Status Packagist

SensioLabsInsight

Installing

The recommended way to install is though Composer.

{
    "require": {
        "zortje/boxcar-notifications-php": "~1.0"
    }
}

Usage

$boxcar = new \Zortje\BoxcarNotifications\Boxcar('secret_access_token');

$boxcar->setSourceName('ACME');
$boxcar->setSound('notifier-1');
$boxcar->setIconUrl('http://new.boxcar.io/images/rss_icons/boxcar-64.png');
$boxcar->setOpenUrl('http://maps.google.com/maps?q=cupertino');

$notification = new \Zortje\BoxcarNotifications\Notification('Message title', '<b>Bold</b> content text.');

$boxcar->push($notification);

Access token

'secret_access_token' in the above example. Your access token can be found in Boxcar global setting pane (Not the registered Boxcar email address).

Title

'Message title' in the above example. Title for the notification. Max size is 255 chars.

Content

'<b>Bold</b> content text.' in the above example. Content of the notification. Can be text or HTML. Max size is 4 Kb.

Source name

'ACME' in the above example. This is a short source name to show in inbox. Defaults to "Custom notification" if omitted.

Sound

'notifier-1' in the above example. General sound is used if omitted. Please find list of supported sounds below.

Icon URL

'http://new.boxcar.io/images/rss_icons/boxcar-64.png' in the above example. Icon to be displayed in the Boxcar inbox.

open URL

'http://maps.google.com/maps?q=cupertino' in the above example. If defined, Boxcar will redirect the receiver to this url when he/she opens the notification from the Notification Center.

Supported sounds

The following sounds can be used.

  • beep-crisp
  • beep-soft
  • bell-modern
  • bell-one-tone
  • bell-simple
  • bell-triple
  • bird-1
  • bird-2
  • boing
  • cash
  • clanging
  • detonator-charge
  • digital-alarm
  • done
  • echo
  • flourish
  • harp
  • light
  • magic-chime
  • magic-coin
  • notifier-1
  • notifier-2
  • notifier-3
  • orchestral-long
  • orchestral-short
  • score
  • success
  • up

Acknowledgement

Built by following the API specs provided in this Boxcar help article.

Disclaimer

I am not affiliated with Boxcar in any way.

统计信息

  • 总下载量: 217
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-02