Class: Watchfor::Client::Monitors

Inherits:
Namespace
  • Object
show all
Defined in:
lib/watchfor/client.rb

Instance Method Summary collapse

Methods inherited from Namespace

#initialize

Constructor Details

This class inherits a constructor from Watchfor::Client::Namespace

Instance Method Details

#check_now(id) ⇒ Object



107
# File 'lib/watchfor/client.rb', line 107

def check_now(id) = @c.request("POST", "/monitors/#{id}/check-now")

#checks(id, **query) ⇒ Object



109
# File 'lib/watchfor/client.rb', line 109

def checks(id, **query) = @c.request("GET", "/monitors/#{id}/checks", query: query)

#create(body, idempotency_key: nil) ⇒ Object



102
# File 'lib/watchfor/client.rb', line 102

def create(body, idempotency_key: nil) = @c.request("POST", "/monitors", body: body, idempotency_key: idempotency_key)

#delete(id) ⇒ Object



104
# File 'lib/watchfor/client.rb', line 104

def delete(id) = @c.request("DELETE", "/monitors/#{id}")

#get(id) ⇒ Object



101
# File 'lib/watchfor/client.rb', line 101

def get(id) = @c.request("GET", "/monitors/#{id}")

#list(**query) ⇒ Object



100
# File 'lib/watchfor/client.rb', line 100

def list(**query) = @c.request("GET", "/monitors", query: query)

#pause(id) ⇒ Object



105
# File 'lib/watchfor/client.rb', line 105

def pause(id) = @c.request("POST", "/monitors/#{id}/pause")

#resume(id) ⇒ Object



106
# File 'lib/watchfor/client.rb', line 106

def resume(id) = @c.request("POST", "/monitors/#{id}/resume")

#update(id, body) ⇒ Object



103
# File 'lib/watchfor/client.rb', line 103

def update(id, body) = @c.request("PATCH", "/monitors/#{id}", body: body)

#uptime(id, period = nil) ⇒ Object



108
# File 'lib/watchfor/client.rb', line 108

def uptime(id, period = nil) = @c.request("GET", "/monitors/#{id}/uptime", query: { period: period })