0.0.4, fix pub on endpoints

pull/5/head v0.0.4
Mingwei Samuel 2019-10-22 00:01:11 -07:00
parent a9fdd84236
commit 1950f7ec98
7 changed files with 131 additions and 81 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "riven" name = "riven"
version = "0.0.3" version = "0.0.4"
authors = ["Mingwei Samuel <mingwei.samuel@gmail.com>"] authors = ["Mingwei Samuel <mingwei.samuel@gmail.com>"]
repository = "https://github.com/MingweiSamuel/Riven" repository = "https://github.com/MingweiSamuel/Riven"
description = "Riot API Library (WIP)" description = "Riot API Library (WIP)"

View File

@ -1,7 +1,7 @@
 
// This file is automatically generated. // This file is automatically generated.
// Do not directly edit. // Do not directly edit.
// Generated on 2019-10-22T05:40:37.599Z // Generated on 2019-10-22T06:59:44.522Z
use std::fmt; use std::fmt;
use num_derive; use num_derive;

View File

@ -1,7 +1,7 @@
// This file is automatically generated. // This file is automatically generated.
// Do not directly edit. // Do not directly edit.
// Generated on 2019-10-22T05:40:37.680Z // Generated on 2019-10-22T06:59:44.590Z
// http://www.mingweisamuel.com/riotapi-schema/tool/ // http://www.mingweisamuel.com/riotapi-schema/tool/
// Version 0c74167e0eaaeb6de1c7e8219fecaabcf8386d1f // Version 0c74167e0eaaeb6de1c7e8219fecaabcf8386d1f
@ -9,7 +9,7 @@
// champion-mastery-v4 // champion-mastery-v4
#[allow(dead_code)] #[allow(dead_code)]
pub mod champion_mastery_v4 { pub mod champion_mastery_v4 {
/// ChampionMastery data object. This class is automatically generated. /// ChampionMastery data object. This struct is automatically generated.
/// # Description /// # Description
/// This object contains single Champion Mastery information for player and champion combination. /// This object contains single Champion Mastery information for player and champion combination.
#[derive(Debug)] #[derive(Debug)]
@ -48,7 +48,7 @@ pub mod champion_mastery_v4 {
// champion-v3 // champion-v3
#[allow(dead_code)] #[allow(dead_code)]
pub mod champion_v3 { pub mod champion_v3 {
/// ChampionInfo data object. This class is automatically generated. /// ChampionInfo data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct ChampionInfo { pub struct ChampionInfo {
@ -64,7 +64,7 @@ pub mod champion_v3 {
// league-exp-v4 // league-exp-v4
#[allow(dead_code)] #[allow(dead_code)]
pub mod league_exp_v4 { pub mod league_exp_v4 {
/// LeagueEntry data object. This class is automatically generated. /// LeagueEntry data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct LeagueEntry { pub struct LeagueEntry {
@ -100,7 +100,7 @@ pub mod league_exp_v4 {
#[serde(rename = "leaguePoints")] #[serde(rename = "leaguePoints")]
pub league_points: i32, pub league_points: i32,
} }
/// MiniSeries data object. This class is automatically generated. /// MiniSeries data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct MiniSeries { pub struct MiniSeries {
@ -118,7 +118,7 @@ pub mod league_exp_v4 {
// league-v4 // league-v4
#[allow(dead_code)] #[allow(dead_code)]
pub mod league_v4 { pub mod league_v4 {
/// LeagueList data object. This class is automatically generated. /// LeagueList data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct LeagueList { pub struct LeagueList {
@ -133,7 +133,7 @@ pub mod league_v4 {
#[serde(rename = "name")] #[serde(rename = "name")]
pub name: String, pub name: String,
} }
/// LeagueItem data object. This class is automatically generated. /// LeagueItem data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct LeagueItem { pub struct LeagueItem {
@ -163,7 +163,7 @@ pub mod league_v4 {
#[serde(rename = "leaguePoints")] #[serde(rename = "leaguePoints")]
pub league_points: i32, pub league_points: i32,
} }
/// MiniSeries data object. This class is automatically generated. /// MiniSeries data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct MiniSeries { pub struct MiniSeries {
@ -176,7 +176,7 @@ pub mod league_v4 {
#[serde(rename = "wins")] #[serde(rename = "wins")]
pub wins: i32, pub wins: i32,
} }
/// LeagueEntry data object. This class is automatically generated. /// LeagueEntry data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct LeagueEntry { pub struct LeagueEntry {
@ -217,7 +217,7 @@ pub mod league_v4 {
// lol-status-v3 // lol-status-v3
#[allow(dead_code)] #[allow(dead_code)]
pub mod lol_status_v3 { pub mod lol_status_v3 {
/// ShardStatus data object. This class is automatically generated. /// ShardStatus data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct ShardStatus { pub struct ShardStatus {
@ -234,7 +234,7 @@ pub mod lol_status_v3 {
#[serde(rename = "locales")] #[serde(rename = "locales")]
pub locales: std::vec::Vec<String>, pub locales: std::vec::Vec<String>,
} }
/// Service data object. This class is automatically generated. /// Service data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct Service { pub struct Service {
@ -247,7 +247,7 @@ pub mod lol_status_v3 {
#[serde(rename = "slug")] #[serde(rename = "slug")]
pub slug: String, pub slug: String,
} }
/// Incident data object. This class is automatically generated. /// Incident data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct Incident { pub struct Incident {
@ -260,7 +260,7 @@ pub mod lol_status_v3 {
#[serde(rename = "updates")] #[serde(rename = "updates")]
pub updates: std::vec::Vec<Message>, pub updates: std::vec::Vec<Message>,
} }
/// Message data object. This class is automatically generated. /// Message data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct Message { pub struct Message {
@ -279,7 +279,7 @@ pub mod lol_status_v3 {
#[serde(rename = "id")] #[serde(rename = "id")]
pub id: String, pub id: String,
} }
/// Translation data object. This class is automatically generated. /// Translation data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct Translation { pub struct Translation {
@ -295,7 +295,7 @@ pub mod lol_status_v3 {
// match-v4 // match-v4
#[allow(dead_code)] #[allow(dead_code)]
pub mod match_v4 { pub mod match_v4 {
/// Match data object. This class is automatically generated. /// Match data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct Match { pub struct Match {
@ -338,7 +338,7 @@ pub mod match_v4 {
#[serde(rename = "gameCreation")] #[serde(rename = "gameCreation")]
pub game_creation: i64, pub game_creation: i64,
} }
/// ParticipantIdentity data object. This class is automatically generated. /// ParticipantIdentity data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct ParticipantIdentity { pub struct ParticipantIdentity {
@ -348,7 +348,7 @@ pub mod match_v4 {
#[serde(rename = "participantId")] #[serde(rename = "participantId")]
pub participant_id: i32, pub participant_id: i32,
} }
/// Player data object. This class is automatically generated. /// Player data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct Player { pub struct Player {
@ -373,7 +373,7 @@ pub mod match_v4 {
#[serde(rename = "accountId")] #[serde(rename = "accountId")]
pub account_id: String, pub account_id: String,
} }
/// TeamStats data object. This class is automatically generated. /// TeamStats data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct TeamStats { pub struct TeamStats {
@ -427,7 +427,7 @@ pub mod match_v4 {
#[serde(rename = "dragonKills")] #[serde(rename = "dragonKills")]
pub dragon_kills: i32, pub dragon_kills: i32,
} }
/// TeamBans data object. This class is automatically generated. /// TeamBans data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct TeamBans { pub struct TeamBans {
@ -438,7 +438,7 @@ pub mod match_v4 {
#[serde(rename = "championId")] #[serde(rename = "championId")]
pub champion_id: i32, pub champion_id: i32,
} }
/// Participant data object. This class is automatically generated. /// Participant data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct Participant { pub struct Participant {
@ -472,7 +472,7 @@ pub mod match_v4 {
#[serde(rename = "championId")] #[serde(rename = "championId")]
pub champion_id: i32, pub champion_id: i32,
} }
/// ParticipantStats data object. This class is automatically generated. /// ParticipantStats data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct ParticipantStats { pub struct ParticipantStats {
@ -719,7 +719,7 @@ pub mod match_v4 {
#[serde(rename = "timeCCingOthers")] #[serde(rename = "timeCCingOthers")]
pub time_c_cing_others: i64, pub time_c_cing_others: i64,
} }
/// Rune data object. This class is automatically generated. /// Rune data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct Rune { pub struct Rune {
@ -728,7 +728,7 @@ pub mod match_v4 {
#[serde(rename = "rank")] #[serde(rename = "rank")]
pub rank: i32, pub rank: i32,
} }
/// ParticipantTimeline data object. This class is automatically generated. /// ParticipantTimeline data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct ParticipantTimeline { pub struct ParticipantTimeline {
@ -764,7 +764,7 @@ pub mod match_v4 {
#[serde(rename = "damageTakenPerMinDeltas")] #[serde(rename = "damageTakenPerMinDeltas")]
pub damage_taken_per_min_deltas: std::collections::HashMap<String, f64>, pub damage_taken_per_min_deltas: std::collections::HashMap<String, f64>,
} }
/// Mastery data object. This class is automatically generated. /// Mastery data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct Mastery { pub struct Mastery {
@ -773,7 +773,7 @@ pub mod match_v4 {
#[serde(rename = "rank")] #[serde(rename = "rank")]
pub rank: i32, pub rank: i32,
} }
/// Matchlist data object. This class is automatically generated. /// Matchlist data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct Matchlist { pub struct Matchlist {
@ -786,7 +786,7 @@ pub mod match_v4 {
#[serde(rename = "endIndex")] #[serde(rename = "endIndex")]
pub end_index: i32, pub end_index: i32,
} }
/// MatchReference data object. This class is automatically generated. /// MatchReference data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct MatchReference { pub struct MatchReference {
@ -807,7 +807,7 @@ pub mod match_v4 {
#[serde(rename = "timestamp")] #[serde(rename = "timestamp")]
pub timestamp: i64, pub timestamp: i64,
} }
/// MatchTimeline data object. This class is automatically generated. /// MatchTimeline data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct MatchTimeline { pub struct MatchTimeline {
@ -816,7 +816,7 @@ pub mod match_v4 {
#[serde(rename = "frameInterval")] #[serde(rename = "frameInterval")]
pub frame_interval: i64, pub frame_interval: i64,
} }
/// MatchFrame data object. This class is automatically generated. /// MatchFrame data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct MatchFrame { pub struct MatchFrame {
@ -827,7 +827,7 @@ pub mod match_v4 {
#[serde(rename = "events")] #[serde(rename = "events")]
pub events: std::vec::Vec<MatchEvent>, pub events: std::vec::Vec<MatchEvent>,
} }
/// MatchParticipantFrame data object. This class is automatically generated. /// MatchParticipantFrame data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct MatchParticipantFrame { pub struct MatchParticipantFrame {
@ -852,7 +852,7 @@ pub mod match_v4 {
#[serde(rename = "jungleMinionsKilled")] #[serde(rename = "jungleMinionsKilled")]
pub jungle_minions_killed: i32, pub jungle_minions_killed: i32,
} }
/// MatchPosition data object. This class is automatically generated. /// MatchPosition data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct MatchPosition { pub struct MatchPosition {
@ -861,7 +861,7 @@ pub mod match_v4 {
#[serde(rename = "x")] #[serde(rename = "x")]
pub x: i32, pub x: i32,
} }
/// MatchEvent data object. This class is automatically generated. /// MatchEvent data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct MatchEvent { pub struct MatchEvent {
@ -918,7 +918,7 @@ pub mod match_v4 {
// spectator-v4 // spectator-v4
#[allow(dead_code)] #[allow(dead_code)]
pub mod spectator_v4 { pub mod spectator_v4 {
/// CurrentGameInfo data object. This class is automatically generated. /// CurrentGameInfo data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct CurrentGameInfo { pub struct CurrentGameInfo {
@ -956,7 +956,7 @@ pub mod spectator_v4 {
#[serde(rename = "gameQueueConfigId")] #[serde(rename = "gameQueueConfigId")]
pub game_queue_config_id: i64, pub game_queue_config_id: i64,
} }
/// BannedChampion data object. This class is automatically generated. /// BannedChampion data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct BannedChampion { pub struct BannedChampion {
@ -970,7 +970,7 @@ pub mod spectator_v4 {
#[serde(rename = "teamId")] #[serde(rename = "teamId")]
pub team_id: i64, pub team_id: i64,
} }
/// Observer data object. This class is automatically generated. /// Observer data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct Observer { pub struct Observer {
@ -978,7 +978,7 @@ pub mod spectator_v4 {
#[serde(rename = "encryptionKey")] #[serde(rename = "encryptionKey")]
pub encryption_key: String, pub encryption_key: String,
} }
/// CurrentGameParticipant data object. This class is automatically generated. /// CurrentGameParticipant data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct CurrentGameParticipant { pub struct CurrentGameParticipant {
@ -1013,7 +1013,7 @@ pub mod spectator_v4 {
#[serde(rename = "summonerId")] #[serde(rename = "summonerId")]
pub summoner_id: String, pub summoner_id: String,
} }
/// GameCustomizationObject data object. This class is automatically generated. /// GameCustomizationObject data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct GameCustomizationObject { pub struct GameCustomizationObject {
@ -1024,7 +1024,7 @@ pub mod spectator_v4 {
#[serde(rename = "content")] #[serde(rename = "content")]
pub content: String, pub content: String,
} }
/// Perks data object. This class is automatically generated. /// Perks data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct Perks { pub struct Perks {
@ -1038,7 +1038,7 @@ pub mod spectator_v4 {
#[serde(rename = "perkSubStyle")] #[serde(rename = "perkSubStyle")]
pub perk_sub_style: i64, pub perk_sub_style: i64,
} }
/// FeaturedGames data object. This class is automatically generated. /// FeaturedGames data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct FeaturedGames { pub struct FeaturedGames {
@ -1049,7 +1049,7 @@ pub mod spectator_v4 {
#[serde(rename = "gameList")] #[serde(rename = "gameList")]
pub game_list: std::vec::Vec<FeaturedGameInfo>, pub game_list: std::vec::Vec<FeaturedGameInfo>,
} }
/// FeaturedGameInfo data object. This class is automatically generated. /// FeaturedGameInfo data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct FeaturedGameInfo { pub struct FeaturedGameInfo {
@ -1089,7 +1089,7 @@ pub mod spectator_v4 {
#[serde(rename = "gameQueueConfigId")] #[serde(rename = "gameQueueConfigId")]
pub game_queue_config_id: i64, pub game_queue_config_id: i64,
} }
/// Participant data object. This class is automatically generated. /// Participant data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct Participant { pub struct Participant {
@ -1120,7 +1120,7 @@ pub mod spectator_v4 {
// summoner-v4 // summoner-v4
#[allow(dead_code)] #[allow(dead_code)]
pub mod summoner_v4 { pub mod summoner_v4 {
/// Summoner data object. This class is automatically generated. /// Summoner data object. This struct is automatically generated.
/// # Description /// # Description
/// represents a summoner /// represents a summoner
#[derive(Debug)] #[derive(Debug)]
@ -1153,7 +1153,7 @@ pub mod summoner_v4 {
// tournament-stub-v4 // tournament-stub-v4
#[allow(dead_code)] #[allow(dead_code)]
pub mod tournament_stub_v4 { pub mod tournament_stub_v4 {
/// TournamentCodeParameters data object. This class is automatically generated. /// TournamentCodeParameters data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct TournamentCodeParameters { pub struct TournamentCodeParameters {
@ -1179,14 +1179,14 @@ pub mod tournament_stub_v4 {
#[serde(rename = "metadata")] #[serde(rename = "metadata")]
pub metadata: String, pub metadata: String,
} }
/// LobbyEventWrapper data object. This class is automatically generated. /// LobbyEventWrapper data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct LobbyEventWrapper { pub struct LobbyEventWrapper {
#[serde(rename = "eventList")] #[serde(rename = "eventList")]
pub event_list: std::vec::Vec<LobbyEvent>, pub event_list: std::vec::Vec<LobbyEvent>,
} }
/// LobbyEvent data object. This class is automatically generated. /// LobbyEvent data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct LobbyEvent { pub struct LobbyEvent {
@ -1200,7 +1200,7 @@ pub mod tournament_stub_v4 {
#[serde(rename = "timestamp")] #[serde(rename = "timestamp")]
pub timestamp: String, pub timestamp: String,
} }
/// ProviderRegistrationParameters data object. This class is automatically generated. /// ProviderRegistrationParameters data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct ProviderRegistrationParameters { pub struct ProviderRegistrationParameters {
@ -1212,7 +1212,7 @@ pub mod tournament_stub_v4 {
#[serde(rename = "region")] #[serde(rename = "region")]
pub region: String, pub region: String,
} }
/// TournamentRegistrationParameters data object. This class is automatically generated. /// TournamentRegistrationParameters data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct TournamentRegistrationParameters { pub struct TournamentRegistrationParameters {
@ -1228,7 +1228,7 @@ pub mod tournament_stub_v4 {
// tournament-v4 // tournament-v4
#[allow(dead_code)] #[allow(dead_code)]
pub mod tournament_v4 { pub mod tournament_v4 {
/// TournamentCodeParameters data object. This class is automatically generated. /// TournamentCodeParameters data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct TournamentCodeParameters { pub struct TournamentCodeParameters {
@ -1254,7 +1254,7 @@ pub mod tournament_v4 {
#[serde(rename = "metadata")] #[serde(rename = "metadata")]
pub metadata: String, pub metadata: String,
} }
/// TournamentCode data object. This class is automatically generated. /// TournamentCode data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct TournamentCode { pub struct TournamentCode {
@ -1299,7 +1299,7 @@ pub mod tournament_v4 {
#[serde(rename = "metaData")] #[serde(rename = "metaData")]
pub meta_data: String, pub meta_data: String,
} }
/// TournamentCodeUpdateParameters data object. This class is automatically generated. /// TournamentCodeUpdateParameters data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct TournamentCodeUpdateParameters { pub struct TournamentCodeUpdateParameters {
@ -1319,14 +1319,14 @@ pub mod tournament_v4 {
#[serde(rename = "mapType")] #[serde(rename = "mapType")]
pub map_type: String, pub map_type: String,
} }
/// LobbyEventWrapper data object. This class is automatically generated. /// LobbyEventWrapper data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct LobbyEventWrapper { pub struct LobbyEventWrapper {
#[serde(rename = "eventList")] #[serde(rename = "eventList")]
pub event_list: std::vec::Vec<LobbyEvent>, pub event_list: std::vec::Vec<LobbyEvent>,
} }
/// LobbyEvent data object. This class is automatically generated. /// LobbyEvent data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct LobbyEvent { pub struct LobbyEvent {
@ -1340,7 +1340,7 @@ pub mod tournament_v4 {
#[serde(rename = "eventType")] #[serde(rename = "eventType")]
pub event_type: String, pub event_type: String,
} }
/// ProviderRegistrationParameters data object. This class is automatically generated. /// ProviderRegistrationParameters data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct ProviderRegistrationParameters { pub struct ProviderRegistrationParameters {
@ -1352,7 +1352,7 @@ pub mod tournament_v4 {
#[serde(rename = "region")] #[serde(rename = "region")]
pub region: String, pub region: String,
} }
/// TournamentRegistrationParameters data object. This class is automatically generated. /// TournamentRegistrationParameters data object. This struct is automatically generated.
#[derive(Debug)] #[derive(Debug)]
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
pub struct TournamentRegistrationParameters { pub struct TournamentRegistrationParameters {

View File

@ -1,7 +1,7 @@
// This file is automatically generated. // This file is automatically generated.
// Do not directly edit. // Do not directly edit.
// Generated on 2019-10-22T05:40:37.693Z // Generated on 2019-10-22T06:59:44.598Z
// http://www.mingweisamuel.com/riotapi-schema/tool/ // http://www.mingweisamuel.com/riotapi-schema/tool/
// Version 0c74167e0eaaeb6de1c7e8219fecaabcf8386d1f // Version 0c74167e0eaaeb6de1c7e8219fecaabcf8386d1f
@ -16,44 +16,88 @@ use crate::consts::Region;
use crate::riot_api::RiotApi; use crate::riot_api::RiotApi;
impl RiotApi { impl RiotApi {
/// Handle for ChampionMasteryV4 endpoints. This method is automatically generated.
/// # Official API Reference
/// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4">https://developer.riotgames.com/api-methods/#champion-mastery-v4</a>
#[inline]
pub fn champion_mastery_v4(&self) -> ChampionMasteryV4 { pub fn champion_mastery_v4(&self) -> ChampionMasteryV4 {
ChampionMasteryV4 { base: self } ChampionMasteryV4 { base: self }
} }
/// Handle for ChampionV3 endpoints. This method is automatically generated.
/// # Official API Reference
/// <a href="https://developer.riotgames.com/api-methods/#champion-v3">https://developer.riotgames.com/api-methods/#champion-v3</a>
#[inline]
pub fn champion_v3(&self) -> ChampionV3 { pub fn champion_v3(&self) -> ChampionV3 {
ChampionV3 { base: self } ChampionV3 { base: self }
} }
/// Handle for LeagueExpV4 endpoints. This method is automatically generated.
/// # Official API Reference
/// <a href="https://developer.riotgames.com/api-methods/#league-exp-v4">https://developer.riotgames.com/api-methods/#league-exp-v4</a>
#[inline]
pub fn league_exp_v4(&self) -> LeagueExpV4 { pub fn league_exp_v4(&self) -> LeagueExpV4 {
LeagueExpV4 { base: self } LeagueExpV4 { base: self }
} }
/// Handle for LeagueV4 endpoints. This method is automatically generated.
/// # Official API Reference
/// <a href="https://developer.riotgames.com/api-methods/#league-v4">https://developer.riotgames.com/api-methods/#league-v4</a>
#[inline]
pub fn league_v4(&self) -> LeagueV4 { pub fn league_v4(&self) -> LeagueV4 {
LeagueV4 { base: self } LeagueV4 { base: self }
} }
/// Handle for LolStatusV3 endpoints. This method is automatically generated.
/// # Official API Reference
/// <a href="https://developer.riotgames.com/api-methods/#lol-status-v3">https://developer.riotgames.com/api-methods/#lol-status-v3</a>
#[inline]
pub fn lol_status_v3(&self) -> LolStatusV3 { pub fn lol_status_v3(&self) -> LolStatusV3 {
LolStatusV3 { base: self } LolStatusV3 { base: self }
} }
/// Handle for MatchV4 endpoints. This method is automatically generated.
/// # Official API Reference
/// <a href="https://developer.riotgames.com/api-methods/#match-v4">https://developer.riotgames.com/api-methods/#match-v4</a>
#[inline]
pub fn match_v4(&self) -> MatchV4 { pub fn match_v4(&self) -> MatchV4 {
MatchV4 { base: self } MatchV4 { base: self }
} }
/// Handle for SpectatorV4 endpoints. This method is automatically generated.
/// # Official API Reference
/// <a href="https://developer.riotgames.com/api-methods/#spectator-v4">https://developer.riotgames.com/api-methods/#spectator-v4</a>
#[inline]
pub fn spectator_v4(&self) -> SpectatorV4 { pub fn spectator_v4(&self) -> SpectatorV4 {
SpectatorV4 { base: self } SpectatorV4 { base: self }
} }
/// Handle for SummonerV4 endpoints. This method is automatically generated.
/// # Official API Reference
/// <a href="https://developer.riotgames.com/api-methods/#summoner-v4">https://developer.riotgames.com/api-methods/#summoner-v4</a>
#[inline]
pub fn summoner_v4(&self) -> SummonerV4 { pub fn summoner_v4(&self) -> SummonerV4 {
SummonerV4 { base: self } SummonerV4 { base: self }
} }
/// Handle for ThirdPartyCodeV4 endpoints. This method is automatically generated.
/// # Official API Reference
/// <a href="https://developer.riotgames.com/api-methods/#third-party-code-v4">https://developer.riotgames.com/api-methods/#third-party-code-v4</a>
#[inline]
pub fn third_party_code_v4(&self) -> ThirdPartyCodeV4 { pub fn third_party_code_v4(&self) -> ThirdPartyCodeV4 {
ThirdPartyCodeV4 { base: self } ThirdPartyCodeV4 { base: self }
} }
/// Handle for TournamentStubV4 endpoints. This method is automatically generated.
/// # Official API Reference
/// <a href="https://developer.riotgames.com/api-methods/#tournament-stub-v4">https://developer.riotgames.com/api-methods/#tournament-stub-v4</a>
#[inline]
pub fn tournament_stub_v4(&self) -> TournamentStubV4 { pub fn tournament_stub_v4(&self) -> TournamentStubV4 {
TournamentStubV4 { base: self } TournamentStubV4 { base: self }
} }
/// Handle for TournamentV4 endpoints. This method is automatically generated.
/// # Official API Reference
/// <a href="https://developer.riotgames.com/api-methods/#tournament-v4">https://developer.riotgames.com/api-methods/#tournament-v4</a>
#[inline]
pub fn tournament_v4(&self) -> TournamentV4 { pub fn tournament_v4(&self) -> TournamentV4 {
TournamentV4 { base: self } TournamentV4 { base: self }
} }
} }
/// ChampionMasteryV4 endpoints. This class is automatically generated.<para /> /// ChampionMasteryV4 endpoints. This struct is automatically generated.
/// # Official API Reference /// # Official API Reference
/// a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4">https://developer.riotgames.com/api-methods/#champion-mastery-v4</a> /// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4">https://developer.riotgames.com/api-methods/#champion-mastery-v4</a>
pub struct ChampionMasteryV4<'a> { pub struct ChampionMasteryV4<'a> {
base: &'a RiotApi, base: &'a RiotApi,
} }
@ -100,9 +144,9 @@ impl<'a> ChampionMasteryV4<'a> {
} }
/// ChampionV3 endpoints. This class is automatically generated.<para /> /// ChampionV3 endpoints. This struct is automatically generated.
/// # Official API Reference /// # Official API Reference
/// a href="https://developer.riotgames.com/api-methods/#champion-v3">https://developer.riotgames.com/api-methods/#champion-v3</a> /// <a href="https://developer.riotgames.com/api-methods/#champion-v3">https://developer.riotgames.com/api-methods/#champion-v3</a>
pub struct ChampionV3<'a> { pub struct ChampionV3<'a> {
base: &'a RiotApi, base: &'a RiotApi,
} }
@ -121,9 +165,9 @@ impl<'a> ChampionV3<'a> {
} }
/// LeagueExpV4 endpoints. This class is automatically generated.<para /> /// LeagueExpV4 endpoints. This struct is automatically generated.
/// # Official API Reference /// # Official API Reference
/// a href="https://developer.riotgames.com/api-methods/#league-exp-v4">https://developer.riotgames.com/api-methods/#league-exp-v4</a> /// <a href="https://developer.riotgames.com/api-methods/#league-exp-v4">https://developer.riotgames.com/api-methods/#league-exp-v4</a>
pub struct LeagueExpV4<'a> { pub struct LeagueExpV4<'a> {
base: &'a RiotApi, base: &'a RiotApi,
} }
@ -149,9 +193,9 @@ impl<'a> LeagueExpV4<'a> {
} }
/// LeagueV4 endpoints. This class is automatically generated.<para /> /// LeagueV4 endpoints. This struct is automatically generated.
/// # Official API Reference /// # Official API Reference
/// a href="https://developer.riotgames.com/api-methods/#league-v4">https://developer.riotgames.com/api-methods/#league-v4</a> /// <a href="https://developer.riotgames.com/api-methods/#league-v4">https://developer.riotgames.com/api-methods/#league-v4</a>
pub struct LeagueV4<'a> { pub struct LeagueV4<'a> {
base: &'a RiotApi, base: &'a RiotApi,
} }
@ -242,9 +286,9 @@ impl<'a> LeagueV4<'a> {
} }
/// LolStatusV3 endpoints. This class is automatically generated.<para /> /// LolStatusV3 endpoints. This struct is automatically generated.
/// # Official API Reference /// # Official API Reference
/// a href="https://developer.riotgames.com/api-methods/#lol-status-v3">https://developer.riotgames.com/api-methods/#lol-status-v3</a> /// <a href="https://developer.riotgames.com/api-methods/#lol-status-v3">https://developer.riotgames.com/api-methods/#lol-status-v3</a>
pub struct LolStatusV3<'a> { pub struct LolStatusV3<'a> {
base: &'a RiotApi, base: &'a RiotApi,
} }
@ -265,9 +309,9 @@ impl<'a> LolStatusV3<'a> {
} }
/// MatchV4 endpoints. This class is automatically generated.<para /> /// MatchV4 endpoints. This struct is automatically generated.
/// # Official API Reference /// # Official API Reference
/// a href="https://developer.riotgames.com/api-methods/#match-v4">https://developer.riotgames.com/api-methods/#match-v4</a> /// <a href="https://developer.riotgames.com/api-methods/#match-v4">https://developer.riotgames.com/api-methods/#match-v4</a>
pub struct MatchV4<'a> { pub struct MatchV4<'a> {
base: &'a RiotApi, base: &'a RiotApi,
} }
@ -364,9 +408,9 @@ impl<'a> MatchV4<'a> {
} }
/// SpectatorV4 endpoints. This class is automatically generated.<para /> /// SpectatorV4 endpoints. This struct is automatically generated.
/// # Official API Reference /// # Official API Reference
/// a href="https://developer.riotgames.com/api-methods/#spectator-v4">https://developer.riotgames.com/api-methods/#spectator-v4</a> /// <a href="https://developer.riotgames.com/api-methods/#spectator-v4">https://developer.riotgames.com/api-methods/#spectator-v4</a>
pub struct SpectatorV4<'a> { pub struct SpectatorV4<'a> {
base: &'a RiotApi, base: &'a RiotApi,
} }
@ -398,9 +442,9 @@ impl<'a> SpectatorV4<'a> {
} }
/// SummonerV4 endpoints. This class is automatically generated.<para /> /// SummonerV4 endpoints. This struct is automatically generated.
/// # Official API Reference /// # Official API Reference
/// a href="https://developer.riotgames.com/api-methods/#summoner-v4">https://developer.riotgames.com/api-methods/#summoner-v4</a> /// <a href="https://developer.riotgames.com/api-methods/#summoner-v4">https://developer.riotgames.com/api-methods/#summoner-v4</a>
pub struct SummonerV4<'a> { pub struct SummonerV4<'a> {
base: &'a RiotApi, base: &'a RiotApi,
} }
@ -459,9 +503,9 @@ impl<'a> SummonerV4<'a> {
} }
/// ThirdPartyCodeV4 endpoints. This class is automatically generated.<para /> /// ThirdPartyCodeV4 endpoints. This struct is automatically generated.
/// # Official API Reference /// # Official API Reference
/// a href="https://developer.riotgames.com/api-methods/#third-party-code-v4">https://developer.riotgames.com/api-methods/#third-party-code-v4</a> /// <a href="https://developer.riotgames.com/api-methods/#third-party-code-v4">https://developer.riotgames.com/api-methods/#third-party-code-v4</a>
pub struct ThirdPartyCodeV4<'a> { pub struct ThirdPartyCodeV4<'a> {
base: &'a RiotApi, base: &'a RiotApi,
} }
@ -481,9 +525,9 @@ impl<'a> ThirdPartyCodeV4<'a> {
} }
/// TournamentStubV4 endpoints. This class is automatically generated.<para /> /// TournamentStubV4 endpoints. This struct is automatically generated.
/// # Official API Reference /// # Official API Reference
/// a href="https://developer.riotgames.com/api-methods/#tournament-stub-v4">https://developer.riotgames.com/api-methods/#tournament-stub-v4</a> /// <a href="https://developer.riotgames.com/api-methods/#tournament-stub-v4">https://developer.riotgames.com/api-methods/#tournament-stub-v4</a>
pub struct TournamentStubV4<'a> { pub struct TournamentStubV4<'a> {
base: &'a RiotApi, base: &'a RiotApi,
} }
@ -503,9 +547,9 @@ impl<'a> TournamentStubV4<'a> {
} }
/// TournamentV4 endpoints. This class is automatically generated.<para /> /// TournamentV4 endpoints. This struct is automatically generated.
/// # Official API Reference /// # Official API Reference
/// a href="https://developer.riotgames.com/api-methods/#tournament-v4">https://developer.riotgames.com/api-methods/#tournament-v4</a> /// <a href="https://developer.riotgames.com/api-methods/#tournament-v4">https://developer.riotgames.com/api-methods/#tournament-v4</a>
pub struct TournamentV4<'a> { pub struct TournamentV4<'a> {
base: &'a RiotApi, base: &'a RiotApi,
} }

