PluginProbe ʕ •ᴥ•ʔ
Brevo – Email, SMS, Web Push, Chat, and more. / trunk
Brevo – Email, SMS, Web Push, Chat, and more. vtrunk
2.9.13 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 3.0.7 3.0.9 3.1.0 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.2 3.1.20 3.1.21 3.1.22 3.1.23 3.1.24 3.1.25 3.1.26 3.1.27 3.1.28 3.1.29 3.1.3 3.1.30 3.1.31 3.1.32 3.1.33 3.1.34 3.1.35 3.1.36 3.1.37 3.1.38 3.1.39 3.1.4 3.1.40 3.1.41 3.1.42 3.1.43 3.1.44 3.1.45 3.1.46 3.1.47 3.1.48 3.1.49 3.1.5 3.1.50 3.1.51 3.1.52 3.1.53 3.1.54 3.1.55 3.1.56 3.1.57 3.1.58 3.1.59 3.1.6 3.1.60 3.1.61 3.1.62 3.1.63 3.1.64 3.1.65 3.1.66 3.1.67 3.1.68 3.1.69 3.1.7 3.1.70 3.1.71 3.1.72 3.1.73 3.1.74 3.1.75 3.1.76 3.1.77 3.1.78 3.1.79 3.1.8 3.1.80 3.1.81 3.1.82 3.1.83 3.1.84 3.1.85 3.1.86 3.1.87 3.1.88 3.1.89 3.1.9 3.1.90 3.1.91 3.1.92 3.1.93 3.1.94 3.1.95 3.1.96 3.1.97 3.1.98 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.3.0 3.3.1 3.3.2 3.3.3 3.3.4 3.3.5 trunk 1.0 1.5 2.0.8 2.9.10 2.9.11 2.9.12
mailin / wonderpush-php-lib / README.md
mailin / wonderpush-php-lib Last commit date
doc 1 year ago lib 2 months ago tests 1 year ago .coveralls.yml 1 year ago .git 1 year ago .gitignore 1 year ago .travis.yml 1 year ago LICENSE.txt 1 year ago README.md 1 year ago build.php 1 year ago composer.json 1 year ago init.php 5 months ago overview.md 1 year ago phpunit.no_autoload.xml 1 year ago phpunit.xml 1 year ago release.php 1 year ago test 1 year ago
README.md
136 lines
1 WonderPush PHP library
2 ======================
3
4 [](https://travis-ci.org/wonderpush/wonderpush-php-lib![Build Status](https://travis-ci.org/wonderpush/wonderpush-php-lib.svg?branch=master)](https://travis-ci.org/wonderpush/wonderpush-php-lib](https://travis-ci.org/wonderpush/wonderpush-php-lib)
5 [](https://packagist.org/packages/wonderpush/wonderpush-php-lib![Latest Stable Version](https://poser.pugx.org/wonderpush/wonderpush-php-lib/version)](https://packagist.org/packages/wonderpush/wonderpush-php-lib](https://packagist.org/packages/wonderpush/wonderpush-php-lib)
6 [](https://packagist.org/packages/wonderpush/wonderpush-php-lib![License](https://poser.pugx.org/wonderpush/wonderpush-php-lib/license.svg)](https://packagist.org/packages/wonderpush/wonderpush-php-lib](https://packagist.org/packages/wonderpush/wonderpush-php-lib)
7 [](https://coveralls.io/github/wonderpush/wonderpush-php-lib?branch=master![Coverage Status](https://coveralls.io/repos/github/wonderpush/wonderpush-php-lib/badge.svg?branch=master)](https://coveralls.io/github/wonderpush/wonderpush-php-lib?branch=master](https://coveralls.io/github/wonderpush/wonderpush-php-lib?branch=master)
8
9 Find the full WonderPush services documentation at:
10 https://docs.wonderpush.com/docs.
11
12
13
14 ## Introduction
15
16 This project contain a PHP library for interacting with the WonderPush services.
17 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.
18
19
20 ### APIs
21
22 WonderPush comes as two APIs, one aimed at the user devices, and the other optional one aimed at your servers and tools.
23 The former is simply called the REST API, whereas the latter is called the Management API.
24
25 This tool helps you performing calls to the Management API.
26
27 #### Management API Reference
28
29 All references for the WonderPush Management API are available on the WonderPush documentation pages:
30 https://docs.wonderpush.com/reference.
31
32
33
34 ## Documentation
35
36 Please see https://wonderpush.github.io/wonderpush-php-lib for up-to-date documentation.
37
38
39
40 ## Requirements
41
42 PHP 5.3.3 and later.
43
44
45
46 ## Composer
47
48 You can install the bindings via [](http://getcomposer.org/Composer](http://getcomposer.org/](http://getcomposer.org/). Run the following command:
49
50 ```bash
51 composer require wonderpush/wonderpush-php-lib
52 ```
53
54 To use the bindings, use Composer's [](https://getcomposer.org/doc/00-intro.md#autoloadingautoload](https://getcomposer.org/doc/00-intro.md#autoloading](https://getcomposer.org/doc/00-intro.md#autoloading):
55
56 ```php
57 require_once('vendor/autoload.php');
58 ```
59
60
61
62 ## Manual Installation
63
64 If you do not wish to use Composer, you can download the [](https://github.com/wonderpush/wonderpush-php-lib/releaseslatest release](https://github.com/wonderpush/wonderpush-php-lib/releases](https://github.com/wonderpush/wonderpush-php-lib/releases).
65 Then, to use the bindings, include the `init.php` file.
66
67 ```php
68 require_once('/path/to/wonderpush-php-lib/init.php');
69 ```
70
71
72
73 ## Dependencies
74
75 The bindings require the following extension in order to work properly:
76
77 - [](https://secure.php.net/manual/en/book.curl.php`curl`](https://secure.php.net/manual/en/book.curl.php](https://secure.php.net/manual/en/book.curl.php)
78 - [](https://secure.php.net/manual/en/book.json.php`json`](https://secure.php.net/manual/en/book.json.php](https://secure.php.net/manual/en/book.json.php)
79
80 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.
81
82
83
84 ## Getting Started
85
86 Simple usage looks like:
87
88 ```php
89 $wonderpush = new \WonderPush\WonderPush(WONDERPUSH_ACCESS_TOKEN, WONDERPUSH_APPLICATION_ID);
90 $response = $wonderpush->deliveries()->create(
91 \WonderPush\Params\DeliveriesCreateParams::_new()
92 ->setTargetSegmentIds('@ALL')
93 ->setNotification(\WonderPush\Obj\Notification::_new()
94 ->setAlert(\WonderPush\Obj\NotificationAlert::_new()
95 ->setTitle('Using the PHP library')
96 ->setText('Hello, WonderPush!')
97 ))
98 );
99 echo $response->getNotificationId();
100 ```
101
102
103 ### Configuring a Logger
104
105 The library does minimal logging, but it can be configured with a [](http://www.php-fig.org/psr/psr-3/`PSR-3` compatible logger](http://www.php-fig.org/psr/psr-3/](http://www.php-fig.org/psr/psr-3/) so that messages end up there instead of `error_log`:
106
107 ```php
108 $wonderpush->setLogger($logger);
109 ```
110
111
112
113 ## Development
114
115 Install dependencies:
116
117 ``` bash
118 composer install
119 ```
120
121
122
123 ## Tests
124
125 Install dependencies as mentioned above (which will resolve [](http://packagist.org/packages/phpunit/phpunitPHPUnit](http://packagist.org/packages/phpunit/phpunit](http://packagist.org/packages/phpunit/phpunit)), then you can run the test suite:
126
127 ```bash
128 ./test
129 ```
130
131 Or to run an individual test file:
132
133 ```bash
134 vendor/bin/phpunit tests/SomeTest.php
135 ```
136