pub async fn list_messages(
user: &User,
page: Option<usize>,
) -> Result<HydraCollection<Message>, Error>Expand description
List messages
This will list messages belonging to the token holder. Has a page for optional page selection(inclusive).
Defaults to 1
ยงExample
use mail_tm_rs::user::User;
use mail_tm_rs::{create_account, update_token, token, me, list_messages, domains};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
//let user = User::default().with_domain(&domains().await?.any().domain);
//let account = create_account(&user).await?;
//let user = update_token(&user, &token(&user).await?.token);
//let messages = list_messages(&user, Some(33)).await?;
Ok(())
}