Sha256: f7a724146b4ac9883aa86b7ec1c5f74b74c7c527e6ade9837eaca48e2f67e492
Contents?: true
Size: 664 Bytes
Versions: 10
Compression:
Stored size: 664 Bytes
Contents
require 'pushbullet_ruby/api/subscriptions' module PushbulletRuby class Channel attr_reader :body def self.from_response(response) response.body['subscriptions'].each_with_object([]) do |attributes, memo| next unless attributes['active'] memo << new(attributes['channel']) end end def update(client: nil, params: {}) client.update_subscription(channel_id: self.id, params: params) end def initialize(response) @body = response end def tag body['tag'] end def name body['name'] end def id body['iden'] end end end
Version data entries
10 entries across 9 versions & 2 rubygems