Class: Pingdom::Summary::Proxy

Inherits:
Struct
  • Object
show all
Defined in:
lib/pingdom/summary.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#clientObject

Returns the value of attribute client

Returns:

  • (Object)

    the current value of client



3
4
5
# File 'lib/pingdom/summary.rb', line 3

def client
  @client
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



3
4
5
# File 'lib/pingdom/summary.rb', line 3

def id
  @id
end

Instance Method Details

#average(options = {}) ⇒ Object Also known as: averages



4
5
6
7
# File 'lib/pingdom/summary.rb', line 4

def average(options = {})
  options.reverse_merge!(byprobe: true, includeuptime: true)
  Average.parse(client, client.get("summary.average/#{id}", options))
end

#outage(options = {}) ⇒ Object Also known as: outages



10
11
12
13
# File 'lib/pingdom/summary.rb', line 10

def outage(options = {})
  options.reverse_merge!(byprobe: true, includeuptime: true)
  Outage.parse(client, client.get("summary.outage/#{id}", options))
end

#performance(options = {}) ⇒ Object



16
17
18
19
# File 'lib/pingdom/summary.rb', line 16

def performance(options = {})
  options.reverse_merge!(resolution: :day, includeuptime: true)
  Performance.parse(client, client.get("summary.performance/#{id}", options))
end