Skip to content

Commit 245cb1e

Browse files
committed
initial commit
1 parent beaa4b0 commit 245cb1e

File tree

11 files changed

+4336
-3
lines changed

11 files changed

+4336
-3
lines changed

.gitignore

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
composer.phar
22
/vendor/
3-
3+
._*
44
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
55
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
66
# composer.lock
7+
.DS_Store
8+
.idea
9+
phpunit.phar
10+
/phpunit.xml
11+
build/
12+
*.swp
13+
*~
14+
*.log

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: php
2+
sudo: false
3+
4+
php:
5+
- 5.6
6+
- 7.0
7+
- 7.1
8+
9+
install:
10+
- travis_retry composer self-update
11+
- travis_retry composer install

README.md

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,52 @@
1-
# pushbots-php
2-
PushBots PHP Package
1+
## pushbots-php
2+
3+
> Official PHP package for PushBots
4+
5+
6+
## Installation
7+
8+
Requires PHP 5.6.
9+
10+
11+
Install with Composer
12+
------------
13+
14+
```
15+
$ php composer.phar require pushbots/pushbots-php
16+
```
17+
18+
Then require the library in your PHP code:
19+
20+
```php
21+
require "vendor/autoload.php";
22+
``
23+
24+
```php
25+
<?php
26+
// load dependencies
27+
require 'vendor/autoload.php';
28+
29+
use Pushbots\PushbotsClient;
30+
31+
$client = new PushbotsClient("APPLICATION_ID", "APPLICATION_SECRET");
32+
$client->campaign->send([
33+
//Platforms
34+
"platform" => [0,1,2],
35+
//Message
36+
"msg" => "test",
37+
//Badge [iOS only]
38+
"badge" => "+1",
39+
//Notification payload
40+
"payload"=>[
41+
"key"=> "value"
42+
]
43+
]);
44+
```
45+
46+
47+
48+
Changelog
49+
-------------
50+
51+
Version 1.0.0
52+
* Release PushBots PHP package

composer.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "pushbots/pushbots-php",
3+
"description": "PushBots API",
4+
"keywords": ["pushbots", "pushbots.com", "api", "guzzle"],
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "PushBots",
9+
"homepage": "https://pushbots.com"
10+
}
11+
],
12+
"autoload": {
13+
"psr-4": {
14+
"Pushbots\\": ["src"]
15+
}
16+
},
17+
"require": {
18+
"guzzlehttp/guzzle": "~6.0",
19+
"php": ">= 5.6"
20+
},
21+
"require-dev": {
22+
"phpunit/phpunit": "4.8.12",
23+
"phpunit/php-timer": "1.0.9",
24+
"phpdocumentor/phpdocumentor": "2.*"
25+
}
26+
}

0 commit comments

Comments
 (0)