gonzalo123/pushsilex

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

This package is not auto-updated.

Last update: 2024-12-21 20:12:56 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();