Struct sendgrid_api::blocks_api::BlocksApi
source · [−]pub struct BlocksApi {
pub client: Client,
}Fields
client: ClientImplementations
sourceimpl BlocksApi
impl BlocksApi
sourcepub async fn get_suppression_blocks(
&self,
start_time: i64,
end_time: i64,
limit: i64,
offset: i64
) -> Result<Vec<BlocksResponse>>
pub async fn get_suppression_blocks(
&self,
start_time: i64,
end_time: i64,
limit: i64,
offset: i64
) -> Result<Vec<BlocksResponse>>
Retrieve all blocks.
This function performs a GET to the /suppression/blocks endpoint.
This endpoint allows you to retrieve all email addresses that are currently on your blocks list.
Parameters:
start_time: i64– The start of the time range when a blocked email was created (inclusive). This is a unix timestamp.end_time: i64– The end of the time range when a blocked email was created (inclusive). This is a unix timestamp.limit: i64– Limit the number of results to be displayed per page.offset: i64– The point in the list to begin displaying results.on_behalf_of: &str– The license key provided with your New Relic account.
sourcepub async fn get_all_suppression_blocks(
&self,
start_time: i64,
end_time: i64,
offset: i64
) -> Result<Vec<BlocksResponse>>
pub async fn get_all_suppression_blocks(
&self,
start_time: i64,
end_time: i64,
offset: i64
) -> Result<Vec<BlocksResponse>>
Retrieve all blocks.
This function performs a GET to the /suppression/blocks endpoint.
As opposed to get_suppression_blocks, this function returns all the pages of the request at once.
This endpoint allows you to retrieve all email addresses that are currently on your blocks list.
sourcepub async fn delete_suppression_blocks(
&self,
body: &DeleteSuppressionBlocksRequest
) -> Result<Help>
pub async fn delete_suppression_blocks(
&self,
body: &DeleteSuppressionBlocksRequest
) -> Result<Help>
Delete blocks.
This function performs a DELETE to the /suppression/blocks endpoint.
This endpoint allows you to delete all email addresses on your blocks list.
There are two options for deleting blocked emails:
- You can delete all blocked emails by setting
delete_alltotruein the request body. - You can delete a selection of blocked emails by specifying the email addresses in the
emailsarray of the request body.
Parameters:
on_behalf_of: &str– The license key provided with your New Relic account.
sourcepub async fn get_suppression_blocks_email(
&self,
email: &str
) -> Result<Vec<BlocksResponse>>
pub async fn get_suppression_blocks_email(
&self,
email: &str
) -> Result<Vec<BlocksResponse>>
Retrieve a specific block.
This function performs a GET to the /suppression/blocks/{email} endpoint.
This endpoint allows you to retrieve a specific email address from your blocks list.
Parameters:
on_behalf_of: &str– The license key provided with your New Relic account.
sourcepub async fn get_all_suppression_blocks_email(
&self,
email: &str
) -> Result<Vec<BlocksResponse>>
pub async fn get_all_suppression_blocks_email(
&self,
email: &str
) -> Result<Vec<BlocksResponse>>
Retrieve a specific block.
This function performs a GET to the /suppression/blocks/{email} endpoint.
As opposed to get_suppression_blocks_email, this function returns all the pages of the request at once.
This endpoint allows you to retrieve a specific email address from your blocks list.
sourcepub async fn delete_suppression_blocks_email(&self, email: &str) -> Result<Help>
pub async fn delete_suppression_blocks_email(&self, email: &str) -> Result<Help>
Delete a specific block.
This function performs a DELETE to the /suppression/blocks/{email} endpoint.
This endpoint allows you to delete a specific email address from your blocks list.
Parameters:
on_behalf_of: &str– The license key provided with your New Relic account.
Auto Trait Implementations
impl !RefUnwindSafe for BlocksApi
impl Send for BlocksApi
impl Sync for BlocksApi
impl Unpin for BlocksApi
impl !UnwindSafe for BlocksApi
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