2017 © Pedro Peláez
 

library pushall

PushAll.ru PHP Client

image

platx/pushall

PushAll.ru PHP Client

  • Thursday, January 28, 2016
  • by asdixer
  • Repository
  • 2 Watchers
  • 6 Stars
  • 103 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 1 Versions
  • 12 % Grown

The README.md

PushAll.ru PHP Client

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

Usage

1.In your php file type this:, (*2)

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

Where {dir} - full server path to a directory with our pushall folder., (*3)

2.Then you must to initialize PushAll client with following code:, (*4)

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

Where 00000 - your feed id, aaa000bbb111ccc222ddd333eee444ff - your feed key., (*5)

3.To send a push message use following code:, (*6)

    /**
     * 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

The Versions

28/01 2016

dev-master

9999999-dev http://plat-x.com/

PushAll.ru PHP Client

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0
  • ext-curl *

 

php apns push notifications push messages php client pushall