platx/pushall 问题修复 & 功能扩展

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

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

platx/pushall

Composer 安装命令:

composer require platx/pushall

包简介

PushAll.ru PHP Client

README 文档

README

This is php client for PushAll.ru API, helps to send push messages via this service.

Usage

1.In your php file type this:

    require {dir}.'/pushall/PushAll.php';

Where {dir} - full server path to a directory with our pushall folder.

2.Then you must to initialize PushAll client with following code:

    /**
     * Client initialization
     */
    $pushAll = new PushAll(
        00000, 
        'aaa000bbb111ccc222ddd333eee444ff'
    );

Where 00000 - your feed id, aaa000bbb111ccc222ddd333eee444ff - your feed key.

3.To send a push message use following code:

    /**
     * Send a message
     */
    $result = $pushAll->send(array(
        'type' => PushAll::TYPE_SELF,
        'title' => 'some title',
        'text' => 'some message'
    ));

Initialization parameters

Parameter Type Required Default Variants
id integer YES - -
key string YES - -
responseType string NO 0 0, 1 OR RESPONSE_TYPE_JSON, RESPONSE_TYPE_ARRAY

List of parameters

Parameter Type Required Default Variants
type string YES self self, broadcast, unicast, multicast OR TYPE_SELF, TYPE_BROADCAST, TYPE_UNICAST, TYPE_MULTICAST
uid integer NO - -
title string YES - -
text string YES - -
url string NO - -
hidden integer NO 0 0, 1, 2 OR HIDDEN_FALSE, HIDDEN_HISTORY, HIDDEN_BAND
encode string NO UTF-8 -
priority integer NO 0 -1, 0, 1 OR PRIORITY_NOT_IMPORTANT, PRIORITY_DEFAULT, PRIORITY_IMPORTANT
responseType integer NO 0 0, 1 OR RESPONSE_TYPE_JSON, RESPONSE_TYPE_ARRAY

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-09-10