Class: Holivia::Commands::Appointment
- Defined in:
- lib/holivia/commands/appointment.rb
Constant Summary collapse
- BASE_PATH =
"/api/v1/backoffice/appointments"
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.route(args) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/holivia/commands/appointment.rb', line 10 def self.route(args) subcommand = args.shift case subcommand when "video-diagnostics" then new.video_diagnostics(args) else warn "Unknown appointment command: #{subcommand}" exit 1 end end |
Instance Method Details
#video_diagnostics(args = []) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/holivia/commands/appointment.rb', line 19 def video_diagnostics(args = []) id = args.shift abort "Usage: holivia appointment video-diagnostics <id>" unless id output(client.get("#{BASE_PATH}/#{id}/video_diagnostics")) end |