Class: Essential::Messaging::Channel

Inherits:
Resource
  • Object
show all
Extended by:
Resource::List
Includes:
Resource::Update
Defined in:
lib/essential/messaging/channel.rb

Instance Method Summary collapse

Methods included from Resource::List

list, retrieve

Methods included from Resource::Update

#update

Methods inherited from Resource

#==, #as_json, #fetch, #init_from, #initialize, #inspect, #loaded?, request, #to_json, url, #url

Methods included from Resource::AttrMethods

#filter_attrs, included

Constructor Details

This class inherits a constructor from Essential::Resource

Instance Method Details

#messagesObject



27
28
29
30
31
32
33
# File 'lib/essential/messaging/channel.rb', line 27

def messages
  Essential::Resource::PaginatorProxy.new(
    Message,
    params: {channel: self.sid},
    headers: @headers
  )
end

#subscribersObject



19
20
21
22
23
24
25
# File 'lib/essential/messaging/channel.rb', line 19

def subscribers
  Essential::Resource::PaginatorProxy.new(
    Subscriber,
    params: {channel: self.sid},
    headers: @headers
  )
end

#transportsObject



11
12
13
14
15
16
17
# File 'lib/essential/messaging/channel.rb', line 11

def transports
  Essential::Resource::PaginatorProxy.new(
    Transport,
    params: {channel: self.sid},
    headers: @headers
  )
end