pub struct Endpoint<'a> { /* private fields */ }
Implementations§
Source§impl<'a> Endpoint<'a>
impl<'a> Endpoint<'a>
Sourcepub async fn list(
&self,
app_id: String,
options: Option<EndpointListOptions>,
) -> Result<ListResponseEndpointOut>
pub async fn list( &self, app_id: String, options: Option<EndpointListOptions>, ) -> Result<ListResponseEndpointOut>
List the application’s endpoints.
Sourcepub async fn create(
&self,
app_id: String,
endpoint_in: EndpointIn,
options: Option<PostOptions>,
) -> Result<EndpointOut>
pub async fn create( &self, app_id: String, endpoint_in: EndpointIn, options: Option<PostOptions>, ) -> Result<EndpointOut>
Create a new endpoint for the application.
When secret
is null
the secret is automatically generated
(recommended)
Sourcepub async fn get(
&self,
app_id: String,
endpoint_id: String,
) -> Result<EndpointOut>
pub async fn get( &self, app_id: String, endpoint_id: String, ) -> Result<EndpointOut>
Get an endpoint.
Sourcepub async fn update(
&self,
app_id: String,
endpoint_id: String,
endpoint_update: EndpointUpdate,
) -> Result<EndpointOut>
pub async fn update( &self, app_id: String, endpoint_id: String, endpoint_update: EndpointUpdate, ) -> Result<EndpointOut>
Update an endpoint.
Sourcepub async fn delete(&self, app_id: String, endpoint_id: String) -> Result<()>
pub async fn delete(&self, app_id: String, endpoint_id: String) -> Result<()>
Delete an endpoint.
Sourcepub async fn patch(
&self,
app_id: String,
endpoint_id: String,
endpoint_patch: EndpointPatch,
) -> Result<EndpointOut>
pub async fn patch( &self, app_id: String, endpoint_id: String, endpoint_patch: EndpointPatch, ) -> Result<EndpointOut>
Partially update an endpoint.
Sourcepub async fn get_secret(
&self,
app_id: String,
endpoint_id: String,
) -> Result<EndpointSecretOut>
pub async fn get_secret( &self, app_id: String, endpoint_id: String, ) -> Result<EndpointSecretOut>
Get the endpoint’s signing secret.
This is used to verify the authenticity of the webhook. For more information please refer to the consuming webhooks docs.
Sourcepub async fn rotate_secret(
&self,
app_id: String,
endpoint_id: String,
endpoint_secret_rotate_in: EndpointSecretRotateIn,
) -> Result<()>
pub async fn rotate_secret( &self, app_id: String, endpoint_id: String, endpoint_secret_rotate_in: EndpointSecretRotateIn, ) -> Result<()>
Rotates the endpoint’s signing secret.
The previous secret will remain valid for the next 24 hours.
Sourcepub async fn recover(
&self,
app_id: String,
endpoint_id: String,
recover_in: RecoverIn,
) -> Result<()>
pub async fn recover( &self, app_id: String, endpoint_id: String, recover_in: RecoverIn, ) -> Result<()>
Resend all failed messages since a given time.
Messages that were sent successfully, even if failed initially, are not resent.
Sourcepub async fn get_headers(
&self,
app_id: String,
endpoint_id: String,
) -> Result<EndpointHeadersOut>
pub async fn get_headers( &self, app_id: String, endpoint_id: String, ) -> Result<EndpointHeadersOut>
Get the additional headers to be sent with the webhook
Sourcepub async fn update_headers(
&self,
app_id: String,
endpoint_id: String,
endpoint_headers_in: EndpointHeadersIn,
) -> Result<()>
pub async fn update_headers( &self, app_id: String, endpoint_id: String, endpoint_headers_in: EndpointHeadersIn, ) -> Result<()>
Set the additional headers to be sent with the webhook
Sourcepub async fn patch_headers(
&self,
app_id: String,
endpoint_id: String,
endpoint_headers_patch_in: EndpointHeadersPatchIn,
) -> Result<()>
pub async fn patch_headers( &self, app_id: String, endpoint_id: String, endpoint_headers_patch_in: EndpointHeadersPatchIn, ) -> Result<()>
Partially set the additional headers to be sent with the webhook
Sourcepub async fn get_stats(
&self,
app_id: String,
endpoint_id: String,
options: Option<EndpointStatsOptions>,
) -> Result<EndpointStats>
pub async fn get_stats( &self, app_id: String, endpoint_id: String, options: Option<EndpointStatsOptions>, ) -> Result<EndpointStats>
Get basic statistics for the endpoint.
Sourcepub async fn replay_missing(
&self,
app_id: String,
endpoint_id: String,
replay_in: ReplayIn,
options: Option<PostOptions>,
) -> Result<()>
pub async fn replay_missing( &self, app_id: String, endpoint_id: String, replay_in: ReplayIn, options: Option<PostOptions>, ) -> Result<()>
Replays messages to the endpoint.
Only messages that were created after since
will be sent. Messages
that were previously sent to the endpoint are not resent.
Sourcepub async fn transformation_get(
&self,
app_id: String,
endpoint_id: String,
) -> Result<EndpointTransformationOut>
pub async fn transformation_get( &self, app_id: String, endpoint_id: String, ) -> Result<EndpointTransformationOut>
Get the transformation code associated with this endpoint
Sourcepub async fn transformation_partial_update(
&self,
app_id: String,
endpoint_id: String,
endpoint_transformation_in: EndpointTransformationIn,
) -> Result<()>
pub async fn transformation_partial_update( &self, app_id: String, endpoint_id: String, endpoint_transformation_in: EndpointTransformationIn, ) -> Result<()>
Set or unset the transformation code associated with this endpoint
Sourcepub async fn send_example(
&self,
app_id: String,
endpoint_id: String,
event_example_in: EventExampleIn,
options: Option<PostOptions>,
) -> Result<MessageOut>
pub async fn send_example( &self, app_id: String, endpoint_id: String, event_example_in: EventExampleIn, options: Option<PostOptions>, ) -> Result<MessageOut>
Send an example message for an event