class Pushbullet::V2::Subscriptions
Constants
- API_URL
Public Class Methods
channel_info(channel_tag)
click to toggle source
get information on given channel
@param channel_tag [String] channel tag @return [JSON] result as json
# File lib/v2/subscriptions.rb, line 57 def self.channel_info(channel_tag) result = Pushbullet::V2::request_get('https://api.pushbullet.com/v2/channel-info', { tag: channel_tag, }) JSON.parse(result.body) end
get()
click to toggle source
get subscriptions list
@return [JSON] result as json
# File lib/v2/subscriptions.rb, line 25 def self.get result = Pushbullet::V2::request_get(API_URL, {}) JSON.parse(result.body) end
subscribe(channel_tag)
click to toggle source
subscribe a new subscription
@param channel_tag [String] channel tag to subscribe @return [JSON] result as json
# File lib/v2/subscriptions.rb, line 35 def self.subscribe(channel_tag) result = Pushbullet::V2::request(API_URL, { channel_tag: channel_tag, }) JSON.parse(result.body) end
unsubscribe(subscription_iden)
click to toggle source
unsubscribe a subscription
@param subscription_iden [String] subscription identifier @return [JSON] result as json
# File lib/v2/subscriptions.rb, line 47 def self.unsubscribe(subscription_iden) result = Pushbullet::V2::request_delete(API_URL + '/' + subscription_iden, {}) JSON.parse(result.body) end