# -*- coding: utf-8 -*- require "magellan/cli" module Magellan module Cli class Direct < ::Magellan::Cli::Http desc "get PATH", "send GET request with PATH" def get(path) r = get_json(path) $stdout.puts(JSON.pretty_generate(r)) end desc "post PATH [PARAMS]", "send POST request with PATH and PARAMS" def post(path, params = nil) post_json(path) end desc "put PATH [PARAMS]", "send PUT request with PATH and PARAMS" def put(path, params = nil) put_json(path) end desc "delete PATH", "send DELETE request with PATH" def delete(path) delete(path) end end end end