Class: Twilio::REST::Monitor

Inherits:
Domain
  • Object
show all
Defined in:
lib/twilio-ruby/rest/monitor.rb,
lib/twilio-ruby/rest/monitor/v1.rb,
lib/twilio-ruby/rest/monitor/v1/alert.rb,
lib/twilio-ruby/rest/monitor/v1/event.rb

Defined Under Namespace

Classes: V1

Instance Attribute Summary

Attributes inherited from Domain

#client

Instance Method Summary collapse

Methods inherited from Domain

#absolute_url, #request

Constructor Details

#initialize(twilio) ⇒ Monitor

Initialize the Monitor Domain


14
15
16
17
18
19
20
21
22
23
# File 'lib/twilio-ruby/rest/monitor.rb', line 14

def initialize(twilio)
  super

  @base_url = 'https://monitor.twilio.com'
  @host = 'monitor.twilio.com'
  @port = 443

  # Versions
  @v1 = nil
end

Instance Method Details

#alerts(sid = :unset) ⇒ Twilio::REST::Monitor::V1::AlertInstance, Twilio::REST::Monitor::V1::AlertList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that we created to identify the Alert resource.

Returns:


36
37
38
# File 'lib/twilio-ruby/rest/monitor.rb', line 36

def alerts(sid=:unset)
  self.v1.alerts(sid)
end

#events(sid = :unset) ⇒ Twilio::REST::Monitor::V1::EventInstance, Twilio::REST::Monitor::V1::EventList

Parameters:

  • sid (String) (defaults to: :unset)

    The unique string that we created to identify the Event resource.

Returns:


45
46
47
# File 'lib/twilio-ruby/rest/monitor.rb', line 45

def events(sid=:unset)
  self.v1.events(sid)
end

#to_sObject

Provide a user friendly representation


51
52
53
# File 'lib/twilio-ruby/rest/monitor.rb', line 51

def to_s
  '#<Twilio::REST::Monitor>'
end

#v1Object

Version v1 of monitor


27
28
29
# File 'lib/twilio-ruby/rest/monitor.rb', line 27

def v1
  @v1 ||= V1.new self
end