1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/dns/requests/dnsimple/create_domain.rb

28 lines
672 B
Ruby
Raw Normal View History

module Fog
module DNSimple
class DNS
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(
:body => body.to_json,
:expects => 201,
:method => 'POST',
:path => '/domains'
)
end
end
end
end
end