PushbulletRuby
Installation
Add this line to your application's Gemfile:
gem 'pushbullet_ruby'
Usage
Setup
Puts your api-key into a token.json file formatted like this:
{"token": "your api-key here"}
And setup your client:
client = PushbulletRuby::Client.new(PushbulletRuby::Token.load)
List devices
client.devices
Update device informations
client.update_device(
device_id: 'device id',
params: {
nickname: 'device name'
}
)
List contacts
client.contacts
List chats
client.chats
Create chat
client.create_chat(
params: {
email: 'target email'
}
)
List subscriptions(channels)
client.subscriptions
Get recent channel pushes
client.recent_pushes('channel tag')
List pushes
client.pushes
Push
You can send following list:
- note
- link
- file
client.push_note(
receiver: :device,
id: 'target id',
params: {
title: 'Title',
body: 'Content'
}
)
Sms
client.sens_sms(
user_id: 'user id',
device_id: 'device id',
params: {
conversation_iden: 'target phone number',
message: 'Content'
}
)
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/creends/pushbullet_ruby.