Class: Qrdot::DomainsResource
- Inherits:
-
Object
- Object
- Qrdot::DomainsResource
- Defined in:
- lib/qrdot/client.rb
Instance Method Summary collapse
- #create(payload) ⇒ Object
- #delete(id) ⇒ Object
- #dns(id) ⇒ Object
- #dns_provider(id) ⇒ Object
- #domain_connect_start(id) ⇒ Object
- #forward_dns(id, payload) ⇒ Object
- #get(id) ⇒ Object
-
#initialize(client) ⇒ DomainsResource
constructor
A new instance of DomainsResource.
- #list ⇒ Object
- #refresh(id) ⇒ Object
- #set_default(id) ⇒ Object
Constructor Details
#initialize(client) ⇒ DomainsResource
Returns a new instance of DomainsResource.
242 243 244 |
# File 'lib/qrdot/client.rb', line 242 def initialize(client) @c = client end |
Instance Method Details
#create(payload) ⇒ Object
246 247 248 |
# File 'lib/qrdot/client.rb', line 246 def create(payload) @c.request("POST", "/v1/domains", body: payload) end |
#delete(id) ⇒ Object
282 283 284 |
# File 'lib/qrdot/client.rb', line 282 def delete(id) @c.request("DELETE", "/v1/domains/#{URI.encode_www_form_component(id)}") end |
#dns(id) ⇒ Object
258 259 260 |
# File 'lib/qrdot/client.rb', line 258 def dns(id) @c.request("GET", "/v1/domains/#{URI.encode_www_form_component(id)}/dns") end |
#dns_provider(id) ⇒ Object
262 263 264 |
# File 'lib/qrdot/client.rb', line 262 def dns_provider(id) @c.request("GET", "/v1/domains/#{URI.encode_www_form_component(id)}/dns-provider") end |
#domain_connect_start(id) ⇒ Object
266 267 268 |
# File 'lib/qrdot/client.rb', line 266 def domain_connect_start(id) @c.request("POST", "/v1/domains/#{URI.encode_www_form_component(id)}/domain-connect/start") end |
#forward_dns(id, payload) ⇒ Object
270 271 272 |
# File 'lib/qrdot/client.rb', line 270 def forward_dns(id, payload) @c.request("POST", "/v1/domains/#{URI.encode_www_form_component(id)}/dns/forward", body: payload) end |
#get(id) ⇒ Object
254 255 256 |
# File 'lib/qrdot/client.rb', line 254 def get(id) @c.request("GET", "/v1/domains/#{URI.encode_www_form_component(id)}") end |
#list ⇒ Object
250 251 252 |
# File 'lib/qrdot/client.rb', line 250 def list @c.request("GET", "/v1/domains") end |
#refresh(id) ⇒ Object
274 275 276 |
# File 'lib/qrdot/client.rb', line 274 def refresh(id) @c.request("POST", "/v1/domains/#{URI.encode_www_form_component(id)}/refresh") end |
#set_default(id) ⇒ Object
278 279 280 |
# File 'lib/qrdot/client.rb', line 278 def set_default(id) @c.request("POST", "/v1/domains/#{URI.encode_www_form_component(id)}/default") end |