joetannenbaum/phpushbullet 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

joetannenbaum/phpushbullet

最新稳定版本:1.2.2

Composer 安装命令:

composer require joetannenbaum/phpushbullet

包简介

PHP API wrapper for Pushbullet.

README 文档

README

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

A PHP library for the Pushbullet API.

Table of Contents

Installation

Using composer:

{ "require": { "joetannenbaum/phpushbullet": "~1.0" } } 

PHPushbullet takes one optional parameter, your Pushbullet access token:

require_once('vendor/autoload.php'); $pushbullet = new PHPushbullet\PHPushbullet('YOUR_ACCESS_TOKEN_HERE');

If you do not wish to put your access token in your code (understandable), simply set it to the environment variable pushbullet.access_token and PHPushbullet will automatically pick it up.

Listing Devices

To list the available devices on your account:

$pushbullet->devices();

This will return an array of objects with all of the device information.

Pushing

To Devices

When pushing a to a device, simply use the device's nickname or their iden from the list above.

To push to a single device:

$pushbullet->device('Chrome')->note('Remember', 'Buy some eggs.');

To push to multiple devices:

$pushbullet->device('Chrome')->device('Galaxy S4')->note('Remember', 'Buy some eggs.'); // or $pushbullet->device('Chrome', 'Galaxy S4')->note('Remember', 'Buy some eggs.'); // or $pushbullet->device(['Chrome', 'Galaxy S4'])->note('Remember', 'Buy some eggs.');

To Users

When pushing a to a user, simply use the user's email address:

To push to a single user:

$pushbullet->user('joe@example.com')->note('Remember', 'Buy some eggs.');

To push to multiple users:

$pushbullet->user('joe@example.com')->user('anne@example.com')->note('Remember', 'Buy some eggs.'); // or $pushbullet->user('joe@example.com', 'anne@example.com')->note('Remember', 'Buy some eggs.'); // or $pushbullet->user(['joe@example.com', 'anne@example.com'])->note('Remember', 'Buy some eggs.');

Types

Notes

Arguments:

  • Title
  • Body
$pushbullet->device('Chrome')->note('Musings', 'Why are fudgy brownies better than cakey brownies?');

Links

Arguments:

  • Title
  • URL
  • Body (optional)
$pushbullet->device('Chrome')->link('Look It Up', 'http://google.com', 'I hear this is a good site for finding things.');

Addresses

Arguments:

  • Name
  • Address
$pushbullet->device('Chrome')->address('The Hollywood Sign', '4059 Mt Lee Drive Hollywood, CA 90068');

Alternatively, you can pass in an associative array:

$address = [ 'address' => '4059 Mt Lee Drive', 'city' => 'Hollywood', 'state' => 'CA', 'zip' => '90068', ]; $pushbullet->device('Chrome')->address('The Hollywood Sign', $address);

Lists

Arguments:

  • Title
  • Items (array)
$items = [ 'Socks', 'Pants', 'Keys', 'Wallet', ]; $pushbullet->device('Chrome')->list('Do Not Forget', $items);

Files

Arguments:

  • File Name
  • File URL (must be publicly available)
  • Body (optional)
$pushbullet->device('Chrome')->file('The Big Presentation', 'http://example.com/do-not-lose-this.pptx', 'Final version of slides.');

统计信息

  • 总下载量: 44.58k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 31
  • 点击次数: 3
  • 依赖项目数: 4
  • 推荐数: 0

GitHub 信息

  • Stars: 31
  • Watchers: 7
  • Forks: 14
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固