abcde-sappy 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/lib/sappy/account.rb +16 -8
- data/spec/sappy/account_bacon.rb +4 -0
- metadata +1 -1
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/sappy/account.rb
CHANGED
@@ -29,14 +29,8 @@ module Sappy
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def refresh!
|
32
|
-
|
33
|
-
|
34
|
-
@setup_monitors = response.setup_monitors
|
35
|
-
@sms_alerts = response.sms_alerts
|
36
|
-
response = request('summarystatistics')
|
37
|
-
@up_monitors = response.up
|
38
|
-
@down_monitors = response.down
|
39
|
-
@inactive_monitors = response.inactive
|
32
|
+
refresh_account_info
|
33
|
+
refresh_summary_statistics
|
40
34
|
end
|
41
35
|
|
42
36
|
def monitors(ids = [])
|
@@ -60,5 +54,19 @@ module Sappy
|
|
60
54
|
response = request('auth', "Email" => @username, "Password" => @password)
|
61
55
|
@authkey = response.key
|
62
56
|
end
|
57
|
+
|
58
|
+
def refresh_account_info
|
59
|
+
response = request('accountinfo')
|
60
|
+
@available_monitors = response.available_monitors
|
61
|
+
@setup_monitors = response.setup_monitors
|
62
|
+
@sms_alerts = response.sms_alerts
|
63
|
+
end
|
64
|
+
|
65
|
+
def refresh_summary_statistics
|
66
|
+
response = request('summarystatistics')
|
67
|
+
@up_monitors = response.up
|
68
|
+
@down_monitors = response.down
|
69
|
+
@inactive_monitors = response.inactive
|
70
|
+
end
|
63
71
|
end
|
64
72
|
end
|
data/spec/sappy/account_bacon.rb
CHANGED