Class: Uptime::Checks

Inherits:
Object
  • Object
show all
Defined in:
lib/uptime/checks.rb

Class Method Summary collapse

Class Method Details

.all(filter = {}) ⇒ Object

attr_accessor :username, :password



8
9
10
# File 'lib/uptime/checks.rb', line 8

def self.all(filter={})
  response = Uptime::Call.execute(self.resource, :get)
end

.create(options = {}) ⇒ Object



12
13
14
# File 'lib/uptime/checks.rb', line 12

def self.create(options={})
  Uptime::Call.execute(self.resource, :put, options)
end

.delete(check_id) ⇒ Object



17
18
19
# File 'lib/uptime/checks.rb', line 17

def self.delete(check_id)
  Uptime::Call.execute("#{self.resource}/#{check_id}", :delete)
end

.update(check_id, options = {}) ⇒ Object



21
22
23
# File 'lib/uptime/checks.rb', line 21

def self.update(check_id, options={})
  Uptime::Call.execute("#{self.resource}/#{check_id}", :post, options)
end