64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# File 'lib/cloudstack_client/cli.rb', line 64
def list_apis
apis = client(no_api_methods: true).send_request('command' => 'listApis')
apis.each do |command|
command.delete("response") if options[:remove_response]
if options[:remove_description]
command.delete("description")
command["params"].each {|param| param.delete("description")}
end
end
print case options[:format]
when "yaml"
apis.to_yaml
else
options[:pretty_print] ? JSON.pretty_generate(apis) : JSON.generate(apis)
end
end
|