10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/threadfix/cli/applications.rb', line 10
def lookup
Client.configure do |config|
config.host = options[:host] if options[:host]
config.key = options[:key] if options[:key]
end
begin
response = Client::Applications.lookup(team_name: options[:team_name], app_name: options[:app_name] )
if response['message'] == ''
puts "ID: #{response['object']['id']}"
else
puts response['message']
end
rescue SocketError => e
puts "Error: Unable open connection to '#{Client.config.host}'"
exit 1
end
end
|