Struct dnsimple::dnsimple::templates::Templates [−][src]
pub struct Templates<'a> {
pub client: &'a Client,
}
Expand description
The Templates Service handles the domains templates of the DNSimple API.
Fields
client: &'a Client
Implementations
pub fn list_templates(
&self,
account_id: u64,
options: Option<RequestOptions>
) -> Result<DNSimpleResponse<Vec<Template>>, String>
pub fn list_templates(
&self,
account_id: u64,
options: Option<RequestOptions>
) -> Result<DNSimpleResponse<Vec<Template>>, String>
List templates in the account.
Arguments
account_id
: The account id
options
: The RequestOptions
for sorting, etc.
pub fn create_template(
&self,
account_id: u64,
payload: TemplatePayload
) -> Result<DNSimpleResponse<Template>, String>
pub fn create_template(
&self,
account_id: u64,
payload: TemplatePayload
) -> Result<DNSimpleResponse<Template>, String>
Create a template in the account
Arguments
account_id
: The account id
payload
: The Template payload
with the information to create the template
pub fn get_template(
&self,
account_id: u64,
template: String
) -> Result<DNSimpleResponse<Template>, String>
pub fn get_template(
&self,
account_id: u64,
template: String
) -> Result<DNSimpleResponse<Template>, String>
Retrieve a template in the account
Arguments
account_id
: The account id
template
: The template name or id
pub fn update_template(
&self,
account_id: u64,
template: String,
payload: TemplatePayload
) -> Result<DNSimpleResponse<Template>, String>
pub fn update_template(
&self,
account_id: u64,
template: String,
payload: TemplatePayload
) -> Result<DNSimpleResponse<Template>, String>
Update a template in the account
Arguments
account_id
: The account id
template
: The template name or id
payload
: The Template payload
with the information to create the template
Deletes a template from the account
Arguments
account_id
: The account id
template
: The template name or id
pub fn list_template_records(
&self,
account_id: u64,
template: String,
options: Option<RequestOptions>
) -> Result<DNSimpleResponse<Vec<TemplateRecord>>, String>
pub fn list_template_records(
&self,
account_id: u64,
template: String,
options: Option<RequestOptions>
) -> Result<DNSimpleResponse<Vec<TemplateRecord>>, String>
pub fn create_template_record(
&self,
account_id: u64,
template: String,
payload: TemplateRecordPayload
) -> Result<DNSimpleResponse<TemplateRecord>, String>
pub fn create_template_record(
&self,
account_id: u64,
template: String,
payload: TemplateRecordPayload
) -> Result<DNSimpleResponse<TemplateRecord>, String>
Create a template record
Arguments
account_id
: The account id
template
: The template name or id
payload
: The TemplateRecordPayload
with the information needed to create the template record
pub fn get_template_record(
&self,
account_id: u64,
template: String,
record: u64
) -> Result<DNSimpleResponse<TemplateRecord>, String>
pub fn get_template_record(
&self,
account_id: u64,
template: String,
record: u64
) -> Result<DNSimpleResponse<TemplateRecord>, String>
Retrieve a template record
Arguments
account_id
: The account id
template
: The template name or id
record
: The record id
pub fn delete_template_record(
&self,
account_id: u64,
template: String,
record: u64
) -> DNSimpleEmptyResponse
pub fn delete_template_record(
&self,
account_id: u64,
template: String,
record: u64
) -> DNSimpleEmptyResponse
Delete a template record
Arguments
account_id
: The account id
template
: The template name or id
record
: The record id
pub fn apply_template(
&self,
account_id: u64,
domain: String,
template: String
) -> DNSimpleEmptyResponse
pub fn apply_template(
&self,
account_id: u64,
domain: String,
template: String
) -> DNSimpleEmptyResponse
Applies a template to a domain.
Arguments
account_id
: The account id
domain
: The domain name or id
template
: The template id or short name