use super::*;
#[derive(Deserialize, Serialize, Debug)]
pub struct User {
pub id: i32,
pub email: String,
pub first_name: Option<String>,
pub last_name: Option<String>,
pub birthday: Option<time::Date>,
pub verified: bool,
}
impl Client {
pub async fn users(&self) -> Result<Vec<User>, Box<dyn std::error::Error>> {
Ok(req()
.get(self.endpoint("/v1/users", vec![]))
.send()
.await?
.json::<Vec<User>>()
.await?)
}
}