Class: Pushbullet::Push

Inherits:
Resource
  • Object
show all
Defined in:
lib/pushbullet/push.rb

Class Method Summary collapse

Methods inherited from Resource

all, #destroy, #save

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


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

.pathObject



25
26
27
# File 'lib/pushbullet/push.rb', line 25

def self.path
  'pushes'
end