pub struct History<'a> { /* private fields */ }
Implementations§
Source§impl<'a> History<'a>
impl<'a> History<'a>
Sourcepub async fn get(
&self,
page: Option<&str>,
) -> Result<Vec<HistoryItem>, HttpError>
pub async fn get( &self, page: Option<&str>, ) -> Result<Vec<HistoryItem>, HttpError>
Gets your messaging history.
§Examples
use termii_rust::{
async_impl::rest::termii,
common::insights::history::HistoryItem,
}
let client = termii::Termii::new("Your API key");
let history:HistoryItem = client.insights.history.get().await.unwrap();
println!("{:?}", history);
§The above code is limited by termii’s pagination. You can get all your messaging history with the all function like such
let history = client.insights.history.all().await.unwrap();
Trait Implementations§
Source§impl PaginatedResourceAsync for History<'_>
impl PaginatedResourceAsync for History<'_>
type Item = HistoryItem
fn _get<'life0, 'life1, 'async_trait>(
&'life0 self,
page: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Item>, HttpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Item>, HttpError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl<'a> Freeze for History<'a>
impl<'a> !RefUnwindSafe for History<'a>
impl<'a> Send for History<'a>
impl<'a> Sync for History<'a>
impl<'a> Unpin for History<'a>
impl<'a> !UnwindSafe for History<'a>
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