use wanikani_rs::{ response::{CollectionResponse, ResourceResponse}, wanikani_client::WanikaniClient, wrapper::level_progressions::LevelProgressionFilter, }; use wanikani_rs_model::level_progression::LevelProgression; #[tokio::main] async fn main() -> Result<(), reqwest::Error> { let client = WanikaniClient::default(); let params = vec![LevelProgressionFilter::Ids(vec![1, 2])]; let lps: CollectionResponse> = client.get_level_progressions_filtered(params).await?; let d = lps.data; if d.is_empty() { return Ok(()); } let first = d.first().unwrap(); let id = first.id; let lp = client.get_level_progression(id).await?; assert_eq!(lp.data, first.data); Ok(()) }