Add this line to your application's Gemfile:
gem 'pushbullet_ruby'
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)
client.devices
client.update_device(
device_id: 'device id',
params: {
nickname: 'device name'
}
)
client.contacts
client.chats
client.create_chat(
params: {
email: 'target email'
}
)
client.subscriptions
client.recent_pushes('channel tag')
client.pushes
You can send following list:
- note
- link
- file
client.push_note(
receiver: :device,
id: 'target id',
params: {
title: 'Title',
body: 'Content'
}
)
client.sens_sms(
user_id: 'user id',
device_id: 'device id',
params: {
conversation_iden: 'target phone number',
message: 'Content'
}
)
Bug reports and pull requests are welcome on GitHub at https://github.com/creends/pushbullet_ruby.