View Source Dnsimple.Services (dnsimple v4.0.0)
Provides functions to interact with the one-click service endpoints.
See:
Summary
Functions
Lists the one-click services already applied to a domain.
Apply a one-click service to a domain.
Returns a one-click service.
Returns the list of available one-click services.
Remove a one-click service previously applied to a domain.
Functions
@spec 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)
Link to this function
apply_service(client, account_id, domain_id, service_id, settings \\ %{}, options \\ [])
View Source@spec 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"}}
})
@spec 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")
@spec 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")
Link to this function
unapply_service(client, account_id, domain_id, service_id, options \\ [])
View Source@spec 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)