pub struct Templates {
    pub client: Client,
}

Fields

client: Client

Implementations

List templates.

This function performs a GET to the /templates endpoint.

Get a list of an account’s available templates.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • count: i64 – The number of records to return. Default value is 10. Maximum value is 1000.
  • offset: i64 – Used for pagination, this it the number of records from a collection to skip. Default value is 0.
  • created_by: &str – The Mailchimp account user who created the template.
  • since_date_created: &str – Restrict the response to templates created after the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
  • before_date_created: &str – Restrict the response to templates created before the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
  • type_: &str – Limit results based on template type.
  • category: &str – Limit results based on category.
  • folder_id: &str – The name of the folder.
  • sort_field: crate::types::GetTemplatesSortField – Returns user templates sorted by the specified field.
  • sort_dir: crate::types::SortDir – Determines the order direction for sorted results.

Add template.

This function performs a POST to the /templates endpoint.

Create a new template for the account. Only Classic templates are supported.

Get template info.

This function performs a GET to the /templates/{template_id} endpoint.

Get information about a specific template.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • template_id: &str – The unique id for the template.

Delete template.

This function performs a DELETE to the /templates/{template_id} endpoint.

Delete a specific template.

Parameters:

  • template_id: &str – The unique id for the template.

Update template.

This function performs a PATCH to the /templates/{template_id} endpoint.

Update the name, HTML, or folder_id of an existing template.

Parameters:

  • template_id: &str – The unique id for the template.

View default content.

This function performs a GET to the /templates/{template_id}/default-content endpoint.

Get the sections that you can edit in a template, including each section’s default content.

Parameters:

  • fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • exclude_fields: &[String] – A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
  • template_id: &str – The unique id for the template.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Attaches the current Context to this type, returning a WithContext wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more