#[tokio::main]
async fn main() -> anyhow::Result<()> {
let client = linear_api::LinearClient::from_env()?;
let viewer = client.viewer().await?;
println!("Logged in as {} <{}>", viewer.name, viewer.email);
if let Some(info) = client.last_rate_limit() {
println!(
"Request budget: {:?} remaining of {:?} (complexity {:?} of {:?})",
info.requests_remaining,
info.requests_limit,
info.complexity_remaining,
info.complexity_limit,
);
}
Ok(())
}