dnsimple v0.9.2 Dnsimple.Domains
This module provides functions to interact with the domain related endpoints.
Summary
Functions
Accept a pending push. Requires a contact_id corresponding to the that will be used as the domain contact
List all domains from the account
Creates a new domain in the account
Creates an email forward for a domain
PERMANENTLY deletes a domain from the account
Deletes an email forward of a domain
See Dnsimple.Domains.get_domain/3
See Dnsimple.Domains.list_domains/2
See Dnsimple.Domains.get_email_forward/4
See Dnsimple.Domains.list_email_forwards/3
Returns an email forward of a domain
Initiates the push of a domain to a different account
Lists the domains
Lists the email forwards of a domain
Returns the pending pushes in the account
See Dnsimple.Domains.list_pushes/2
Rejects a pending push
Resets the domain API token used for authentication in APIv1
Functions
Specs
accept_push(Dnsimple.Client.t, String.t | integer, integer, map, Keyword.t) :: Dnsimple.Response.t
Accept a pending push. Requires a contact_id corresponding to the that will be used as the domain contact.
See: https://developer.dnsimple.com/v2/domains/pushes#accept
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Domains.accept_push(client, account_id = 1010, push_id = 6789, %{
contact_id: 123,
})
Specs
all_domains(Dnsimple.Client.t, String.t | integer, Keyword.t) :: [Dnsimple.Domain.t]
List all domains from the account.
This function will automatically page through to the end of the list, returning all domains. It will respect the provided sorting and filtering options.
Examples:
Dnsimple.Domains.all_domains(client, account_id = 1010) Dnsimple.Domains.all_domains(client, account_id = 1010, sort: “name:asc”) Dnsimple.Domains.all_domains(client, account_id = 1010, filter: [name_like: ".com"])
Specs
create_domain(Dnsimple.Client.t, String.t | integer, map, Keyword.t) :: Dnsimple.Response.t
Creates a new domain in the account.
This won’t register the domain and will only add the domain as hosted. To
register a domain please use
Dnsimple.Registrar.register_domain.
See https://developer.dnsimple.com/v2/domains/#create
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Domains.create_domain(client, account_id = 1010, %{name: “example.io”})
Specs
create_email_forward(Dnsimple.Client.t, String.t | integer, String.t | integer, map, Keyword.t) :: Dnsimple.Response.t
Creates an email forward for a domain.
See: https://developer.dnsimple.com/v2/domains/email-forwards/#create
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Domains.create_email_forward(client, account_id = 1010, domain_id = “example.com”, %{
from: "jacegu@example.com",
to: "me@provider.com",
})
Specs
delete_domain(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t
PERMANENTLY deletes a domain from the account.
See https://developer.dnsimple.com/v2/domains/#delete
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Domains.delete_domain(client, account_id = 1010, domain_id = 237) Dnsimple.Domains.delete_domain(client, account_id = 1010, domain_id = “example.io”)
Specs
delete_email_forward(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t) :: Dnsimple.Response.t
Deletes an email forward of a domain.
See: https://developer.dnsimple.com/v2/domains/email-forwards/#delete
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Domains.delete_email_forward(client, account_id = 1010, domain_id = “example.com”, email_forward_id = 123)
Specs
domain(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Specs
domains(Dnsimple.Client.t, String.t | integer) :: Dnsimple.Response.t
See Dnsimple.Domains.list_domains/2.
See Dnsimple.Domains.get_email_forward/4.
Specs
email_forward(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t) :: Dnsimple.Response.t
Specs
email_forwards(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Specs
get_domain(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Get a domain.
See https://developer.dnsimple.com/v2/domains/#get
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Domains.get_domain(client, account_id = 1010, domain_id = 123) Dnsimple.Domains.get_domain(client, account_id = 1010, domain_id = “example.com”)
Specs
get_email_forward(Dnsimple.Client.t, String.t | integer, String.t | integer, integer, Keyword.t) :: Dnsimple.Response.t
Returns an email forward of a domain.
See: https://developer.dnsimple.com/v2/domains/email-forwards/#get
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Domains.get_email_forward(client, account_id = 1010, domain_id = “example.com”, email_forward_id = 123)
Specs
initiate_push(Dnsimple.Client.t, String.t | integer, String.t | integer, map, Keyword.t) :: Dnsimple.Response.t
Initiates the push of a domain to a different account.
See: https://developer.dnsimple.com/v2/domains/pushes#initiate
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Domains.initiate_push(client, account_id = 1010, domain_id = “example.com”, %{
new_account_email: "other@example.com",
})
Lists the domains.
See https://developer.dnsimple.com/v2/domains/#list
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Domains.list_domains(client, account_id = 1010) Dnsimple.Domains.list_domains(client, account_id = 1010, sort: “name:asc”) Dnsimple.Domains.list_domains(client, account_id = 1010, per_page: 50, page: 4) Dnsimple.Domains.list_domains(client, account_id = 1010, filter: [name_like: ".com"])
Specs
list_email_forwards(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Lists the email forwards of a domain.
See: https://developer.dnsimple.com/v2/domains/email-forwards/#list
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Domains.list_email_forwards(client, account_id = 1010, domain_id = 23) Dnsimple.Domains.list_email_forwards(client, account_id = 1010, domain_id = “example.com”) Dnsimple.Domains.list_email_forwards(client, account_id = 1010, domain_id = “example.com”, sort: “to:asc”) Dnsimple.Domains.list_email_forwards(client, account_id = 1010, domain_id = “example.com”, per_page: 5, page: 1)
Specs
list_pushes(Dnsimple.Client.t, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Returns the pending pushes in the account.
See: https://developer.dnsimple.com/v2/domains/pushes#list
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Domains.list_pushes(client, account_id = 1010)
Specs
pushes(Dnsimple.Client.t, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Specs
reject_push(Dnsimple.Client.t, String.t | integer, integer, Keyword.t) :: Dnsimple.Response.t
Rejects a pending push.
See: https://developer.dnsimple.com/v2/domains/pushes#reject
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Domains.reject_push(client, account_id = 1010, push_id = 6789)
Specs
reset_domain_token(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: Dnsimple.Response.t
Resets the domain API token used for authentication in APIv1.
See https://developer.dnsimple.com/v2/domains/#reset-token
Examples:
client = %Dnsimple.Client{access_token: “a1b2c3d4”}
Dnsimple.Domains.reset_domain_token(client, account_id = 1010, domain_id = 123) Dnsimple.Domains.reset_domain_token(client, account_id = 1010, domain_id = “example.io”)