pub struct CcMeClient { /* private fields */ }Expand description
A client bound to a single private key and base URL.
Implementations§
Source§impl CcMeClient
impl CcMeClient
Sourcepub fn new(private_key: String, base_url: Option<&str>) -> Result<Self>
pub fn new(private_key: String, base_url: Option<&str>) -> Result<Self>
Build a client. base_url defaults to DEFAULT_BASE_URL.
Sourcepub fn inbox_url(&self, options: &ListOptions) -> String
pub fn inbox_url(&self, options: &ListOptions) -> String
The inbox URL with optional l, c, p query params (in that order).
Sourcepub fn webmention_url(&self) -> String
pub fn webmention_url(&self) -> String
Webmention receiver URL.
Sourcepub fn websub_url(&self) -> String
pub fn websub_url(&self) -> String
WebSub receiver URL.
Sourcepub fn pingback_url(&self) -> String
pub fn pingback_url(&self) -> String
Pingback receiver URL.
Sourcepub fn meta_url(&self, verify_token: Option<&str>) -> String
pub fn meta_url(&self, verify_token: Option<&str>) -> String
Meta (webhooks) receiver URL, with optional verify token (?v=).
Sourcepub fn cloud_events_url(&self) -> String
pub fn cloud_events_url(&self) -> String
CloudEvents receiver URL.
Sourcepub fn discord_url(&self, discord_public_key: &str) -> String
pub fn discord_url(&self, discord_public_key: &str) -> String
Discord interaction receiver URL for the given application public key.
Sourcepub fn peek(&self, options: &ListOptions) -> Result<DeliveryResponse>
pub fn peek(&self, options: &ListOptions) -> Result<DeliveryResponse>
Peek at deliveries without reserving them (signed GET).
Sourcepub fn claim(&self, options: &ListOptions) -> Result<DeliveryResponse>
pub fn claim(&self, options: &ListOptions) -> Result<DeliveryResponse>
Claim deliveries, reserving them until ack/release (signed POST).
Sourcepub fn ack(&self, ids: &[String]) -> Result<BatchResponse>
pub fn ack(&self, ids: &[String]) -> Result<BatchResponse>
Acknowledge (consume) the given delivery ids.
Sourcepub fn release(&self, ids: &[String]) -> Result<BatchResponse>
pub fn release(&self, ids: &[String]) -> Result<BatchResponse>
Release the given delivery ids back to the queue.
Auto Trait Implementations§
impl Freeze for CcMeClient
impl RefUnwindSafe for CcMeClient
impl Send for CcMeClient
impl Sync for CcMeClient
impl Unpin for CcMeClient
impl UnsafeUnpin for CcMeClient
impl UnwindSafe for CcMeClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more