Sha256: 79e9b36c23f40176eb1880fd56fc4d86ffcf4f4d5220869cf2361c2758e686cf

Contents?: true

Size: 678 Bytes

Versions: 8

Compression:

Stored size: 678 Bytes

Contents

module Pushbullet
  class Push < Resource

    def self.create_note(id, title, body)
      create :note, id, title: title, body: body
    end

    def self.create_link(id, title, url, body)
      create :link, id, title: title, url: url, body: body
    end

    def self.create_address(id, name, address)
      create :address, id, name: name, address: address
    end

    def self.create_list(id, title, items)
      create :list, id, title: title, items: items
    end

    def self.create(type, iden, payload)
      id = iden[/.@.?/].nil? ? :device_iden : :email
      super(payload.merge(type: type, id => iden))
    end

    def self.path
      'pushes'
    end
  end
end

Version data entries

8 entries across 6 versions & 2 rubygems

Version Path
tdiary-5.0.5 vendor/bundle/gems/ruby-pushbullet-0.1.4/lib/pushbullet/push.rb
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/ruby-pushbullet-0.1.4/lib/pushbullet/push.rb
tdiary-5.0.4 vendor/bundle/gems/ruby-pushbullet-0.1.4/lib/pushbullet/push.rb
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/ruby-pushbullet-0.1.4/lib/pushbullet/push.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/ruby-pushbullet-0.1.4/lib/pushbullet/push.rb
ruby-pushbullet-0.1.4 lib/pushbullet/push.rb
ruby-pushbullet-0.1.3 lib/pushbullet/push.rb
ruby-pushbullet-0.1.2 lib/pushbullet/push.rb