class Pushbullet::Channel

Public Class Methods

get_info(tag) click to toggle source
# File lib/pushbullet/channel.rb, line 14
def self.get_info(tag)
  channel = new Pushbullet.client.get("channel-info?tag=#{tag}")
  channel.recent_pushes.map! { |push| Pushbullet::Push.new push }
  channel
end
path() click to toggle source
# File lib/pushbullet/channel.rb, line 20
def self.path
  'subscriptions'
end
subscribe(name) click to toggle source
# File lib/pushbullet/channel.rb, line 5
def self.subscribe(name)
  create(channel_tag: name)
end
unsubscribe(idn) click to toggle source
# File lib/pushbullet/channel.rb, line 9
def self.unsubscribe(idn)
  Pushbullet.client.delete "#{path}/#{idn}"
  true
end