forked from mirror/Riven
1
0
Fork 0

Regen for Viego, val-ranked-v1

v/1.x.x
Mingwei Samuel 2021-01-16 14:16:56 -08:00
parent 6c3d51a071
commit 19eeeae637
6 changed files with 4244 additions and 4159 deletions

View File

@ -298,6 +298,8 @@ pub enum Champion {
#[strum(to_string="Vel'Koz", serialize="Velkoz")] VelKoz = 161,
/// Vi (`Vi`, 254).
#[strum(to_string="Vi")] Vi = 254,
/// Viego (`Viego`, 234).
#[strum(to_string="Viego")] Viego = 234,
/// Viktor (`Viktor`, 112).
#[strum(to_string="Viktor")] Viktor = 112,
/// Vladimir (`Vladimir`, 8).
@ -497,6 +499,7 @@ impl Champion {
Self::Veigar => "Veigar",
Self::VelKoz => "Velkoz",
Self::Vi => "Vi",
Self::Viego => "Viego",
Self::Viktor => "Viktor",
Self::Vladimir => "Vladimir",
Self::Volibear => "Volibear",

View File

@ -7,7 +7,7 @@
///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version ece6f45a4d6232f4e9940219258f1bd3ae1fee6d
// Version 0c5382b0f4b74c9e27cee3043c02faa4acef0f25
//! Automatically generated endpoint handles.
@ -221,6 +221,15 @@ impl RiotApi {
pub fn val_match_v1(&self) -> ValMatchV1 {
ValMatchV1 { base: self }
}
/// Returns a handle for accessing [ValRankedV1](crate::endpoints::ValRankedV1) endpoints.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/apis#val-ranked-v1" target="_blank">`val-ranked-v1`</a>
///
/// Note: this method is automatically generated.
#[inline]
pub fn val_ranked_v1(&self) -> ValRankedV1 {
ValRankedV1 { base: self }
}
/// Returns a handle for accessing [ValStatusV1](crate::endpoints::ValStatusV1) endpoints.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/apis#val-status-v1" target="_blank">`val-status-v1`</a>
@ -1362,6 +1371,38 @@ impl<'a> ValMatchV1<'a> {
}
/// ValRankedV1 endpoints handle, accessed by calling [`val_ranked_v1()`](crate::RiotApi::val_ranked_v1) on a [`RiotApi`](crate::RiotApi) instance.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/apis#val-ranked-v1" target="_blank">`val-ranked-v1`</a>
///
/// Note: this struct is automatically generated.
pub struct ValRankedV1<'a> {
base: &'a RiotApi,
}
impl<'a> ValRankedV1<'a> {
/// Get leaderboard for the competitive queue
/// # Parameters
/// * `region` - Region to query.
/// * `actId` - Act ids can be found using the val-content API.
/// * `size` (optional)
/// * `startIndex` (optional)
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/api-methods/#val-ranked-v1/GET_getLeaderboard" target="_blank">`val-ranked-v1.getLeaderboard`</a>
///
/// Note: this method is automatically generated.
pub fn get_leaderboard(&self, region: Region, act_id: &str, size: Option<i32>, start_index: Option<i32>)
-> impl Future<Output = Result<Option<val_ranked_v1::Leaderboard>>> + 'a
{
let mut query_params = Serializer::new(String::new());
if let Some(size) = size { query_params.append_pair("size", &*size.to_string()); };
if let Some(start_index) = start_index { query_params.append_pair("startIndex", &*start_index.to_string()); };
let query_string = query_params.finish();
let path_string = format!("/val/ranked/v1/leaderboards/by-act/{}", act_id);
self.base.get_optional::<val_ranked_v1::Leaderboard>("val-ranked-v1.getLeaderboard", region.into(), path_string, Some(query_string))
}
}
/// ValStatusV1 endpoints handle, accessed by calling [`val_status_v1()`](crate::RiotApi::val_status_v1) on a [`RiotApi`](crate::RiotApi) instance.
/// # Riot Developer API Reference
/// <a href="https://developer.riotgames.com/apis#val-status-v1" target="_blank">`val-status-v1`</a>

View File

@ -7,7 +7,7 @@
///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version ece6f45a4d6232f4e9940219258f1bd3ae1fee6d
// Version 0c5382b0f4b74c9e27cee3043c02faa4acef0f25
//! Metadata about the Riot API and Riven.
//!
@ -76,6 +76,7 @@ lazy_static! {
map.insert("/val/match/v1/matches/{matchId}", "val-match-v1.getMatch");
map.insert("/val/match/v1/matchlists/by-puuid/{puuid}", "val-match-v1.getMatchlist");
map.insert("/val/match/v1/recent-matches/by-queue/{queue}", "val-match-v1.getRecent");
map.insert("/val/ranked/v1/leaderboards/by-act/{actId}", "val-ranked-v1.getLeaderboard");
map.insert("/val/status/v1/platform-data", "val-status-v1.getPlatformData");
map
};

View File

@ -7,7 +7,7 @@
///////////////////////////////////////////////
// http://www.mingweisamuel.com/riotapi-schema/tool/
// Version ece6f45a4d6232f4e9940219258f1bd3ae1fee6d
// Version 0c5382b0f4b74c9e27cee3043c02faa4acef0f25
//! Data transfer structs.
//!
@ -84,7 +84,7 @@ pub mod champion_mastery_v4 {
/// Number of points earned since current level has been achieved.
#[serde(rename = "championPointsSinceLastLevel")]
pub champion_points_since_last_level: i64,
/// The token earned for this champion to levelup.
/// The token earned for this champion at the current championLevel. When the championLevel is advanced the tokensEarned resets to 0.
#[serde(rename = "tokensEarned")]
pub tokens_earned: i32,
}
@ -1383,7 +1383,7 @@ pub mod spectator_v4 {
pub champion_id: crate::consts::Champion,
/// Perks/Runes Reforged Information
#[serde(rename = "perks")]
pub perks: Perks,
pub perks: Option<Perks>,
/// The ID of the profile icon used by this participant
#[serde(rename = "profileIconId")]
pub profile_icon_id: i64,
@ -2110,7 +2110,7 @@ pub mod val_content_v1 {
pub asset_name: String,
/// This field is only included for maps and game modes. These values are used in the match response.
#[serde(rename = "assetPath")]
pub asset_path: String,
pub asset_path: Option<String>,
}
/// LocalizedNames data object.
#[derive(Debug)]
@ -2163,7 +2163,7 @@ pub mod val_content_v1 {
pub name: String,
/// This field is excluded from the response when a locale is set
#[serde(rename = "localizedNames")]
pub localized_names: LocalizedNames,
pub localized_names: Option<LocalizedNames>,
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "isActive")]
@ -2471,6 +2471,46 @@ pub mod val_match_v1 {
}
}
/// Data structs used by [`ValRankedV1`](crate::endpoints::ValRankedV1).
///
/// Note: this module is automatically generated.
#[allow(dead_code)]
pub mod val_ranked_v1 {
/// Leaderboard data object.
#[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
pub struct Leaderboard {
/// The shard for the given leaderboard.
#[serde(rename = "shard")]
pub shard: String,
/// The act id for the given leaderboard. Act ids can be found using the val-content API.
#[serde(rename = "actId")]
pub act_id: String,
/// The total number of players in the leaderboard.
#[serde(rename = "totalPlayers")]
pub total_players: i64,
#[serde(rename = "players")]
pub players: std::vec::Vec<Player>,
}
/// Player data object.
#[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)]
pub struct Player {
#[serde(rename = "puuid")]
pub puuid: String,
#[serde(rename = "gameName")]
pub game_name: String,
#[serde(rename = "tagLine")]
pub tag_line: String,
#[serde(rename = "leaderboardRank")]
pub leaderboard_rank: i64,
#[serde(rename = "rankedRating")]
pub ranked_rating: i64,
#[serde(rename = "numberOfWins")]
pub number_of_wins: i64,
}
}
/// Data structs used by [`ValStatusV1`](crate::endpoints::ValStatusV1).
///
/// Note: this module is automatically generated.