Skip to main content

CcMeClient

Struct CcMeClient 

Source
pub struct CcMeClient { /* private fields */ }
Expand description

A client bound to a single private key and base URL.

Implementations§

Source§

impl CcMeClient

Source

pub fn new(private_key: String, base_url: Option<&str>) -> Result<Self>

Build a client. base_url defaults to DEFAULT_BASE_URL.

Source

pub fn inbox_url(&self, options: &ListOptions) -> String

The inbox URL with optional l, c, p query params (in that order).

Source

pub fn webmention_url(&self) -> String

Webmention receiver URL.

Source

pub fn websub_url(&self) -> String

WebSub receiver URL.

Source

pub fn slack_url(&self) -> String

Slack receiver URL.

Source

pub fn pingback_url(&self) -> String

Pingback receiver URL.

Source

pub fn meta_url(&self, verify_token: Option<&str>) -> String

Meta (webhooks) receiver URL, with optional verify token (?v=).

Source

pub fn cloud_events_url(&self) -> String

CloudEvents receiver URL.

Source

pub fn discord_url(&self, discord_public_key: &str) -> String

Discord interaction receiver URL for the given application public key.

Source

pub fn peek(&self, options: &ListOptions) -> Result<DeliveryResponse>

Peek at deliveries without reserving them (signed GET).

Source

pub fn claim(&self, options: &ListOptions) -> Result<DeliveryResponse>

Claim deliveries, reserving them until ack/release (signed POST).

Source

pub fn ack(&self, ids: &[String]) -> Result<BatchResponse>

Acknowledge (consume) the given delivery ids.

Source

pub fn release(&self, ids: &[String]) -> Result<BatchResponse>

Release the given delivery ids back to the queue.

Auto Trait Implementations§

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, 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> Same for T

Source§

type Output = T

Should always be Self
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.