2011-02-23 22:35:05 -05:00
|
|
|
module Fog
|
2011-06-15 20:25:01 -04:00
|
|
|
module DNS
|
|
|
|
class DNSimple
|
2011-02-23 22:35:05 -05:00
|
|
|
class Real
|
|
|
|
|
|
|
|
# Create a single domain in DNSimple in your account.
|
|
|
|
# ==== Parameters
|
|
|
|
# * name<~String> - domain name to host (ie example.com)
|
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
|
|
|
# * body<~Hash>:
|
|
|
|
# * 'name'<~String>
|
|
|
|
def create_domain(name)
|
|
|
|
body = { "domain" => { "name" => name } }
|
|
|
|
request(
|
2012-04-25 10:31:28 -04:00
|
|
|
:body => Fog::JSON.encode(body),
|
2011-02-23 22:35:05 -05:00
|
|
|
:expects => 201,
|
|
|
|
:method => 'POST',
|
|
|
|
:path => '/domains'
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|