dnsimple v0.9.2 Dnsimple.Templates
This module provides functions to interact with the template related endpoints.
See: https://developer.dnsimple.com/v2/templates/ See: https://developer.dnsimple.com/v2/templates/records/ See: https://developer.dnsimple.com/v2/templates/domains/
Summary
Functions
Applies a template to a domain
Creates a new template in the account
Creates a new record in the template
PERMANENTLY deletes an existing template
PERMANENTLY deletes a record from the template
Returns a template in the account
Returns a record in of the template
Returns the list of records in the template
Returns the list of existing templates in the account
See Dnsimple.Templates.get_template/3
See Dnsimple.Templates.get_template_record/4
See Dnsimple.Templates.list_template_records/3
See Dnsimple.Templates.list_templates/2
Updates an existing template
Functions
Specs
apply_template(Dnsimple.Client.t, String.t | integer, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Applies a template to a domain.
See https://developer.dnsimple.com/v2/templates/domains/#apply
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Templates.apply_template(client, account_id = 1010, domain_id = “example.com”, template_id = “alpha”)
Specs
create_template(Dnsimple.Client.t, String.t | integer, map, Keyword.t) :: Dnsimple.Response.t
Creates a new template in the account.
See https://developer.dnsimple.com/v2/templates/#create
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Templates.create_template(client, account_id = 1010, %{
name: "Beta",
short_name: "beta",
description: "A beta template.",
})
Specs
create_template_record(Dnsimple.Client.t, String.t | integer, String.t | integer, map, Keyword.t) :: Dnsimple.Response.t
Creates a new record in the template.
See https://developer.dnsimple.com/v2/templates/records/#create
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Templates.create_template_record(client, account_id = 1010, template_id = “alpha” %{
name: "",
type: "mx",
content: "mx.example.com",
ttl: 600,
prio: 10,
})
Specs
delete_template(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t
PERMANENTLY deletes an existing template.
See https://developer.dnsimple.com/v2/templates/#delete
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Templates.delete_template(client, account_id = 1010, template_id = “alpha”)
Specs
delete_template_record(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t) :: Dnsimple.Response.t
PERMANENTLY deletes a record from the template.
See https://developer.dnsimple.com/v2/templates/records/#delete
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Templates.delete_template_record(client, account_id = 1010, template_id = “alpha”, record_id = 1)
Specs
get_template(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Returns a template in the account.
See https://developer.dnsimple.com/v2/templates/#get
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Templates.get_template(client, account_id = 1010, template_id = “alpha”)
Specs
get_template_record(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t) :: Dnsimple.Response.t
Returns a record in of the template.
See https://developer.dnsimple.com/v2/templates/records/#get
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Templates.get_template_record(client, account_id = 1010, template_id = “alpha”, record_id = 123)
Specs
list_template_records(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Returns the list of records in the template.
See https://developer.dnsimple.com/v2/templates/records/#list
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Templates.list_template_records(client, account_id = 1010, template_id = 1) Dnsimple.Templates.list_template_records(client, account_id = 1010, template_id = 1, sort: “type:asc”)
Specs
list_templates(Dnsimple.Client.t, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Returns the list of existing templates in the account.
See https://developer.dnsimple.com/v2/templates/#list
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Templates.list_templates(client, account_id = 1010) Dnsimple.Templates.list_templates(client, account_id = 1010, sort: “name:asc”)
Specs
template(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t
See Dnsimple.Templates.get_template_record/4.
Specs
template_record(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t) :: Dnsimple.Response.t
Specs
template_records(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Specs
templates(Dnsimple.Client.t, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Specs
update_template(Dnsimple.Client.t, String.t | integer, String.t | integer, map, Keyword.t) :: Dnsimple.Response.t
Updates an existing template.
See https://developer.dnsimple.com/v2/templates/#update
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Templates.update_template(client, account_id = 1010, template_id = 1, %{
name: "Beta",
short_name: "beta",
description: "A beta template.",
})