lib/pushbullet_ruby/api/subscriptions.rb in pushbullet_ruby-1.0.4.1 vs lib/pushbullet_ruby/api/subscriptions.rb in pushbullet_ruby-1.1.0
- old
+ new
@@ -14,8 +14,20 @@
def recent_pushes(tag)
channel_info(tag).body['recent_pushes'].each_with_object([]) do |push, memo|
memo << PushbulletRuby::Push.new(push)
end
end
+
+ def update_subscription(channel_id: nil, params: {})
+ PushbulletRuby::Channel.new(post("/v2/subscriptions/#{channel_id}", params).body)
+ end
+
+ def delete_subscription(channel_id: nil)
+ delete("/v2/subscriptions/#{channel_id}").body
+ end
+
+ def create_subscription(params: {})
+ PushbulletRuby::Channel.new(post('/v2/subscriptions', params))
+ end
end
end
end
\ No newline at end of file