Class: Lumberg::Cpanel::AddonDomain
- Defined in:
- lib/lumberg/cpanel/addon_domain.rb
Instance Attribute Summary
Attributes inherited from Base
Attributes inherited from Whm::Base
Instance Method Summary collapse
-
#add(options = {}) ⇒ Object
Public: Add an addon domain with a coresponding subdomain.
-
#list(options = {}) ⇒ Object
Public: Get a list of addon domains.
-
#remove(options = {}) ⇒ Object
Public: Delete an addon domain.
Methods inherited from Base
api_module, #initialize, #perform_request
Methods inherited from Whm::Base
Constructor Details
This class inherits a constructor from Lumberg::Cpanel::Base
Instance Method Details
#add(options = {}) ⇒ Object
Public: Add an addon domain with a coresponding subdomain.
options - Hash options for API call params (default: {}):
:dir - String path for addon domain docroot.
:newdomain - String domain to use for addon domain.
:subdomain - String subdomain / FTP username corresponding to new
addon domain, e.g., "user".
Returns Hash API response.
29 30 31 32 33 |
# File 'lib/lumberg/cpanel/addon_domain.rb', line 29 def add( = {}) perform_request({ api_function: "addaddondomain" }.merge()) end |
#list(options = {}) ⇒ Object
Public: Get a list of addon domains.
options - Hash options for API call params (default: {}):
:regex - String regular expression to filter search results
(optional).
Returns Hash API response.
42 43 44 45 46 |
# File 'lib/lumberg/cpanel/addon_domain.rb', line 42 def list(={}) perform_request({ api_function: "listaddondomains" }.merge()) end |
#remove(options = {}) ⇒ Object
Public: Delete an addon domain. This will also remove the corresponding subdomain and FTP account.
options - Hash options for API call params (default: {}):
:domain - String addon domain to be deleted.
:subdomain - String adddon domain's username followed by "_", then
the addon domain's main domain, e.g.,
"user_addon.com"
Returns Hash API response.
14 15 16 17 18 |
# File 'lib/lumberg/cpanel/addon_domain.rb', line 14 def remove( = {}) perform_request({ api_function: "deladdondomain" }.merge()) end |