gonzalo123/pushsilex

dev-master / 1.0.x-dev 2015-02-28 19:32 UTC

This package is not auto-updated.

Last update: 2024-11-09 19:35:47 UTC


README

Pushbullet integration with Silex

https://docs.pushbullet.com/

Usage

use Silex\Application;
use PushSilex\Silex\Provider\PushbulletServiceProvider;

$app = new Application(['debug' => true]);

$myToken = include(__DIR__ . '/../conf/token.php');

$app->register(new PushbulletServiceProvider($myToken));

$app->get("/", function () {
    return "Usage: GET /note/{title}/{body}";
});

$app->get("/note/{title}/{body}", function (Application $app, $title, $body) {
    return $app->json($app['pushbullet.note']($title, $body));
});

$app->run();