Add tutorial tests, regen for optional match-v4.TeamStatsDto.win

pull/23/head
Mingwei Samuel 2020-08-02 20:31:24 -07:00
parent da1b82fcd7
commit 5a78205dcd
4 changed files with 22 additions and 4 deletions

View File

@ -7,7 +7,7 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/ // http://www.mingweisamuel.com/riotapi-schema/tool/
// Version ae788d19c63d356f53849f87be4d4b49b01c11de // Version 36871d82bfc1f861d45c3941b4b5fddd3ab20ea0
//! Automatically generated endpoint handles. //! Automatically generated endpoint handles.

View File

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

View File

@ -7,7 +7,7 @@
/////////////////////////////////////////////// ///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/ // http://www.mingweisamuel.com/riotapi-schema/tool/
// Version ae788d19c63d356f53849f87be4d4b49b01c11de // Version 36871d82bfc1f861d45c3941b4b5fddd3ab20ea0
//! Data transfer structs. //! 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> /// String indicating whether or not the team won. There are only two values visibile in public match history.<br>
/// (Legal values: Fail, Win) /// (Legal values: Fail, Win)
#[serde(rename = "win")] #[serde(rename = "win")]
pub win: String, pub win: Option<String>,
} }
/// TeamBans data object. /// TeamBans data object.
#[derive(Debug)] #[derive(Debug)]

View File

@ -80,6 +80,24 @@ async_tests!{
rassert!(!m.participants.is_empty(), "Match should have participants."); rassert!(!m.participants.is_empty(), "Match should have participants.");
Ok(()) 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. // Commented out, requires special API key.
// // LOR // // LOR
// lor_ranked_get_leaderboards: async { // lor_ranked_get_leaderboards: async {