Class: Awful::ApiGateway::RestApi
- Inherits:
-
Cli
show all
- Defined in:
- lib/awful/api_gateway.rb,
lib/awful/api_gateway_stages.rb,
lib/awful/api_gateway_methods.rb,
lib/awful/api_gateway_resources.rb,
lib/awful/api_gateway_deployments.rb
Instance Method Summary
collapse
Methods inherited from Cli
#initialize, #ll, #version
Constructor Details
This class inherits a constructor from Awful::Cli
Instance Method Details
#delete(id) ⇒ Object
33
34
35
36
37
38
|
# File 'lib/awful/api_gateway.rb', line 33
def delete(id)
name = api_gateway.get_rest_api(rest_api_id: id).name
if yes?("Really delete rest api #{id}: #{name}?", :yellow)
api_gateway.delete_rest_api(rest_api_id: id)
end
end
|
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/awful/api_gateway.rb', line 20
def ls
api_gateway.get_rest_apis.items.output do |items|
if options[:long]
print_table items.map { |i|
[i.name, i.id, i.created_date, i.description]
}.sort
else
puts items.map(&:name).sort
end
end
end
|