From 0c48125e00a31ebf529ce03df50147eb1585ad03 Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Sun, 9 May 2021 09:55:09 -0700 Subject: [PATCH] Regen, add `tft-league-v1.getTopRatedLadder` test --- src/endpoints.rs | 4 ++-- src/meta.rs | 2 +- src/models.rs | 2 +- tests/tests_jp.rs | 11 ++++++++++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/endpoints.rs b/src/endpoints.rs index 0807853..780a7b3 100644 --- a/src/endpoints.rs +++ b/src/endpoints.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version d958cb912f35a3eb9091337de469633e228a7aa2 +// Version e3a10221e77395e8b757d85cecf4413902b9ef10 //! Automatically generated endpoint handles. @@ -1152,7 +1152,7 @@ impl<'a> TftLeagueV1<'a> { /// `tft-league-v1.getTopRatedLadder` /// /// Note: this method is automatically generated. - pub fn get_top_rated_ladder(&self, region: Region, queue: &str) + pub fn get_top_rated_ladder(&self, region: Region, queue: crate::consts::QueueType) -> impl Future>> + 'a { let path_string = format!("/tft/league/v1/rated-ladders/{}/top", queue); diff --git a/src/meta.rs b/src/meta.rs index 71663c9..542048e 100644 --- a/src/meta.rs +++ b/src/meta.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version d958cb912f35a3eb9091337de469633e228a7aa2 +// Version e3a10221e77395e8b757d85cecf4413902b9ef10 //! Metadata about the Riot API and Riven. //! diff --git a/src/models.rs b/src/models.rs index 1b3ecf8..8a84f29 100644 --- a/src/models.rs +++ b/src/models.rs @@ -7,7 +7,7 @@ /////////////////////////////////////////////// // http://www.mingweisamuel.com/riotapi-schema/tool/ -// Version d958cb912f35a3eb9091337de469633e228a7aa2 +// Version e3a10221e77395e8b757d85cecf4413902b9ef10 //! Data transfer structs. //! diff --git a/tests/tests_jp.rs b/tests/tests_jp.rs index 16f5b26..9b2996b 100644 --- a/tests/tests_jp.rs +++ b/tests/tests_jp.rs @@ -47,8 +47,9 @@ async_tests!{ Ok(()) }, + // tft-league-v1.getLeagueEntriesForSummoner // https://github.com/MingweiSamuel/Riven/issues/25 - tft_league_getbysummoner: async { + tft_league_getleagueentriesforsummoner: async { let sp = RIOT_API.summoner_v4().get_by_summoner_name(Region::JP, "Caihonbbt"); let sr = sp.await.map_err(|e| e.to_string())?.ok_or("Failed to get \"Caihonbbt\"".to_owned())?; let lp = RIOT_API.tft_league_v1().get_league_entries_for_summoner(Region::JP, &sr.id); @@ -56,5 +57,13 @@ async_tests!{ rassert!(0 < lr.len()); Ok(()) }, + // tft-league-v1.getTopRatedLadder + // https://github.com/MingweiSamuel/Riven/issues/24 + tft_league_gettopratedladder: async { + let lp = RIOT_API.tft_league_v1().get_top_rated_ladder(Region::JP, QueueType::RANKED_TFT_TURBO); + let lr = lp.await.map_err(|e| e.to_string())?; + rassert!(0 < lr.len()); + Ok(()) + }, } }