dnsimple v1.2.0 Dnsimple.Services

Provides functions to interact with the one-click service endpoints.

See:

Summary

Functions

Lists the one-click services already applied to a domain

Returns the list of available one-click services

Remove a one-click service previously applied to a domain

Functions

applied_services(client, account_id, domain_id, options \\ [])

Specs

applied_services(Dnsimple.Client.t, String.t | integer, String.t | integer, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}

Lists the one-click services already applied to a domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Services.applied_services(client, account_id = 1010, domain_id = "example.com")
{:ok, response} = Dnsimple.Services.applied_services(client, account_id = 1010, domain_id = "example.com", page: 2)
apply_service(client, account_id, domain_id, service_id, settings \\ %{}, options \\ [])

Specs

apply_service(Dnsimple.Client.t, String.t | integer, String.t | integer, String.t | integer, map, keyword) :: {:ok | :error, Dnsimple.Response.t}

Apply a one-click service to a domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Services.apply_service(client, account_id = 1010, domain_id = "example.com", service_id = 12)
{:ok, response} = Dnsimple.Services.apply_service(client, account_id = 1010, domain_id = "example.com", service_id = 27, %{
  %{settings: %{setting_name: "setting value"}}
})
get_service(client, service_id, options \\ [])

Specs

get_service(Dnsimple.Client.t, integer | String.t, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}

Returns a one-click service.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Templates.get_service(client, service_id = 1)
{:ok, response} = Dnsimple.Templates.get_service(client, service_id = "wordpress")
list_services(client, options \\ [])

Specs

list_services(Dnsimple.Client.t, Keyword.t) :: {:ok | :error, Dnsimple.Response.t}

Returns the list of available one-click services.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Templates.list_services(client)
{:ok, response} = Dnsimple.Templates.list_services(client, sort: "short_name:desc")
unapply_service(client, account_id, domain_id, service_id, options \\ [])

Specs

unapply_service(Dnsimple.Client.t, String.t | integer, String.t | integer, String.t | integer, keyword) :: {:ok | :error, Dnsimple.Response.t}

Remove a one-click service previously applied to a domain.

See:

Examples:

client = %Dnsimple.Client{access_token: "a1b2c3d4"}
{:ok, response} = Dnsimple.Services.unapply_service(client, account_id = 1010, domain_id = "example.com", service_id = 12)