Struct sendgrid_api::contacts_api_lists::ContactsApiLists
source · [−]pub struct ContactsApiLists {
pub client: Client,
}
Fields
client: Client
Implementations
sourceimpl ContactsApiLists
impl ContactsApiLists
sourcepub async fn get_contactdb_lists(&self) -> Result<ListAllListsResponse>
pub async fn get_contactdb_lists(&self) -> Result<ListAllListsResponse>
Retrieve all lists.
This function performs a GET
to the /contactdb/lists
endpoint.
This endpoint allows you to retrieve all of your recipient lists. If you don’t have any lists, an empty array will be returned.
Parameters:
on_behalf_of: &str
– The license key provided with your New Relic account.
sourcepub async fn post_contactdb_list(&self, body: &IpPool) -> Result<ContactdbList>
pub async fn post_contactdb_list(&self, body: &IpPool) -> Result<ContactdbList>
Create a List.
This function performs a POST
to the /contactdb/lists
endpoint.
This endpoint allows you to create a list for your recipients.
Parameters:
on_behalf_of: &str
– The license key provided with your New Relic account.
sourcepub async fn delete_contactdb_lists(&self, body: &[i64]) -> Result<()>
pub async fn delete_contactdb_lists(&self, body: &[i64]) -> Result<()>
Delete Multiple lists.
This function performs a DELETE
to the /contactdb/lists
endpoint.
This endpoint allows you to delete multiple recipient lists.
Parameters:
on_behalf_of: &str
– The license key provided with your New Relic account.
sourcepub async fn get_contactdb_lists_list(
&self,
list_id: &str
) -> Result<ContactdbList>
pub async fn get_contactdb_lists_list(
&self,
list_id: &str
) -> Result<ContactdbList>
Retrieve a single list.
This function performs a GET
to the /contactdb/lists/{list_id}
endpoint.
This endpoint allows you to retrieve a single recipient list.
Parameters:
list_id: i64
– The ID of the list to retrieve.on_behalf_of: &str
– The license key provided with your New Relic account.
sourcepub async fn delete_contactdb_lists_list(
&self,
list_id: &str,
delete_contacts: bool,
body: &Value
) -> Result<()>
pub async fn delete_contactdb_lists_list(
&self,
list_id: &str,
delete_contacts: bool,
body: &Value
) -> Result<()>
Delete a List.
This function performs a DELETE
to the /contactdb/lists/{list_id}
endpoint.
This endpoint allows you to delete a specific recipient list with the given ID.
Parameters:
delete_contacts: bool
– Adds the ability to delete all contacts on the list in addition to deleting the list.on_behalf_of: &str
– The license key provided with your New Relic account.
sourcepub async fn patch_contactdb_lists_list(
&self,
list_id: &str,
body: &IpPool
) -> Result<PatchContactdbListsListResponse>
pub async fn patch_contactdb_lists_list(
&self,
list_id: &str,
body: &IpPool
) -> Result<PatchContactdbListsListResponse>
Update a List.
This function performs a PATCH
to the /contactdb/lists/{list_id}
endpoint.
This endpoint allows you to update the name of one of your recipient lists.
Parameters:
list_id: i64
– The ID of the list you are updating.on_behalf_of: &str
– The license key provided with your New Relic account.
sourcepub async fn get_contactdb_lists_list_recipients(
&self,
list_id: i64,
page: i64,
page_size: i64
) -> Result<GetContactdbRecipientsSearchResponse>
pub async fn get_contactdb_lists_list_recipients(
&self,
list_id: i64,
page: i64,
page_size: i64
) -> Result<GetContactdbRecipientsSearchResponse>
Retrieve all recipients on a List.
This function performs a GET
to the /contactdb/lists/{list_id}/recipients
endpoint.
This endpoint allows you to retrieve all recipients on the list with the given ID.
Parameters:
page: i64
– Page index of first recipient to return (must be a positive integer).page_size: i64
– Number of recipients to return at a time (must be a positive integer between 1 and 1000).list_id: i64
– The ID of the list whose recipients you are requesting.on_behalf_of: &str
– The license key provided with your New Relic account.
sourcepub async fn post_contactdb_lists_list_recipient(
&self,
list_id: i64,
body: &[i64]
) -> Result<()>
pub async fn post_contactdb_lists_list_recipient(
&self,
list_id: i64,
body: &[i64]
) -> Result<()>
Add Multiple Recipients to a List.
This function performs a POST
to the /contactdb/lists/{list_id}/recipients
endpoint.
This endpoint allows you to add multiple recipients to a list.
Adds existing recipients to a list, passing in the recipient IDs to add. Recipient IDs should be passed exactly as they are returned from recipient endpoints.
Parameters:
on_behalf_of: &str
– The license key provided with your New Relic account.
sourcepub async fn post_contactdb_lists_list_recipients_recipient(
&self,
list_id: i64,
recipient_id: &str
) -> Result<()>
pub async fn post_contactdb_lists_list_recipients_recipient(
&self,
list_id: i64,
recipient_id: &str
) -> Result<()>
Add a Single Recipient to a List.
This function performs a POST
to the /contactdb/lists/{list_id}/recipients/{recipient_id}
endpoint.
This endpoint allows you to add a single recipient to a list.
Parameters:
on_behalf_of: &str
– The license key provided with your New Relic account.
sourcepub async fn delete_contactdb_lists_list_recipients_recipient(
&self,
list_id: i64,
recipient_id: &str,
body: &Value
) -> Result<()>
pub async fn delete_contactdb_lists_list_recipients_recipient(
&self,
list_id: i64,
recipient_id: &str,
body: &Value
) -> Result<()>
Delete a Single Recipient from a Single List.
This function performs a DELETE
to the /contactdb/lists/{list_id}/recipients/{recipient_id}
endpoint.
This endpoint allows you to delete a single recipient from a list.
Parameters:
list_id: i64
– The ID of the list you are taking this recipient away from.recipient_id: i64
– The ID of the recipient to take off the list.on_behalf_of: &str
– The license key provided with your New Relic account.
Auto Trait Implementations
impl !RefUnwindSafe for ContactsApiLists
impl Send for ContactsApiLists
impl Sync for ContactsApiLists
impl Unpin for ContactsApiLists
impl !UnwindSafe for ContactsApiLists
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FutureExt for T
impl<T> FutureExt for T
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more