Class: Synthetics::API

Inherits:
Object
  • Object
show all
Defined in:
lib/synthetics/api.rb,
lib/synthetics/api/base.rb,
lib/synthetics/api/label.rb,
lib/synthetics/api/labels.rb,
lib/synthetics/api/monitor.rb,
lib/synthetics/api/monitors.rb,
lib/synthetics/api/locations.rb

Overview

This class holds the sub APIs used to communicate with synthetics.

Defined Under Namespace

Classes: Base, Label, Labels, Locations, Monitor, Monitors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ API

Returns a new instance of API.



13
14
15
# File 'lib/synthetics/api.rb', line 13

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



11
12
13
# File 'lib/synthetics/api.rb', line 11

def client
  @client
end

Instance Method Details

#label(label) ⇒ Object



17
18
19
# File 'lib/synthetics/api.rb', line 17

def label(label)
  Label.new(client, label)
end

#labelsObject



21
22
23
# File 'lib/synthetics/api.rb', line 21

def labels
  Labels.new(client)
end

#locationsObject



25
26
27
# File 'lib/synthetics/api.rb', line 25

def locations
  Locations.new(client)
end

#monitor(monitor_uuid) ⇒ Object



29
30
31
# File 'lib/synthetics/api.rb', line 29

def monitor(monitor_uuid)
  Monitor.new(client, monitor_uuid)
end

#monitorsObject



33
34
35
# File 'lib/synthetics/api.rb', line 33

def monitors
  Monitors.new(client)
end