Class: Pushbullet::Push
- Defined in:
- lib/pushbullet/push.rb
Class Method Summary collapse
- .create(type, iden, payload) ⇒ Object
- .create_address(id, name, address) ⇒ Object
- .create_link(id, title, url, body) ⇒ Object
- .create_list(id, title, items) ⇒ Object
- .create_note(id, title, body) ⇒ Object
- .path ⇒ Object
Methods inherited from Resource
Class Method Details
.create(type, iden, payload) ⇒ Object
20 21 22 23 |
# File 'lib/pushbullet/push.rb', line 20 def self.create(type, iden, payload) id = iden[/.@.?/].nil? ? :device_iden : :email super(payload.merge(type: type, id => iden)) end |
.create_address(id, name, address) ⇒ Object
12 13 14 |
# File 'lib/pushbullet/push.rb', line 12 def self.create_address(id, name, address) create :address, id, name: name, address: address end |
.create_link(id, title, url, body) ⇒ Object
8 9 10 |
# File 'lib/pushbullet/push.rb', line 8 def self.create_link(id, title, url, body) create :link, id, title: title, url: url, body: body end |
.create_list(id, title, items) ⇒ Object
16 17 18 |
# File 'lib/pushbullet/push.rb', line 16 def self.create_list(id, title, items) create :list, id, title: title, items: items end |
.create_note(id, title, body) ⇒ Object
4 5 6 |
# File 'lib/pushbullet/push.rb', line 4 def self.create_note(id, title, body) create :note, id, title: title, body: body end |
.path ⇒ Object
25 26 27 |
# File 'lib/pushbullet/push.rb', line 25 def self.path 'pushes' end |