pushbullet-notifier/app.php

16 lines
389 B
PHP
Raw Normal View History

2017-03-17 18:43:45 -07:00
<?php
require 'vendor/autoload.php';
$token = getenv('NOTI_PB');
if(empty($token)) {
throw new InvalidArgumentException('Please set your Pushbullet API token');
}
$pb = new Pushbullet\Pushbullet($token);
print_r($pb->getDevices());
//$pb->device('Chrome')->pushNote('Done', 'Your thing has finished on repos.');
$pb->device('Huawei Nexus 6P')->pushNote('Done', 'Finished pushing');