class Server

Public Class Methods

ip(auth_code, host, environment, subdomain, type, subpath) click to toggle source
# File lib/proboscis_cli.rb, line 13
def self.ip(auth_code, host, environment, subdomain, type, subpath)
  response = HTTParty.get("#{host}/api/api/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