Struct mailchimp_api::lists::Lists
source · pub struct Lists {
pub client: Client,
}
Fields
client: Client
Implementations
sourceimpl Lists
impl Lists
sourcepub async fn get(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
before_date_created: &str,
since_date_created: &str,
before_campaign_last_sent: &str,
since_campaign_last_sent: &str,
email: &str,
sort_field: GetListsSortField,
sort_dir: SortDir,
has_ecommerce_store: bool,
include_total_contacts: bool
) -> Result<SubscriberLists>
pub async fn get(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
before_date_created: &str,
since_date_created: &str,
before_campaign_last_sent: &str,
since_campaign_last_sent: &str,
email: &str,
sort_field: GetListsSortField,
sort_dir: SortDir,
has_ecommerce_store: bool,
include_total_contacts: bool
) -> Result<SubscriberLists>
Get lists info.
This function performs a GET
to the /lists
endpoint.
Get information about all lists in the account.
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.before_date_created: &str
– Restrict response to lists created before the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.since_date_created: &str
– Restrict results to lists created after the set date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.before_campaign_last_sent: &str
– Restrict results to lists created before the last campaign send date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.since_campaign_last_sent: &str
– Restrict results to lists created after the last campaign send date. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.email: &str
– Restrict results to lists that include a specific subscriber’s email address.sort_field: crate::types::GetListsSortField
– Returns files sorted by the specified field.sort_dir: crate::types::SortDir
– Determines the order direction for sorted results.has_ecommerce_store: bool
– Restrict results to lists that contain an active, connected, undeleted ecommerce store.include_total_contacts: bool
– Return the total_contacts field in the stats response, which contains an approximate count of all contacts in any state.
sourcepub async fn post(&self, body: &SubscriberList) -> Result<Lists>
pub async fn post(&self, body: &SubscriberList) -> Result<Lists>
Add list.
This function performs a POST
to the /lists
endpoint.
Create a new list in your Mailchimp account.
sourcepub async fn get_lists(
&self,
fields: &[String],
exclude_fields: &[String],
list_id: &str,
include_total_contacts: bool
) -> Result<Lists>
pub async fn get_lists(
&self,
fields: &[String],
exclude_fields: &[String],
list_id: &str,
include_total_contacts: bool
) -> Result<Lists>
Get list info.
This function performs a GET
to the /lists/{list_id}
endpoint.
Get information about a specific list in your Mailchimp account. Results include list members who have signed up but haven’t confirmed their subscription yet and unsubscribed or cleaned.
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.list_id: &str
– The unique ID for the list.include_total_contacts: bool
– Return the total_contacts field in the stats response, which contains an approximate count of all contacts in any state.
sourcepub async fn post_lists(
&self,
list_id: &str,
skip_merge_validation: bool,
skip_duplicate_check: bool,
body: &MembersSubscribeUnsubscribeFromAListInBatch
) -> Result<BatchUpdateListMembers>
pub async fn post_lists(
&self,
list_id: &str,
skip_merge_validation: bool,
skip_duplicate_check: bool,
body: &MembersSubscribeUnsubscribeFromAListInBatch
) -> Result<BatchUpdateListMembers>
Batch subscribe or unsubscribe.
This function performs a POST
to the /lists/{list_id}
endpoint.
Batch subscribe or unsubscribe list members.
Parameters:
list_id: &str
– The unique ID for the list.skip_merge_validation: bool
– If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to false.skip_duplicate_check: bool
– If skip_duplicate_check is true, we will ignore duplicates sent in the request when using the batch sub/unsub on the lists endpoint. The status of the first appearance in the request will be saved. This defaults to false.
sourcepub async fn delete(&self, list_id: &str) -> Result<()>
pub async fn delete(&self, list_id: &str) -> Result<()>
Delete list.
This function performs a DELETE
to the /lists/{list_id}
endpoint.
Delete a list from your Mailchimp account. If you delete a list, you’ll lose the list history—including subscriber activity, unsubscribes, complaints, and bounces. You’ll also lose subscribers’ email addresses, unless you exported and backed up your list.
Parameters:
list_id: &str
– The unique ID for the list.
sourcepub async fn patch(
&self,
list_id: &str,
body: &SubscriberListData
) -> Result<Lists>
pub async fn patch(
&self,
list_id: &str,
body: &SubscriberListData
) -> Result<Lists>
Update lists.
This function performs a PATCH
to the /lists/{list_id}
endpoint.
Update the settings for a specific list.
Parameters:
list_id: &str
– The unique ID for the list.
sourcepub async fn get_abuse_report(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
list_id: &str
) -> Result<AbuseComplaints>
pub async fn get_abuse_report(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
list_id: &str
) -> Result<AbuseComplaints>
List abuse reports.
This function performs a GET
to the /lists/{list_id}/abuse-reports
endpoint.
Get all abuse reports for a specific list.
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.list_id: &str
– The unique ID for the list.
sourcepub async fn get_abuse_report_lists(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
list_id: &str,
report_id: &str
) -> Result<AbuseReports>
pub async fn get_abuse_report_lists(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
list_id: &str,
report_id: &str
) -> Result<AbuseReports>
Get abuse report.
This function performs a GET
to the /lists/{list_id}/abuse-reports/{report_id}
endpoint.
Get details about a specific abuse report.
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.list_id: &str
– The unique ID for the list.report_id: &str
– The id for the abuse report.
sourcepub async fn get_activity(
&self,
fields: &[String],
exclude_fields: &[String],
list_id: &str
) -> Result<ListActivity>
pub async fn get_activity(
&self,
fields: &[String],
exclude_fields: &[String],
list_id: &str
) -> Result<ListActivity>
List recent activity.
This function performs a GET
to the /lists/{list_id}/activity
endpoint.
Get up to the previous 180 days of daily detailed aggregated activity stats for a list, not including Automation activity.
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.list_id: &str
– The unique ID for the list.
sourcepub async fn get_client(
&self,
fields: &[String],
exclude_fields: &[String],
list_id: &str
) -> Result<EmailClients>
pub async fn get_client(
&self,
fields: &[String],
exclude_fields: &[String],
list_id: &str
) -> Result<EmailClients>
List top email clients.
This function performs a GET
to the /lists/{list_id}/clients
endpoint.
Get a list of the top email clients based on user-agent strings.
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.list_id: &str
– The unique ID for the list.
sourcepub async fn get_growth_history(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
list_id: &str,
sort_field: GetListsGrowthHistorySortField,
sort_dir: SortDir
) -> Result<GrowthHistory>
pub async fn get_growth_history(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
list_id: &str,
sort_field: GetListsGrowthHistorySortField,
sort_dir: SortDir
) -> Result<GrowthHistory>
List growth history data.
This function performs a GET
to the /lists/{list_id}/growth-history
endpoint.
Get a month-by-month summary of a specific list’s growth activity.
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.list_id: &str
– The unique ID for the list.sort_field: crate::types::GetListsGrowthHistorySortField
– Returns files sorted by the specified field.sort_dir: crate::types::SortDir
– Determines the order direction for sorted results.
sourcepub async fn get_growth_history_lists(
&self,
fields: &[String],
exclude_fields: &[String],
list_id: &str,
month: &str
) -> Result<History>
pub async fn get_growth_history_lists(
&self,
fields: &[String],
exclude_fields: &[String],
list_id: &str,
month: &str
) -> Result<History>
Get growth history by month.
This function performs a GET
to the /lists/{list_id}/growth-history/{month}
endpoint.
Get a summary of a specific list’s growth activity for a specific month and year.
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.list_id: &str
– The unique ID for the list.month: &str
– A specific month of list growth history.
sourcepub async fn get_interest_categorie(
&self,
list_id: &str,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
type_: &str
) -> Result<InterestGroupings>
pub async fn get_interest_categorie(
&self,
list_id: &str,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
type_: &str
) -> Result<InterestGroupings>
List interest categories.
This function performs a GET
to the /lists/{list_id}/interest-categories
endpoint.
Get information about a list’s interest categories.
Parameters:
list_id: &str
– The unique ID for the list.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.type_: &str
– Restrict results a type of interest group.
sourcepub async fn post_interest_categorie(
&self,
list_id: &str,
body: &InterestCategory
) -> Result<Categories>
pub async fn post_interest_categorie(
&self,
list_id: &str,
body: &InterestCategory
) -> Result<Categories>
Add interest category.
This function performs a POST
to the /lists/{list_id}/interest-categories
endpoint.
Create a new interest category.
Parameters:
list_id: &str
– The unique ID for the list.
sourcepub async fn get_interest_categorie_lists(
&self,
list_id: &str,
interest_category_id: &str,
fields: &[String],
exclude_fields: &[String]
) -> Result<Categories>
pub async fn get_interest_categorie_lists(
&self,
list_id: &str,
interest_category_id: &str,
fields: &[String],
exclude_fields: &[String]
) -> Result<Categories>
Get interest category info.
This function performs a GET
to the /lists/{list_id}/interest-categories/{interest_category_id}
endpoint.
Get information about a specific interest category.
Parameters:
list_id: &str
– The unique ID for the list.interest_category_id: &str
– The unique ID for the interest category.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.
sourcepub async fn delete_interest_categories(
&self,
list_id: &str,
interest_category_id: &str
) -> Result<()>
pub async fn delete_interest_categories(
&self,
list_id: &str,
interest_category_id: &str
) -> Result<()>
Delete interest category.
This function performs a DELETE
to the /lists/{list_id}/interest-categories/{interest_category_id}
endpoint.
Delete a specific interest category.
Parameters:
list_id: &str
– The unique ID for the list.interest_category_id: &str
– The unique ID for the interest category.
sourcepub async fn patch_interest_categories(
&self,
list_id: &str,
interest_category_id: &str,
body: &InterestCategory
) -> Result<Categories>
pub async fn patch_interest_categories(
&self,
list_id: &str,
interest_category_id: &str,
body: &InterestCategory
) -> Result<Categories>
Update interest category.
This function performs a PATCH
to the /lists/{list_id}/interest-categories/{interest_category_id}
endpoint.
Update a specific interest category.
Parameters:
list_id: &str
– The unique ID for the list.interest_category_id: &str
– The unique ID for the interest category.
sourcepub async fn get_interest_categories_interest(
&self,
list_id: &str,
interest_category_id: &str,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64
) -> Result<InterestsData>
pub async fn get_interest_categories_interest(
&self,
list_id: &str,
interest_category_id: &str,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64
) -> Result<InterestsData>
List interests in category.
This function performs a GET
to the /lists/{list_id}/interest-categories/{interest_category_id}/interests
endpoint.
Get a list of this category’s interests.
Parameters:
list_id: &str
– The unique ID for the list.interest_category_id: &str
– The unique ID for the interest category.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.
sourcepub async fn post_interest_categories(
&self,
list_id: &str,
interest_category_id: &str,
body: &Interest
) -> Result<InterestsInterest>
pub async fn post_interest_categories(
&self,
list_id: &str,
interest_category_id: &str,
body: &Interest
) -> Result<InterestsInterest>
Add interest in category.
This function performs a POST
to the /lists/{list_id}/interest-categories/{interest_category_id}/interests
endpoint.
Create a new interest or ‘group name’ for a specific category.
Parameters:
list_id: &str
– The unique ID for the list.interest_category_id: &str
– The unique ID for the interest category.
sourcepub async fn get_interest_categories_interest_lists(
&self,
list_id: &str,
interest_category_id: &str,
interest_id: &str,
fields: &[String],
exclude_fields: &[String]
) -> Result<InterestsInterest>
pub async fn get_interest_categories_interest_lists(
&self,
list_id: &str,
interest_category_id: &str,
interest_id: &str,
fields: &[String],
exclude_fields: &[String]
) -> Result<InterestsInterest>
Get interest in category.
This function performs a GET
to the /lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}
endpoint.
Get interests or ‘group names’ for a specific category.
Parameters:
list_id: &str
– The unique ID for the list.interest_category_id: &str
– The unique ID for the interest category.interest_id: &str
– The specific interest or ‘group name’.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.
sourcepub async fn delete_interest_categories_interests(
&self,
list_id: &str,
interest_category_id: &str,
interest_id: &str
) -> Result<()>
pub async fn delete_interest_categories_interests(
&self,
list_id: &str,
interest_category_id: &str,
interest_id: &str
) -> Result<()>
Delete interest in category.
This function performs a DELETE
to the /lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}
endpoint.
Delete interests or group names in a specific category.
Parameters:
list_id: &str
– The unique ID for the list.interest_category_id: &str
– The unique ID for the interest category.interest_id: &str
– The specific interest or ‘group name’.
sourcepub async fn patch_interest_categories_interests(
&self,
list_id: &str,
interest_category_id: &str,
interest_id: &str,
body: &Interest
) -> Result<InterestsInterest>
pub async fn patch_interest_categories_interests(
&self,
list_id: &str,
interest_category_id: &str,
interest_id: &str,
body: &Interest
) -> Result<InterestsInterest>
Update interest in category.
This function performs a PATCH
to the /lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}
endpoint.
Update interests or ‘group names’ for a specific category.
Parameters:
list_id: &str
– The unique ID for the list.interest_category_id: &str
– The unique ID for the interest category.interest_id: &str
– The specific interest or ‘group name’.
sourcepub async fn preview_segment(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
list_id: &str,
type_: &str,
since_created_at: &str,
before_created_at: &str,
include_cleaned: bool,
include_transactional: bool,
include_unsubscribed: bool,
since_updated_at: &str,
before_updated_at: &str
) -> Result<CollectionOfSegments>
pub async fn preview_segment(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
list_id: &str,
type_: &str,
since_created_at: &str,
before_created_at: &str,
include_cleaned: bool,
include_transactional: bool,
include_unsubscribed: bool,
since_updated_at: &str,
before_updated_at: &str
) -> Result<CollectionOfSegments>
List segments.
This function performs a GET
to the /lists/{list_id}/segments
endpoint.
Get information about all available segments for a specific list.
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.list_id: &str
– The unique ID for the list.type_: &str
– Limit results based on segment type.since_created_at: &str
– Restrict results to segments created after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.before_created_at: &str
– Restrict results to segments created before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.include_cleaned: bool
– Whether the webhook is triggered when a list subscriber is added.include_transactional: bool
– Whether the webhook is triggered when a list subscriber is added.include_unsubscribed: bool
– Whether the webhook is triggered when a list subscriber is added.since_updated_at: &str
– Restrict results to segments update after the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.before_updated_at: &str
– Restrict results to segments update before the set time. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.
sourcepub async fn post_segment(
&self,
list_id: &str,
body: &ListData
) -> Result<Segments>
pub async fn post_segment(
&self,
list_id: &str,
body: &ListData
) -> Result<Segments>
Add segment.
This function performs a POST
to the /lists/{list_id}/segments
endpoint.
Create a new segment in a specific list.
Parameters:
list_id: &str
– The unique ID for the list.
sourcepub async fn get_segment(
&self,
fields: &[String],
exclude_fields: &[String],
list_id: &str,
segment_id: &str,
include_cleaned: bool,
include_transactional: bool,
include_unsubscribed: bool
) -> Result<Segments>
pub async fn get_segment(
&self,
fields: &[String],
exclude_fields: &[String],
list_id: &str,
segment_id: &str,
include_cleaned: bool,
include_transactional: bool,
include_unsubscribed: bool
) -> Result<Segments>
Get segment info.
This function performs a GET
to the /lists/{list_id}/segments/{segment_id}
endpoint.
Get information about a specific segment.
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.list_id: &str
– The unique ID for the list.segment_id: &str
– The unique id for the segment.include_cleaned: bool
– Whether the webhook is triggered when a list subscriber is added.include_transactional: bool
– Whether the webhook is triggered when a list subscriber is added.include_unsubscribed: bool
– Whether the webhook is triggered when a list subscriber is added.
sourcepub async fn post_segment_lists(
&self,
list_id: &str,
segment_id: &str,
body: &MembersAddRemoveFromAStaticSegment
) -> Result<BatchAddRemoveListMembersFromStaticSegment>
pub async fn post_segment_lists(
&self,
list_id: &str,
segment_id: &str,
body: &MembersAddRemoveFromAStaticSegment
) -> Result<BatchAddRemoveListMembersFromStaticSegment>
Batch add or remove members.
This function performs a POST
to the /lists/{list_id}/segments/{segment_id}
endpoint.
Batch add/remove list members to static segment
Parameters:
list_id: &str
– The unique ID for the list.segment_id: &str
– The unique id for the segment.
sourcepub async fn delete_segments(&self, list_id: &str, segment_id: &str) -> Result<()>
pub async fn delete_segments(&self, list_id: &str, segment_id: &str) -> Result<()>
Delete segment.
This function performs a DELETE
to the /lists/{list_id}/segments/{segment_id}
endpoint.
Delete a specific segment in a list.
Parameters:
list_id: &str
– The unique ID for the list.segment_id: &str
– The unique id for the segment.
sourcepub async fn patch_segments(
&self,
list_id: &str,
segment_id: &str,
body: &ListDataType
) -> Result<Segments>
pub async fn patch_segments(
&self,
list_id: &str,
segment_id: &str,
body: &ListDataType
) -> Result<Segments>
Update segment.
This function performs a PATCH
to the /lists/{list_id}/segments/{segment_id}
endpoint.
Update a specific segment in a list.
Parameters:
list_id: &str
– The unique ID for the list.segment_id: &str
– The unique id for the segment.
sourcepub async fn get_segments_member(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
list_id: &str,
segment_id: &str,
include_cleaned: bool,
include_transactional: bool,
include_unsubscribed: bool
) -> Result<SegmentMembers>
pub async fn get_segments_member(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
list_id: &str,
segment_id: &str,
include_cleaned: bool,
include_transactional: bool,
include_unsubscribed: bool
) -> Result<SegmentMembers>
List members in segment.
This function performs a GET
to the /lists/{list_id}/segments/{segment_id}/members
endpoint.
Get information about members in a saved segment.
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.list_id: &str
– The unique ID for the list.segment_id: &str
– The unique id for the segment.include_cleaned: bool
– Whether the webhook is triggered when a list subscriber is added.include_transactional: bool
– Whether the webhook is triggered when a list subscriber is added.include_unsubscribed: bool
– Whether the webhook is triggered when a list subscriber is added.
sourcepub async fn post_segments_member(
&self,
list_id: &str,
segment_id: &str,
body: &SubscriberInAutomationQueue
) -> Result<ListMembers>
pub async fn post_segments_member(
&self,
list_id: &str,
segment_id: &str,
body: &SubscriberInAutomationQueue
) -> Result<ListMembers>
Add member to segment.
This function performs a POST
to the /lists/{list_id}/segments/{segment_id}/members
endpoint.
Add a member to a static segment.
Parameters:
list_id: &str
– The unique ID for the list.segment_id: &str
– The unique id for the segment.
sourcepub async fn delete_segments_members(
&self,
list_id: &str,
segment_id: &str,
subscriber_hash: &str
) -> Result<()>
pub async fn delete_segments_members(
&self,
list_id: &str,
segment_id: &str,
subscriber_hash: &str
) -> Result<()>
Remove list member from segment.
This function performs a DELETE
to the /lists/{list_id}/segments/{segment_id}/members/{subscriber_hash}
endpoint.
Remove a member from the specified static segment.
Parameters:
list_id: &str
– The unique ID for the list.segment_id: &str
– The unique id for the segment.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address.
Search for tags on a list by name.
This function performs a GET
to the /lists/{list_id}/tag-search
endpoint.
Search for tags on a list by name. If no name is provided, will return all tags on the list.
Parameters:
list_id: &str
– The unique ID for the list.name: &str
– The search query used to filter tags. The search query will be compared to each tag as a prefix, so all tags that have a name starting with this field will be returned.
sourcepub async fn get_member(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
list_id: &str,
email_type: &str,
status: GetListsMembersStatus,
since_timestamp_opt: &str,
before_timestamp_opt: &str,
since_last_changed: &str,
before_last_changed: &str,
unique_email_id: &str,
vip_only: bool,
interest_category_id: &str,
interest_ids: &str,
interest_match: InterestMatch,
sort_field: GetListsMembersSortField,
sort_dir: SortDir,
since_last_campaign: bool,
unsubscribed_since: &str
) -> Result<ListMembersDataType>
pub async fn get_member(
&self,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
list_id: &str,
email_type: &str,
status: GetListsMembersStatus,
since_timestamp_opt: &str,
before_timestamp_opt: &str,
since_last_changed: &str,
before_last_changed: &str,
unique_email_id: &str,
vip_only: bool,
interest_category_id: &str,
interest_ids: &str,
interest_match: InterestMatch,
sort_field: GetListsMembersSortField,
sort_dir: SortDir,
since_last_campaign: bool,
unsubscribed_since: &str
) -> Result<ListMembersDataType>
List members info.
This function performs a GET
to the /lists/{list_id}/members
endpoint.
Get information about members in a specific Mailchimp list.
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.list_id: &str
– The unique ID for the list.email_type: &str
– The name of the folder.status: crate::types::GetListsMembersStatus
– The subscriber’s status.since_timestamp_opt: &str
– Restrict results to subscribers who opted-in after the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.before_timestamp_opt: &str
– Restrict results to subscribers who opted-in before the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.since_last_changed: &str
– Restrict results to subscribers whose information changed after the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.before_last_changed: &str
– Restrict results to subscribers whose information changed before the set timeframe. Uses ISO 8601 time format: 2015-10-21T15:41:36+00:00.unique_email_id: &str
– A unique identifier for the email address across all Mailchimp lists.vip_only: bool
– A filter to return only the list’s VIP members. Passingtrue
will restrict results to VIP list members, passingfalse
will return all list members.interest_category_id: &str
– The unique id for the interest category.interest_ids: &str
– Used to filter list members by interests. Must be accompanied by interest_category_id and interest_match. The value must be a comma separated list of interest ids present for any supplied interest categories.interest_match: crate::types::InterestMatch
– Used to filter list members by interests. Must be accompanied by interest_category_id and interest_ids. “any” will match a member with any of the interest supplied, “all” will only match members with every interest supplied, and “none” will match members without any of the interest supplied.sort_field: crate::types::GetListsMembersSortField
– Returns files sorted by the specified field.sort_dir: crate::types::SortDir
– Determines the order direction for sorted results.since_last_campaign: bool
– Filter subscribers by those subscribed/unsubscribed/pending/cleaned since last email campaign send. Member status is required to use this filter.unsubscribed_since: &str
– Filter subscribers by those unsubscribed since a specific date. Using any status other than unsubscribed with this filter will result in an error.
sourcepub async fn post_member(
&self,
list_id: &str,
skip_merge_validation: bool,
body: &AddListMembers
) -> Result<ListMembersData>
pub async fn post_member(
&self,
list_id: &str,
skip_merge_validation: bool,
body: &AddListMembers
) -> Result<ListMembersData>
Add member to list.
This function performs a POST
to the /lists/{list_id}/members
endpoint.
Add a new member to the list.
Parameters:
list_id: &str
– The unique ID for the list.skip_merge_validation: bool
– If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to false.
sourcepub async fn get_member_lists(
&self,
fields: &[String],
exclude_fields: &[String],
list_id: &str,
subscriber_hash: &str
) -> Result<ListMembersData>
pub async fn get_member_lists(
&self,
fields: &[String],
exclude_fields: &[String],
list_id: &str,
subscriber_hash: &str
) -> Result<ListMembersData>
Get member info.
This function performs a GET
to the /lists/{list_id}/members/{subscriber_hash}
endpoint.
Get information about a specific list member, including a currently subscribed, unsubscribed, or bounced member.
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.list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address. This endpoint also accepts email addresses.
sourcepub async fn put_members(
&self,
list_id: &str,
subscriber_hash: &str,
skip_merge_validation: bool,
body: &AddListMembersData
) -> Result<ListMembersData>
pub async fn put_members(
&self,
list_id: &str,
subscriber_hash: &str,
skip_merge_validation: bool,
body: &AddListMembersData
) -> Result<ListMembersData>
Add or update list member.
This function performs a PUT
to the /lists/{list_id}/members/{subscriber_hash}
endpoint.
Add or update a list member.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address.skip_merge_validation: bool
– If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to false.
sourcepub async fn delete_members(
&self,
list_id: &str,
subscriber_hash: &str
) -> Result<()>
pub async fn delete_members(
&self,
list_id: &str,
subscriber_hash: &str
) -> Result<()>
Archive list member.
This function performs a DELETE
to the /lists/{list_id}/members/{subscriber_hash}
endpoint.
Archive a list member. To permanently delete, use the delete-permanent action.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address.
sourcepub async fn patch_members(
&self,
list_id: &str,
subscriber_hash: &str,
skip_merge_validation: bool,
body: &AddListMembersDataType
) -> Result<ListMembersData>
pub async fn patch_members(
&self,
list_id: &str,
subscriber_hash: &str,
skip_merge_validation: bool,
body: &AddListMembersDataType
) -> Result<ListMembersData>
Update list member.
This function performs a PATCH
to the /lists/{list_id}/members/{subscriber_hash}
endpoint.
Update information for a specific list member.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address.skip_merge_validation: bool
– If skip_merge_validation is true, member data will be accepted without merge field values, even if the merge field is usually required. This defaults to false.
sourcepub async fn get_members_activity(
&self,
list_id: &str,
subscriber_hash: &str,
fields: &[String],
exclude_fields: &[String],
action: &[String]
) -> Result<MemberActivityEvents>
pub async fn get_members_activity(
&self,
list_id: &str,
subscriber_hash: &str,
fields: &[String],
exclude_fields: &[String],
action: &[String]
) -> Result<MemberActivityEvents>
View recent activity 50.
This function performs a GET
to the /lists/{list_id}/members/{subscriber_hash}/activity
endpoint.
Get the last 50 events of a member’s activity on a specific list, including opens, clicks, and unsubscribes.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address.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.action: &[String]
– A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
sourcepub async fn get_members_activity_feed(
&self,
list_id: &str,
subscriber_hash: &str,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
activity_filters: &[String]
) -> Result<MemberActivityEventsData>
pub async fn get_members_activity_feed(
&self,
list_id: &str,
subscriber_hash: &str,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
activity_filters: &[String]
) -> Result<MemberActivityEventsData>
View recent activity.
This function performs a GET
to the /lists/{list_id}/members/{subscriber_hash}/activity-feed
endpoint.
Get a member’s activity on a specific list, including opens, clicks, and unsubscribes.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address.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.activity_filters: &[String]
– A comma-separated list of activity filters that correspond to a set of activity types, e.g “?activity_filters=open,bounce,click”.
sourcepub async fn get_member_tag(
&self,
list_id: &str,
subscriber_hash: &str,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64
) -> Result<CollectionOfTags>
pub async fn get_member_tag(
&self,
list_id: &str,
subscriber_hash: &str,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64
) -> Result<CollectionOfTags>
List member tags.
This function performs a GET
to the /lists/{list_id}/members/{subscriber_hash}/tags
endpoint.
Get the tags on a list member.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address.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.
sourcepub async fn post_member_tag(
&self,
list_id: &str,
subscriber_hash: &str,
body: &MemberTags
) -> Result<()>
pub async fn post_member_tag(
&self,
list_id: &str,
subscriber_hash: &str,
body: &MemberTags
) -> Result<()>
Add or remove member tags.
This function performs a POST
to the /lists/{list_id}/members/{subscriber_hash}/tags
endpoint.
Add or remove tags from a list member. If a tag that does not exist is passed in and set as ‘active’, a new tag will be created.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address.
sourcepub async fn get_members_event(
&self,
list_id: &str,
subscriber_hash: &str,
count: i64,
offset: i64,
fields: &[String],
exclude_fields: &[String]
) -> Result<CollectionOfEvents>
pub async fn get_members_event(
&self,
list_id: &str,
subscriber_hash: &str,
count: i64,
offset: i64,
fields: &[String],
exclude_fields: &[String]
) -> Result<CollectionOfEvents>
List member events.
This function performs a GET
to the /lists/{list_id}/members/{subscriber_hash}/events
endpoint.
Get events for a contact.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address. This endpoint also accepts email addresses.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.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.
sourcepub async fn post_member_event(
&self,
list_id: &str,
subscriber_hash: &str,
body: &EventsData
) -> Result<()>
pub async fn post_member_event(
&self,
list_id: &str,
subscriber_hash: &str,
body: &EventsData
) -> Result<()>
Add event.
This function performs a POST
to the /lists/{list_id}/members/{subscriber_hash}/events
endpoint.
Add an event for a list member.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address. This endpoint also accepts email addresses.
sourcepub async fn get_members_goal(
&self,
list_id: &str,
subscriber_hash: &str,
fields: &[String],
exclude_fields: &[String]
) -> Result<CollectionOfMemberActivityEvents>
pub async fn get_members_goal(
&self,
list_id: &str,
subscriber_hash: &str,
fields: &[String],
exclude_fields: &[String]
) -> Result<CollectionOfMemberActivityEvents>
List member goal events.
This function performs a GET
to the /lists/{list_id}/members/{subscriber_hash}/goals
endpoint.
Get the last 50 Goal events for a member on a specific list.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address.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.
sourcepub async fn get_members_note(
&self,
list_id: &str,
subscriber_hash: &str,
sort_field: GetListsMembersNotesSortField,
sort_dir: SortDir,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64
) -> Result<CollectionOfNotes>
pub async fn get_members_note(
&self,
list_id: &str,
subscriber_hash: &str,
sort_field: GetListsMembersNotesSortField,
sort_dir: SortDir,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64
) -> Result<CollectionOfNotes>
List recent member notes.
This function performs a GET
to the /lists/{list_id}/members/{subscriber_hash}/notes
endpoint.
Get recent notes for a specific list member.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address.sort_field: crate::types::GetListsMembersNotesSortField
– Returns notes sorted by the specified field.sort_dir: crate::types::SortDir
– Determines the order direction for sorted results.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.
sourcepub async fn post_members_note(
&self,
list_id: &str,
subscriber_hash: &str,
body: &MemberNotes
) -> Result<CollectionOfNotesMember>
pub async fn post_members_note(
&self,
list_id: &str,
subscriber_hash: &str,
body: &MemberNotes
) -> Result<CollectionOfNotesMember>
Add member note.
This function performs a POST
to the /lists/{list_id}/members/{subscriber_hash}/notes
endpoint.
Add a new note for a specific subscriber.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address.
sourcepub async fn get_members_note_lists(
&self,
list_id: &str,
subscriber_hash: &str,
note_id: &str,
fields: &[String],
exclude_fields: &[String]
) -> Result<CollectionOfNotesMember>
pub async fn get_members_note_lists(
&self,
list_id: &str,
subscriber_hash: &str,
note_id: &str,
fields: &[String],
exclude_fields: &[String]
) -> Result<CollectionOfNotesMember>
Get member note.
This function performs a GET
to the /lists/{list_id}/members/{subscriber_hash}/notes/{note_id}
endpoint.
Get a specific note for a specific list member.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address.note_id: &str
– The name of the folder.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.
sourcepub async fn delete_members_notes(
&self,
list_id: &str,
subscriber_hash: &str,
note_id: &str
) -> Result<()>
pub async fn delete_members_notes(
&self,
list_id: &str,
subscriber_hash: &str,
note_id: &str
) -> Result<()>
Delete note.
This function performs a DELETE
to the /lists/{list_id}/members/{subscriber_hash}/notes/{note_id}
endpoint.
Delete a specific note for a specific list member.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address.note_id: &str
– The name of the folder.
sourcepub async fn patch_members_notes(
&self,
list_id: &str,
subscriber_hash: &str,
note_id: &str,
body: &MemberNotes
) -> Result<CollectionOfNotesMember>
pub async fn patch_members_notes(
&self,
list_id: &str,
subscriber_hash: &str,
note_id: &str,
body: &MemberNotes
) -> Result<CollectionOfNotesMember>
Update note.
This function performs a PATCH
to the /lists/{list_id}/members/{subscriber_hash}/notes/{note_id}
endpoint.
Update a specific note for a specific list member.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address.note_id: &str
– The name of the folder.
sourcepub async fn post_members_hash_actions_delete_permanent(
&self,
list_id: &str,
subscriber_hash: &str
) -> Result<()>
pub async fn post_members_hash_actions_delete_permanent(
&self,
list_id: &str,
subscriber_hash: &str
) -> Result<()>
Delete list member.
This function performs a POST
to the /lists/{list_id}/members/{subscriber_hash}/actions/delete-permanent
endpoint.
Delete all personally identifiable information related to a list member, and remove them from a list. This will make it impossible to re-import the list member.
Parameters:
list_id: &str
– The unique ID for the list.subscriber_hash: &str
– The MD5 hash of the lowercase version of the list member’s email address.
sourcepub async fn get_merge_field(
&self,
list_id: &str,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
type_: &str,
required: bool
) -> Result<CollectionOfMergeFields>
pub async fn get_merge_field(
&self,
list_id: &str,
fields: &[String],
exclude_fields: &[String],
count: i64,
offset: i64,
type_: &str,
required: bool
) -> Result<CollectionOfMergeFields>
List merge fields.
This function performs a GET
to the /lists/{list_id}/merge-fields
endpoint.
Get a list of all merge fields (audience fields) for a list.
Parameters:
list_id: &str
– The unique ID for the list.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.type_: &str
– The name of the folder.required: bool
– Whether the webhook is triggered when a list subscriber is added.
sourcepub async fn post_merge_field(
&self,
list_id: &str,
body: &MergeFieldData
) -> Result<MergeField>
pub async fn post_merge_field(
&self,
list_id: &str,
body: &MergeFieldData
) -> Result<MergeField>
Add merge field.
This function performs a POST
to the /lists/{list_id}/merge-fields
endpoint.
Add a new merge field (audience field) for a specific list.
Parameters:
list_id: &str
– The unique ID for the list.
sourcepub async fn get_merge_field_lists(
&self,
list_id: &str,
merge_id: &str,
exclude_fields: &[String],
fields: &[String]
) -> Result<MergeField>
pub async fn get_merge_field_lists(
&self,
list_id: &str,
merge_id: &str,
exclude_fields: &[String],
fields: &[String]
) -> Result<MergeField>
Get merge field.
This function performs a GET
to the /lists/{list_id}/merge-fields/{merge_id}
endpoint.
Get information about a specific merge field (audience field) in a list.
Parameters:
list_id: &str
– The unique ID for the list.merge_id: &str
– The id for the merge field.exclude_fields: &[String]
– A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.fields: &[String]
– A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
sourcepub async fn delete_merge_fields(
&self,
list_id: &str,
merge_id: &str
) -> Result<()>
pub async fn delete_merge_fields(
&self,
list_id: &str,
merge_id: &str
) -> Result<()>
Delete merge field.
This function performs a DELETE
to the /lists/{list_id}/merge-fields/{merge_id}
endpoint.
Delete a specific merge field (audience field) in a list.
Parameters:
list_id: &str
– The unique ID for the list.merge_id: &str
– The id for the merge field.
sourcepub async fn patch_merge_fields(
&self,
list_id: &str,
merge_id: &str,
body: &MergeFieldDataType
) -> Result<MergeField>
pub async fn patch_merge_fields(
&self,
list_id: &str,
merge_id: &str,
body: &MergeFieldDataType
) -> Result<MergeField>
Update merge field.
This function performs a PATCH
to the /lists/{list_id}/merge-fields/{merge_id}
endpoint.
Update a specific merge field (audience field) in a list.
Parameters:
list_id: &str
– The unique ID for the list.merge_id: &str
– The id for the merge field.
sourcepub async fn get_webhook(&self, list_id: &str) -> Result<ListWebhooksData>
pub async fn get_webhook(&self, list_id: &str) -> Result<ListWebhooksData>
List webhooks.
This function performs a GET
to the /lists/{list_id}/webhooks
endpoint.
Get information about all webhooks for a specific list.
Parameters:
list_id: &str
– The unique ID for the list.
sourcepub async fn post_webhook(
&self,
list_id: &str,
body: &AddWebhook
) -> Result<ListWebhooks>
pub async fn post_webhook(
&self,
list_id: &str,
body: &AddWebhook
) -> Result<ListWebhooks>
Add webhook.
This function performs a POST
to the /lists/{list_id}/webhooks
endpoint.
Create a new webhook for a specific list.
Parameters:
list_id: &str
– The unique ID for the list.
sourcepub async fn get_webhook_lists(
&self,
list_id: &str,
webhook_id: &str
) -> Result<ListWebhooks>
pub async fn get_webhook_lists(
&self,
list_id: &str,
webhook_id: &str
) -> Result<ListWebhooks>
Get webhook info.
This function performs a GET
to the /lists/{list_id}/webhooks/{webhook_id}
endpoint.
Get information about a specific webhook.
Parameters:
list_id: &str
– The unique ID for the list.webhook_id: &str
– The name of the folder.
sourcepub async fn delete_webhooks(&self, list_id: &str, webhook_id: &str) -> Result<()>
pub async fn delete_webhooks(&self, list_id: &str, webhook_id: &str) -> Result<()>
Delete webhook.
This function performs a DELETE
to the /lists/{list_id}/webhooks/{webhook_id}
endpoint.
Delete a specific webhook in a list.
Parameters:
list_id: &str
– The unique ID for the list.webhook_id: &str
– The name of the folder.
sourcepub async fn patch_webhooks(
&self,
list_id: &str,
webhook_id: &str,
body: &AddWebhook
) -> Result<ListWebhooks>
pub async fn patch_webhooks(
&self,
list_id: &str,
webhook_id: &str,
body: &AddWebhook
) -> Result<ListWebhooks>
Update webhook.
This function performs a PATCH
to the /lists/{list_id}/webhooks/{webhook_id}
endpoint.
Update the settings for an existing webhook.
Parameters:
list_id: &str
– The unique ID for the list.webhook_id: &str
– The name of the folder.
sourcepub async fn get_signup_form(&self, list_id: &str) -> Result<ListSignupForms>
pub async fn get_signup_form(&self, list_id: &str) -> Result<ListSignupForms>
List signup forms.
This function performs a GET
to the /lists/{list_id}/signup-forms
endpoint.
Get signup forms for a specific list.
Parameters:
list_id: &str
– The unique ID for the list.
sourcepub async fn post_signup_form(
&self,
list_id: &str,
body: &SignupFormData
) -> Result<SignupForm>
pub async fn post_signup_form(
&self,
list_id: &str,
body: &SignupFormData
) -> Result<SignupForm>
Customize signup form.
This function performs a POST
to the /lists/{list_id}/signup-forms
endpoint.
Customize a list’s default signup form.
Parameters:
list_id: &str
– The unique ID for the list.
sourcepub async fn get_location(
&self,
fields: &[String],
exclude_fields: &[String],
list_id: &str
) -> Result<ListLocations>
pub async fn get_location(
&self,
fields: &[String],
exclude_fields: &[String],
list_id: &str
) -> Result<ListLocations>
List locations.
This function performs a GET
to the /lists/{list_id}/locations
endpoint.
Get the locations (countries) that the list’s subscribers have been tagged to based on geocoding their IP address.
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.list_id: &str
– The unique ID for the list.