mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2024-12-27 03:16:33 +00:00
Add tutorial tests, regen for optional match-v4.TeamStatsDto.win
This commit is contained in:
parent
da1b82fcd7
commit
5a78205dcd
4 changed files with 22 additions and 4 deletions
|
@ -7,7 +7,7 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version ae788d19c63d356f53849f87be4d4b49b01c11de
|
||||
// Version 36871d82bfc1f861d45c3941b4b5fddd3ab20ea0
|
||||
|
||||
//! Automatically generated endpoint handles.
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version ae788d19c63d356f53849f87be4d4b49b01c11de
|
||||
// Version 36871d82bfc1f861d45c3941b4b5fddd3ab20ea0
|
||||
|
||||
//! Metadata about the Riot API and Riven.
|
||||
//!
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
///////////////////////////////////////////////
|
||||
|
||||
// http://www.mingweisamuel.com/riotapi-schema/tool/
|
||||
// Version ae788d19c63d356f53849f87be4d4b49b01c11de
|
||||
// Version 36871d82bfc1f861d45c3941b4b5fddd3ab20ea0
|
||||
|
||||
//! Data transfer structs.
|
||||
//!
|
||||
|
@ -580,7 +580,7 @@ pub mod match_v4 {
|
|||
/// String indicating whether or not the team won. There are only two values visibile in public match history.<br>
|
||||
/// (Legal values: Fail, Win)
|
||||
#[serde(rename = "win")]
|
||||
pub win: String,
|
||||
pub win: Option<String>,
|
||||
}
|
||||
/// TeamBans data object.
|
||||
#[derive(Debug)]
|
||||
|
|
|
@ -80,6 +80,24 @@ async_tests!{
|
|||
rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
Ok(())
|
||||
},
|
||||
match_get_tutorial1: async {
|
||||
let p = RIOT_API.match_v4().get_match(Region::NA, 3432145099);
|
||||
let m = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get match.".to_owned())?;
|
||||
rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
Ok(())
|
||||
},
|
||||
match_get_tutorial2: async {
|
||||
let p = RIOT_API.match_v4().get_match(Region::NA, 3432116214);
|
||||
let m = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get match.".to_owned())?;
|
||||
rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
Ok(())
|
||||
},
|
||||
match_get_tutorial3: async {
|
||||
let p = RIOT_API.match_v4().get_match(Region::NA, 3432156790);
|
||||
let m = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get match.".to_owned())?;
|
||||
rassert!(!m.participants.is_empty(), "Match should have participants.");
|
||||
Ok(())
|
||||
},
|
||||
// Commented out, requires special API key.
|
||||
// // LOR
|
||||
// lor_ranked_get_leaderboards: async {
|
||||
|
|
Loading…
Reference in a new issue