class Namecheap::Dns

Public Instance Methods

get_email_forwarding(domain, options = {}) click to toggle source

Gets email forwarding settings for the requested domain. @see developer.namecheap.com/docs/doku.php?id=api-reference:domains.dns:getemailforwarding

# File lib/namecheap/dns.rb, line 37
def get_email_forwarding(domain, options = {})
  options = {:DomainName => domain}.merge(options)
  get 'domains.dns.getEmailForwarding', options
end
get_hosts(sld, tld, options = {}) click to toggle source

Retrieves DNS host record settings for the requested domain. @see developer.namecheap.com/docs/doku.php?id=api-reference:domains.dns:gethosts

# File lib/namecheap/dns.rb, line 30
def get_hosts(sld, tld, options = {})
  options = {:SLD => sld, :TLD => tld}.merge(options)
  get 'domains.dns.getHosts', options
end
get_list(sld, tld, options = {}) click to toggle source

Gets a list of DNS servers associated with the requested domain. @see developer.namecheap.com/docs/doku.php?id=api-reference:domains.dns:getlist

# File lib/namecheap/dns.rb, line 23
def get_list(sld, tld, options = {})
  options = {:SLD => sld, :TLD => tld}.merge(options)
  get 'domains.dns.getList', options
end
set_custom(sld, tld, nameservers = [], options = {}) click to toggle source

Sets domain to use custom DNS servers. @see developer.namecheap.com/docs/doku.php?id=api-reference:domains.dns:setcustom

# File lib/namecheap/dns.rb, line 12
def set_custom(sld, tld, nameservers = [], options = {})
  if nameservers.respond_to?(:join)
    nameservers = nameservers.join(',')
  end
  
  options = {:SLD => sld, :TLD => tld, :Nameservers => nameservers}.merge(options)
  get 'domains.dns.setCustom', options
end
set_default(sld, tld, options = {}) click to toggle source

Sets domain to use Namecheap’s default DNS servers. @see developer.namecheap.com/docs/doku.php?id=api-reference:domains.dns:setdefault

# File lib/namecheap/dns.rb, line 5
def set_default(sld, tld, options = {})
  options = {:SLD => sld, :TLD => tld}.merge(options)
  get 'domains.dns.setDefault', options
end
set_email_forwarding(domain, options = {}) click to toggle source

Sets email forwarding for a domain name. @see developer.namecheap.com/docs/doku.php?id=api-reference:domains.dns:setemailforwarding

# File lib/namecheap/dns.rb, line 44
def set_email_forwarding(domain, options = {})
  options = {:DomainName => domain}.merge(options)
  get 'domains.dns.setEmailForwarding', options
end
set_hosts(sld, tld, options = {}) click to toggle source

Sets DNS host records settings for the requested domain. @see developer.namecheap.com/docs/doku.php?id=api-reference:domains.dns:sethosts

# File lib/namecheap/dns.rb, line 51
def set_hosts(sld, tld, options = {})
  options = {:SLD => sld, :TLD => tld}.merge(options)
  get 'domains.dns.setHosts', options
end