View File

@ -4,6 +4,8 @@ pub use dto::*;
pub mod consts; pub mod consts;
mod endpoints; mod endpoints;
pub use endpoints::*;
mod riot_api_config; mod riot_api_config;
pub use riot_api_config::*; pub use riot_api_config::*;

View File

@ -27,7 +27,7 @@ pub mod {{= dotUtils.changeCase.snakeCase(endpoint) }} {
let schema = schemas[schemaKey]; let schema = schemas[schemaKey];
let props = schema.properties; let props = schema.properties;
}} }}
/// {{= schemaName }} data object. This class is automatically generated. /// {{= schemaName }} data object. This struct is automatically generated.
{{? schema.description }} {{? schema.description }}
/// # Description /// # Description
/// {{= schema.description }} /// {{= schema.description }}

View File

@ -32,6 +32,10 @@ impl RiotApi {
const method = dotUtils.changeCase.snakeCase(endpointName); const method = dotUtils.changeCase.snakeCase(endpointName);
const type = dotUtils.changeCase.pascalCase(endpointName); const type = dotUtils.changeCase.pascalCase(endpointName);
}} }}
/// Handle for {{= type }} endpoints. This method is automatically generated.
/// # Official API Reference
/// <a href="https://developer.riotgames.com/api-methods/#{{= endpointName }}">https://developer.riotgames.com/api-methods/#{{= endpointName }}</a>
#[inline]
pub fn {{= method }}(&self) -> {{= type }} { pub fn {{= method }}(&self) -> {{= type }} {
{{= type }} { base: self } {{= type }} { base: self }
} }
@ -44,9 +48,9 @@ impl RiotApi {
let endpoint = dotUtils.changeCase.pascalCase(endpointName); let endpoint = dotUtils.changeCase.pascalCase(endpointName);
}} }}
/// {{= endpoint }} endpoints. This class is automatically generated.<para /> /// {{= endpoint }} endpoints. This struct is automatically generated.
/// # Official API Reference /// # Official API Reference
/// a href="https://developer.riotgames.com/api-methods/#{{= endpointName }}">https://developer.riotgames.com/api-methods/#{{= endpointName }}</a> /// <a href="https://developer.riotgames.com/api-methods/#{{= endpointName }}">https://developer.riotgames.com/api-methods/#{{= endpointName }}</a>
pub struct {{= endpoint }}<'a> { pub struct {{= endpoint }}<'a> {
base: &'a RiotApi, base: &'a RiotApi,
} }