Class: BetterStack::Resources::Monitor
- Inherits:
-
Base
- Object
- Base
- BetterStack::Resources::Monitor
show all
- Defined in:
- lib/betterstack/resources/monitor.rb
Instance Attribute Summary
Attributes inherited from Base
#client
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#availability(id, params = {}) ⇒ Object
36
37
38
|
# File 'lib/betterstack/resources/monitor.rb', line 36
def availability(id, params = {})
client.get("#{resource_path(id)}/availability", params)
end
|
#create(attributes) ⇒ Object
12
13
14
|
# File 'lib/betterstack/resources/monitor.rb', line 12
def create(attributes)
client.post(resource_path, attributes)
end
|
#delete(id) ⇒ Object
20
21
22
|
# File 'lib/betterstack/resources/monitor.rb', line 20
def delete(id)
client.delete(resource_path(id))
end
|
#get(id) ⇒ Object
8
9
10
|
# File 'lib/betterstack/resources/monitor.rb', line 8
def get(id)
client.get(resource_path(id))
end
|
#list(params = {}) ⇒ Object
4
5
6
|
# File 'lib/betterstack/resources/monitor.rb', line 4
def list(params = {})
client.get(resource_path, params)
end
|
#pause(id) ⇒ Object
24
25
26
|
# File 'lib/betterstack/resources/monitor.rb', line 24
def pause(id)
client.post("#{resource_path(id)}/pause")
end
|
#response_times(id, params = {}) ⇒ Object
32
33
34
|
# File 'lib/betterstack/resources/monitor.rb', line 32
def response_times(id, params = {})
client.get("#{resource_path(id)}/response-times", params)
end
|
#resume(id) ⇒ Object
28
29
30
|
# File 'lib/betterstack/resources/monitor.rb', line 28
def resume(id)
client.post("#{resource_path(id)}/resume")
end
|
#test(attributes) ⇒ Object
40
41
42
|
# File 'lib/betterstack/resources/monitor.rb', line 40
def test(attributes)
client.post("/monitors/test", attributes)
end
|
#update(id, attributes) ⇒ Object
16
17
18
|
# File 'lib/betterstack/resources/monitor.rb', line 16
def update(id, attributes)
client.patch(resource_path(id), attributes)
end
|