Class: Namecheap::Dns
Constant Summary
Constants inherited from Api
Api::ENDPOINT, Api::ENVIRONMENT, Api::PRODUCTION, Api::SANDBOX
Instance Method Summary collapse
-
#get_email_forwarding(domain, options = {}) ⇒ Object
Gets email forwarding settings for the requested domain.
-
#get_hosts(sld, tld, options = {}) ⇒ Object
Retrieves DNS host record settings for the requested domain.
-
#get_list(sld, tld, options = {}) ⇒ Object
Gets a list of DNS servers associated with the requested domain.
-
#set_custom(sld, tld, nameservers = [], options = {}) ⇒ Object
Sets domain to use custom DNS servers.
-
#set_default(sld, tld, options = {}) ⇒ Object
Sets domain to use Namecheap's default DNS servers.
-
#set_email_forwarding(domain, options = {}) ⇒ Object
Sets email forwarding for a domain name.
-
#set_hosts(sld, tld, options = {}) ⇒ Object
Sets DNS host records settings for the requested domain.
Methods inherited from Api
#delete, #get, #init_args, #post, #put, #request
Instance Method Details
#get_email_forwarding(domain, options = {}) ⇒ Object
Gets email forwarding settings for the requested domain.
37 38 39 40 |
# File 'lib/namecheap/dns.rb', line 37 def get_email_forwarding(domain, = {}) = {DomainName: domain}.merge() get "domains.dns.getEmailForwarding", end |
#get_hosts(sld, tld, options = {}) ⇒ Object
Retrieves DNS host record settings for the requested domain.
30 31 32 33 |
# File 'lib/namecheap/dns.rb', line 30 def get_hosts(sld, tld, = {}) = {SLD: sld, TLD: tld}.merge() get "domains.dns.getHosts", end |
#get_list(sld, tld, options = {}) ⇒ Object
Gets a list of DNS servers associated with the requested domain.
23 24 25 26 |
# File 'lib/namecheap/dns.rb', line 23 def get_list(sld, tld, = {}) = {SLD: sld, TLD: tld}.merge() get "domains.dns.getList", end |
#set_custom(sld, tld, nameservers = [], options = {}) ⇒ Object
Sets domain to use custom DNS servers.
12 13 14 15 16 17 18 19 |
# File 'lib/namecheap/dns.rb', line 12 def set_custom(sld, tld, nameservers = [], = {}) if nameservers.respond_to?(:join) nameservers = nameservers.join(",") end = {SLD: sld, TLD: tld, Nameservers: nameservers}.merge() get "domains.dns.setCustom", end |
#set_default(sld, tld, options = {}) ⇒ Object
Sets domain to use Namecheap's default DNS servers.
5 6 7 8 |
# File 'lib/namecheap/dns.rb', line 5 def set_default(sld, tld, = {}) = {SLD: sld, TLD: tld}.merge() get "domains.dns.setDefault", end |
#set_email_forwarding(domain, options = {}) ⇒ Object
Sets email forwarding for a domain name.
44 45 46 47 |
# File 'lib/namecheap/dns.rb', line 44 def set_email_forwarding(domain, = {}) = {DomainName: domain}.merge() get "domains.dns.setEmailForwarding", end |
#set_hosts(sld, tld, options = {}) ⇒ Object
Sets DNS host records settings for the requested domain.
51 52 53 54 |
# File 'lib/namecheap/dns.rb', line 51 def set_hosts(sld, tld, = {}) = {SLD: sld, TLD: tld}.merge() get "domains.dns.setHosts", end |