Struct Endpoint

Source
pub struct Endpoint<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Endpoint<'a>

Source

pub async fn list( &self, app_id: String, options: Option<EndpointListOptions>, ) -> Result<ListResponseEndpointOut>

List the application’s endpoints.

Source

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)

Source

pub async fn get( &self, app_id: String, endpoint_id: String, ) -> Result<EndpointOut>

Get an endpoint.

Source

pub async fn update( &self, app_id: String, endpoint_id: String, endpoint_update: EndpointUpdate, ) -> Result<EndpointOut>

Update an endpoint.

Source

pub async fn delete(&self, app_id: String, endpoint_id: String) -> Result<()>

Delete an endpoint.

Source

pub async fn patch( &self, app_id: String, endpoint_id: String, endpoint_patch: EndpointPatch, ) -> Result<EndpointOut>

Partially update an endpoint.

Source

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.

Source

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.

Source

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.

Source

pub async fn get_headers( &self, app_id: String, endpoint_id: String, ) -> Result<EndpointHeadersOut>

Get the additional headers to be sent with the webhook

Source

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

Source

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

Source

pub async fn get_stats( &self, app_id: String, endpoint_id: String, options: Option<EndpointStatsOptions>, ) -> Result<EndpointStats>

Get basic statistics for the endpoint.

Source

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.

Source

pub async fn transformation_get( &self, app_id: String, endpoint_id: String, ) -> Result<EndpointTransformationOut>

Get the transformation code associated with this endpoint

Source

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

Source

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

Auto Trait Implementations§

§

impl<'a> Freeze for Endpoint<'a>

§

impl<'a> !RefUnwindSafe for Endpoint<'a>

§

impl<'a> Send for Endpoint<'a>

§

impl<'a> Sync for Endpoint<'a>

§

impl<'a> Unpin for Endpoint<'a>

§

impl<'a> !UnwindSafe for Endpoint<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,