use quiverquant::Client; use std::env::var; #[tokio::main] async fn main() { let api_token = var("QQ_API_KEY").expect("Please set your API token at QQ_API_KEY"); let client = Client::new(api_token); let lobbying = client.lobbying().await.expect("Failed to Connect!"); println!("Lobbying:"); for lobby in lobbying { println!( "Ticker: {}, Amount: {}, Issue: {}", lobby.ticker, lobby.amount.unwrap_or_default(), lobby.issue.unwrap_or("N/A".to_string()) ) } println!("Lobbying of ConocoPhillips:"); for lobby in client.lobbying_by_ticker("COP").await.expect("Failed to get COP Lobbying") { println!( "Ticker: {}, Amount: {}, Issue: {}", lobby.ticker, lobby.amount.unwrap_or_default(), lobby.issue.unwrap_or("N/A".to_string()) ) } }