for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace GJClasses;
class Pushbullet
{
public function push($api_key, $type, $subject, $content, $url)
if ($type == 'note') {
$message = $this->pushNote($api_key, $subject, $content);
} elseif ($type == 'url') {
$message = $this->pushUrl($api_key, $subject, $content, $url);
} else {
$message = 'Push type incorrect or not specified';
}
return $message;
public function pushNote($api_key, $subject, $content)
$push = new \Pushbullet\Pushbullet($api_key);
$push->allDevices()->pushNote($subject, $content);
return 'Note Sent';
public function pushUrl($api_key, $subject, $content, $url)
$push->allDevices()->pushLink($subject, $url, $content);
return 'URL Sent';