[−][src]Struct zipwhip_rs::Client
Zipwhip API Client Requires a Zipwhip session key to be used
Implementations
impl Client
[src]
pub fn with_key<K: Into<String>>(session_key: K) -> Self
[src]
Create a new Zipwhip client with a session key.
pub async fn add_webhook<'_, U: Into<String>>(
&'_ self,
event: WebhookEvent,
url: U
) -> Result<usize, ZipwhipError>
[src]
&'_ self,
event: WebhookEvent,
url: U
) -> Result<usize, ZipwhipError>
Register a new webhook for event
events.
Returns the id
of the new webhook
pub async fn list_webhooks<'_>(&'_ self) -> Result<Vec<Webhook>, ZipwhipError>
[src]
Returns a list of webhooks configured for this session_key.
pub async fn remove_webhook<'_>(&'_ self, id: usize) -> Result<(), ZipwhipError>
[src]
Delete a webhook (id
) for this session_key
pub async fn logout(self) -> Result<(), ZipwhipError>
[src]
Invalidate the session_key
pub async fn login<U: Into<String>, P: Into<String>>(
username: U,
password: P
) -> Result<Self, ZipwhipError>
[src]
username: U,
password: P
) -> Result<Self, ZipwhipError>
Generate a session key on auth
pub fn set_key<K: Into<String>>(&mut self, session_key: K)
[src]
Override the current session_key
pub async fn send_sms<'_, T: Into<String>, B: Into<String>>(
&'_ self,
to: T,
body: B
) -> Result<usize, ZipwhipError>
[src]
&'_ self,
to: T,
body: B
) -> Result<usize, ZipwhipError>
Send an SMS message to a single recipient.
to
: A phone number to send your SMS toobody
: Message body Returns the message_id of the newly send message
pub async fn group_sms<'_, T: Into<String>, B: Into<String>>(
&'_ self,
to: Vec<T>,
body: B
) -> Result<usize, ZipwhipError>
[src]
&'_ self,
to: Vec<T>,
body: B
) -> Result<usize, ZipwhipError>
Send a group SMS message
to
: A vector of phone numbers to send a group message toobody
: Message body
pub async fn bulk_sms<'_, T: Into<String>, B: Into<String> + Clone>(
&'_ self,
to: Vec<T>,
body: B
) -> Vec<Result<usize, ZipwhipError>>
[src]
&'_ self,
to: Vec<T>,
body: B
) -> Vec<Result<usize, ZipwhipError>>
Send a group SMS message
to
: A vector of phone numbers to send an individual message to each recipient.body
: Message body
pub async fn group_mms<'_, T: Into<String>, B: Into<String>>(
&'_ self,
to: Vec<T>,
body: B
) -> Result<usize, ZipwhipError>
[src]
&'_ self,
to: Vec<T>,
body: B
) -> Result<usize, ZipwhipError>
Send a group MMS message
to
: A vector of phone numbers to send a group message toobody
: Message body
pub async fn bulk_mms<'_, T: Into<String>, B: Into<String> + Clone>(
&'_ self,
to: Vec<T>,
body: B
) -> Vec<Result<usize, ZipwhipError>>
[src]
&'_ self,
to: Vec<T>,
body: B
) -> Vec<Result<usize, ZipwhipError>>
Send a group MMS message
to
: A vector of phone numbers to send an individual message to each recipient.body
: Message body
pub async fn send_mms<'_, T: Into<String>, B: Into<String>>(
&'_ self,
to: T,
body: B
) -> Result<usize, ZipwhipError>
[src]
&'_ self,
to: T,
body: B
) -> Result<usize, ZipwhipError>
Send an MMS message
to
: A vector of phone numbers to send a group message toobody
: Message body
pub async fn send_file<'_, T: Into<String>>(
&'_ self,
to: T,
file: Vec<u8>
) -> Result<usize, ZipwhipError>
[src]
&'_ self,
to: T,
file: Vec<u8>
) -> Result<usize, ZipwhipError>
Send an MMS message with an attachment
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,