Class: Pingdom::SummaryAverage
- Inherits:
-
Base
- Object
- Base
- Pingdom::SummaryAverage
show all
- Defined in:
- lib/pingdom/summary_average.rb
Instance Attribute Summary collapse
Attributes inherited from Base
#additional_field
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#add, all, body, client, collection, error?, find, #get, #initialize, limited, params, params=, parse, status, total, update_client
Constructor Details
This class inherits a constructor from Pingdom::Base
Instance Attribute Details
#probe_responses ⇒ Object
Returns the value of attribute probe_responses.
31
32
33
|
# File 'lib/pingdom/summary_average.rb', line 31
def probe_responses
@probe_responses
end
|
#responsetime ⇒ Object
Returns the value of attribute responsetime.
31
32
33
|
# File 'lib/pingdom/summary_average.rb', line 31
def responsetime
@responsetime
end
|
#status ⇒ Object
Returns the value of attribute status.
31
32
33
|
# File 'lib/pingdom/summary_average.rb', line 31
def status
@status
end
|
Class Method Details
.collection_type ⇒ Object
14
15
16
|
# File 'lib/pingdom/summary_average.rb', line 14
def collection_type
'summary'
end
|
.path ⇒ Object
10
11
12
|
# File 'lib/pingdom/summary_average.rb', line 10
def path
'/summary.average'
end
|
.permit ⇒ Object
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/pingdom/summary_average.rb', line 18
def permit
{
to: :valid_time?,
from: :valid_time?,
probes: :valid_int_list?,
includeuptime: :valid_boolean?,
bycountry: :valid_boolean?,
byprobe: :valid_boolean?
}
end
|
Instance Method Details
#avgresponse ⇒ Object
33
34
35
36
37
38
|
# File 'lib/pingdom/summary_average.rb', line 33
def avgresponse
data = responsetime['avgresponse'] || []
data.map do |v|
Struct::AvgResponse.new(v['countryiso'], v['avgresponse'])
end
end
|
#from ⇒ Object
47
48
49
|
# File 'lib/pingdom/summary_average.rb', line 47
def from
Time.at responsetime['from']
end
|
#to ⇒ Object
51
52
53
|
# File 'lib/pingdom/summary_average.rb', line 51
def to
Time.at responsetime['to']
end
|