mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2024-12-27 11:26:31 +00:00
Regen and add disabled AMERICAS test for new match-v5
This commit is contained in:
parent
51c0832174
commit
50f1a4afde
5 changed files with 33 additions and 8 deletions
|
@ -7,7 +7,7 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version 7938729f7e446a82eb73d3908205a579e3f0db71
|
||||
// Version 570eb12bfe9fb09e435976cb454f622293d0020e
|
||||
|
||||
//! Automatically generated endpoint handles.
|
||||
|
||||
|
@ -949,10 +949,10 @@ impl<'a> MatchV5<'a> {
|
|||
///
|
||||
/// Note: this method is automatically generated.
|
||||
pub fn get_match(&self, region: Region, match_id: &str)
|
||||
-> impl Future<Output = Result<match_v5::Match>> + 'a
|
||||
-> impl Future<Output = Result<Option<match_v5::Match>>> + 'a
|
||||
{
|
||||
let path_string = format!("/lol/match/v5/matches/{}", match_id);
|
||||
self.base.get::<match_v5::Match>("match-v5.getMatch", region.into(), path_string, None)
|
||||
self.base.get_optional::<match_v5::Match>("match-v5.getMatch", region.into(), path_string, None)
|
||||
}
|
||||
|
||||
/// Get a match timeline by match id
|
||||
|
@ -964,10 +964,10 @@ impl<'a> MatchV5<'a> {
|
|||
///
|
||||
/// Note: this method is automatically generated.
|
||||
pub fn get_timeline(&self, region: Region, match_id: &str)
|
||||
-> impl Future<Output = Result<match_v5::MatchTimeline>> + 'a
|
||||
-> impl Future<Output = Result<Option<match_v5::MatchTimeline>>> + 'a
|
||||
{
|
||||
let path_string = format!("/lol/match/v5/matches/{}/timeline", match_id);
|
||||
self.base.get::<match_v5::MatchTimeline>("match-v5.getTimeline", region.into(), path_string, None)
|
||||
self.base.get_optional::<match_v5::MatchTimeline>("match-v5.getTimeline", region.into(), path_string, None)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version 7938729f7e446a82eb73d3908205a579e3f0db71
|
||||
// Version 570eb12bfe9fb09e435976cb454f622293d0020e
|
||||
|
||||
//! Metadata about the Riot API and Riven.
|
||||
//!
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version 7938729f7e446a82eb73d3908205a579e3f0db71
|
||||
// Version 570eb12bfe9fb09e435976cb454f622293d0020e
|
||||
|
||||
//! Data transfer structs.
|
||||
//!
|
||||
|
|
24
tests/tests_americas.rs
Normal file
24
tests/tests_americas.rs
Normal file
|
@ -0,0 +1,24 @@
|
|||
#![cfg_attr(feature = "nightly", feature(custom_test_frameworks))]
|
||||
#![cfg_attr(feature = "nightly", test_runner(my_runner))]
|
||||
|
||||
mod async_tests;
|
||||
mod testutils;
|
||||
use testutils::*;
|
||||
|
||||
use colored::*;
|
||||
|
||||
// use riven::consts::*;
|
||||
|
||||
async_tests!{
|
||||
my_runner {
|
||||
// DISABLED FOR API KEY ACCESS.
|
||||
// match_v5_get: async {
|
||||
// let p = RIOT_API.match_v5().get_match(Region::AMERICAS, "NA1_3923487226");
|
||||
// let m = p.await.map_err(|e| e.to_string())?.ok_or("Match not found.".to_owned())?;
|
||||
// rassert_eq!("NA1_3923487226", m.metadata.match_id, "Bad match id? {}", m.metadata.match_id);
|
||||
// rassert!(!m.metadata.participants.is_empty(), "Match should have participants.");
|
||||
// rassert!(!m.info.teams.is_empty(), "Match should have teams.");
|
||||
// Ok(())
|
||||
// },
|
||||
}
|
||||
}
|
|
@ -47,7 +47,6 @@ async_tests!{
|
|||
},
|
||||
|
||||
matchlist_get: async {
|
||||
|
||||
let sp = RIOT_API.summoner_v4().get_by_summoner_name(Region::NA, "haha yes");
|
||||
let s = sp.await.map_err(|e| e.to_string())?.ok_or("Failed to get \"haha yes\"".to_owned())?;
|
||||
let mp = RIOT_API.match_v4().get_matchlist(Region::NA, &s.account_id, None, Some(2500), None, None, Some(2600), None, None);
|
||||
|
@ -117,6 +116,8 @@ async_tests!{
|
|||
rassert!(!m.frames.is_empty(), "Match timeline should have frames.");
|
||||
Ok(())
|
||||
},
|
||||
|
||||
|
||||
// Commented out, requires special API key.
|
||||
// // LOR
|
||||
// lor_ranked_get_leaderboards: async {
|
||||
|
|
Loading…
Reference in a new issue