2017 © Pedro Peláez
 

library wonderpush-php-lib

PHP library for WonderPush

image

wonderpush/wonderpush-php-lib

PHP library for WonderPush

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 37 % Grown

The README.md

WonderPush PHP library

Build Status Latest Stable Version License Coverage Status, (*1)

Find the full WonderPush services documentation at: https://docs.wonderpush.com/docs., (*2)

Introduction

This project contain a PHP library for interacting with the WonderPush services. It helps you performing calls to the Management API. This contrasts with the SDKs, which are targeted at being integrated within your apps and handle interactions with the users., (*3)

APIs

WonderPush comes as two APIs, one aimed at the user devices, and the other optional one aimed at your servers and tools. The former is simply called the REST API, whereas the latter is called the Management API., (*4)

This tool helps you performing calls to the Management API., (*5)

Management API Reference

All references for the WonderPush Management API are available on the WonderPush documentation pages: https://docs.wonderpush.com/reference., (*6)

Documentation

Please see https://wonderpush.github.io/wonderpush-php-lib for up-to-date documentation., (*7)

Requirements

PHP 5.3.3 and later., (*8)

Composer

You can install the bindings via Composer. Run the following command:, (*9)

composer require wonderpush/wonderpush-php-lib

To use the bindings, use Composer's autoload:, (*10)

require_once('vendor/autoload.php');

Manual Installation

If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the init.php file., (*11)

require_once('/path/to/wonderpush-php-lib/init.php');

Dependencies

The bindings require the following extension in order to work properly:, (*12)

If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available., (*13)

Getting Started

Simple usage looks like:, (*14)

$wonderpush = new \WonderPush\WonderPush(WONDERPUSH_ACCESS_TOKEN, WONDERPUSH_APPLICATION_ID);
$response = $wonderpush->deliveries()->create(
    \WonderPush\Params\DeliveriesCreateParams::_new()
        ->setTargetSegmentIds('@ALL')
        ->setNotification(\WonderPush\Obj\Notification::_new()
            ->setAlert(\WonderPush\Obj\NotificationAlert::_new()
                ->setTitle('Using the PHP library')
                ->setText('Hello, WonderPush!')
            ))
);
echo $response->getNotificationId();

Configuring a Logger

The library does minimal logging, but it can be configured with a PSR-3 compatible logger so that messages end up there instead of error_log:, (*15)

$wonderpush->setLogger($logger);

Development

Install dependencies:, (*16)

``` bash composer install, (*17)




## Tests Install dependencies as mentioned above (which will resolve [PHPUnit](http://packagist.org/packages/phpunit/phpunit)), then you can run the test suite: ```bash ./test

Or to run an individual test file:, (*18)

vendor/bin/phpunit tests/SomeTest.php

The Versions

26/07 2017

dev-master

9999999-dev https://www.wonderpush.com/

PHP library for WonderPush

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api push notification wonderpush

26/07 2017

v1.0.0

1.0.0.0 https://www.wonderpush.com/

PHP library for WonderPush

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

api push notification wonderpush