Class: SetupUptimerobot
- Inherits:
-
Object
- Object
- SetupUptimerobot
- Defined in:
- lib/renuo/cli/app/setup_uptimerobot.rb
Constant Summary collapse
- CONTACT_GROUP_IDS =
"2811620_0_0-2806053_0_0"
- HTTPS_MONITORING =
1
- STATUS_PAUSED =
0
Instance Method Summary collapse
-
#initialize(args) ⇒ SetupUptimerobot
constructor
A new instance of SetupUptimerobot.
- #run ⇒ Object
Constructor Details
#initialize(args) ⇒ SetupUptimerobot
Returns a new instance of SetupUptimerobot.
11 12 13 14 15 |
# File 'lib/renuo/cli/app/setup_uptimerobot.rb', line 11 def initialize(args) abort("No project name given.") if args.nil? @api_key = ask_for_api_key @url = validate_url(args) end |
Instance Method Details
#run ⇒ Object
17 18 19 20 21 22 |
# File 'lib/renuo/cli/app/setup_uptimerobot.rb', line 17 def run robot_obj = monitoring_call(:new, create_robot_params) validate_new_project(robot_obj) response = monitoring_call(:edit, edit_robot_params(robot_obj["monitor"]["id"])) final_command_status(response) end |