pub struct Contacts { /* private fields */ }Expand description
Accessed as client.contacts().
Implementations§
Source§impl Contacts
impl Contacts
Sourcepub async fn list_lists(&self) -> Result<Vec<ContactList>>
pub async fn list_lists(&self) -> Result<Vec<ContactList>>
List all subscriber lists in the active workspace.
Sourcepub async fn create_list(&self, params: &CreateList) -> Result<ContactList>
pub async fn create_list(&self, params: &CreateList) -> Result<ContactList>
Create a subscriber list.
Sourcepub async fn get_list(
&self,
id: &str,
page: Option<u64>,
limit: Option<u64>,
) -> Result<ContactListDetail>
pub async fn get_list( &self, id: &str, page: Option<u64>, limit: Option<u64>, ) -> Result<ContactListDetail>
Get a list with a page of its contacts (zero-based page).
Sourcepub async fn update_list(
&self,
id: &str,
params: &UpdateList,
) -> Result<ContactList>
pub async fn update_list( &self, id: &str, params: &UpdateList, ) -> Result<ContactList>
Update a list’s name, description, or icon (partial).
Sourcepub async fn delete_list(&self, id: &str) -> Result<()>
pub async fn delete_list(&self, id: &str) -> Result<()>
Delete a list and all of its contacts.
Sourcepub async fn add_contact(
&self,
list_id: &str,
params: &AddContact,
) -> Result<Contact>
pub async fn add_contact( &self, list_id: &str, params: &AddContact, ) -> Result<Contact>
Add a single contact to a list.
Sourcepub async fn remove_contact(
&self,
list_id: &str,
contact_id: &str,
) -> Result<()>
pub async fn remove_contact( &self, list_id: &str, contact_id: &str, ) -> Result<()>
Remove a contact from a list.
Sourcepub async fn upload_csv(
&self,
list_id: &str,
file: Vec<u8>,
filename: &str,
) -> Result<CsvImportResult>
pub async fn upload_csv( &self, list_id: &str, file: Vec<u8>, filename: &str, ) -> Result<CsvImportResult>
Import contacts from a CSV file (header row required). Sent as
multipart/form-data under the field file.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Contacts
impl !UnwindSafe for Contacts
impl Freeze for Contacts
impl Send for Contacts
impl Sync for Contacts
impl Unpin for Contacts
impl UnsafeUnpin for Contacts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more