From 62f323da88c4e51d2197ffb1f0085be784c9e877 Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Tue, 8 Feb 2022 17:18:16 -0800 Subject: [PATCH] Release 2.5.1 --- riven/Cargo.toml | 4 ++-- riven/tests/tests_euw.rs | 33 ++++++++++++++++++--------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/riven/Cargo.toml b/riven/Cargo.toml index 0342d7a..6fa1303 100644 --- a/riven/Cargo.toml +++ b/riven/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "riven" -version = "2.5.0" +version = "2.5.1" authors = ["Mingwei Samuel "] repository = "https://github.com/MingweiSamuel/Riven" description = "Riot Games API Library" @@ -32,7 +32,7 @@ rustls-tls = [ "reqwest/rustls-tls" ] lazy_static = "1.4" log = "0.4" num_enum = "0.5" -parking_lot = "0.11" +parking_lot = "0.12" reqwest = { version = "0.11", default-features = false, features = [ "gzip", "json" ] } scan_fmt = { version = "0.2", default-features = false } serde = { version = "1.0", features = [ "derive" ] } diff --git a/riven/tests/tests_euw.rs b/riven/tests/tests_euw.rs index 2ac0745..665610d 100644 --- a/riven/tests/tests_euw.rs +++ b/riven/tests/tests_euw.rs @@ -32,24 +32,27 @@ async_tests!{ rassert!(s.len() >= 142, "Expected masteries: {}.", s.len()); Ok(()) }, - spectator_combo: async { - let featured_p = RIOT_API.spectator_v4().get_featured_games(ROUTE); - let featured = featured_p.await.map_err(|e| e.to_string())?; - rassert!(!featured.game_list.is_empty()); + // TODO: https://github.com/RiotGames/developer-relations/issues/602 + // spectator_combo: async { + // let featured_p = RIOT_API.spectator_v4().get_featured_games(ROUTE); + // let featured = featured_p.await.map_err(|e| e.to_string())?; - let summoner_name = &featured.game_list[0].participants[0].summoner_name; - let summoner_p = RIOT_API.summoner_v4().get_by_summoner_name(ROUTE, summoner_name); - let summoner = summoner_p.await.map_err(|e| e.to_string())?.ok_or_else(|| "Failed to get summoner".to_owned())?; + // rassert!(!featured.game_list.is_empty()); + + // let summoner_name = &featured.game_list[0].participants[0].summoner_name; + // let summoner_p = RIOT_API.summoner_v4().get_by_summoner_name(ROUTE, summoner_name); + // let summoner = summoner_p.await.map_err(|e| e.to_string())?.ok_or_else(|| "Failed to get summoner".to_owned())?; + + // let livegame_p = RIOT_API.spectator_v4().get_current_game_info_by_summoner(ROUTE, &summoner.id); + // let livegame_o = livegame_p.await.map_err(|e| e.to_string())?; + // if let Some(livegame) = livegame_o { + // let participant_match = livegame.participants.iter().find(|p| p.summoner_name == *summoner_name); + // rassert!(participant_match.is_some(), "Failed to find summoner in match: {}.", summoner_name); + // } + // Ok(()) + // }, - let livegame_p = RIOT_API.spectator_v4().get_current_game_info_by_summoner(ROUTE, &summoner.id); - let livegame_o = livegame_p.await.map_err(|e| e.to_string())?; - if let Some(livegame) = livegame_o { - let participant_match = livegame.participants.iter().find(|p| p.summoner_name == *summoner_name); - rassert!(participant_match.is_some(), "Failed to find summoner in match: {}.", summoner_name); - } - Ok(()) - }, // // TFT tests. // tftleaguev1_getchallengerleague: async { // let p = RIOT_API.tft_league_v1().get_challenger_league(Region::EUW);