Skip to content

Instantly share code, notes, and snippets.

@voxxit
Created June 25, 2010 17:59
Show Gist options
  • Select an option

  • Save voxxit/453197 to your computer and use it in GitHub Desktop.

Select an option

Save voxxit/453197 to your computer and use it in GitHub Desktop.
require 'cpanel'
# Create a new instance of a server
server = Cpanel::Server.new(
:url => "http://server.url.com:2086/",
:key => "API_KEY",
:timepout => 100, # defaults to 300
:api => "xml" # defaults to "json"
)
# Use commands here, with options as hash key -> values
# Reference: http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/XmlApi
server.request("createacct", {
:username => "username",
:domain => "domain.com"
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment