forked from mirror/Riven
1
0
Fork 0

Regen, add `tft-league-v1.getTopRatedLadder` test

v/1.x.x
Mingwei Samuel 2021-05-09 09:55:09 -07:00
parent 0f400ab43a
commit 0c48125e00
4 changed files with 14 additions and 5 deletions

View File

@ -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> {
/// <a href="https://developer.riotgames.com/api-methods/#tft-league-v1/GET_getTopRatedLadder" target="_blank">`tft-league-v1.getTopRatedLadder`</a>
///
/// 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<Output = Result<Vec<tft_league_v1::TopRatedLadderEntry>>> + 'a
{
let path_string = format!("/tft/league/v1/rated-ladders/{}/top", queue);

View File

@ -7,7 +7,7 @@
///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version d958cb912f35a3eb9091337de469633e228a7aa2
// Version e3a10221e77395e8b757d85cecf4413902b9ef10
//! Metadata about the Riot API and Riven.
//!

View File

@ -7,7 +7,7 @@
///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version d958cb912f35a3eb9091337de469633e228a7aa2
// Version e3a10221e77395e8b757d85cecf4413902b9ef10
//! Data transfer structs.
//!

View File

@ -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(())
},
}
}