Class: Server
Direct Known Subclasses
Class Method Summary collapse
Methods inherited from Machine
Class Method Details
.ip(auth_code, host, environment, subdomain, type, subpath) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/proboscis_cli.rb', line 13 def self.ip(auth_code, host, environment, subdomain, type, subpath) response = HTTParty.get("#{host}/api/web/hives/#{subdomain}/#{type}", headers: {"X-Authorization" => auth_code}) if response.code != 200 puts "Unable to fetch details for domain #{subdomain}" exit -1 end hive = JSON::parse(response.body) @ipAddress = hive["ip_address"] end |