Module: PushbulletRuby::API::Subscriptions
- Included in:
- PushbulletRuby::API
- Defined in:
- lib/pushbullet_ruby/api/subscriptions.rb
Instance Method Summary collapse
Instance Method Details
#channel_info(tag) ⇒ Object
10 11 12 |
# File 'lib/pushbullet_ruby/api/subscriptions.rb', line 10 def channel_info(tag) PushbulletRuby::Channel.new(get('/v2/channel-info', tag: tag).body) end |
#recent_pushes(tag) ⇒ Object
14 15 16 17 18 |
# File 'lib/pushbullet_ruby/api/subscriptions.rb', line 14 def recent_pushes(tag) channel_info(tag).body['recent_pushes'].each_with_object([]) do |push, memo| memo << PushbulletRuby::Push.new(push) end end |
#subscriptions ⇒ Object
6 7 8 |
# File 'lib/pushbullet_ruby/api/subscriptions.rb', line 6 def subscriptions PushbulletRuby::Channel.from_response(get('/v2/subscriptions')) end |