riven/
endpoints.rs

1#![cfg_attr(any(), rustfmt::skip)]
2///////////////////////////////////////////////
3//                                           //
4//                     !                     //
5//   This file is automatically generated!   //
6//           Do not directly edit!           //
7//                                           //
8///////////////////////////////////////////////
9
10// http://www.mingweisamuel.com/riotapi-schema/tool/
11// Version e2d9f6306aaed7b541fdaffb1d10711073291f6e
12
13//! Automatically generated endpoint handles.
14#![allow(clippy::let_and_return, clippy::too_many_arguments)]
15
16use std::future::Future;
17use std::vec::Vec;
18
19#[cfg(feature="metrics")]
20use crate::metrics;
21
22#[cfg(feature="tracing")]
23use tracing::Instrument;
24use reqwest::Method;
25
26use crate::{Result, TryRequestResult};
27use crate::consts::{ RegionalRoute, PlatformRoute, ValPlatformRoute };
28use crate::riot_api::RiotApi;
29
30impl RiotApi {
31    /// Returns a handle for accessing [AccountV1](crate::endpoints::AccountV1) endpoints.
32    /// # Riot Developer API Reference
33    /// <a href="https://developer.riotgames.com/apis#account-v1" target="_blank">`account-v1`</a>
34    ///
35    /// Note: this method is automatically generated.
36    #[inline]
37    pub fn account_v1(&self) -> AccountV1<'_> {
38        AccountV1 { base: self }
39    }
40    /// Returns a handle for accessing [ChampionMasteryV4](crate::endpoints::ChampionMasteryV4) endpoints.
41    /// # Riot Developer API Reference
42    /// <a href="https://developer.riotgames.com/apis#champion-mastery-v4" target="_blank">`champion-mastery-v4`</a>
43    ///
44    /// Note: this method is automatically generated.
45    #[inline]
46    pub fn champion_mastery_v4(&self) -> ChampionMasteryV4<'_> {
47        ChampionMasteryV4 { base: self }
48    }
49    /// Returns a handle for accessing [ChampionV3](crate::endpoints::ChampionV3) endpoints.
50    /// # Riot Developer API Reference
51    /// <a href="https://developer.riotgames.com/apis#champion-v3" target="_blank">`champion-v3`</a>
52    ///
53    /// Note: this method is automatically generated.
54    #[inline]
55    pub fn champion_v3(&self) -> ChampionV3<'_> {
56        ChampionV3 { base: self }
57    }
58    /// Returns a handle for accessing [ClashV1](crate::endpoints::ClashV1) endpoints.
59    /// # Riot Developer API Reference
60    /// <a href="https://developer.riotgames.com/apis#clash-v1" target="_blank">`clash-v1`</a>
61    ///
62    /// Note: this method is automatically generated.
63    #[inline]
64    pub fn clash_v1(&self) -> ClashV1<'_> {
65        ClashV1 { base: self }
66    }
67    /// Returns a handle for accessing [LeagueExpV4](crate::endpoints::LeagueExpV4) endpoints.
68    /// # Riot Developer API Reference
69    /// <a href="https://developer.riotgames.com/apis#league-exp-v4" target="_blank">`league-exp-v4`</a>
70    ///
71    /// Note: this method is automatically generated.
72    #[inline]
73    pub fn league_exp_v4(&self) -> LeagueExpV4<'_> {
74        LeagueExpV4 { base: self }
75    }
76    /// Returns a handle for accessing [LeagueV4](crate::endpoints::LeagueV4) endpoints.
77    /// # Riot Developer API Reference
78    /// <a href="https://developer.riotgames.com/apis#league-v4" target="_blank">`league-v4`</a>
79    ///
80    /// Note: this method is automatically generated.
81    #[inline]
82    pub fn league_v4(&self) -> LeagueV4<'_> {
83        LeagueV4 { base: self }
84    }
85    /// Returns a handle for accessing [LolChallengesV1](crate::endpoints::LolChallengesV1) endpoints.
86    /// # Riot Developer API Reference
87    /// <a href="https://developer.riotgames.com/apis#lol-challenges-v1" target="_blank">`lol-challenges-v1`</a>
88    ///
89    /// Note: this method is automatically generated.
90    #[inline]
91    pub fn lol_challenges_v1(&self) -> LolChallengesV1<'_> {
92        LolChallengesV1 { base: self }
93    }
94    /// Returns a handle for accessing [LolRsoMatchV1](crate::endpoints::LolRsoMatchV1) endpoints.
95    /// # Riot Developer API Reference
96    /// <a href="https://developer.riotgames.com/apis#lol-rso-match-v1" target="_blank">`lol-rso-match-v1`</a>
97    ///
98    /// Note: this method is automatically generated.
99    #[inline]
100    pub fn lol_rso_match_v1(&self) -> LolRsoMatchV1<'_> {
101        LolRsoMatchV1 { base: self }
102    }
103    /// Returns a handle for accessing [LolStatusV4](crate::endpoints::LolStatusV4) endpoints.
104    /// # Riot Developer API Reference
105    /// <a href="https://developer.riotgames.com/apis#lol-status-v4" target="_blank">`lol-status-v4`</a>
106    ///
107    /// Note: this method is automatically generated.
108    #[inline]
109    pub fn lol_status_v4(&self) -> LolStatusV4<'_> {
110        LolStatusV4 { base: self }
111    }
112    /// Returns a handle for accessing [LorDeckV1](crate::endpoints::LorDeckV1) endpoints.
113    /// # Riot Developer API Reference
114    /// <a href="https://developer.riotgames.com/apis#lor-deck-v1" target="_blank">`lor-deck-v1`</a>
115    ///
116    /// Note: this method is automatically generated.
117    #[inline]
118    pub fn lor_deck_v1(&self) -> LorDeckV1<'_> {
119        LorDeckV1 { base: self }
120    }
121    /// Returns a handle for accessing [LorInventoryV1](crate::endpoints::LorInventoryV1) endpoints.
122    /// # Riot Developer API Reference
123    /// <a href="https://developer.riotgames.com/apis#lor-inventory-v1" target="_blank">`lor-inventory-v1`</a>
124    ///
125    /// Note: this method is automatically generated.
126    #[inline]
127    pub fn lor_inventory_v1(&self) -> LorInventoryV1<'_> {
128        LorInventoryV1 { base: self }
129    }
130    /// Returns a handle for accessing [LorMatchV1](crate::endpoints::LorMatchV1) endpoints.
131    /// # Riot Developer API Reference
132    /// <a href="https://developer.riotgames.com/apis#lor-match-v1" target="_blank">`lor-match-v1`</a>
133    ///
134    /// Note: this method is automatically generated.
135    #[inline]
136    pub fn lor_match_v1(&self) -> LorMatchV1<'_> {
137        LorMatchV1 { base: self }
138    }
139    /// Returns a handle for accessing [LorRankedV1](crate::endpoints::LorRankedV1) endpoints.
140    /// # Riot Developer API Reference
141    /// <a href="https://developer.riotgames.com/apis#lor-ranked-v1" target="_blank">`lor-ranked-v1`</a>
142    ///
143    /// Note: this method is automatically generated.
144    #[inline]
145    pub fn lor_ranked_v1(&self) -> LorRankedV1<'_> {
146        LorRankedV1 { base: self }
147    }
148    /// Returns a handle for accessing [LorStatusV1](crate::endpoints::LorStatusV1) endpoints.
149    /// # Riot Developer API Reference
150    /// <a href="https://developer.riotgames.com/apis#lor-status-v1" target="_blank">`lor-status-v1`</a>
151    ///
152    /// Note: this method is automatically generated.
153    #[inline]
154    pub fn lor_status_v1(&self) -> LorStatusV1<'_> {
155        LorStatusV1 { base: self }
156    }
157    /// Returns a handle for accessing [MatchV5](crate::endpoints::MatchV5) endpoints.
158    /// # Riot Developer API Reference
159    /// <a href="https://developer.riotgames.com/apis#match-v5" target="_blank">`match-v5`</a>
160    ///
161    /// Note: this method is automatically generated.
162    #[inline]
163    pub fn match_v5(&self) -> MatchV5<'_> {
164        MatchV5 { base: self }
165    }
166    /// Returns a handle for accessing [RiftboundContentV1](crate::endpoints::RiftboundContentV1) endpoints.
167    /// # Riot Developer API Reference
168    /// <a href="https://developer.riotgames.com/apis#riftbound-content-v1" target="_blank">`riftbound-content-v1`</a>
169    ///
170    /// Note: this method is automatically generated.
171    #[inline]
172    pub fn riftbound_content_v1(&self) -> RiftboundContentV1<'_> {
173        RiftboundContentV1 { base: self }
174    }
175    /// Returns a handle for accessing [SpectatorTftV5](crate::endpoints::SpectatorTftV5) endpoints.
176    /// # Riot Developer API Reference
177    /// <a href="https://developer.riotgames.com/apis#spectator-tft-v5" target="_blank">`spectator-tft-v5`</a>
178    ///
179    /// Note: this method is automatically generated.
180    #[inline]
181    pub fn spectator_tft_v5(&self) -> SpectatorTftV5<'_> {
182        SpectatorTftV5 { base: self }
183    }
184    /// Returns a handle for accessing [SpectatorV5](crate::endpoints::SpectatorV5) endpoints.
185    /// # Riot Developer API Reference
186    /// <a href="https://developer.riotgames.com/apis#spectator-v5" target="_blank">`spectator-v5`</a>
187    ///
188    /// Note: this method is automatically generated.
189    #[inline]
190    pub fn spectator_v5(&self) -> SpectatorV5<'_> {
191        SpectatorV5 { base: self }
192    }
193    /// Returns a handle for accessing [SummonerV4](crate::endpoints::SummonerV4) endpoints.
194    /// # Riot Developer API Reference
195    /// <a href="https://developer.riotgames.com/apis#summoner-v4" target="_blank">`summoner-v4`</a>
196    ///
197    /// Note: this method is automatically generated.
198    #[inline]
199    pub fn summoner_v4(&self) -> SummonerV4<'_> {
200        SummonerV4 { base: self }
201    }
202    /// Returns a handle for accessing [TftLeagueV1](crate::endpoints::TftLeagueV1) endpoints.
203    /// # Riot Developer API Reference
204    /// <a href="https://developer.riotgames.com/apis#tft-league-v1" target="_blank">`tft-league-v1`</a>
205    ///
206    /// Note: this method is automatically generated.
207    #[inline]
208    pub fn tft_league_v1(&self) -> TftLeagueV1<'_> {
209        TftLeagueV1 { base: self }
210    }
211    /// Returns a handle for accessing [TftMatchV1](crate::endpoints::TftMatchV1) endpoints.
212    /// # Riot Developer API Reference
213    /// <a href="https://developer.riotgames.com/apis#tft-match-v1" target="_blank">`tft-match-v1`</a>
214    ///
215    /// Note: this method is automatically generated.
216    #[inline]
217    pub fn tft_match_v1(&self) -> TftMatchV1<'_> {
218        TftMatchV1 { base: self }
219    }
220    /// Returns a handle for accessing [TftStatusV1](crate::endpoints::TftStatusV1) endpoints.
221    /// # Riot Developer API Reference
222    /// <a href="https://developer.riotgames.com/apis#tft-status-v1" target="_blank">`tft-status-v1`</a>
223    ///
224    /// Note: this method is automatically generated.
225    #[inline]
226    pub fn tft_status_v1(&self) -> TftStatusV1<'_> {
227        TftStatusV1 { base: self }
228    }
229    /// Returns a handle for accessing [TftSummonerV1](crate::endpoints::TftSummonerV1) endpoints.
230    /// # Riot Developer API Reference
231    /// <a href="https://developer.riotgames.com/apis#tft-summoner-v1" target="_blank">`tft-summoner-v1`</a>
232    ///
233    /// Note: this method is automatically generated.
234    #[inline]
235    pub fn tft_summoner_v1(&self) -> TftSummonerV1<'_> {
236        TftSummonerV1 { base: self }
237    }
238    /// Returns a handle for accessing [TournamentStubV5](crate::endpoints::TournamentStubV5) endpoints.
239    /// # Riot Developer API Reference
240    /// <a href="https://developer.riotgames.com/apis#tournament-stub-v5" target="_blank">`tournament-stub-v5`</a>
241    ///
242    /// Note: this method is automatically generated.
243    #[inline]
244    pub fn tournament_stub_v5(&self) -> TournamentStubV5<'_> {
245        TournamentStubV5 { base: self }
246    }
247    /// Returns a handle for accessing [TournamentV5](crate::endpoints::TournamentV5) endpoints.
248    /// # Riot Developer API Reference
249    /// <a href="https://developer.riotgames.com/apis#tournament-v5" target="_blank">`tournament-v5`</a>
250    ///
251    /// Note: this method is automatically generated.
252    #[inline]
253    pub fn tournament_v5(&self) -> TournamentV5<'_> {
254        TournamentV5 { base: self }
255    }
256    /// Returns a handle for accessing [ValConsoleMatchV1](crate::endpoints::ValConsoleMatchV1) endpoints.
257    /// # Riot Developer API Reference
258    /// <a href="https://developer.riotgames.com/apis#val-console-match-v1" target="_blank">`val-console-match-v1`</a>
259    ///
260    /// Note: this method is automatically generated.
261    #[inline]
262    pub fn val_console_match_v1(&self) -> ValConsoleMatchV1<'_> {
263        ValConsoleMatchV1 { base: self }
264    }
265    /// Returns a handle for accessing [ValConsoleRankedV1](crate::endpoints::ValConsoleRankedV1) endpoints.
266    /// # Riot Developer API Reference
267    /// <a href="https://developer.riotgames.com/apis#val-console-ranked-v1" target="_blank">`val-console-ranked-v1`</a>
268    ///
269    /// Note: this method is automatically generated.
270    #[inline]
271    pub fn val_console_ranked_v1(&self) -> ValConsoleRankedV1<'_> {
272        ValConsoleRankedV1 { base: self }
273    }
274    /// Returns a handle for accessing [ValContentV1](crate::endpoints::ValContentV1) endpoints.
275    /// # Riot Developer API Reference
276    /// <a href="https://developer.riotgames.com/apis#val-content-v1" target="_blank">`val-content-v1`</a>
277    ///
278    /// Note: this method is automatically generated.
279    #[inline]
280    pub fn val_content_v1(&self) -> ValContentV1<'_> {
281        ValContentV1 { base: self }
282    }
283    /// Returns a handle for accessing [ValMatchV1](crate::endpoints::ValMatchV1) endpoints.
284    /// # Riot Developer API Reference
285    /// <a href="https://developer.riotgames.com/apis#val-match-v1" target="_blank">`val-match-v1`</a>
286    ///
287    /// Note: this method is automatically generated.
288    #[inline]
289    pub fn val_match_v1(&self) -> ValMatchV1<'_> {
290        ValMatchV1 { base: self }
291    }
292    /// Returns a handle for accessing [ValRankedV1](crate::endpoints::ValRankedV1) endpoints.
293    /// # Riot Developer API Reference
294    /// <a href="https://developer.riotgames.com/apis#val-ranked-v1" target="_blank">`val-ranked-v1`</a>
295    ///
296    /// Note: this method is automatically generated.
297    #[inline]
298    pub fn val_ranked_v1(&self) -> ValRankedV1<'_> {
299        ValRankedV1 { base: self }
300    }
301    /// Returns a handle for accessing [ValStatusV1](crate::endpoints::ValStatusV1) endpoints.
302    /// # Riot Developer API Reference
303    /// <a href="https://developer.riotgames.com/apis#val-status-v1" target="_blank">`val-status-v1`</a>
304    ///
305    /// Note: this method is automatically generated.
306    #[inline]
307    pub fn val_status_v1(&self) -> ValStatusV1<'_> {
308        ValStatusV1 { base: self }
309    }
310}
311
312/// AccountV1 endpoints handle, accessed by calling [`account_v1()`](RiotApi::account_v1) on a [`RiotApi`] instance.
313/// # Riot Developer API Reference
314/// <a href="https://developer.riotgames.com/apis#account-v1" target="_blank">`account-v1`</a>
315///
316/// Note: this struct is automatically generated.
317#[repr(transparent)]
318pub struct AccountV1<'a> {
319    base: &'a RiotApi,
320}
321impl<'a> AccountV1<'a> {
322    /// Get account by puuid
323    /// # Parameters
324    /// * `route` - Route to query.
325    /// * `puuid` (required, in path)
326    /// # Riot Developer API Reference
327    /// <a href="https://developer.riotgames.com/api-methods/#account-v1/GET_getByPuuid" target="_blank">`account-v1.getByPuuid`</a>
328    ///
329    /// Note: this method is automatically generated.
330    pub fn get_by_puuid(&self, route: RegionalRoute, puuid: &str)
331        -> impl Future<Output = Result<crate::models::account_v1::Account>> + 'a
332    {
333        let route_str = route.into();
334        let request = self.base.request(Method::GET, route_str, &format!("/riot/account/v1/accounts/by-puuid/{}", puuid));
335        let future = self.base.execute_val::<crate::models::account_v1::Account>("account-v1.getByPuuid", route_str, request);
336        #[cfg(feature = "tracing")]
337        let future = future.instrument(tracing::info_span!("account-v1.getByPuuid", route = route_str));
338        #[cfg(feature = "metrics")]
339        let future = metrics::timed(future, "account-v1.getByPuuid", route_str);
340        future
341    }
342
343    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
344    /// See `get_by_puuid` for detailed documentation
345    /// # Parameters
346    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
347    /// * `route` - Route to query.
348    /// * `puuid` (required, in path)
349    /// # Riot Developer API Reference
350    /// <a href="https://developer.riotgames.com/api-methods/#account-v1/GET_getByPuuid" target="_blank">`account-v1.getByPuuid`</a>
351    ///
352    /// Note: this method is automatically generated.
353    pub fn try_get_by_puuid(&self, min_capacity: f32, route: RegionalRoute, puuid: &str)
354        -> impl Future<Output = TryRequestResult<crate::models::account_v1::Account>> + 'a
355    {
356        let route_str = route.into();
357        let request = self.base.request(Method::GET, route_str, &format!("/riot/account/v1/accounts/by-puuid/{}", puuid));
358        let future = self.base.try_execute_val::<crate::models::account_v1::Account>("account-v1.getByPuuid", route_str, request, min_capacity);
359        #[cfg(feature = "tracing")]
360        let future = future.instrument(tracing::info_span!("account-v1.getByPuuid", route = route_str));
361        #[cfg(feature = "metrics")]
362        let future = metrics::try_timed(future, "account-v1.getByPuuid", route_str);
363        future
364    }
365
366    /// Get account by riot id
367    /// # Parameters
368    /// * `route` - Route to query.
369    /// * `tag_line` (required, in path) - When querying for a player by their riot id, the gameName and tagLine query params are required.
370    /// * `game_name` (required, in path) - When querying for a player by their riot id, the gameName and tagLine query params are required.
371    /// # Riot Developer API Reference
372    /// <a href="https://developer.riotgames.com/api-methods/#account-v1/GET_getByRiotId" target="_blank">`account-v1.getByRiotId`</a>
373    ///
374    /// Note: this method is automatically generated.
375    pub fn get_by_riot_id(&self, route: RegionalRoute, game_name: &str, tag_line: &str)
376        -> impl Future<Output = Result<Option<crate::models::account_v1::Account>>> + 'a
377    {
378        let route_str = route.into();
379        let request = self.base.request(Method::GET, route_str, &format!("/riot/account/v1/accounts/by-riot-id/{}/{}", game_name, tag_line));
380        let future = self.base.execute_opt::<crate::models::account_v1::Account>("account-v1.getByRiotId", route_str, request);
381        #[cfg(feature = "tracing")]
382        let future = future.instrument(tracing::info_span!("account-v1.getByRiotId", route = route_str));
383        #[cfg(feature = "metrics")]
384        let future = metrics::timed(future, "account-v1.getByRiotId", route_str);
385        future
386    }
387
388    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
389    /// See `get_by_riot_id` for detailed documentation
390    /// # Parameters
391    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
392    /// * `route` - Route to query.
393    /// * `tag_line` (required, in path) - When querying for a player by their riot id, the gameName and tagLine query params are required.
394    /// * `game_name` (required, in path) - When querying for a player by their riot id, the gameName and tagLine query params are required.
395    /// # Riot Developer API Reference
396    /// <a href="https://developer.riotgames.com/api-methods/#account-v1/GET_getByRiotId" target="_blank">`account-v1.getByRiotId`</a>
397    ///
398    /// Note: this method is automatically generated.
399    pub fn try_get_by_riot_id(&self, min_capacity: f32, route: RegionalRoute, game_name: &str, tag_line: &str)
400        -> impl Future<Output = TryRequestResult<Option<crate::models::account_v1::Account>>> + 'a
401    {
402        let route_str = route.into();
403        let request = self.base.request(Method::GET, route_str, &format!("/riot/account/v1/accounts/by-riot-id/{}/{}", game_name, tag_line));
404        let future = self.base.try_execute_opt::<crate::models::account_v1::Account>("account-v1.getByRiotId", route_str, request, min_capacity);
405        #[cfg(feature = "tracing")]
406        let future = future.instrument(tracing::info_span!("account-v1.getByRiotId", route = route_str));
407        #[cfg(feature = "metrics")]
408        let future = metrics::try_timed(future, "account-v1.getByRiotId", route_str);
409        future
410    }
411
412    /// Get account by access token
413    /// # Parameters
414    /// * `route` - Route to query.
415    /// * `access_token` - RSO access token.
416    /// # RSO
417    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
418    /// via the `access_token` parameter, instead of the Riot API key.
419    /// # Riot Developer API Reference
420    /// <a href="https://developer.riotgames.com/api-methods/#account-v1/GET_getByAccessToken" target="_blank">`account-v1.getByAccessToken`</a>
421    ///
422    /// Note: this method is automatically generated.
423    pub fn get_by_access_token(&self, route: RegionalRoute, access_token: impl std::fmt::Display)
424        -> impl Future<Output = Result<crate::models::account_v1::Account>> + 'a
425    {
426        let route_str = route.into();
427        let request = self.base.request(Method::GET, route_str, "/riot/account/v1/accounts/me");
428        let mut request = request.bearer_auth(access_token);
429        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
430        let future = self.base.execute_val::<crate::models::account_v1::Account>("account-v1.getByAccessToken", route_str, request);
431        #[cfg(feature = "tracing")]
432        let future = future.instrument(tracing::info_span!("account-v1.getByAccessToken", route = route_str));
433        #[cfg(feature = "metrics")]
434        let future = metrics::timed(future, "account-v1.getByAccessToken", route_str);
435        future
436    }
437
438    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
439    /// See `get_by_access_token` for detailed documentation
440    /// # Parameters
441    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
442    /// * `route` - Route to query.
443    /// * `access_token` - RSO access token.
444    /// # RSO
445    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
446    /// via the `access_token` parameter, instead of the Riot API key.
447    /// # Riot Developer API Reference
448    /// <a href="https://developer.riotgames.com/api-methods/#account-v1/GET_getByAccessToken" target="_blank">`account-v1.getByAccessToken`</a>
449    ///
450    /// Note: this method is automatically generated.
451    pub fn try_get_by_access_token(&self, min_capacity: f32, route: RegionalRoute, access_token: impl std::fmt::Display)
452        -> impl Future<Output = TryRequestResult<crate::models::account_v1::Account>> + 'a
453    {
454        let route_str = route.into();
455        let request = self.base.request(Method::GET, route_str, "/riot/account/v1/accounts/me");
456        let mut request = request.bearer_auth(access_token);
457        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
458        let future = self.base.try_execute_val::<crate::models::account_v1::Account>("account-v1.getByAccessToken", route_str, request, min_capacity);
459        #[cfg(feature = "tracing")]
460        let future = future.instrument(tracing::info_span!("account-v1.getByAccessToken", route = route_str));
461        #[cfg(feature = "metrics")]
462        let future = metrics::try_timed(future, "account-v1.getByAccessToken", route_str);
463        future
464    }
465
466    /// Get active shard for a player
467    /// # Parameters
468    /// * `route` - Route to query.
469    /// * `game` (required, in path)
470    /// * `puuid` (required, in path)
471    /// # Riot Developer API Reference
472    /// <a href="https://developer.riotgames.com/api-methods/#account-v1/GET_getActiveShard" target="_blank">`account-v1.getActiveShard`</a>
473    ///
474    /// Note: this method is automatically generated.
475    pub fn get_active_shard(&self, route: RegionalRoute, game: &str, puuid: &str)
476        -> impl Future<Output = Result<Option<crate::models::account_v1::ActiveShard>>> + 'a
477    {
478        let route_str = route.into();
479        let request = self.base.request(Method::GET, route_str, &format!("/riot/account/v1/active-shards/by-game/{}/by-puuid/{}", game, puuid));
480        let future = self.base.execute_opt::<crate::models::account_v1::ActiveShard>("account-v1.getActiveShard", route_str, request);
481        #[cfg(feature = "tracing")]
482        let future = future.instrument(tracing::info_span!("account-v1.getActiveShard", route = route_str));
483        #[cfg(feature = "metrics")]
484        let future = metrics::timed(future, "account-v1.getActiveShard", route_str);
485        future
486    }
487
488    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
489    /// See `get_active_shard` for detailed documentation
490    /// # Parameters
491    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
492    /// * `route` - Route to query.
493    /// * `game` (required, in path)
494    /// * `puuid` (required, in path)
495    /// # Riot Developer API Reference
496    /// <a href="https://developer.riotgames.com/api-methods/#account-v1/GET_getActiveShard" target="_blank">`account-v1.getActiveShard`</a>
497    ///
498    /// Note: this method is automatically generated.
499    pub fn try_get_active_shard(&self, min_capacity: f32, route: RegionalRoute, game: &str, puuid: &str)
500        -> impl Future<Output = TryRequestResult<Option<crate::models::account_v1::ActiveShard>>> + 'a
501    {
502        let route_str = route.into();
503        let request = self.base.request(Method::GET, route_str, &format!("/riot/account/v1/active-shards/by-game/{}/by-puuid/{}", game, puuid));
504        let future = self.base.try_execute_opt::<crate::models::account_v1::ActiveShard>("account-v1.getActiveShard", route_str, request, min_capacity);
505        #[cfg(feature = "tracing")]
506        let future = future.instrument(tracing::info_span!("account-v1.getActiveShard", route = route_str));
507        #[cfg(feature = "metrics")]
508        let future = metrics::try_timed(future, "account-v1.getActiveShard", route_str);
509        future
510    }
511
512    /// Get active region (lol and tft)
513    /// # Parameters
514    /// * `route` - Route to query.
515    /// * `puuid` (required, in path)
516    /// * `game` (required, in path)
517    /// # Riot Developer API Reference
518    /// <a href="https://developer.riotgames.com/api-methods/#account-v1/GET_getActiveRegion" target="_blank">`account-v1.getActiveRegion`</a>
519    ///
520    /// Note: this method is automatically generated.
521    pub fn get_active_region(&self, route: RegionalRoute, game: &str, puuid: &str)
522        -> impl Future<Output = Result<crate::models::account_v1::AccountRegion>> + 'a
523    {
524        let route_str = route.into();
525        let request = self.base.request(Method::GET, route_str, &format!("/riot/account/v1/region/by-game/{}/by-puuid/{}", game, puuid));
526        let future = self.base.execute_val::<crate::models::account_v1::AccountRegion>("account-v1.getActiveRegion", route_str, request);
527        #[cfg(feature = "tracing")]
528        let future = future.instrument(tracing::info_span!("account-v1.getActiveRegion", route = route_str));
529        #[cfg(feature = "metrics")]
530        let future = metrics::timed(future, "account-v1.getActiveRegion", route_str);
531        future
532    }
533
534    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
535    /// See `get_active_region` for detailed documentation
536    /// # Parameters
537    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
538    /// * `route` - Route to query.
539    /// * `puuid` (required, in path)
540    /// * `game` (required, in path)
541    /// # Riot Developer API Reference
542    /// <a href="https://developer.riotgames.com/api-methods/#account-v1/GET_getActiveRegion" target="_blank">`account-v1.getActiveRegion`</a>
543    ///
544    /// Note: this method is automatically generated.
545    pub fn try_get_active_region(&self, min_capacity: f32, route: RegionalRoute, game: &str, puuid: &str)
546        -> impl Future<Output = TryRequestResult<crate::models::account_v1::AccountRegion>> + 'a
547    {
548        let route_str = route.into();
549        let request = self.base.request(Method::GET, route_str, &format!("/riot/account/v1/region/by-game/{}/by-puuid/{}", game, puuid));
550        let future = self.base.try_execute_val::<crate::models::account_v1::AccountRegion>("account-v1.getActiveRegion", route_str, request, min_capacity);
551        #[cfg(feature = "tracing")]
552        let future = future.instrument(tracing::info_span!("account-v1.getActiveRegion", route = route_str));
553        #[cfg(feature = "metrics")]
554        let future = metrics::try_timed(future, "account-v1.getActiveRegion", route_str);
555        future
556    }
557
558}
559
560/// ChampionMasteryV4 endpoints handle, accessed by calling [`champion_mastery_v4()`](RiotApi::champion_mastery_v4) on a [`RiotApi`] instance.
561/// # Riot Developer API Reference
562/// <a href="https://developer.riotgames.com/apis#champion-mastery-v4" target="_blank">`champion-mastery-v4`</a>
563///
564/// Note: this struct is automatically generated.
565#[repr(transparent)]
566pub struct ChampionMasteryV4<'a> {
567    base: &'a RiotApi,
568}
569impl<'a> ChampionMasteryV4<'a> {
570    /// Get all champion mastery entries sorted by number of champion points descending.
571    /// # Parameters
572    /// * `route` - Route to query.
573    /// * `encrypted_puuid` (required, in path)
574    /// # Riot Developer API Reference
575    /// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getAllChampionMasteriesByPUUID" target="_blank">`champion-mastery-v4.getAllChampionMasteriesByPUUID`</a>
576    ///
577    /// Note: this method is automatically generated.
578    pub fn get_all_champion_masteries_by_puuid(&self, route: PlatformRoute, encrypted_puuid: &str)
579        -> impl Future<Output = Result<Vec<crate::models::champion_mastery_v4::ChampionMastery>>> + 'a
580    {
581        let route_str = route.into();
582        let request = self.base.request(Method::GET, route_str, &format!("/lol/champion-mastery/v4/champion-masteries/by-puuid/{}", encrypted_puuid));
583        let future = self.base.execute_val::<Vec<crate::models::champion_mastery_v4::ChampionMastery>>("champion-mastery-v4.getAllChampionMasteriesByPUUID", route_str, request);
584        #[cfg(feature = "tracing")]
585        let future = future.instrument(tracing::info_span!("champion-mastery-v4.getAllChampionMasteriesByPUUID", route = route_str));
586        #[cfg(feature = "metrics")]
587        let future = metrics::timed(future, "champion-mastery-v4.getAllChampionMasteriesByPUUID", route_str);
588        future
589    }
590
591    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
592    /// See `get_all_champion_masteries_by_puuid` for detailed documentation
593    /// # Parameters
594    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
595    /// * `route` - Route to query.
596    /// * `encrypted_puuid` (required, in path)
597    /// # Riot Developer API Reference
598    /// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getAllChampionMasteriesByPUUID" target="_blank">`champion-mastery-v4.getAllChampionMasteriesByPUUID`</a>
599    ///
600    /// Note: this method is automatically generated.
601    pub fn try_get_all_champion_masteries_by_puuid(&self, min_capacity: f32, route: PlatformRoute, encrypted_puuid: &str)
602        -> impl Future<Output = TryRequestResult<Vec<crate::models::champion_mastery_v4::ChampionMastery>>> + 'a
603    {
604        let route_str = route.into();
605        let request = self.base.request(Method::GET, route_str, &format!("/lol/champion-mastery/v4/champion-masteries/by-puuid/{}", encrypted_puuid));
606        let future = self.base.try_execute_val::<Vec<crate::models::champion_mastery_v4::ChampionMastery>>("champion-mastery-v4.getAllChampionMasteriesByPUUID", route_str, request, min_capacity);
607        #[cfg(feature = "tracing")]
608        let future = future.instrument(tracing::info_span!("champion-mastery-v4.getAllChampionMasteriesByPUUID", route = route_str));
609        #[cfg(feature = "metrics")]
610        let future = metrics::try_timed(future, "champion-mastery-v4.getAllChampionMasteriesByPUUID", route_str);
611        future
612    }
613
614    /// Get a champion mastery by puuid and champion ID.
615    /// # Parameters
616    /// * `route` - Route to query.
617    /// * `encrypted_puuid` (required, in path)
618    /// * `champion_id` (required, in path) - Champion ID to retrieve Champion Mastery.
619    /// # Riot Developer API Reference
620    /// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getChampionMasteryByPUUID" target="_blank">`champion-mastery-v4.getChampionMasteryByPUUID`</a>
621    ///
622    /// Note: this method is automatically generated.
623    pub fn get_champion_mastery_by_puuid(&self, route: PlatformRoute, encrypted_puuid: &str, champion_id: crate::consts::Champion)
624        -> impl Future<Output = Result<crate::models::champion_mastery_v4::ChampionMastery>> + 'a
625    {
626        let route_str = route.into();
627        let request = self.base.request(Method::GET, route_str, &format!("/lol/champion-mastery/v4/champion-masteries/by-puuid/{}/by-champion/{}", encrypted_puuid, champion_id));
628        let future = self.base.execute_val::<crate::models::champion_mastery_v4::ChampionMastery>("champion-mastery-v4.getChampionMasteryByPUUID", route_str, request);
629        #[cfg(feature = "tracing")]
630        let future = future.instrument(tracing::info_span!("champion-mastery-v4.getChampionMasteryByPUUID", route = route_str));
631        #[cfg(feature = "metrics")]
632        let future = metrics::timed(future, "champion-mastery-v4.getChampionMasteryByPUUID", route_str);
633        future
634    }
635
636    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
637    /// See `get_champion_mastery_by_puuid` for detailed documentation
638    /// # Parameters
639    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
640    /// * `route` - Route to query.
641    /// * `encrypted_puuid` (required, in path)
642    /// * `champion_id` (required, in path) - Champion ID to retrieve Champion Mastery.
643    /// # Riot Developer API Reference
644    /// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getChampionMasteryByPUUID" target="_blank">`champion-mastery-v4.getChampionMasteryByPUUID`</a>
645    ///
646    /// Note: this method is automatically generated.
647    pub fn try_get_champion_mastery_by_puuid(&self, min_capacity: f32, route: PlatformRoute, encrypted_puuid: &str, champion_id: crate::consts::Champion)
648        -> impl Future<Output = TryRequestResult<crate::models::champion_mastery_v4::ChampionMastery>> + 'a
649    {
650        let route_str = route.into();
651        let request = self.base.request(Method::GET, route_str, &format!("/lol/champion-mastery/v4/champion-masteries/by-puuid/{}/by-champion/{}", encrypted_puuid, champion_id));
652        let future = self.base.try_execute_val::<crate::models::champion_mastery_v4::ChampionMastery>("champion-mastery-v4.getChampionMasteryByPUUID", route_str, request, min_capacity);
653        #[cfg(feature = "tracing")]
654        let future = future.instrument(tracing::info_span!("champion-mastery-v4.getChampionMasteryByPUUID", route = route_str));
655        #[cfg(feature = "metrics")]
656        let future = metrics::try_timed(future, "champion-mastery-v4.getChampionMasteryByPUUID", route_str);
657        future
658    }
659
660    /// Get specified number of top champion mastery entries sorted by number of champion points descending.
661    /// # Parameters
662    /// * `route` - Route to query.
663    /// * `encrypted_puuid` (required, in path)
664    /// * `count` (optional, in query) - Number of entries to retrieve, defaults to 3.
665    /// # Riot Developer API Reference
666    /// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getTopChampionMasteriesByPUUID" target="_blank">`champion-mastery-v4.getTopChampionMasteriesByPUUID`</a>
667    ///
668    /// Note: this method is automatically generated.
669    pub fn get_top_champion_masteries_by_puuid(&self, route: PlatformRoute, encrypted_puuid: &str, count: Option<i32>)
670        -> impl Future<Output = Result<Vec<crate::models::champion_mastery_v4::ChampionMastery>>> + 'a
671    {
672        let route_str = route.into();
673        let request = self.base.request(Method::GET, route_str, &format!("/lol/champion-mastery/v4/champion-masteries/by-puuid/{}/top", encrypted_puuid));
674        let request = if let Some(count) = count { request.query(&[ ("count", count) ]) } else { request };
675        let future = self.base.execute_val::<Vec<crate::models::champion_mastery_v4::ChampionMastery>>("champion-mastery-v4.getTopChampionMasteriesByPUUID", route_str, request);
676        #[cfg(feature = "tracing")]
677        let future = future.instrument(tracing::info_span!("champion-mastery-v4.getTopChampionMasteriesByPUUID", route = route_str));
678        #[cfg(feature = "metrics")]
679        let future = metrics::timed(future, "champion-mastery-v4.getTopChampionMasteriesByPUUID", route_str);
680        future
681    }
682
683    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
684    /// See `get_top_champion_masteries_by_puuid` for detailed documentation
685    /// # Parameters
686    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
687    /// * `route` - Route to query.
688    /// * `encrypted_puuid` (required, in path)
689    /// * `count` (optional, in query) - Number of entries to retrieve, defaults to 3.
690    /// # Riot Developer API Reference
691    /// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getTopChampionMasteriesByPUUID" target="_blank">`champion-mastery-v4.getTopChampionMasteriesByPUUID`</a>
692    ///
693    /// Note: this method is automatically generated.
694    pub fn try_get_top_champion_masteries_by_puuid(&self, min_capacity: f32, route: PlatformRoute, encrypted_puuid: &str, count: Option<i32>)
695        -> impl Future<Output = TryRequestResult<Vec<crate::models::champion_mastery_v4::ChampionMastery>>> + 'a
696    {
697        let route_str = route.into();
698        let request = self.base.request(Method::GET, route_str, &format!("/lol/champion-mastery/v4/champion-masteries/by-puuid/{}/top", encrypted_puuid));
699        let request = if let Some(count) = count { request.query(&[ ("count", count) ]) } else { request };
700        let future = self.base.try_execute_val::<Vec<crate::models::champion_mastery_v4::ChampionMastery>>("champion-mastery-v4.getTopChampionMasteriesByPUUID", route_str, request, min_capacity);
701        #[cfg(feature = "tracing")]
702        let future = future.instrument(tracing::info_span!("champion-mastery-v4.getTopChampionMasteriesByPUUID", route = route_str));
703        #[cfg(feature = "metrics")]
704        let future = metrics::try_timed(future, "champion-mastery-v4.getTopChampionMasteriesByPUUID", route_str);
705        future
706    }
707
708    /// Get a player's total champion mastery score, which is the sum of individual champion mastery levels.
709    /// # Parameters
710    /// * `route` - Route to query.
711    /// * `encrypted_puuid` (required, in path)
712    /// # Riot Developer API Reference
713    /// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getChampionMasteryScoreByPUUID" target="_blank">`champion-mastery-v4.getChampionMasteryScoreByPUUID`</a>
714    ///
715    /// Note: this method is automatically generated.
716    pub fn get_champion_mastery_score_by_puuid(&self, route: PlatformRoute, encrypted_puuid: &str)
717        -> impl Future<Output = Result<i32>> + 'a
718    {
719        let route_str = route.into();
720        let request = self.base.request(Method::GET, route_str, &format!("/lol/champion-mastery/v4/scores/by-puuid/{}", encrypted_puuid));
721        let future = self.base.execute_val::<i32>("champion-mastery-v4.getChampionMasteryScoreByPUUID", route_str, request);
722        #[cfg(feature = "tracing")]
723        let future = future.instrument(tracing::info_span!("champion-mastery-v4.getChampionMasteryScoreByPUUID", route = route_str));
724        #[cfg(feature = "metrics")]
725        let future = metrics::timed(future, "champion-mastery-v4.getChampionMasteryScoreByPUUID", route_str);
726        future
727    }
728
729    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
730    /// See `get_champion_mastery_score_by_puuid` for detailed documentation
731    /// # Parameters
732    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
733    /// * `route` - Route to query.
734    /// * `encrypted_puuid` (required, in path)
735    /// # Riot Developer API Reference
736    /// <a href="https://developer.riotgames.com/api-methods/#champion-mastery-v4/GET_getChampionMasteryScoreByPUUID" target="_blank">`champion-mastery-v4.getChampionMasteryScoreByPUUID`</a>
737    ///
738    /// Note: this method is automatically generated.
739    pub fn try_get_champion_mastery_score_by_puuid(&self, min_capacity: f32, route: PlatformRoute, encrypted_puuid: &str)
740        -> impl Future<Output = TryRequestResult<i32>> + 'a
741    {
742        let route_str = route.into();
743        let request = self.base.request(Method::GET, route_str, &format!("/lol/champion-mastery/v4/scores/by-puuid/{}", encrypted_puuid));
744        let future = self.base.try_execute_val::<i32>("champion-mastery-v4.getChampionMasteryScoreByPUUID", route_str, request, min_capacity);
745        #[cfg(feature = "tracing")]
746        let future = future.instrument(tracing::info_span!("champion-mastery-v4.getChampionMasteryScoreByPUUID", route = route_str));
747        #[cfg(feature = "metrics")]
748        let future = metrics::try_timed(future, "champion-mastery-v4.getChampionMasteryScoreByPUUID", route_str);
749        future
750    }
751
752}
753
754/// ChampionV3 endpoints handle, accessed by calling [`champion_v3()`](RiotApi::champion_v3) on a [`RiotApi`] instance.
755/// # Riot Developer API Reference
756/// <a href="https://developer.riotgames.com/apis#champion-v3" target="_blank">`champion-v3`</a>
757///
758/// Note: this struct is automatically generated.
759#[repr(transparent)]
760pub struct ChampionV3<'a> {
761    base: &'a RiotApi,
762}
763impl<'a> ChampionV3<'a> {
764    /// Returns champion rotations, including free-to-play and low-level free-to-play rotations (REST)
765    /// # Parameters
766    /// * `route` - Route to query.
767    /// # Riot Developer API Reference
768    /// <a href="https://developer.riotgames.com/api-methods/#champion-v3/GET_getChampionInfo" target="_blank">`champion-v3.getChampionInfo`</a>
769    ///
770    /// Note: this method is automatically generated.
771    pub fn get_champion_info(&self, route: PlatformRoute)
772        -> impl Future<Output = Result<crate::models::champion_v3::ChampionInfo>> + 'a
773    {
774        let route_str = route.into();
775        let request = self.base.request(Method::GET, route_str, "/lol/platform/v3/champion-rotations");
776        let future = self.base.execute_val::<crate::models::champion_v3::ChampionInfo>("champion-v3.getChampionInfo", route_str, request);
777        #[cfg(feature = "tracing")]
778        let future = future.instrument(tracing::info_span!("champion-v3.getChampionInfo", route = route_str));
779        #[cfg(feature = "metrics")]
780        let future = metrics::timed(future, "champion-v3.getChampionInfo", route_str);
781        future
782    }
783
784    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
785    /// See `get_champion_info` for detailed documentation
786    /// # Parameters
787    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
788    /// * `route` - Route to query.
789    /// # Riot Developer API Reference
790    /// <a href="https://developer.riotgames.com/api-methods/#champion-v3/GET_getChampionInfo" target="_blank">`champion-v3.getChampionInfo`</a>
791    ///
792    /// Note: this method is automatically generated.
793    pub fn try_get_champion_info(&self, min_capacity: f32, route: PlatformRoute)
794        -> impl Future<Output = TryRequestResult<crate::models::champion_v3::ChampionInfo>> + 'a
795    {
796        let route_str = route.into();
797        let request = self.base.request(Method::GET, route_str, "/lol/platform/v3/champion-rotations");
798        let future = self.base.try_execute_val::<crate::models::champion_v3::ChampionInfo>("champion-v3.getChampionInfo", route_str, request, min_capacity);
799        #[cfg(feature = "tracing")]
800        let future = future.instrument(tracing::info_span!("champion-v3.getChampionInfo", route = route_str));
801        #[cfg(feature = "metrics")]
802        let future = metrics::try_timed(future, "champion-v3.getChampionInfo", route_str);
803        future
804    }
805
806}
807
808/// ClashV1 endpoints handle, accessed by calling [`clash_v1()`](RiotApi::clash_v1) on a [`RiotApi`] instance.
809/// # Riot Developer API Reference
810/// <a href="https://developer.riotgames.com/apis#clash-v1" target="_blank">`clash-v1`</a>
811///
812/// Note: this struct is automatically generated.
813#[repr(transparent)]
814pub struct ClashV1<'a> {
815    base: &'a RiotApi,
816}
817impl<'a> ClashV1<'a> {
818    /// Get players by puuid
819    /// ## Implementation Notes
820    /// This endpoint returns a list of active Clash players for a given PUUID. If a summoner registers for multiple tournaments at the same time (e.g., Saturday and Sunday) then both registrations would appear in this list.
821    /// # Parameters
822    /// * `route` - Route to query.
823    /// * `puuid` (required, in path)
824    /// # Riot Developer API Reference
825    /// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getPlayersByPUUID" target="_blank">`clash-v1.getPlayersByPUUID`</a>
826    ///
827    /// Note: this method is automatically generated.
828    pub fn get_players_by_puuid(&self, route: PlatformRoute, puuid: &str)
829        -> impl Future<Output = Result<Vec<crate::models::clash_v1::Player>>> + 'a
830    {
831        let route_str = route.into();
832        let request = self.base.request(Method::GET, route_str, &format!("/lol/clash/v1/players/by-puuid/{}", puuid));
833        let future = self.base.execute_val::<Vec<crate::models::clash_v1::Player>>("clash-v1.getPlayersByPUUID", route_str, request);
834        #[cfg(feature = "tracing")]
835        let future = future.instrument(tracing::info_span!("clash-v1.getPlayersByPUUID", route = route_str));
836        #[cfg(feature = "metrics")]
837        let future = metrics::timed(future, "clash-v1.getPlayersByPUUID", route_str);
838        future
839    }
840
841    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
842    /// See `get_players_by_puuid` for detailed documentation
843    /// # Parameters
844    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
845    /// * `route` - Route to query.
846    /// * `puuid` (required, in path)
847    /// # Riot Developer API Reference
848    /// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getPlayersByPUUID" target="_blank">`clash-v1.getPlayersByPUUID`</a>
849    ///
850    /// Note: this method is automatically generated.
851    pub fn try_get_players_by_puuid(&self, min_capacity: f32, route: PlatformRoute, puuid: &str)
852        -> impl Future<Output = TryRequestResult<Vec<crate::models::clash_v1::Player>>> + 'a
853    {
854        let route_str = route.into();
855        let request = self.base.request(Method::GET, route_str, &format!("/lol/clash/v1/players/by-puuid/{}", puuid));
856        let future = self.base.try_execute_val::<Vec<crate::models::clash_v1::Player>>("clash-v1.getPlayersByPUUID", route_str, request, min_capacity);
857        #[cfg(feature = "tracing")]
858        let future = future.instrument(tracing::info_span!("clash-v1.getPlayersByPUUID", route = route_str));
859        #[cfg(feature = "metrics")]
860        let future = metrics::try_timed(future, "clash-v1.getPlayersByPUUID", route_str);
861        future
862    }
863
864    /// Get team by ID.
865    /// # Parameters
866    /// * `route` - Route to query.
867    /// * `team_id` (required, in path)
868    /// # Riot Developer API Reference
869    /// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getTeamById" target="_blank">`clash-v1.getTeamById`</a>
870    ///
871    /// Note: this method is automatically generated.
872    pub fn get_team_by_id(&self, route: PlatformRoute, team_id: &str)
873        -> impl Future<Output = Result<Option<crate::models::clash_v1::Team>>> + 'a
874    {
875        let route_str = route.into();
876        let request = self.base.request(Method::GET, route_str, &format!("/lol/clash/v1/teams/{}", team_id));
877        let future = self.base.execute_opt::<crate::models::clash_v1::Team>("clash-v1.getTeamById", route_str, request);
878        #[cfg(feature = "tracing")]
879        let future = future.instrument(tracing::info_span!("clash-v1.getTeamById", route = route_str));
880        #[cfg(feature = "metrics")]
881        let future = metrics::timed(future, "clash-v1.getTeamById", route_str);
882        future
883    }
884
885    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
886    /// See `get_team_by_id` for detailed documentation
887    /// # Parameters
888    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
889    /// * `route` - Route to query.
890    /// * `team_id` (required, in path)
891    /// # Riot Developer API Reference
892    /// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getTeamById" target="_blank">`clash-v1.getTeamById`</a>
893    ///
894    /// Note: this method is automatically generated.
895    pub fn try_get_team_by_id(&self, min_capacity: f32, route: PlatformRoute, team_id: &str)
896        -> impl Future<Output = TryRequestResult<Option<crate::models::clash_v1::Team>>> + 'a
897    {
898        let route_str = route.into();
899        let request = self.base.request(Method::GET, route_str, &format!("/lol/clash/v1/teams/{}", team_id));
900        let future = self.base.try_execute_opt::<crate::models::clash_v1::Team>("clash-v1.getTeamById", route_str, request, min_capacity);
901        #[cfg(feature = "tracing")]
902        let future = future.instrument(tracing::info_span!("clash-v1.getTeamById", route = route_str));
903        #[cfg(feature = "metrics")]
904        let future = metrics::try_timed(future, "clash-v1.getTeamById", route_str);
905        future
906    }
907
908    /// Get all active or upcoming tournaments.
909    /// # Parameters
910    /// * `route` - Route to query.
911    /// # Riot Developer API Reference
912    /// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getTournaments" target="_blank">`clash-v1.getTournaments`</a>
913    ///
914    /// Note: this method is automatically generated.
915    pub fn get_tournaments(&self, route: PlatformRoute)
916        -> impl Future<Output = Result<Vec<crate::models::clash_v1::Tournament>>> + 'a
917    {
918        let route_str = route.into();
919        let request = self.base.request(Method::GET, route_str, "/lol/clash/v1/tournaments");
920        let future = self.base.execute_val::<Vec<crate::models::clash_v1::Tournament>>("clash-v1.getTournaments", route_str, request);
921        #[cfg(feature = "tracing")]
922        let future = future.instrument(tracing::info_span!("clash-v1.getTournaments", route = route_str));
923        #[cfg(feature = "metrics")]
924        let future = metrics::timed(future, "clash-v1.getTournaments", route_str);
925        future
926    }
927
928    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
929    /// See `get_tournaments` for detailed documentation
930    /// # Parameters
931    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
932    /// * `route` - Route to query.
933    /// # Riot Developer API Reference
934    /// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getTournaments" target="_blank">`clash-v1.getTournaments`</a>
935    ///
936    /// Note: this method is automatically generated.
937    pub fn try_get_tournaments(&self, min_capacity: f32, route: PlatformRoute)
938        -> impl Future<Output = TryRequestResult<Vec<crate::models::clash_v1::Tournament>>> + 'a
939    {
940        let route_str = route.into();
941        let request = self.base.request(Method::GET, route_str, "/lol/clash/v1/tournaments");
942        let future = self.base.try_execute_val::<Vec<crate::models::clash_v1::Tournament>>("clash-v1.getTournaments", route_str, request, min_capacity);
943        #[cfg(feature = "tracing")]
944        let future = future.instrument(tracing::info_span!("clash-v1.getTournaments", route = route_str));
945        #[cfg(feature = "metrics")]
946        let future = metrics::try_timed(future, "clash-v1.getTournaments", route_str);
947        future
948    }
949
950    /// Get tournament by team ID.
951    /// # Parameters
952    /// * `route` - Route to query.
953    /// * `team_id` (required, in path)
954    /// # Riot Developer API Reference
955    /// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getTournamentByTeam" target="_blank">`clash-v1.getTournamentByTeam`</a>
956    ///
957    /// Note: this method is automatically generated.
958    pub fn get_tournament_by_team(&self, route: PlatformRoute, team_id: &str)
959        -> impl Future<Output = Result<Option<crate::models::clash_v1::Tournament>>> + 'a
960    {
961        let route_str = route.into();
962        let request = self.base.request(Method::GET, route_str, &format!("/lol/clash/v1/tournaments/by-team/{}", team_id));
963        let future = self.base.execute_opt::<crate::models::clash_v1::Tournament>("clash-v1.getTournamentByTeam", route_str, request);
964        #[cfg(feature = "tracing")]
965        let future = future.instrument(tracing::info_span!("clash-v1.getTournamentByTeam", route = route_str));
966        #[cfg(feature = "metrics")]
967        let future = metrics::timed(future, "clash-v1.getTournamentByTeam", route_str);
968        future
969    }
970
971    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
972    /// See `get_tournament_by_team` for detailed documentation
973    /// # Parameters
974    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
975    /// * `route` - Route to query.
976    /// * `team_id` (required, in path)
977    /// # Riot Developer API Reference
978    /// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getTournamentByTeam" target="_blank">`clash-v1.getTournamentByTeam`</a>
979    ///
980    /// Note: this method is automatically generated.
981    pub fn try_get_tournament_by_team(&self, min_capacity: f32, route: PlatformRoute, team_id: &str)
982        -> impl Future<Output = TryRequestResult<Option<crate::models::clash_v1::Tournament>>> + 'a
983    {
984        let route_str = route.into();
985        let request = self.base.request(Method::GET, route_str, &format!("/lol/clash/v1/tournaments/by-team/{}", team_id));
986        let future = self.base.try_execute_opt::<crate::models::clash_v1::Tournament>("clash-v1.getTournamentByTeam", route_str, request, min_capacity);
987        #[cfg(feature = "tracing")]
988        let future = future.instrument(tracing::info_span!("clash-v1.getTournamentByTeam", route = route_str));
989        #[cfg(feature = "metrics")]
990        let future = metrics::try_timed(future, "clash-v1.getTournamentByTeam", route_str);
991        future
992    }
993
994    /// Get tournament by ID.
995    /// # Parameters
996    /// * `route` - Route to query.
997    /// * `tournament_id` (required, in path)
998    /// # Riot Developer API Reference
999    /// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getTournamentById" target="_blank">`clash-v1.getTournamentById`</a>
1000    ///
1001    /// Note: this method is automatically generated.
1002    pub fn get_tournament_by_id(&self, route: PlatformRoute, tournament_id: i32)
1003        -> impl Future<Output = Result<Option<crate::models::clash_v1::Tournament>>> + 'a
1004    {
1005        let route_str = route.into();
1006        let request = self.base.request(Method::GET, route_str, &format!("/lol/clash/v1/tournaments/{}", tournament_id));
1007        let future = self.base.execute_opt::<crate::models::clash_v1::Tournament>("clash-v1.getTournamentById", route_str, request);
1008        #[cfg(feature = "tracing")]
1009        let future = future.instrument(tracing::info_span!("clash-v1.getTournamentById", route = route_str));
1010        #[cfg(feature = "metrics")]
1011        let future = metrics::timed(future, "clash-v1.getTournamentById", route_str);
1012        future
1013    }
1014
1015    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1016    /// See `get_tournament_by_id` for detailed documentation
1017    /// # Parameters
1018    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1019    /// * `route` - Route to query.
1020    /// * `tournament_id` (required, in path)
1021    /// # Riot Developer API Reference
1022    /// <a href="https://developer.riotgames.com/api-methods/#clash-v1/GET_getTournamentById" target="_blank">`clash-v1.getTournamentById`</a>
1023    ///
1024    /// Note: this method is automatically generated.
1025    pub fn try_get_tournament_by_id(&self, min_capacity: f32, route: PlatformRoute, tournament_id: i32)
1026        -> impl Future<Output = TryRequestResult<Option<crate::models::clash_v1::Tournament>>> + 'a
1027    {
1028        let route_str = route.into();
1029        let request = self.base.request(Method::GET, route_str, &format!("/lol/clash/v1/tournaments/{}", tournament_id));
1030        let future = self.base.try_execute_opt::<crate::models::clash_v1::Tournament>("clash-v1.getTournamentById", route_str, request, min_capacity);
1031        #[cfg(feature = "tracing")]
1032        let future = future.instrument(tracing::info_span!("clash-v1.getTournamentById", route = route_str));
1033        #[cfg(feature = "metrics")]
1034        let future = metrics::try_timed(future, "clash-v1.getTournamentById", route_str);
1035        future
1036    }
1037
1038}
1039
1040/// LeagueExpV4 endpoints handle, accessed by calling [`league_exp_v4()`](RiotApi::league_exp_v4) on a [`RiotApi`] instance.
1041/// # Riot Developer API Reference
1042/// <a href="https://developer.riotgames.com/apis#league-exp-v4" target="_blank">`league-exp-v4`</a>
1043///
1044/// Note: this struct is automatically generated.
1045#[repr(transparent)]
1046pub struct LeagueExpV4<'a> {
1047    base: &'a RiotApi,
1048}
1049impl<'a> LeagueExpV4<'a> {
1050    /// Get all the league entries.
1051    /// # Parameters
1052    /// * `route` - Route to query.
1053    /// * `queue` (required, in path) - Note that the queue value must be a valid ranked queue.
1054    /// * `tier` (required, in path)
1055    /// * `division` (required, in path)
1056    /// * `page` (optional, in query) - Defaults to 1. Starts with page 1.
1057    /// # Riot Developer API Reference
1058    /// <a href="https://developer.riotgames.com/api-methods/#league-exp-v4/GET_getLeagueEntries" target="_blank">`league-exp-v4.getLeagueEntries`</a>
1059    ///
1060    /// Note: this method is automatically generated.
1061    pub fn get_league_entries(&self, route: PlatformRoute, queue: crate::consts::QueueType, tier: crate::consts::Tier, division: crate::consts::Division, page: Option<i32>)
1062        -> impl Future<Output = Result<Option<Vec<crate::models::league_exp_v4::LeagueEntry>>>> + 'a
1063    {
1064        let route_str = route.into();
1065        let request = self.base.request(Method::GET, route_str, &format!("/lol/league-exp/v4/entries/{}/{}/{}", queue, tier, division));
1066        let request = if let Some(page) = page { request.query(&[ ("page", page) ]) } else { request };
1067        let future = self.base.execute_opt::<Vec<crate::models::league_exp_v4::LeagueEntry>>("league-exp-v4.getLeagueEntries", route_str, request);
1068        #[cfg(feature = "tracing")]
1069        let future = future.instrument(tracing::info_span!("league-exp-v4.getLeagueEntries", route = route_str));
1070        #[cfg(feature = "metrics")]
1071        let future = metrics::timed(future, "league-exp-v4.getLeagueEntries", route_str);
1072        future
1073    }
1074
1075    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1076    /// See `get_league_entries` for detailed documentation
1077    /// # Parameters
1078    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1079    /// * `route` - Route to query.
1080    /// * `queue` (required, in path) - Note that the queue value must be a valid ranked queue.
1081    /// * `tier` (required, in path)
1082    /// * `division` (required, in path)
1083    /// * `page` (optional, in query) - Defaults to 1. Starts with page 1.
1084    /// # Riot Developer API Reference
1085    /// <a href="https://developer.riotgames.com/api-methods/#league-exp-v4/GET_getLeagueEntries" target="_blank">`league-exp-v4.getLeagueEntries`</a>
1086    ///
1087    /// Note: this method is automatically generated.
1088    pub fn try_get_league_entries(&self, min_capacity: f32, route: PlatformRoute, queue: crate::consts::QueueType, tier: crate::consts::Tier, division: crate::consts::Division, page: Option<i32>)
1089        -> impl Future<Output = TryRequestResult<Option<Vec<crate::models::league_exp_v4::LeagueEntry>>>> + 'a
1090    {
1091        let route_str = route.into();
1092        let request = self.base.request(Method::GET, route_str, &format!("/lol/league-exp/v4/entries/{}/{}/{}", queue, tier, division));
1093        let request = if let Some(page) = page { request.query(&[ ("page", page) ]) } else { request };
1094        let future = self.base.try_execute_opt::<Vec<crate::models::league_exp_v4::LeagueEntry>>("league-exp-v4.getLeagueEntries", route_str, request, min_capacity);
1095        #[cfg(feature = "tracing")]
1096        let future = future.instrument(tracing::info_span!("league-exp-v4.getLeagueEntries", route = route_str));
1097        #[cfg(feature = "metrics")]
1098        let future = metrics::try_timed(future, "league-exp-v4.getLeagueEntries", route_str);
1099        future
1100    }
1101
1102}
1103
1104/// LeagueV4 endpoints handle, accessed by calling [`league_v4()`](RiotApi::league_v4) on a [`RiotApi`] instance.
1105/// # Riot Developer API Reference
1106/// <a href="https://developer.riotgames.com/apis#league-v4" target="_blank">`league-v4`</a>
1107///
1108/// Note: this struct is automatically generated.
1109#[repr(transparent)]
1110pub struct LeagueV4<'a> {
1111    base: &'a RiotApi,
1112}
1113impl<'a> LeagueV4<'a> {
1114    /// Get the challenger league for given queue.
1115    /// # Parameters
1116    /// * `route` - Route to query.
1117    /// * `queue` (required, in path)
1118    /// # Riot Developer API Reference
1119    /// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getChallengerLeague" target="_blank">`league-v4.getChallengerLeague`</a>
1120    ///
1121    /// Note: this method is automatically generated.
1122    pub fn get_challenger_league(&self, route: PlatformRoute, queue: crate::consts::QueueType)
1123        -> impl Future<Output = Result<crate::models::league_v4::LeagueList>> + 'a
1124    {
1125        let route_str = route.into();
1126        let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/challengerleagues/by-queue/{}", queue));
1127        let future = self.base.execute_val::<crate::models::league_v4::LeagueList>("league-v4.getChallengerLeague", route_str, request);
1128        #[cfg(feature = "tracing")]
1129        let future = future.instrument(tracing::info_span!("league-v4.getChallengerLeague", route = route_str));
1130        #[cfg(feature = "metrics")]
1131        let future = metrics::timed(future, "league-v4.getChallengerLeague", route_str);
1132        future
1133    }
1134
1135    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1136    /// See `get_challenger_league` for detailed documentation
1137    /// # Parameters
1138    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1139    /// * `route` - Route to query.
1140    /// * `queue` (required, in path)
1141    /// # Riot Developer API Reference
1142    /// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getChallengerLeague" target="_blank">`league-v4.getChallengerLeague`</a>
1143    ///
1144    /// Note: this method is automatically generated.
1145    pub fn try_get_challenger_league(&self, min_capacity: f32, route: PlatformRoute, queue: crate::consts::QueueType)
1146        -> impl Future<Output = TryRequestResult<crate::models::league_v4::LeagueList>> + 'a
1147    {
1148        let route_str = route.into();
1149        let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/challengerleagues/by-queue/{}", queue));
1150        let future = self.base.try_execute_val::<crate::models::league_v4::LeagueList>("league-v4.getChallengerLeague", route_str, request, min_capacity);
1151        #[cfg(feature = "tracing")]
1152        let future = future.instrument(tracing::info_span!("league-v4.getChallengerLeague", route = route_str));
1153        #[cfg(feature = "metrics")]
1154        let future = metrics::try_timed(future, "league-v4.getChallengerLeague", route_str);
1155        future
1156    }
1157
1158    /// Get league entries in all queues for a given puuid
1159    /// # Parameters
1160    /// * `route` - Route to query.
1161    /// * `encrypted_puuid` (required, in path)
1162    /// # Riot Developer API Reference
1163    /// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getLeagueEntriesByPUUID" target="_blank">`league-v4.getLeagueEntriesByPUUID`</a>
1164    ///
1165    /// Note: this method is automatically generated.
1166    pub fn get_league_entries_by_puuid(&self, route: PlatformRoute, encrypted_puuid: &str)
1167        -> impl Future<Output = Result<Vec<crate::models::league_v4::LeagueEntry>>> + 'a
1168    {
1169        let route_str = route.into();
1170        let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/entries/by-puuid/{}", encrypted_puuid));
1171        let future = self.base.execute_val::<Vec<crate::models::league_v4::LeagueEntry>>("league-v4.getLeagueEntriesByPUUID", route_str, request);
1172        #[cfg(feature = "tracing")]
1173        let future = future.instrument(tracing::info_span!("league-v4.getLeagueEntriesByPUUID", route = route_str));
1174        #[cfg(feature = "metrics")]
1175        let future = metrics::timed(future, "league-v4.getLeagueEntriesByPUUID", route_str);
1176        future
1177    }
1178
1179    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1180    /// See `get_league_entries_by_puuid` for detailed documentation
1181    /// # Parameters
1182    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1183    /// * `route` - Route to query.
1184    /// * `encrypted_puuid` (required, in path)
1185    /// # Riot Developer API Reference
1186    /// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getLeagueEntriesByPUUID" target="_blank">`league-v4.getLeagueEntriesByPUUID`</a>
1187    ///
1188    /// Note: this method is automatically generated.
1189    pub fn try_get_league_entries_by_puuid(&self, min_capacity: f32, route: PlatformRoute, encrypted_puuid: &str)
1190        -> impl Future<Output = TryRequestResult<Vec<crate::models::league_v4::LeagueEntry>>> + 'a
1191    {
1192        let route_str = route.into();
1193        let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/entries/by-puuid/{}", encrypted_puuid));
1194        let future = self.base.try_execute_val::<Vec<crate::models::league_v4::LeagueEntry>>("league-v4.getLeagueEntriesByPUUID", route_str, request, min_capacity);
1195        #[cfg(feature = "tracing")]
1196        let future = future.instrument(tracing::info_span!("league-v4.getLeagueEntriesByPUUID", route = route_str));
1197        #[cfg(feature = "metrics")]
1198        let future = metrics::try_timed(future, "league-v4.getLeagueEntriesByPUUID", route_str);
1199        future
1200    }
1201
1202    /// Get all the league entries.
1203    /// # Parameters
1204    /// * `route` - Route to query.
1205    /// * `division` (required, in path)
1206    /// * `tier` (required, in path)
1207    /// * `queue` (required, in path) - Note that the queue value must be a valid ranked queue.
1208    /// * `page` (optional, in query) - Defaults to 1. Starts with page 1.
1209    /// # Riot Developer API Reference
1210    /// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getLeagueEntries" target="_blank">`league-v4.getLeagueEntries`</a>
1211    ///
1212    /// Note: this method is automatically generated.
1213    pub fn get_league_entries(&self, route: PlatformRoute, queue: crate::consts::QueueType, tier: crate::consts::Tier, division: crate::consts::Division, page: Option<i32>)
1214        -> impl Future<Output = Result<Option<Vec<crate::models::league_v4::LeagueEntry>>>> + 'a
1215    {
1216        let route_str = route.into();
1217        let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/entries/{}/{}/{}", queue, tier, division));
1218        let request = if let Some(page) = page { request.query(&[ ("page", page) ]) } else { request };
1219        let future = self.base.execute_opt::<Vec<crate::models::league_v4::LeagueEntry>>("league-v4.getLeagueEntries", route_str, request);
1220        #[cfg(feature = "tracing")]
1221        let future = future.instrument(tracing::info_span!("league-v4.getLeagueEntries", route = route_str));
1222        #[cfg(feature = "metrics")]
1223        let future = metrics::timed(future, "league-v4.getLeagueEntries", route_str);
1224        future
1225    }
1226
1227    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1228    /// See `get_league_entries` for detailed documentation
1229    /// # Parameters
1230    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1231    /// * `route` - Route to query.
1232    /// * `division` (required, in path)
1233    /// * `tier` (required, in path)
1234    /// * `queue` (required, in path) - Note that the queue value must be a valid ranked queue.
1235    /// * `page` (optional, in query) - Defaults to 1. Starts with page 1.
1236    /// # Riot Developer API Reference
1237    /// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getLeagueEntries" target="_blank">`league-v4.getLeagueEntries`</a>
1238    ///
1239    /// Note: this method is automatically generated.
1240    pub fn try_get_league_entries(&self, min_capacity: f32, route: PlatformRoute, queue: crate::consts::QueueType, tier: crate::consts::Tier, division: crate::consts::Division, page: Option<i32>)
1241        -> impl Future<Output = TryRequestResult<Option<Vec<crate::models::league_v4::LeagueEntry>>>> + 'a
1242    {
1243        let route_str = route.into();
1244        let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/entries/{}/{}/{}", queue, tier, division));
1245        let request = if let Some(page) = page { request.query(&[ ("page", page) ]) } else { request };
1246        let future = self.base.try_execute_opt::<Vec<crate::models::league_v4::LeagueEntry>>("league-v4.getLeagueEntries", route_str, request, min_capacity);
1247        #[cfg(feature = "tracing")]
1248        let future = future.instrument(tracing::info_span!("league-v4.getLeagueEntries", route = route_str));
1249        #[cfg(feature = "metrics")]
1250        let future = metrics::try_timed(future, "league-v4.getLeagueEntries", route_str);
1251        future
1252    }
1253
1254    /// Get the grandmaster league of a specific queue.
1255    /// # Parameters
1256    /// * `route` - Route to query.
1257    /// * `queue` (required, in path)
1258    /// # Riot Developer API Reference
1259    /// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getGrandmasterLeague" target="_blank">`league-v4.getGrandmasterLeague`</a>
1260    ///
1261    /// Note: this method is automatically generated.
1262    pub fn get_grandmaster_league(&self, route: PlatformRoute, queue: crate::consts::QueueType)
1263        -> impl Future<Output = Result<crate::models::league_v4::LeagueList>> + 'a
1264    {
1265        let route_str = route.into();
1266        let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/grandmasterleagues/by-queue/{}", queue));
1267        let future = self.base.execute_val::<crate::models::league_v4::LeagueList>("league-v4.getGrandmasterLeague", route_str, request);
1268        #[cfg(feature = "tracing")]
1269        let future = future.instrument(tracing::info_span!("league-v4.getGrandmasterLeague", route = route_str));
1270        #[cfg(feature = "metrics")]
1271        let future = metrics::timed(future, "league-v4.getGrandmasterLeague", route_str);
1272        future
1273    }
1274
1275    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1276    /// See `get_grandmaster_league` for detailed documentation
1277    /// # Parameters
1278    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1279    /// * `route` - Route to query.
1280    /// * `queue` (required, in path)
1281    /// # Riot Developer API Reference
1282    /// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getGrandmasterLeague" target="_blank">`league-v4.getGrandmasterLeague`</a>
1283    ///
1284    /// Note: this method is automatically generated.
1285    pub fn try_get_grandmaster_league(&self, min_capacity: f32, route: PlatformRoute, queue: crate::consts::QueueType)
1286        -> impl Future<Output = TryRequestResult<crate::models::league_v4::LeagueList>> + 'a
1287    {
1288        let route_str = route.into();
1289        let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/grandmasterleagues/by-queue/{}", queue));
1290        let future = self.base.try_execute_val::<crate::models::league_v4::LeagueList>("league-v4.getGrandmasterLeague", route_str, request, min_capacity);
1291        #[cfg(feature = "tracing")]
1292        let future = future.instrument(tracing::info_span!("league-v4.getGrandmasterLeague", route = route_str));
1293        #[cfg(feature = "metrics")]
1294        let future = metrics::try_timed(future, "league-v4.getGrandmasterLeague", route_str);
1295        future
1296    }
1297
1298    /// Get league with given ID, including inactive entries.
1299    /// # Parameters
1300    /// * `route` - Route to query.
1301    /// * `league_id` (required, in path) - The UUID of the league.
1302    /// # Riot Developer API Reference
1303    /// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getLeagueById" target="_blank">`league-v4.getLeagueById`</a>
1304    ///
1305    /// Note: this method is automatically generated.
1306    pub fn get_league_by_id(&self, route: PlatformRoute, league_id: &str)
1307        -> impl Future<Output = Result<Option<crate::models::league_v4::LeagueList>>> + 'a
1308    {
1309        let route_str = route.into();
1310        let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/leagues/{}", league_id));
1311        let future = self.base.execute_opt::<crate::models::league_v4::LeagueList>("league-v4.getLeagueById", route_str, request);
1312        #[cfg(feature = "tracing")]
1313        let future = future.instrument(tracing::info_span!("league-v4.getLeagueById", route = route_str));
1314        #[cfg(feature = "metrics")]
1315        let future = metrics::timed(future, "league-v4.getLeagueById", route_str);
1316        future
1317    }
1318
1319    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1320    /// See `get_league_by_id` for detailed documentation
1321    /// # Parameters
1322    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1323    /// * `route` - Route to query.
1324    /// * `league_id` (required, in path) - The UUID of the league.
1325    /// # Riot Developer API Reference
1326    /// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getLeagueById" target="_blank">`league-v4.getLeagueById`</a>
1327    ///
1328    /// Note: this method is automatically generated.
1329    pub fn try_get_league_by_id(&self, min_capacity: f32, route: PlatformRoute, league_id: &str)
1330        -> impl Future<Output = TryRequestResult<Option<crate::models::league_v4::LeagueList>>> + 'a
1331    {
1332        let route_str = route.into();
1333        let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/leagues/{}", league_id));
1334        let future = self.base.try_execute_opt::<crate::models::league_v4::LeagueList>("league-v4.getLeagueById", route_str, request, min_capacity);
1335        #[cfg(feature = "tracing")]
1336        let future = future.instrument(tracing::info_span!("league-v4.getLeagueById", route = route_str));
1337        #[cfg(feature = "metrics")]
1338        let future = metrics::try_timed(future, "league-v4.getLeagueById", route_str);
1339        future
1340    }
1341
1342    /// Get the master league for given queue.
1343    /// # Parameters
1344    /// * `route` - Route to query.
1345    /// * `queue` (required, in path)
1346    /// # Riot Developer API Reference
1347    /// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getMasterLeague" target="_blank">`league-v4.getMasterLeague`</a>
1348    ///
1349    /// Note: this method is automatically generated.
1350    pub fn get_master_league(&self, route: PlatformRoute, queue: crate::consts::QueueType)
1351        -> impl Future<Output = Result<crate::models::league_v4::LeagueList>> + 'a
1352    {
1353        let route_str = route.into();
1354        let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/masterleagues/by-queue/{}", queue));
1355        let future = self.base.execute_val::<crate::models::league_v4::LeagueList>("league-v4.getMasterLeague", route_str, request);
1356        #[cfg(feature = "tracing")]
1357        let future = future.instrument(tracing::info_span!("league-v4.getMasterLeague", route = route_str));
1358        #[cfg(feature = "metrics")]
1359        let future = metrics::timed(future, "league-v4.getMasterLeague", route_str);
1360        future
1361    }
1362
1363    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1364    /// See `get_master_league` for detailed documentation
1365    /// # Parameters
1366    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1367    /// * `route` - Route to query.
1368    /// * `queue` (required, in path)
1369    /// # Riot Developer API Reference
1370    /// <a href="https://developer.riotgames.com/api-methods/#league-v4/GET_getMasterLeague" target="_blank">`league-v4.getMasterLeague`</a>
1371    ///
1372    /// Note: this method is automatically generated.
1373    pub fn try_get_master_league(&self, min_capacity: f32, route: PlatformRoute, queue: crate::consts::QueueType)
1374        -> impl Future<Output = TryRequestResult<crate::models::league_v4::LeagueList>> + 'a
1375    {
1376        let route_str = route.into();
1377        let request = self.base.request(Method::GET, route_str, &format!("/lol/league/v4/masterleagues/by-queue/{}", queue));
1378        let future = self.base.try_execute_val::<crate::models::league_v4::LeagueList>("league-v4.getMasterLeague", route_str, request, min_capacity);
1379        #[cfg(feature = "tracing")]
1380        let future = future.instrument(tracing::info_span!("league-v4.getMasterLeague", route = route_str));
1381        #[cfg(feature = "metrics")]
1382        let future = metrics::try_timed(future, "league-v4.getMasterLeague", route_str);
1383        future
1384    }
1385
1386}
1387
1388/// LolChallengesV1 endpoints handle, accessed by calling [`lol_challenges_v1()`](RiotApi::lol_challenges_v1) on a [`RiotApi`] instance.
1389/// # Riot Developer API Reference
1390/// <a href="https://developer.riotgames.com/apis#lol-challenges-v1" target="_blank">`lol-challenges-v1`</a>
1391///
1392/// Note: this struct is automatically generated.
1393#[repr(transparent)]
1394pub struct LolChallengesV1<'a> {
1395    base: &'a RiotApi,
1396}
1397impl<'a> LolChallengesV1<'a> {
1398    /// List of all basic challenge configuration information (includes all translations for names and descriptions)
1399    /// # Parameters
1400    /// * `route` - Route to query.
1401    /// # Riot Developer API Reference
1402    /// <a href="https://developer.riotgames.com/api-methods/#lol-challenges-v1/GET_getAllChallengeConfigs" target="_blank">`lol-challenges-v1.getAllChallengeConfigs`</a>
1403    ///
1404    /// Note: this method is automatically generated.
1405    pub fn get_all_challenge_configs(&self, route: PlatformRoute)
1406        -> impl Future<Output = Result<Vec<crate::models::lol_challenges_v1::ChallengeConfigInfo>>> + 'a
1407    {
1408        let route_str = route.into();
1409        let request = self.base.request(Method::GET, route_str, "/lol/challenges/v1/challenges/config");
1410        let future = self.base.execute_val::<Vec<crate::models::lol_challenges_v1::ChallengeConfigInfo>>("lol-challenges-v1.getAllChallengeConfigs", route_str, request);
1411        #[cfg(feature = "tracing")]
1412        let future = future.instrument(tracing::info_span!("lol-challenges-v1.getAllChallengeConfigs", route = route_str));
1413        #[cfg(feature = "metrics")]
1414        let future = metrics::timed(future, "lol-challenges-v1.getAllChallengeConfigs", route_str);
1415        future
1416    }
1417
1418    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1419    /// See `get_all_challenge_configs` for detailed documentation
1420    /// # Parameters
1421    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1422    /// * `route` - Route to query.
1423    /// # Riot Developer API Reference
1424    /// <a href="https://developer.riotgames.com/api-methods/#lol-challenges-v1/GET_getAllChallengeConfigs" target="_blank">`lol-challenges-v1.getAllChallengeConfigs`</a>
1425    ///
1426    /// Note: this method is automatically generated.
1427    pub fn try_get_all_challenge_configs(&self, min_capacity: f32, route: PlatformRoute)
1428        -> impl Future<Output = TryRequestResult<Vec<crate::models::lol_challenges_v1::ChallengeConfigInfo>>> + 'a
1429    {
1430        let route_str = route.into();
1431        let request = self.base.request(Method::GET, route_str, "/lol/challenges/v1/challenges/config");
1432        let future = self.base.try_execute_val::<Vec<crate::models::lol_challenges_v1::ChallengeConfigInfo>>("lol-challenges-v1.getAllChallengeConfigs", route_str, request, min_capacity);
1433        #[cfg(feature = "tracing")]
1434        let future = future.instrument(tracing::info_span!("lol-challenges-v1.getAllChallengeConfigs", route = route_str));
1435        #[cfg(feature = "metrics")]
1436        let future = metrics::try_timed(future, "lol-challenges-v1.getAllChallengeConfigs", route_str);
1437        future
1438    }
1439
1440    /// Map of level to percentile of players who have achieved it - keys: ChallengeId -> Season -> Level -> percentile of players who achieved it
1441    /// # Parameters
1442    /// * `route` - Route to query.
1443    /// # Riot Developer API Reference
1444    /// <a href="https://developer.riotgames.com/api-methods/#lol-challenges-v1/GET_getAllChallengePercentiles" target="_blank">`lol-challenges-v1.getAllChallengePercentiles`</a>
1445    ///
1446    /// Note: this method is automatically generated.
1447    pub fn get_all_challenge_percentiles(&self, route: PlatformRoute)
1448        -> impl Future<Output = Result<std::collections::HashMap<i64, std::collections::HashMap<crate::consts::Tier, f64>>>> + 'a
1449    {
1450        let route_str = route.into();
1451        let request = self.base.request(Method::GET, route_str, "/lol/challenges/v1/challenges/percentiles");
1452        let future = self.base.execute_val::<std::collections::HashMap<i64, std::collections::HashMap<crate::consts::Tier, f64>>>("lol-challenges-v1.getAllChallengePercentiles", route_str, request);
1453        #[cfg(feature = "tracing")]
1454        let future = future.instrument(tracing::info_span!("lol-challenges-v1.getAllChallengePercentiles", route = route_str));
1455        #[cfg(feature = "metrics")]
1456        let future = metrics::timed(future, "lol-challenges-v1.getAllChallengePercentiles", route_str);
1457        future
1458    }
1459
1460    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1461    /// See `get_all_challenge_percentiles` for detailed documentation
1462    /// # Parameters
1463    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1464    /// * `route` - Route to query.
1465    /// # Riot Developer API Reference
1466    /// <a href="https://developer.riotgames.com/api-methods/#lol-challenges-v1/GET_getAllChallengePercentiles" target="_blank">`lol-challenges-v1.getAllChallengePercentiles`</a>
1467    ///
1468    /// Note: this method is automatically generated.
1469    pub fn try_get_all_challenge_percentiles(&self, min_capacity: f32, route: PlatformRoute)
1470        -> impl Future<Output = TryRequestResult<std::collections::HashMap<i64, std::collections::HashMap<crate::consts::Tier, f64>>>> + 'a
1471    {
1472        let route_str = route.into();
1473        let request = self.base.request(Method::GET, route_str, "/lol/challenges/v1/challenges/percentiles");
1474        let future = self.base.try_execute_val::<std::collections::HashMap<i64, std::collections::HashMap<crate::consts::Tier, f64>>>("lol-challenges-v1.getAllChallengePercentiles", route_str, request, min_capacity);
1475        #[cfg(feature = "tracing")]
1476        let future = future.instrument(tracing::info_span!("lol-challenges-v1.getAllChallengePercentiles", route = route_str));
1477        #[cfg(feature = "metrics")]
1478        let future = metrics::try_timed(future, "lol-challenges-v1.getAllChallengePercentiles", route_str);
1479        future
1480    }
1481
1482    /// Get challenge configuration (REST)
1483    /// # Parameters
1484    /// * `route` - Route to query.
1485    /// * `challenge_id` (required, in path)
1486    /// # Riot Developer API Reference
1487    /// <a href="https://developer.riotgames.com/api-methods/#lol-challenges-v1/GET_getChallengeConfigs" target="_blank">`lol-challenges-v1.getChallengeConfigs`</a>
1488    ///
1489    /// Note: this method is automatically generated.
1490    pub fn get_challenge_configs(&self, route: PlatformRoute, challenge_id: i64)
1491        -> impl Future<Output = Result<Option<crate::models::lol_challenges_v1::ChallengeConfigInfo>>> + 'a
1492    {
1493        let route_str = route.into();
1494        let request = self.base.request(Method::GET, route_str, &format!("/lol/challenges/v1/challenges/{}/config", challenge_id));
1495        let future = self.base.execute_opt::<crate::models::lol_challenges_v1::ChallengeConfigInfo>("lol-challenges-v1.getChallengeConfigs", route_str, request);
1496        #[cfg(feature = "tracing")]
1497        let future = future.instrument(tracing::info_span!("lol-challenges-v1.getChallengeConfigs", route = route_str));
1498        #[cfg(feature = "metrics")]
1499        let future = metrics::timed(future, "lol-challenges-v1.getChallengeConfigs", route_str);
1500        future
1501    }
1502
1503    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1504    /// See `get_challenge_configs` for detailed documentation
1505    /// # Parameters
1506    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1507    /// * `route` - Route to query.
1508    /// * `challenge_id` (required, in path)
1509    /// # Riot Developer API Reference
1510    /// <a href="https://developer.riotgames.com/api-methods/#lol-challenges-v1/GET_getChallengeConfigs" target="_blank">`lol-challenges-v1.getChallengeConfigs`</a>
1511    ///
1512    /// Note: this method is automatically generated.
1513    pub fn try_get_challenge_configs(&self, min_capacity: f32, route: PlatformRoute, challenge_id: i64)
1514        -> impl Future<Output = TryRequestResult<Option<crate::models::lol_challenges_v1::ChallengeConfigInfo>>> + 'a
1515    {
1516        let route_str = route.into();
1517        let request = self.base.request(Method::GET, route_str, &format!("/lol/challenges/v1/challenges/{}/config", challenge_id));
1518        let future = self.base.try_execute_opt::<crate::models::lol_challenges_v1::ChallengeConfigInfo>("lol-challenges-v1.getChallengeConfigs", route_str, request, min_capacity);
1519        #[cfg(feature = "tracing")]
1520        let future = future.instrument(tracing::info_span!("lol-challenges-v1.getChallengeConfigs", route = route_str));
1521        #[cfg(feature = "metrics")]
1522        let future = metrics::try_timed(future, "lol-challenges-v1.getChallengeConfigs", route_str);
1523        future
1524    }
1525
1526    /// Return top players for each level. Level must be MASTER, GRANDMASTER or CHALLENGER.
1527    /// # Parameters
1528    /// * `route` - Route to query.
1529    /// * `level` (required, in path)
1530    /// * `challenge_id` (required, in path)
1531    /// * `limit` (optional, in query)
1532    /// # Riot Developer API Reference
1533    /// <a href="https://developer.riotgames.com/api-methods/#lol-challenges-v1/GET_getChallengeLeaderboards" target="_blank">`lol-challenges-v1.getChallengeLeaderboards`</a>
1534    ///
1535    /// Note: this method is automatically generated.
1536    pub fn get_challenge_leaderboards(&self, route: PlatformRoute, challenge_id: i64, level: crate::consts::Tier, limit: Option<i32>)
1537        -> impl Future<Output = Result<Option<Vec<crate::models::lol_challenges_v1::ApexPlayerInfo>>>> + 'a
1538    {
1539        let route_str = route.into();
1540        let request = self.base.request(Method::GET, route_str, &format!("/lol/challenges/v1/challenges/{}/leaderboards/by-level/{}", challenge_id, level));
1541        let request = if let Some(limit) = limit { request.query(&[ ("limit", limit) ]) } else { request };
1542        let future = self.base.execute_opt::<Vec<crate::models::lol_challenges_v1::ApexPlayerInfo>>("lol-challenges-v1.getChallengeLeaderboards", route_str, request);
1543        #[cfg(feature = "tracing")]
1544        let future = future.instrument(tracing::info_span!("lol-challenges-v1.getChallengeLeaderboards", route = route_str));
1545        #[cfg(feature = "metrics")]
1546        let future = metrics::timed(future, "lol-challenges-v1.getChallengeLeaderboards", route_str);
1547        future
1548    }
1549
1550    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1551    /// See `get_challenge_leaderboards` for detailed documentation
1552    /// # Parameters
1553    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1554    /// * `route` - Route to query.
1555    /// * `level` (required, in path)
1556    /// * `challenge_id` (required, in path)
1557    /// * `limit` (optional, in query)
1558    /// # Riot Developer API Reference
1559    /// <a href="https://developer.riotgames.com/api-methods/#lol-challenges-v1/GET_getChallengeLeaderboards" target="_blank">`lol-challenges-v1.getChallengeLeaderboards`</a>
1560    ///
1561    /// Note: this method is automatically generated.
1562    pub fn try_get_challenge_leaderboards(&self, min_capacity: f32, route: PlatformRoute, challenge_id: i64, level: crate::consts::Tier, limit: Option<i32>)
1563        -> impl Future<Output = TryRequestResult<Option<Vec<crate::models::lol_challenges_v1::ApexPlayerInfo>>>> + 'a
1564    {
1565        let route_str = route.into();
1566        let request = self.base.request(Method::GET, route_str, &format!("/lol/challenges/v1/challenges/{}/leaderboards/by-level/{}", challenge_id, level));
1567        let request = if let Some(limit) = limit { request.query(&[ ("limit", limit) ]) } else { request };
1568        let future = self.base.try_execute_opt::<Vec<crate::models::lol_challenges_v1::ApexPlayerInfo>>("lol-challenges-v1.getChallengeLeaderboards", route_str, request, min_capacity);
1569        #[cfg(feature = "tracing")]
1570        let future = future.instrument(tracing::info_span!("lol-challenges-v1.getChallengeLeaderboards", route = route_str));
1571        #[cfg(feature = "metrics")]
1572        let future = metrics::try_timed(future, "lol-challenges-v1.getChallengeLeaderboards", route_str);
1573        future
1574    }
1575
1576    /// Map of level to percentile of players who have achieved it
1577    /// # Parameters
1578    /// * `route` - Route to query.
1579    /// * `challenge_id` (required, in path)
1580    /// # Riot Developer API Reference
1581    /// <a href="https://developer.riotgames.com/api-methods/#lol-challenges-v1/GET_getChallengePercentiles" target="_blank">`lol-challenges-v1.getChallengePercentiles`</a>
1582    ///
1583    /// Note: this method is automatically generated.
1584    pub fn get_challenge_percentiles(&self, route: PlatformRoute, challenge_id: i64)
1585        -> impl Future<Output = Result<Option<std::collections::HashMap<crate::consts::Tier, f64>>>> + 'a
1586    {
1587        let route_str = route.into();
1588        let request = self.base.request(Method::GET, route_str, &format!("/lol/challenges/v1/challenges/{}/percentiles", challenge_id));
1589        let future = self.base.execute_opt::<std::collections::HashMap<crate::consts::Tier, f64>>("lol-challenges-v1.getChallengePercentiles", route_str, request);
1590        #[cfg(feature = "tracing")]
1591        let future = future.instrument(tracing::info_span!("lol-challenges-v1.getChallengePercentiles", route = route_str));
1592        #[cfg(feature = "metrics")]
1593        let future = metrics::timed(future, "lol-challenges-v1.getChallengePercentiles", route_str);
1594        future
1595    }
1596
1597    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1598    /// See `get_challenge_percentiles` for detailed documentation
1599    /// # Parameters
1600    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1601    /// * `route` - Route to query.
1602    /// * `challenge_id` (required, in path)
1603    /// # Riot Developer API Reference
1604    /// <a href="https://developer.riotgames.com/api-methods/#lol-challenges-v1/GET_getChallengePercentiles" target="_blank">`lol-challenges-v1.getChallengePercentiles`</a>
1605    ///
1606    /// Note: this method is automatically generated.
1607    pub fn try_get_challenge_percentiles(&self, min_capacity: f32, route: PlatformRoute, challenge_id: i64)
1608        -> impl Future<Output = TryRequestResult<Option<std::collections::HashMap<crate::consts::Tier, f64>>>> + 'a
1609    {
1610        let route_str = route.into();
1611        let request = self.base.request(Method::GET, route_str, &format!("/lol/challenges/v1/challenges/{}/percentiles", challenge_id));
1612        let future = self.base.try_execute_opt::<std::collections::HashMap<crate::consts::Tier, f64>>("lol-challenges-v1.getChallengePercentiles", route_str, request, min_capacity);
1613        #[cfg(feature = "tracing")]
1614        let future = future.instrument(tracing::info_span!("lol-challenges-v1.getChallengePercentiles", route = route_str));
1615        #[cfg(feature = "metrics")]
1616        let future = metrics::try_timed(future, "lol-challenges-v1.getChallengePercentiles", route_str);
1617        future
1618    }
1619
1620    /// Returns player information with list of all progressed challenges (REST)
1621    /// # Parameters
1622    /// * `route` - Route to query.
1623    /// * `puuid` (required, in path)
1624    /// # Riot Developer API Reference
1625    /// <a href="https://developer.riotgames.com/api-methods/#lol-challenges-v1/GET_getPlayerData" target="_blank">`lol-challenges-v1.getPlayerData`</a>
1626    ///
1627    /// Note: this method is automatically generated.
1628    pub fn get_player_data(&self, route: PlatformRoute, puuid: &str)
1629        -> impl Future<Output = Result<crate::models::lol_challenges_v1::PlayerInfo>> + 'a
1630    {
1631        let route_str = route.into();
1632        let request = self.base.request(Method::GET, route_str, &format!("/lol/challenges/v1/player-data/{}", puuid));
1633        let future = self.base.execute_val::<crate::models::lol_challenges_v1::PlayerInfo>("lol-challenges-v1.getPlayerData", route_str, request);
1634        #[cfg(feature = "tracing")]
1635        let future = future.instrument(tracing::info_span!("lol-challenges-v1.getPlayerData", route = route_str));
1636        #[cfg(feature = "metrics")]
1637        let future = metrics::timed(future, "lol-challenges-v1.getPlayerData", route_str);
1638        future
1639    }
1640
1641    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1642    /// See `get_player_data` for detailed documentation
1643    /// # Parameters
1644    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1645    /// * `route` - Route to query.
1646    /// * `puuid` (required, in path)
1647    /// # Riot Developer API Reference
1648    /// <a href="https://developer.riotgames.com/api-methods/#lol-challenges-v1/GET_getPlayerData" target="_blank">`lol-challenges-v1.getPlayerData`</a>
1649    ///
1650    /// Note: this method is automatically generated.
1651    pub fn try_get_player_data(&self, min_capacity: f32, route: PlatformRoute, puuid: &str)
1652        -> impl Future<Output = TryRequestResult<crate::models::lol_challenges_v1::PlayerInfo>> + 'a
1653    {
1654        let route_str = route.into();
1655        let request = self.base.request(Method::GET, route_str, &format!("/lol/challenges/v1/player-data/{}", puuid));
1656        let future = self.base.try_execute_val::<crate::models::lol_challenges_v1::PlayerInfo>("lol-challenges-v1.getPlayerData", route_str, request, min_capacity);
1657        #[cfg(feature = "tracing")]
1658        let future = future.instrument(tracing::info_span!("lol-challenges-v1.getPlayerData", route = route_str));
1659        #[cfg(feature = "metrics")]
1660        let future = metrics::try_timed(future, "lol-challenges-v1.getPlayerData", route_str);
1661        future
1662    }
1663
1664}
1665
1666/// LolRsoMatchV1 endpoints handle, accessed by calling [`lol_rso_match_v1()`](RiotApi::lol_rso_match_v1) on a [`RiotApi`] instance.
1667/// # Riot Developer API Reference
1668/// <a href="https://developer.riotgames.com/apis#lol-rso-match-v1" target="_blank">`lol-rso-match-v1`</a>
1669///
1670/// Note: this struct is automatically generated.
1671#[repr(transparent)]
1672pub struct LolRsoMatchV1<'a> {
1673    base: &'a RiotApi,
1674}
1675impl<'a> LolRsoMatchV1<'a> {
1676    /// Get a list of match ids by player access token - Includes custom matches
1677    /// # Parameters
1678    /// * `route` - Route to query.
1679    /// * `access_token` - RSO access token.
1680    /// * `count` (optional, in query) - Defaults to 20. Valid values: 0 to 100. Number of match ids to return.
1681    /// * `start` (optional, in query) - Defaults to 0. Start index.
1682    /// * `type` (optional, in query) - Filter the list of match ids by the type of match. This filter is mutually inclusive of the queue filter meaning any match ids returned must match both the queue and type filters.
1683    /// * `queue` (optional, in query) - Filter the list of match ids by a specific queue id. This filter is mutually inclusive of the type filter meaning any match ids returned must match both the queue and type filters.
1684    /// * `end_time` (optional, in query) - Epoch timestamp in seconds.
1685    /// * `start_time` (optional, in query) - Epoch timestamp in seconds. The matchlist started storing timestamps on June 16th, 2021. Any matches played before June 16th, 2021 won't be included in the results if the startTime filter is set.
1686    /// # RSO
1687    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
1688    /// via the `access_token` parameter, instead of the Riot API key.
1689    /// # Riot Developer API Reference
1690    /// <a href="https://developer.riotgames.com/api-methods/#lol-rso-match-v1/GET_getMatchIds" target="_blank">`lol-rso-match-v1.getMatchIds`</a>
1691    ///
1692    /// Note: this method is automatically generated.
1693    pub fn get_match_ids(&self, route: RegionalRoute, access_token: impl std::fmt::Display, count: Option<i32>, end_time: Option<i64>, queue: Option<i32>, start: Option<i32>, start_time: Option<i64>, r#type: Option<&str>)
1694        -> impl Future<Output = Result<Vec<String>>> + 'a
1695    {
1696        let route_str = route.into();
1697        let request = self.base.request(Method::GET, route_str, "/lol/rso-match/v1/matches/ids");
1698        let mut request = request.bearer_auth(access_token);
1699        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
1700        let request = if let Some(count) = count { request.query(&[ ("count", count) ]) } else { request };
1701        let request = if let Some(end_time) = end_time { request.query(&[ ("endTime", end_time) ]) } else { request };
1702        let request = if let Some(queue) = queue { request.query(&[ ("queue", queue) ]) } else { request };
1703        let request = if let Some(start) = start { request.query(&[ ("start", start) ]) } else { request };
1704        let request = if let Some(start_time) = start_time { request.query(&[ ("startTime", start_time) ]) } else { request };
1705        let request = if let Some(r#type) = r#type { request.query(&[ ("type", r#type) ]) } else { request };
1706        let future = self.base.execute_val::<Vec<String>>("lol-rso-match-v1.getMatchIds", route_str, request);
1707        #[cfg(feature = "tracing")]
1708        let future = future.instrument(tracing::info_span!("lol-rso-match-v1.getMatchIds", route = route_str));
1709        #[cfg(feature = "metrics")]
1710        let future = metrics::timed(future, "lol-rso-match-v1.getMatchIds", route_str);
1711        future
1712    }
1713
1714    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1715    /// See `get_match_ids` for detailed documentation
1716    /// # Parameters
1717    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1718    /// * `route` - Route to query.
1719    /// * `access_token` - RSO access token.
1720    /// * `count` (optional, in query) - Defaults to 20. Valid values: 0 to 100. Number of match ids to return.
1721    /// * `start` (optional, in query) - Defaults to 0. Start index.
1722    /// * `type` (optional, in query) - Filter the list of match ids by the type of match. This filter is mutually inclusive of the queue filter meaning any match ids returned must match both the queue and type filters.
1723    /// * `queue` (optional, in query) - Filter the list of match ids by a specific queue id. This filter is mutually inclusive of the type filter meaning any match ids returned must match both the queue and type filters.
1724    /// * `end_time` (optional, in query) - Epoch timestamp in seconds.
1725    /// * `start_time` (optional, in query) - Epoch timestamp in seconds. The matchlist started storing timestamps on June 16th, 2021. Any matches played before June 16th, 2021 won't be included in the results if the startTime filter is set.
1726    /// # RSO
1727    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
1728    /// via the `access_token` parameter, instead of the Riot API key.
1729    /// # Riot Developer API Reference
1730    /// <a href="https://developer.riotgames.com/api-methods/#lol-rso-match-v1/GET_getMatchIds" target="_blank">`lol-rso-match-v1.getMatchIds`</a>
1731    ///
1732    /// Note: this method is automatically generated.
1733    pub fn try_get_match_ids(&self, min_capacity: f32, route: RegionalRoute, access_token: impl std::fmt::Display, count: Option<i32>, end_time: Option<i64>, queue: Option<i32>, start: Option<i32>, start_time: Option<i64>, r#type: Option<&str>)
1734        -> impl Future<Output = TryRequestResult<Vec<String>>> + 'a
1735    {
1736        let route_str = route.into();
1737        let request = self.base.request(Method::GET, route_str, "/lol/rso-match/v1/matches/ids");
1738        let mut request = request.bearer_auth(access_token);
1739        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
1740        let request = if let Some(count) = count { request.query(&[ ("count", count) ]) } else { request };
1741        let request = if let Some(end_time) = end_time { request.query(&[ ("endTime", end_time) ]) } else { request };
1742        let request = if let Some(queue) = queue { request.query(&[ ("queue", queue) ]) } else { request };
1743        let request = if let Some(start) = start { request.query(&[ ("start", start) ]) } else { request };
1744        let request = if let Some(start_time) = start_time { request.query(&[ ("startTime", start_time) ]) } else { request };
1745        let request = if let Some(r#type) = r#type { request.query(&[ ("type", r#type) ]) } else { request };
1746        let future = self.base.try_execute_val::<Vec<String>>("lol-rso-match-v1.getMatchIds", route_str, request, min_capacity);
1747        #[cfg(feature = "tracing")]
1748        let future = future.instrument(tracing::info_span!("lol-rso-match-v1.getMatchIds", route = route_str));
1749        #[cfg(feature = "metrics")]
1750        let future = metrics::try_timed(future, "lol-rso-match-v1.getMatchIds", route_str);
1751        future
1752    }
1753
1754    /// Get a match by match id
1755    /// # Parameters
1756    /// * `route` - Route to query.
1757    /// * `access_token` - RSO access token.
1758    /// * `match_id` (required, in path)
1759    /// # RSO
1760    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
1761    /// via the `access_token` parameter, instead of the Riot API key.
1762    /// # Riot Developer API Reference
1763    /// <a href="https://developer.riotgames.com/api-methods/#lol-rso-match-v1/GET_getMatch" target="_blank">`lol-rso-match-v1.getMatch`</a>
1764    ///
1765    /// Note: this method is automatically generated.
1766    pub fn get_match(&self, route: RegionalRoute, access_token: impl std::fmt::Display, match_id: &str)
1767        -> impl Future<Output = Result<crate::models::match_v5::Match>> + 'a
1768    {
1769        let route_str = route.into();
1770        let request = self.base.request(Method::GET, route_str, &format!("/lol/rso-match/v1/matches/{}", match_id));
1771        let mut request = request.bearer_auth(access_token);
1772        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
1773        let future = self.base.execute_val::<crate::models::match_v5::Match>("lol-rso-match-v1.getMatch", route_str, request);
1774        #[cfg(feature = "tracing")]
1775        let future = future.instrument(tracing::info_span!("lol-rso-match-v1.getMatch", route = route_str));
1776        #[cfg(feature = "metrics")]
1777        let future = metrics::timed(future, "lol-rso-match-v1.getMatch", route_str);
1778        future
1779    }
1780
1781    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1782    /// See `get_match` for detailed documentation
1783    /// # Parameters
1784    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1785    /// * `route` - Route to query.
1786    /// * `access_token` - RSO access token.
1787    /// * `match_id` (required, in path)
1788    /// # RSO
1789    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
1790    /// via the `access_token` parameter, instead of the Riot API key.
1791    /// # Riot Developer API Reference
1792    /// <a href="https://developer.riotgames.com/api-methods/#lol-rso-match-v1/GET_getMatch" target="_blank">`lol-rso-match-v1.getMatch`</a>
1793    ///
1794    /// Note: this method is automatically generated.
1795    pub fn try_get_match(&self, min_capacity: f32, route: RegionalRoute, access_token: impl std::fmt::Display, match_id: &str)
1796        -> impl Future<Output = TryRequestResult<crate::models::match_v5::Match>> + 'a
1797    {
1798        let route_str = route.into();
1799        let request = self.base.request(Method::GET, route_str, &format!("/lol/rso-match/v1/matches/{}", match_id));
1800        let mut request = request.bearer_auth(access_token);
1801        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
1802        let future = self.base.try_execute_val::<crate::models::match_v5::Match>("lol-rso-match-v1.getMatch", route_str, request, min_capacity);
1803        #[cfg(feature = "tracing")]
1804        let future = future.instrument(tracing::info_span!("lol-rso-match-v1.getMatch", route = route_str));
1805        #[cfg(feature = "metrics")]
1806        let future = metrics::try_timed(future, "lol-rso-match-v1.getMatch", route_str);
1807        future
1808    }
1809
1810    /// Get a match timeline by match id
1811    /// # Parameters
1812    /// * `route` - Route to query.
1813    /// * `access_token` - RSO access token.
1814    /// * `match_id` (required, in path)
1815    /// # RSO
1816    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
1817    /// via the `access_token` parameter, instead of the Riot API key.
1818    /// # Riot Developer API Reference
1819    /// <a href="https://developer.riotgames.com/api-methods/#lol-rso-match-v1/GET_getTimeline" target="_blank">`lol-rso-match-v1.getTimeline`</a>
1820    ///
1821    /// Note: this method is automatically generated.
1822    pub fn get_timeline(&self, route: RegionalRoute, access_token: impl std::fmt::Display, match_id: &str)
1823        -> impl Future<Output = Result<crate::models::match_v5::Timeline>> + 'a
1824    {
1825        let route_str = route.into();
1826        let request = self.base.request(Method::GET, route_str, &format!("/lol/rso-match/v1/matches/{}/timeline", match_id));
1827        let mut request = request.bearer_auth(access_token);
1828        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
1829        let future = self.base.execute_val::<crate::models::match_v5::Timeline>("lol-rso-match-v1.getTimeline", route_str, request);
1830        #[cfg(feature = "tracing")]
1831        let future = future.instrument(tracing::info_span!("lol-rso-match-v1.getTimeline", route = route_str));
1832        #[cfg(feature = "metrics")]
1833        let future = metrics::timed(future, "lol-rso-match-v1.getTimeline", route_str);
1834        future
1835    }
1836
1837    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1838    /// See `get_timeline` for detailed documentation
1839    /// # Parameters
1840    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1841    /// * `route` - Route to query.
1842    /// * `access_token` - RSO access token.
1843    /// * `match_id` (required, in path)
1844    /// # RSO
1845    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
1846    /// via the `access_token` parameter, instead of the Riot API key.
1847    /// # Riot Developer API Reference
1848    /// <a href="https://developer.riotgames.com/api-methods/#lol-rso-match-v1/GET_getTimeline" target="_blank">`lol-rso-match-v1.getTimeline`</a>
1849    ///
1850    /// Note: this method is automatically generated.
1851    pub fn try_get_timeline(&self, min_capacity: f32, route: RegionalRoute, access_token: impl std::fmt::Display, match_id: &str)
1852        -> impl Future<Output = TryRequestResult<crate::models::match_v5::Timeline>> + 'a
1853    {
1854        let route_str = route.into();
1855        let request = self.base.request(Method::GET, route_str, &format!("/lol/rso-match/v1/matches/{}/timeline", match_id));
1856        let mut request = request.bearer_auth(access_token);
1857        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
1858        let future = self.base.try_execute_val::<crate::models::match_v5::Timeline>("lol-rso-match-v1.getTimeline", route_str, request, min_capacity);
1859        #[cfg(feature = "tracing")]
1860        let future = future.instrument(tracing::info_span!("lol-rso-match-v1.getTimeline", route = route_str));
1861        #[cfg(feature = "metrics")]
1862        let future = metrics::try_timed(future, "lol-rso-match-v1.getTimeline", route_str);
1863        future
1864    }
1865
1866}
1867
1868/// LolStatusV4 endpoints handle, accessed by calling [`lol_status_v4()`](RiotApi::lol_status_v4) on a [`RiotApi`] instance.
1869/// # Riot Developer API Reference
1870/// <a href="https://developer.riotgames.com/apis#lol-status-v4" target="_blank">`lol-status-v4`</a>
1871///
1872/// Note: this struct is automatically generated.
1873#[repr(transparent)]
1874pub struct LolStatusV4<'a> {
1875    base: &'a RiotApi,
1876}
1877impl<'a> LolStatusV4<'a> {
1878    /// Get League of Legends status for the given platform.
1879    /// # Parameters
1880    /// * `route` - Route to query.
1881    /// # Riot Developer API Reference
1882    /// <a href="https://developer.riotgames.com/api-methods/#lol-status-v4/GET_getPlatformData" target="_blank">`lol-status-v4.getPlatformData`</a>
1883    ///
1884    /// Note: this method is automatically generated.
1885    pub fn get_platform_data(&self, route: PlatformRoute)
1886        -> impl Future<Output = Result<crate::models::lol_status_v4::PlatformData>> + 'a
1887    {
1888        let route_str = route.into();
1889        let request = self.base.request(Method::GET, route_str, "/lol/status/v4/platform-data");
1890        let future = self.base.execute_val::<crate::models::lol_status_v4::PlatformData>("lol-status-v4.getPlatformData", route_str, request);
1891        #[cfg(feature = "tracing")]
1892        let future = future.instrument(tracing::info_span!("lol-status-v4.getPlatformData", route = route_str));
1893        #[cfg(feature = "metrics")]
1894        let future = metrics::timed(future, "lol-status-v4.getPlatformData", route_str);
1895        future
1896    }
1897
1898    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1899    /// See `get_platform_data` for detailed documentation
1900    /// # Parameters
1901    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1902    /// * `route` - Route to query.
1903    /// # Riot Developer API Reference
1904    /// <a href="https://developer.riotgames.com/api-methods/#lol-status-v4/GET_getPlatformData" target="_blank">`lol-status-v4.getPlatformData`</a>
1905    ///
1906    /// Note: this method is automatically generated.
1907    pub fn try_get_platform_data(&self, min_capacity: f32, route: PlatformRoute)
1908        -> impl Future<Output = TryRequestResult<crate::models::lol_status_v4::PlatformData>> + 'a
1909    {
1910        let route_str = route.into();
1911        let request = self.base.request(Method::GET, route_str, "/lol/status/v4/platform-data");
1912        let future = self.base.try_execute_val::<crate::models::lol_status_v4::PlatformData>("lol-status-v4.getPlatformData", route_str, request, min_capacity);
1913        #[cfg(feature = "tracing")]
1914        let future = future.instrument(tracing::info_span!("lol-status-v4.getPlatformData", route = route_str));
1915        #[cfg(feature = "metrics")]
1916        let future = metrics::try_timed(future, "lol-status-v4.getPlatformData", route_str);
1917        future
1918    }
1919
1920}
1921
1922/// LorDeckV1 endpoints handle, accessed by calling [`lor_deck_v1()`](RiotApi::lor_deck_v1) on a [`RiotApi`] instance.
1923/// # Riot Developer API Reference
1924/// <a href="https://developer.riotgames.com/apis#lor-deck-v1" target="_blank">`lor-deck-v1`</a>
1925///
1926/// Note: this struct is automatically generated.
1927#[repr(transparent)]
1928pub struct LorDeckV1<'a> {
1929    base: &'a RiotApi,
1930}
1931impl<'a> LorDeckV1<'a> {
1932    /// Get a list of the calling user's decks.
1933    /// # Parameters
1934    /// * `route` - Route to query.
1935    /// * `access_token` - RSO access token.
1936    /// # RSO
1937    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
1938    /// via the `access_token` parameter, instead of the Riot API key.
1939    /// # Riot Developer API Reference
1940    /// <a href="https://developer.riotgames.com/api-methods/#lor-deck-v1/GET_getDecks" target="_blank">`lor-deck-v1.getDecks`</a>
1941    ///
1942    /// Note: this method is automatically generated.
1943    pub fn get_decks(&self, route: RegionalRoute, access_token: impl std::fmt::Display)
1944        -> impl Future<Output = Result<Vec<crate::models::lor_deck_v1::Deck>>> + 'a
1945    {
1946        let route_str = route.into();
1947        let request = self.base.request(Method::GET, route_str, "/lor/deck/v1/decks/me");
1948        let mut request = request.bearer_auth(access_token);
1949        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
1950        let future = self.base.execute_val::<Vec<crate::models::lor_deck_v1::Deck>>("lor-deck-v1.getDecks", route_str, request);
1951        #[cfg(feature = "tracing")]
1952        let future = future.instrument(tracing::info_span!("lor-deck-v1.getDecks", route = route_str));
1953        #[cfg(feature = "metrics")]
1954        let future = metrics::timed(future, "lor-deck-v1.getDecks", route_str);
1955        future
1956    }
1957
1958    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
1959    /// See `get_decks` for detailed documentation
1960    /// # Parameters
1961    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
1962    /// * `route` - Route to query.
1963    /// * `access_token` - RSO access token.
1964    /// # RSO
1965    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
1966    /// via the `access_token` parameter, instead of the Riot API key.
1967    /// # Riot Developer API Reference
1968    /// <a href="https://developer.riotgames.com/api-methods/#lor-deck-v1/GET_getDecks" target="_blank">`lor-deck-v1.getDecks`</a>
1969    ///
1970    /// Note: this method is automatically generated.
1971    pub fn try_get_decks(&self, min_capacity: f32, route: RegionalRoute, access_token: impl std::fmt::Display)
1972        -> impl Future<Output = TryRequestResult<Vec<crate::models::lor_deck_v1::Deck>>> + 'a
1973    {
1974        let route_str = route.into();
1975        let request = self.base.request(Method::GET, route_str, "/lor/deck/v1/decks/me");
1976        let mut request = request.bearer_auth(access_token);
1977        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
1978        let future = self.base.try_execute_val::<Vec<crate::models::lor_deck_v1::Deck>>("lor-deck-v1.getDecks", route_str, request, min_capacity);
1979        #[cfg(feature = "tracing")]
1980        let future = future.instrument(tracing::info_span!("lor-deck-v1.getDecks", route = route_str));
1981        #[cfg(feature = "metrics")]
1982        let future = metrics::try_timed(future, "lor-deck-v1.getDecks", route_str);
1983        future
1984    }
1985
1986    /// Create a new deck for the calling user.
1987    /// # Parameters
1988    /// * `route` - Route to query.
1989    /// * `access_token` - RSO access token.
1990    /// # RSO
1991    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
1992    /// via the `access_token` parameter, instead of the Riot API key.
1993    /// # Riot Developer API Reference
1994    /// <a href="https://developer.riotgames.com/api-methods/#lor-deck-v1/POST_createDeck" target="_blank">`lor-deck-v1.createDeck`</a>
1995    ///
1996    /// Note: this method is automatically generated.
1997    pub fn create_deck(&self, route: RegionalRoute, access_token: impl std::fmt::Display, body: &crate::models::lor_deck_v1::NewDeck)
1998        -> impl Future<Output = Result<String>> + 'a
1999    {
2000        let route_str = route.into();
2001        let request = self.base.request(Method::POST, route_str, "/lor/deck/v1/decks/me");
2002        let mut request = request.bearer_auth(access_token);
2003        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
2004        let request = request
2005            .body(serde_json::ser::to_vec(body).unwrap())
2006            .header(reqwest::header::CONTENT_TYPE, "application/json");
2007        let future = self.base.execute_val::<String>("lor-deck-v1.createDeck", route_str, request);
2008        #[cfg(feature = "tracing")]
2009        let future = future.instrument(tracing::info_span!("lor-deck-v1.createDeck", route = route_str));
2010        #[cfg(feature = "metrics")]
2011        let future = metrics::timed(future, "lor-deck-v1.createDeck", route_str);
2012        future
2013    }
2014
2015    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2016    /// See `create_deck` for detailed documentation
2017    /// # Parameters
2018    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2019    /// * `route` - Route to query.
2020    /// * `access_token` - RSO access token.
2021    /// # RSO
2022    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
2023    /// via the `access_token` parameter, instead of the Riot API key.
2024    /// # Riot Developer API Reference
2025    /// <a href="https://developer.riotgames.com/api-methods/#lor-deck-v1/POST_createDeck" target="_blank">`lor-deck-v1.createDeck`</a>
2026    ///
2027    /// Note: this method is automatically generated.
2028    pub fn try_create_deck(&self, min_capacity: f32, route: RegionalRoute, access_token: impl std::fmt::Display, body: &crate::models::lor_deck_v1::NewDeck)
2029        -> impl Future<Output = TryRequestResult<String>> + 'a
2030    {
2031        let route_str = route.into();
2032        let request = self.base.request(Method::POST, route_str, "/lor/deck/v1/decks/me");
2033        let mut request = request.bearer_auth(access_token);
2034        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
2035        let request = request.body(serde_json::ser::to_vec(body).unwrap());
2036        let future = self.base.try_execute_val::<String>("lor-deck-v1.createDeck", route_str, request, min_capacity);
2037        #[cfg(feature = "tracing")]
2038        let future = future.instrument(tracing::info_span!("lor-deck-v1.createDeck", route = route_str));
2039        #[cfg(feature = "metrics")]
2040        let future = metrics::try_timed(future, "lor-deck-v1.createDeck", route_str);
2041        future
2042    }
2043
2044}
2045
2046/// LorInventoryV1 endpoints handle, accessed by calling [`lor_inventory_v1()`](RiotApi::lor_inventory_v1) on a [`RiotApi`] instance.
2047/// # Riot Developer API Reference
2048/// <a href="https://developer.riotgames.com/apis#lor-inventory-v1" target="_blank">`lor-inventory-v1`</a>
2049///
2050/// Note: this struct is automatically generated.
2051#[repr(transparent)]
2052pub struct LorInventoryV1<'a> {
2053    base: &'a RiotApi,
2054}
2055impl<'a> LorInventoryV1<'a> {
2056    /// Return a list of cards owned by the calling user.
2057    /// # Parameters
2058    /// * `route` - Route to query.
2059    /// * `access_token` - RSO access token.
2060    /// # RSO
2061    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
2062    /// via the `access_token` parameter, instead of the Riot API key.
2063    /// # Riot Developer API Reference
2064    /// <a href="https://developer.riotgames.com/api-methods/#lor-inventory-v1/GET_getCards" target="_blank">`lor-inventory-v1.getCards`</a>
2065    ///
2066    /// Note: this method is automatically generated.
2067    pub fn get_cards(&self, route: RegionalRoute, access_token: impl std::fmt::Display)
2068        -> impl Future<Output = Result<Vec<crate::models::lor_inventory_v1::Card>>> + 'a
2069    {
2070        let route_str = route.into();
2071        let request = self.base.request(Method::GET, route_str, "/lor/inventory/v1/cards/me");
2072        let mut request = request.bearer_auth(access_token);
2073        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
2074        let future = self.base.execute_val::<Vec<crate::models::lor_inventory_v1::Card>>("lor-inventory-v1.getCards", route_str, request);
2075        #[cfg(feature = "tracing")]
2076        let future = future.instrument(tracing::info_span!("lor-inventory-v1.getCards", route = route_str));
2077        #[cfg(feature = "metrics")]
2078        let future = metrics::timed(future, "lor-inventory-v1.getCards", route_str);
2079        future
2080    }
2081
2082    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2083    /// See `get_cards` for detailed documentation
2084    /// # Parameters
2085    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2086    /// * `route` - Route to query.
2087    /// * `access_token` - RSO access token.
2088    /// # RSO
2089    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
2090    /// via the `access_token` parameter, instead of the Riot API key.
2091    /// # Riot Developer API Reference
2092    /// <a href="https://developer.riotgames.com/api-methods/#lor-inventory-v1/GET_getCards" target="_blank">`lor-inventory-v1.getCards`</a>
2093    ///
2094    /// Note: this method is automatically generated.
2095    pub fn try_get_cards(&self, min_capacity: f32, route: RegionalRoute, access_token: impl std::fmt::Display)
2096        -> impl Future<Output = TryRequestResult<Vec<crate::models::lor_inventory_v1::Card>>> + 'a
2097    {
2098        let route_str = route.into();
2099        let request = self.base.request(Method::GET, route_str, "/lor/inventory/v1/cards/me");
2100        let mut request = request.bearer_auth(access_token);
2101        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
2102        let future = self.base.try_execute_val::<Vec<crate::models::lor_inventory_v1::Card>>("lor-inventory-v1.getCards", route_str, request, min_capacity);
2103        #[cfg(feature = "tracing")]
2104        let future = future.instrument(tracing::info_span!("lor-inventory-v1.getCards", route = route_str));
2105        #[cfg(feature = "metrics")]
2106        let future = metrics::try_timed(future, "lor-inventory-v1.getCards", route_str);
2107        future
2108    }
2109
2110}
2111
2112/// LorMatchV1 endpoints handle, accessed by calling [`lor_match_v1()`](RiotApi::lor_match_v1) on a [`RiotApi`] instance.
2113/// # Riot Developer API Reference
2114/// <a href="https://developer.riotgames.com/apis#lor-match-v1" target="_blank">`lor-match-v1`</a>
2115///
2116/// Note: this struct is automatically generated.
2117#[repr(transparent)]
2118pub struct LorMatchV1<'a> {
2119    base: &'a RiotApi,
2120}
2121impl<'a> LorMatchV1<'a> {
2122    /// Get a list of match ids by PUUID
2123    /// # Parameters
2124    /// * `route` - Route to query.
2125    /// * `puuid` (required, in path)
2126    /// # Riot Developer API Reference
2127    /// <a href="https://developer.riotgames.com/api-methods/#lor-match-v1/GET_getMatchIdsByPUUID" target="_blank">`lor-match-v1.getMatchIdsByPUUID`</a>
2128    ///
2129    /// Note: this method is automatically generated.
2130    pub fn get_match_ids_by_puuid(&self, route: RegionalRoute, puuid: &str)
2131        -> impl Future<Output = Result<Vec<String>>> + 'a
2132    {
2133        let route_str = route.into();
2134        let request = self.base.request(Method::GET, route_str, &format!("/lor/match/v1/matches/by-puuid/{}/ids", puuid));
2135        let future = self.base.execute_val::<Vec<String>>("lor-match-v1.getMatchIdsByPUUID", route_str, request);
2136        #[cfg(feature = "tracing")]
2137        let future = future.instrument(tracing::info_span!("lor-match-v1.getMatchIdsByPUUID", route = route_str));
2138        #[cfg(feature = "metrics")]
2139        let future = metrics::timed(future, "lor-match-v1.getMatchIdsByPUUID", route_str);
2140        future
2141    }
2142
2143    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2144    /// See `get_match_ids_by_puuid` for detailed documentation
2145    /// # Parameters
2146    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2147    /// * `route` - Route to query.
2148    /// * `puuid` (required, in path)
2149    /// # Riot Developer API Reference
2150    /// <a href="https://developer.riotgames.com/api-methods/#lor-match-v1/GET_getMatchIdsByPUUID" target="_blank">`lor-match-v1.getMatchIdsByPUUID`</a>
2151    ///
2152    /// Note: this method is automatically generated.
2153    pub fn try_get_match_ids_by_puuid(&self, min_capacity: f32, route: RegionalRoute, puuid: &str)
2154        -> impl Future<Output = TryRequestResult<Vec<String>>> + 'a
2155    {
2156        let route_str = route.into();
2157        let request = self.base.request(Method::GET, route_str, &format!("/lor/match/v1/matches/by-puuid/{}/ids", puuid));
2158        let future = self.base.try_execute_val::<Vec<String>>("lor-match-v1.getMatchIdsByPUUID", route_str, request, min_capacity);
2159        #[cfg(feature = "tracing")]
2160        let future = future.instrument(tracing::info_span!("lor-match-v1.getMatchIdsByPUUID", route = route_str));
2161        #[cfg(feature = "metrics")]
2162        let future = metrics::try_timed(future, "lor-match-v1.getMatchIdsByPUUID", route_str);
2163        future
2164    }
2165
2166    /// Get match by id
2167    /// # Parameters
2168    /// * `route` - Route to query.
2169    /// * `match_id` (required, in path)
2170    /// # Riot Developer API Reference
2171    /// <a href="https://developer.riotgames.com/api-methods/#lor-match-v1/GET_getMatch" target="_blank">`lor-match-v1.getMatch`</a>
2172    ///
2173    /// Note: this method is automatically generated.
2174    pub fn get_match(&self, route: RegionalRoute, match_id: &str)
2175        -> impl Future<Output = Result<crate::models::lor_match_v1::Match>> + 'a
2176    {
2177        let route_str = route.into();
2178        let request = self.base.request(Method::GET, route_str, &format!("/lor/match/v1/matches/{}", match_id));
2179        let future = self.base.execute_val::<crate::models::lor_match_v1::Match>("lor-match-v1.getMatch", route_str, request);
2180        #[cfg(feature = "tracing")]
2181        let future = future.instrument(tracing::info_span!("lor-match-v1.getMatch", route = route_str));
2182        #[cfg(feature = "metrics")]
2183        let future = metrics::timed(future, "lor-match-v1.getMatch", route_str);
2184        future
2185    }
2186
2187    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2188    /// See `get_match` for detailed documentation
2189    /// # Parameters
2190    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2191    /// * `route` - Route to query.
2192    /// * `match_id` (required, in path)
2193    /// # Riot Developer API Reference
2194    /// <a href="https://developer.riotgames.com/api-methods/#lor-match-v1/GET_getMatch" target="_blank">`lor-match-v1.getMatch`</a>
2195    ///
2196    /// Note: this method is automatically generated.
2197    pub fn try_get_match(&self, min_capacity: f32, route: RegionalRoute, match_id: &str)
2198        -> impl Future<Output = TryRequestResult<crate::models::lor_match_v1::Match>> + 'a
2199    {
2200        let route_str = route.into();
2201        let request = self.base.request(Method::GET, route_str, &format!("/lor/match/v1/matches/{}", match_id));
2202        let future = self.base.try_execute_val::<crate::models::lor_match_v1::Match>("lor-match-v1.getMatch", route_str, request, min_capacity);
2203        #[cfg(feature = "tracing")]
2204        let future = future.instrument(tracing::info_span!("lor-match-v1.getMatch", route = route_str));
2205        #[cfg(feature = "metrics")]
2206        let future = metrics::try_timed(future, "lor-match-v1.getMatch", route_str);
2207        future
2208    }
2209
2210}
2211
2212/// LorRankedV1 endpoints handle, accessed by calling [`lor_ranked_v1()`](RiotApi::lor_ranked_v1) on a [`RiotApi`] instance.
2213/// # Riot Developer API Reference
2214/// <a href="https://developer.riotgames.com/apis#lor-ranked-v1" target="_blank">`lor-ranked-v1`</a>
2215///
2216/// Note: this struct is automatically generated.
2217#[repr(transparent)]
2218pub struct LorRankedV1<'a> {
2219    base: &'a RiotApi,
2220}
2221impl<'a> LorRankedV1<'a> {
2222    /// Get the players in Master tier.
2223    /// # Parameters
2224    /// * `route` - Route to query.
2225    /// # Riot Developer API Reference
2226    /// <a href="https://developer.riotgames.com/api-methods/#lor-ranked-v1/GET_getLeaderboards" target="_blank">`lor-ranked-v1.getLeaderboards`</a>
2227    ///
2228    /// Note: this method is automatically generated.
2229    pub fn get_leaderboards(&self, route: RegionalRoute)
2230        -> impl Future<Output = Result<crate::models::lor_ranked_v1::Leaderboard>> + 'a
2231    {
2232        let route_str = route.into();
2233        let request = self.base.request(Method::GET, route_str, "/lor/ranked/v1/leaderboards");
2234        let future = self.base.execute_val::<crate::models::lor_ranked_v1::Leaderboard>("lor-ranked-v1.getLeaderboards", route_str, request);
2235        #[cfg(feature = "tracing")]
2236        let future = future.instrument(tracing::info_span!("lor-ranked-v1.getLeaderboards", route = route_str));
2237        #[cfg(feature = "metrics")]
2238        let future = metrics::timed(future, "lor-ranked-v1.getLeaderboards", route_str);
2239        future
2240    }
2241
2242    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2243    /// See `get_leaderboards` for detailed documentation
2244    /// # Parameters
2245    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2246    /// * `route` - Route to query.
2247    /// # Riot Developer API Reference
2248    /// <a href="https://developer.riotgames.com/api-methods/#lor-ranked-v1/GET_getLeaderboards" target="_blank">`lor-ranked-v1.getLeaderboards`</a>
2249    ///
2250    /// Note: this method is automatically generated.
2251    pub fn try_get_leaderboards(&self, min_capacity: f32, route: RegionalRoute)
2252        -> impl Future<Output = TryRequestResult<crate::models::lor_ranked_v1::Leaderboard>> + 'a
2253    {
2254        let route_str = route.into();
2255        let request = self.base.request(Method::GET, route_str, "/lor/ranked/v1/leaderboards");
2256        let future = self.base.try_execute_val::<crate::models::lor_ranked_v1::Leaderboard>("lor-ranked-v1.getLeaderboards", route_str, request, min_capacity);
2257        #[cfg(feature = "tracing")]
2258        let future = future.instrument(tracing::info_span!("lor-ranked-v1.getLeaderboards", route = route_str));
2259        #[cfg(feature = "metrics")]
2260        let future = metrics::try_timed(future, "lor-ranked-v1.getLeaderboards", route_str);
2261        future
2262    }
2263
2264}
2265
2266/// LorStatusV1 endpoints handle, accessed by calling [`lor_status_v1()`](RiotApi::lor_status_v1) on a [`RiotApi`] instance.
2267/// # Riot Developer API Reference
2268/// <a href="https://developer.riotgames.com/apis#lor-status-v1" target="_blank">`lor-status-v1`</a>
2269///
2270/// Note: this struct is automatically generated.
2271#[repr(transparent)]
2272pub struct LorStatusV1<'a> {
2273    base: &'a RiotApi,
2274}
2275impl<'a> LorStatusV1<'a> {
2276    /// Get Legends of Runeterra status for the given platform.
2277    /// # Parameters
2278    /// * `route` - Route to query.
2279    /// # Riot Developer API Reference
2280    /// <a href="https://developer.riotgames.com/api-methods/#lor-status-v1/GET_getPlatformData" target="_blank">`lor-status-v1.getPlatformData`</a>
2281    ///
2282    /// Note: this method is automatically generated.
2283    pub fn get_platform_data(&self, route: RegionalRoute)
2284        -> impl Future<Output = Result<crate::models::lor_status_v1::PlatformData>> + 'a
2285    {
2286        let route_str = route.into();
2287        let request = self.base.request(Method::GET, route_str, "/lor/status/v1/platform-data");
2288        let future = self.base.execute_val::<crate::models::lor_status_v1::PlatformData>("lor-status-v1.getPlatformData", route_str, request);
2289        #[cfg(feature = "tracing")]
2290        let future = future.instrument(tracing::info_span!("lor-status-v1.getPlatformData", route = route_str));
2291        #[cfg(feature = "metrics")]
2292        let future = metrics::timed(future, "lor-status-v1.getPlatformData", route_str);
2293        future
2294    }
2295
2296    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2297    /// See `get_platform_data` for detailed documentation
2298    /// # Parameters
2299    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2300    /// * `route` - Route to query.
2301    /// # Riot Developer API Reference
2302    /// <a href="https://developer.riotgames.com/api-methods/#lor-status-v1/GET_getPlatformData" target="_blank">`lor-status-v1.getPlatformData`</a>
2303    ///
2304    /// Note: this method is automatically generated.
2305    pub fn try_get_platform_data(&self, min_capacity: f32, route: RegionalRoute)
2306        -> impl Future<Output = TryRequestResult<crate::models::lor_status_v1::PlatformData>> + 'a
2307    {
2308        let route_str = route.into();
2309        let request = self.base.request(Method::GET, route_str, "/lor/status/v1/platform-data");
2310        let future = self.base.try_execute_val::<crate::models::lor_status_v1::PlatformData>("lor-status-v1.getPlatformData", route_str, request, min_capacity);
2311        #[cfg(feature = "tracing")]
2312        let future = future.instrument(tracing::info_span!("lor-status-v1.getPlatformData", route = route_str));
2313        #[cfg(feature = "metrics")]
2314        let future = metrics::try_timed(future, "lor-status-v1.getPlatformData", route_str);
2315        future
2316    }
2317
2318}
2319
2320/// MatchV5 endpoints handle, accessed by calling [`match_v5()`](RiotApi::match_v5) on a [`RiotApi`] instance.
2321/// # Riot Developer API Reference
2322/// <a href="https://developer.riotgames.com/apis#match-v5" target="_blank">`match-v5`</a>
2323///
2324/// Note: this struct is automatically generated.
2325#[repr(transparent)]
2326pub struct MatchV5<'a> {
2327    base: &'a RiotApi,
2328}
2329impl<'a> MatchV5<'a> {
2330    /// Get a list of match ids by puuid
2331    /// # Parameters
2332    /// * `route` - Route to query.
2333    /// * `puuid` (required, in path)
2334    /// * `start_time` (optional, in query) - Epoch timestamp in seconds. The matchlist started storing timestamps on June 16th, 2021. Any matches played before June 16th, 2021 won't be included in the results if the startTime filter is set.
2335    /// * `end_time` (optional, in query) - Epoch timestamp in seconds.
2336    /// * `queue` (optional, in query) - Filter the list of match ids by a specific queue id. This filter is mutually inclusive of the type filter meaning any match ids returned must match both the queue and type filters.
2337    /// * `type` (optional, in query) - Filter the list of match ids by the type of match. This filter is mutually inclusive of the queue filter meaning any match ids returned must match both the queue and type filters.
2338    /// * `start` (optional, in query) - Defaults to 0. Start index.
2339    /// * `count` (optional, in query) - Defaults to 20. Valid values: 0 to 100. Number of match ids to return.
2340    /// # Riot Developer API Reference
2341    /// <a href="https://developer.riotgames.com/api-methods/#match-v5/GET_getMatchIdsByPUUID" target="_blank">`match-v5.getMatchIdsByPUUID`</a>
2342    ///
2343    /// Note: this method is automatically generated.
2344    pub fn get_match_ids_by_puuid(&self, route: RegionalRoute, puuid: &str, count: Option<i32>, end_time: Option<i64>, queue: Option<crate::consts::Queue>, start_time: Option<i64>, start: Option<i32>, r#type: Option<&str>)
2345        -> impl Future<Output = Result<Vec<String>>> + 'a
2346    {
2347        let route_str = route.into();
2348        let request = self.base.request(Method::GET, route_str, &format!("/lol/match/v5/matches/by-puuid/{}/ids", puuid));
2349        let request = if let Some(count) = count { request.query(&[ ("count", count) ]) } else { request };
2350        let request = if let Some(end_time) = end_time { request.query(&[ ("endTime", end_time) ]) } else { request };
2351        let request = if let Some(queue) = queue { request.query(&[ ("queue", queue) ]) } else { request };
2352        let request = if let Some(start_time) = start_time { request.query(&[ ("startTime", start_time) ]) } else { request };
2353        let request = if let Some(start) = start { request.query(&[ ("start", start) ]) } else { request };
2354        let request = if let Some(r#type) = r#type { request.query(&[ ("type", r#type) ]) } else { request };
2355        let future = self.base.execute_val::<Vec<String>>("match-v5.getMatchIdsByPUUID", route_str, request);
2356        #[cfg(feature = "tracing")]
2357        let future = future.instrument(tracing::info_span!("match-v5.getMatchIdsByPUUID", route = route_str));
2358        #[cfg(feature = "metrics")]
2359        let future = metrics::timed(future, "match-v5.getMatchIdsByPUUID", route_str);
2360        future
2361    }
2362
2363    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2364    /// See `get_match_ids_by_puuid` for detailed documentation
2365    /// # Parameters
2366    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2367    /// * `route` - Route to query.
2368    /// * `puuid` (required, in path)
2369    /// * `start_time` (optional, in query) - Epoch timestamp in seconds. The matchlist started storing timestamps on June 16th, 2021. Any matches played before June 16th, 2021 won't be included in the results if the startTime filter is set.
2370    /// * `end_time` (optional, in query) - Epoch timestamp in seconds.
2371    /// * `queue` (optional, in query) - Filter the list of match ids by a specific queue id. This filter is mutually inclusive of the type filter meaning any match ids returned must match both the queue and type filters.
2372    /// * `type` (optional, in query) - Filter the list of match ids by the type of match. This filter is mutually inclusive of the queue filter meaning any match ids returned must match both the queue and type filters.
2373    /// * `start` (optional, in query) - Defaults to 0. Start index.
2374    /// * `count` (optional, in query) - Defaults to 20. Valid values: 0 to 100. Number of match ids to return.
2375    /// # Riot Developer API Reference
2376    /// <a href="https://developer.riotgames.com/api-methods/#match-v5/GET_getMatchIdsByPUUID" target="_blank">`match-v5.getMatchIdsByPUUID`</a>
2377    ///
2378    /// Note: this method is automatically generated.
2379    pub fn try_get_match_ids_by_puuid(&self, min_capacity: f32, route: RegionalRoute, puuid: &str, count: Option<i32>, end_time: Option<i64>, queue: Option<crate::consts::Queue>, start_time: Option<i64>, start: Option<i32>, r#type: Option<&str>)
2380        -> impl Future<Output = TryRequestResult<Vec<String>>> + 'a
2381    {
2382        let route_str = route.into();
2383        let request = self.base.request(Method::GET, route_str, &format!("/lol/match/v5/matches/by-puuid/{}/ids", puuid));
2384        let request = if let Some(count) = count { request.query(&[ ("count", count) ]) } else { request };
2385        let request = if let Some(end_time) = end_time { request.query(&[ ("endTime", end_time) ]) } else { request };
2386        let request = if let Some(queue) = queue { request.query(&[ ("queue", queue) ]) } else { request };
2387        let request = if let Some(start_time) = start_time { request.query(&[ ("startTime", start_time) ]) } else { request };
2388        let request = if let Some(start) = start { request.query(&[ ("start", start) ]) } else { request };
2389        let request = if let Some(r#type) = r#type { request.query(&[ ("type", r#type) ]) } else { request };
2390        let future = self.base.try_execute_val::<Vec<String>>("match-v5.getMatchIdsByPUUID", route_str, request, min_capacity);
2391        #[cfg(feature = "tracing")]
2392        let future = future.instrument(tracing::info_span!("match-v5.getMatchIdsByPUUID", route = route_str));
2393        #[cfg(feature = "metrics")]
2394        let future = metrics::try_timed(future, "match-v5.getMatchIdsByPUUID", route_str);
2395        future
2396    }
2397
2398    /// Get a match by match id
2399    /// # Parameters
2400    /// * `route` - Route to query.
2401    /// * `match_id` (required, in path)
2402    /// # Riot Developer API Reference
2403    /// <a href="https://developer.riotgames.com/api-methods/#match-v5/GET_getMatch" target="_blank">`match-v5.getMatch`</a>
2404    ///
2405    /// Note: this method is automatically generated.
2406    pub fn get_match(&self, route: RegionalRoute, match_id: &str)
2407        -> impl Future<Output = Result<Option<crate::models::match_v5::Match>>> + 'a
2408    {
2409        let route_str = route.into();
2410        let request = self.base.request(Method::GET, route_str, &format!("/lol/match/v5/matches/{}", match_id));
2411        let future = self.base.execute_opt::<crate::models::match_v5::Match>("match-v5.getMatch", route_str, request);
2412        #[cfg(feature = "tracing")]
2413        let future = future.instrument(tracing::info_span!("match-v5.getMatch", route = route_str));
2414        #[cfg(feature = "metrics")]
2415        let future = metrics::timed(future, "match-v5.getMatch", route_str);
2416        future
2417    }
2418
2419    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2420    /// See `get_match` for detailed documentation
2421    /// # Parameters
2422    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2423    /// * `route` - Route to query.
2424    /// * `match_id` (required, in path)
2425    /// # Riot Developer API Reference
2426    /// <a href="https://developer.riotgames.com/api-methods/#match-v5/GET_getMatch" target="_blank">`match-v5.getMatch`</a>
2427    ///
2428    /// Note: this method is automatically generated.
2429    pub fn try_get_match(&self, min_capacity: f32, route: RegionalRoute, match_id: &str)
2430        -> impl Future<Output = TryRequestResult<Option<crate::models::match_v5::Match>>> + 'a
2431    {
2432        let route_str = route.into();
2433        let request = self.base.request(Method::GET, route_str, &format!("/lol/match/v5/matches/{}", match_id));
2434        let future = self.base.try_execute_opt::<crate::models::match_v5::Match>("match-v5.getMatch", route_str, request, min_capacity);
2435        #[cfg(feature = "tracing")]
2436        let future = future.instrument(tracing::info_span!("match-v5.getMatch", route = route_str));
2437        #[cfg(feature = "metrics")]
2438        let future = metrics::try_timed(future, "match-v5.getMatch", route_str);
2439        future
2440    }
2441
2442    /// Get a match timeline by match id
2443    /// # Parameters
2444    /// * `route` - Route to query.
2445    /// * `match_id` (required, in path)
2446    /// # Riot Developer API Reference
2447    /// <a href="https://developer.riotgames.com/api-methods/#match-v5/GET_getTimeline" target="_blank">`match-v5.getTimeline`</a>
2448    ///
2449    /// Note: this method is automatically generated.
2450    pub fn get_timeline(&self, route: RegionalRoute, match_id: &str)
2451        -> impl Future<Output = Result<Option<crate::models::match_v5::Timeline>>> + 'a
2452    {
2453        let route_str = route.into();
2454        let request = self.base.request(Method::GET, route_str, &format!("/lol/match/v5/matches/{}/timeline", match_id));
2455        let future = self.base.execute_opt::<crate::models::match_v5::Timeline>("match-v5.getTimeline", route_str, request);
2456        #[cfg(feature = "tracing")]
2457        let future = future.instrument(tracing::info_span!("match-v5.getTimeline", route = route_str));
2458        #[cfg(feature = "metrics")]
2459        let future = metrics::timed(future, "match-v5.getTimeline", route_str);
2460        future
2461    }
2462
2463    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2464    /// See `get_timeline` for detailed documentation
2465    /// # Parameters
2466    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2467    /// * `route` - Route to query.
2468    /// * `match_id` (required, in path)
2469    /// # Riot Developer API Reference
2470    /// <a href="https://developer.riotgames.com/api-methods/#match-v5/GET_getTimeline" target="_blank">`match-v5.getTimeline`</a>
2471    ///
2472    /// Note: this method is automatically generated.
2473    pub fn try_get_timeline(&self, min_capacity: f32, route: RegionalRoute, match_id: &str)
2474        -> impl Future<Output = TryRequestResult<Option<crate::models::match_v5::Timeline>>> + 'a
2475    {
2476        let route_str = route.into();
2477        let request = self.base.request(Method::GET, route_str, &format!("/lol/match/v5/matches/{}/timeline", match_id));
2478        let future = self.base.try_execute_opt::<crate::models::match_v5::Timeline>("match-v5.getTimeline", route_str, request, min_capacity);
2479        #[cfg(feature = "tracing")]
2480        let future = future.instrument(tracing::info_span!("match-v5.getTimeline", route = route_str));
2481        #[cfg(feature = "metrics")]
2482        let future = metrics::try_timed(future, "match-v5.getTimeline", route_str);
2483        future
2484    }
2485
2486}
2487
2488/// RiftboundContentV1 endpoints handle, accessed by calling [`riftbound_content_v1()`](RiotApi::riftbound_content_v1) on a [`RiotApi`] instance.
2489/// # Riot Developer API Reference
2490/// <a href="https://developer.riotgames.com/apis#riftbound-content-v1" target="_blank">`riftbound-content-v1`</a>
2491///
2492/// Note: this struct is automatically generated.
2493#[repr(transparent)]
2494pub struct RiftboundContentV1<'a> {
2495    base: &'a RiotApi,
2496}
2497impl<'a> RiftboundContentV1<'a> {
2498    /// Get riftbound content
2499    /// # Parameters
2500    /// * `route` - Route to query.
2501    /// * `locale` (optional, in query) - Defaults to en. Optional. Specifies the language and regional settings for the response. Use a locale code. During beta only en available.
2502    /// # Riot Developer API Reference
2503    /// <a href="https://developer.riotgames.com/api-methods/#riftbound-content-v1/GET_getContent" target="_blank">`riftbound-content-v1.getContent`</a>
2504    ///
2505    /// Note: this method is automatically generated.
2506    pub fn get_content(&self, route: RegionalRoute, locale: Option<&str>)
2507        -> impl Future<Output = Result<crate::models::riftbound_content_v1::RiftboundContent>> + 'a
2508    {
2509        let route_str = route.into();
2510        let request = self.base.request(Method::GET, route_str, "/riftbound/content/v1/contents");
2511        let request = if let Some(locale) = locale { request.query(&[ ("locale", locale) ]) } else { request };
2512        let future = self.base.execute_val::<crate::models::riftbound_content_v1::RiftboundContent>("riftbound-content-v1.getContent", route_str, request);
2513        #[cfg(feature = "tracing")]
2514        let future = future.instrument(tracing::info_span!("riftbound-content-v1.getContent", route = route_str));
2515        #[cfg(feature = "metrics")]
2516        let future = metrics::timed(future, "riftbound-content-v1.getContent", route_str);
2517        future
2518    }
2519
2520    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2521    /// See `get_content` for detailed documentation
2522    /// # Parameters
2523    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2524    /// * `route` - Route to query.
2525    /// * `locale` (optional, in query) - Defaults to en. Optional. Specifies the language and regional settings for the response. Use a locale code. During beta only en available.
2526    /// # Riot Developer API Reference
2527    /// <a href="https://developer.riotgames.com/api-methods/#riftbound-content-v1/GET_getContent" target="_blank">`riftbound-content-v1.getContent`</a>
2528    ///
2529    /// Note: this method is automatically generated.
2530    pub fn try_get_content(&self, min_capacity: f32, route: RegionalRoute, locale: Option<&str>)
2531        -> impl Future<Output = TryRequestResult<crate::models::riftbound_content_v1::RiftboundContent>> + 'a
2532    {
2533        let route_str = route.into();
2534        let request = self.base.request(Method::GET, route_str, "/riftbound/content/v1/contents");
2535        let request = if let Some(locale) = locale { request.query(&[ ("locale", locale) ]) } else { request };
2536        let future = self.base.try_execute_val::<crate::models::riftbound_content_v1::RiftboundContent>("riftbound-content-v1.getContent", route_str, request, min_capacity);
2537        #[cfg(feature = "tracing")]
2538        let future = future.instrument(tracing::info_span!("riftbound-content-v1.getContent", route = route_str));
2539        #[cfg(feature = "metrics")]
2540        let future = metrics::try_timed(future, "riftbound-content-v1.getContent", route_str);
2541        future
2542    }
2543
2544}
2545
2546/// SpectatorTftV5 endpoints handle, accessed by calling [`spectator_tft_v5()`](RiotApi::spectator_tft_v5) on a [`RiotApi`] instance.
2547/// # Riot Developer API Reference
2548/// <a href="https://developer.riotgames.com/apis#spectator-tft-v5" target="_blank">`spectator-tft-v5`</a>
2549///
2550/// Note: this struct is automatically generated.
2551#[repr(transparent)]
2552pub struct SpectatorTftV5<'a> {
2553    base: &'a RiotApi,
2554}
2555impl<'a> SpectatorTftV5<'a> {
2556    /// Get current game information for the given puuid.
2557    /// # Parameters
2558    /// * `route` - Route to query.
2559    /// * `encrypted_puuid` (required, in path) - The puuid of the summoner.
2560    /// # Riot Developer API Reference
2561    /// <a href="https://developer.riotgames.com/api-methods/#spectator-tft-v5/GET_getCurrentGameInfoByPuuid" target="_blank">`spectator-tft-v5.getCurrentGameInfoByPuuid`</a>
2562    ///
2563    /// Note: this method is automatically generated.
2564    pub fn get_current_game_info_by_puuid(&self, route: PlatformRoute, encrypted_puuid: &str)
2565        -> impl Future<Output = Result<Option<crate::models::spectator_tft_v5::CurrentGameInfo>>> + 'a
2566    {
2567        let route_str = route.into();
2568        let request = self.base.request(Method::GET, route_str, &format!("/lol/spectator/tft/v5/active-games/by-puuid/{}", encrypted_puuid));
2569        let future = self.base.execute_opt::<crate::models::spectator_tft_v5::CurrentGameInfo>("spectator-tft-v5.getCurrentGameInfoByPuuid", route_str, request);
2570        #[cfg(feature = "tracing")]
2571        let future = future.instrument(tracing::info_span!("spectator-tft-v5.getCurrentGameInfoByPuuid", route = route_str));
2572        #[cfg(feature = "metrics")]
2573        let future = metrics::timed(future, "spectator-tft-v5.getCurrentGameInfoByPuuid", route_str);
2574        future
2575    }
2576
2577    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2578    /// See `get_current_game_info_by_puuid` for detailed documentation
2579    /// # Parameters
2580    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2581    /// * `route` - Route to query.
2582    /// * `encrypted_puuid` (required, in path) - The puuid of the summoner.
2583    /// # Riot Developer API Reference
2584    /// <a href="https://developer.riotgames.com/api-methods/#spectator-tft-v5/GET_getCurrentGameInfoByPuuid" target="_blank">`spectator-tft-v5.getCurrentGameInfoByPuuid`</a>
2585    ///
2586    /// Note: this method is automatically generated.
2587    pub fn try_get_current_game_info_by_puuid(&self, min_capacity: f32, route: PlatformRoute, encrypted_puuid: &str)
2588        -> impl Future<Output = TryRequestResult<Option<crate::models::spectator_tft_v5::CurrentGameInfo>>> + 'a
2589    {
2590        let route_str = route.into();
2591        let request = self.base.request(Method::GET, route_str, &format!("/lol/spectator/tft/v5/active-games/by-puuid/{}", encrypted_puuid));
2592        let future = self.base.try_execute_opt::<crate::models::spectator_tft_v5::CurrentGameInfo>("spectator-tft-v5.getCurrentGameInfoByPuuid", route_str, request, min_capacity);
2593        #[cfg(feature = "tracing")]
2594        let future = future.instrument(tracing::info_span!("spectator-tft-v5.getCurrentGameInfoByPuuid", route = route_str));
2595        #[cfg(feature = "metrics")]
2596        let future = metrics::try_timed(future, "spectator-tft-v5.getCurrentGameInfoByPuuid", route_str);
2597        future
2598    }
2599
2600    /// Get list of featured games.
2601    /// # Parameters
2602    /// * `route` - Route to query.
2603    /// # Riot Developer API Reference
2604    /// <a href="https://developer.riotgames.com/api-methods/#spectator-tft-v5/GET_getFeaturedGames" target="_blank">`spectator-tft-v5.getFeaturedGames`</a>
2605    ///
2606    /// Note: this method is automatically generated.
2607    pub fn get_featured_games(&self, route: PlatformRoute)
2608        -> impl Future<Output = Result<crate::models::spectator_tft_v5::FeaturedGames>> + 'a
2609    {
2610        let route_str = route.into();
2611        let request = self.base.request(Method::GET, route_str, "/lol/spectator/tft/v5/featured-games");
2612        let future = self.base.execute_val::<crate::models::spectator_tft_v5::FeaturedGames>("spectator-tft-v5.getFeaturedGames", route_str, request);
2613        #[cfg(feature = "tracing")]
2614        let future = future.instrument(tracing::info_span!("spectator-tft-v5.getFeaturedGames", route = route_str));
2615        #[cfg(feature = "metrics")]
2616        let future = metrics::timed(future, "spectator-tft-v5.getFeaturedGames", route_str);
2617        future
2618    }
2619
2620    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2621    /// See `get_featured_games` for detailed documentation
2622    /// # Parameters
2623    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2624    /// * `route` - Route to query.
2625    /// # Riot Developer API Reference
2626    /// <a href="https://developer.riotgames.com/api-methods/#spectator-tft-v5/GET_getFeaturedGames" target="_blank">`spectator-tft-v5.getFeaturedGames`</a>
2627    ///
2628    /// Note: this method is automatically generated.
2629    pub fn try_get_featured_games(&self, min_capacity: f32, route: PlatformRoute)
2630        -> impl Future<Output = TryRequestResult<crate::models::spectator_tft_v5::FeaturedGames>> + 'a
2631    {
2632        let route_str = route.into();
2633        let request = self.base.request(Method::GET, route_str, "/lol/spectator/tft/v5/featured-games");
2634        let future = self.base.try_execute_val::<crate::models::spectator_tft_v5::FeaturedGames>("spectator-tft-v5.getFeaturedGames", route_str, request, min_capacity);
2635        #[cfg(feature = "tracing")]
2636        let future = future.instrument(tracing::info_span!("spectator-tft-v5.getFeaturedGames", route = route_str));
2637        #[cfg(feature = "metrics")]
2638        let future = metrics::try_timed(future, "spectator-tft-v5.getFeaturedGames", route_str);
2639        future
2640    }
2641
2642}
2643
2644/// SpectatorV5 endpoints handle, accessed by calling [`spectator_v5()`](RiotApi::spectator_v5) on a [`RiotApi`] instance.
2645/// # Riot Developer API Reference
2646/// <a href="https://developer.riotgames.com/apis#spectator-v5" target="_blank">`spectator-v5`</a>
2647///
2648/// Note: this struct is automatically generated.
2649#[repr(transparent)]
2650pub struct SpectatorV5<'a> {
2651    base: &'a RiotApi,
2652}
2653impl<'a> SpectatorV5<'a> {
2654    /// Get current game information for the given puuid.
2655    /// # Parameters
2656    /// * `route` - Route to query.
2657    /// * `encrypted_puuid` (required, in path) - The puuid of the summoner.
2658    /// # Riot Developer API Reference
2659    /// <a href="https://developer.riotgames.com/api-methods/#spectator-v5/GET_getCurrentGameInfoByPuuid" target="_blank">`spectator-v5.getCurrentGameInfoByPuuid`</a>
2660    ///
2661    /// Note: this method is automatically generated.
2662    pub fn get_current_game_info_by_puuid(&self, route: PlatformRoute, encrypted_puuid: &str)
2663        -> impl Future<Output = Result<Option<crate::models::spectator_v5::CurrentGameInfo>>> + 'a
2664    {
2665        let route_str = route.into();
2666        let request = self.base.request(Method::GET, route_str, &format!("/lol/spectator/v5/active-games/by-summoner/{}", encrypted_puuid));
2667        let future = self.base.execute_opt::<crate::models::spectator_v5::CurrentGameInfo>("spectator-v5.getCurrentGameInfoByPuuid", route_str, request);
2668        #[cfg(feature = "tracing")]
2669        let future = future.instrument(tracing::info_span!("spectator-v5.getCurrentGameInfoByPuuid", route = route_str));
2670        #[cfg(feature = "metrics")]
2671        let future = metrics::timed(future, "spectator-v5.getCurrentGameInfoByPuuid", route_str);
2672        future
2673    }
2674
2675    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2676    /// See `get_current_game_info_by_puuid` for detailed documentation
2677    /// # Parameters
2678    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2679    /// * `route` - Route to query.
2680    /// * `encrypted_puuid` (required, in path) - The puuid of the summoner.
2681    /// # Riot Developer API Reference
2682    /// <a href="https://developer.riotgames.com/api-methods/#spectator-v5/GET_getCurrentGameInfoByPuuid" target="_blank">`spectator-v5.getCurrentGameInfoByPuuid`</a>
2683    ///
2684    /// Note: this method is automatically generated.
2685    pub fn try_get_current_game_info_by_puuid(&self, min_capacity: f32, route: PlatformRoute, encrypted_puuid: &str)
2686        -> impl Future<Output = TryRequestResult<Option<crate::models::spectator_v5::CurrentGameInfo>>> + 'a
2687    {
2688        let route_str = route.into();
2689        let request = self.base.request(Method::GET, route_str, &format!("/lol/spectator/v5/active-games/by-summoner/{}", encrypted_puuid));
2690        let future = self.base.try_execute_opt::<crate::models::spectator_v5::CurrentGameInfo>("spectator-v5.getCurrentGameInfoByPuuid", route_str, request, min_capacity);
2691        #[cfg(feature = "tracing")]
2692        let future = future.instrument(tracing::info_span!("spectator-v5.getCurrentGameInfoByPuuid", route = route_str));
2693        #[cfg(feature = "metrics")]
2694        let future = metrics::try_timed(future, "spectator-v5.getCurrentGameInfoByPuuid", route_str);
2695        future
2696    }
2697
2698    /// Get list of featured games.
2699    /// # Parameters
2700    /// * `route` - Route to query.
2701    /// # Riot Developer API Reference
2702    /// <a href="https://developer.riotgames.com/api-methods/#spectator-v5/GET_getFeaturedGames" target="_blank">`spectator-v5.getFeaturedGames`</a>
2703    ///
2704    /// Note: this method is automatically generated.
2705    pub fn get_featured_games(&self, route: PlatformRoute)
2706        -> impl Future<Output = Result<crate::models::spectator_v5::FeaturedGames>> + 'a
2707    {
2708        let route_str = route.into();
2709        let request = self.base.request(Method::GET, route_str, "/lol/spectator/v5/featured-games");
2710        let future = self.base.execute_val::<crate::models::spectator_v5::FeaturedGames>("spectator-v5.getFeaturedGames", route_str, request);
2711        #[cfg(feature = "tracing")]
2712        let future = future.instrument(tracing::info_span!("spectator-v5.getFeaturedGames", route = route_str));
2713        #[cfg(feature = "metrics")]
2714        let future = metrics::timed(future, "spectator-v5.getFeaturedGames", route_str);
2715        future
2716    }
2717
2718    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2719    /// See `get_featured_games` for detailed documentation
2720    /// # Parameters
2721    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2722    /// * `route` - Route to query.
2723    /// # Riot Developer API Reference
2724    /// <a href="https://developer.riotgames.com/api-methods/#spectator-v5/GET_getFeaturedGames" target="_blank">`spectator-v5.getFeaturedGames`</a>
2725    ///
2726    /// Note: this method is automatically generated.
2727    pub fn try_get_featured_games(&self, min_capacity: f32, route: PlatformRoute)
2728        -> impl Future<Output = TryRequestResult<crate::models::spectator_v5::FeaturedGames>> + 'a
2729    {
2730        let route_str = route.into();
2731        let request = self.base.request(Method::GET, route_str, "/lol/spectator/v5/featured-games");
2732        let future = self.base.try_execute_val::<crate::models::spectator_v5::FeaturedGames>("spectator-v5.getFeaturedGames", route_str, request, min_capacity);
2733        #[cfg(feature = "tracing")]
2734        let future = future.instrument(tracing::info_span!("spectator-v5.getFeaturedGames", route = route_str));
2735        #[cfg(feature = "metrics")]
2736        let future = metrics::try_timed(future, "spectator-v5.getFeaturedGames", route_str);
2737        future
2738    }
2739
2740}
2741
2742/// SummonerV4 endpoints handle, accessed by calling [`summoner_v4()`](RiotApi::summoner_v4) on a [`RiotApi`] instance.
2743/// # Riot Developer API Reference
2744/// <a href="https://developer.riotgames.com/apis#summoner-v4" target="_blank">`summoner-v4`</a>
2745///
2746/// Note: this struct is automatically generated.
2747#[repr(transparent)]
2748pub struct SummonerV4<'a> {
2749    base: &'a RiotApi,
2750}
2751impl<'a> SummonerV4<'a> {
2752    /// Get a summoner by PUUID.
2753    /// # Parameters
2754    /// * `route` - Route to query.
2755    /// * `encrypted_puuid` (required, in path) - Summoner ID
2756    /// # Riot Developer API Reference
2757    /// <a href="https://developer.riotgames.com/api-methods/#summoner-v4/GET_getByPUUID" target="_blank">`summoner-v4.getByPUUID`</a>
2758    ///
2759    /// Note: this method is automatically generated.
2760    pub fn get_by_puuid(&self, route: PlatformRoute, encrypted_puuid: &str)
2761        -> impl Future<Output = Result<Option<crate::models::summoner_v4::Summoner>>> + 'a
2762    {
2763        let route_str = route.into();
2764        let request = self.base.request(Method::GET, route_str, &format!("/lol/summoner/v4/summoners/by-puuid/{}", encrypted_puuid));
2765        let future = self.base.execute_opt::<crate::models::summoner_v4::Summoner>("summoner-v4.getByPUUID", route_str, request);
2766        #[cfg(feature = "tracing")]
2767        let future = future.instrument(tracing::info_span!("summoner-v4.getByPUUID", route = route_str));
2768        #[cfg(feature = "metrics")]
2769        let future = metrics::timed(future, "summoner-v4.getByPUUID", route_str);
2770        future
2771    }
2772
2773    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2774    /// See `get_by_puuid` for detailed documentation
2775    /// # Parameters
2776    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2777    /// * `route` - Route to query.
2778    /// * `encrypted_puuid` (required, in path) - Summoner ID
2779    /// # Riot Developer API Reference
2780    /// <a href="https://developer.riotgames.com/api-methods/#summoner-v4/GET_getByPUUID" target="_blank">`summoner-v4.getByPUUID`</a>
2781    ///
2782    /// Note: this method is automatically generated.
2783    pub fn try_get_by_puuid(&self, min_capacity: f32, route: PlatformRoute, encrypted_puuid: &str)
2784        -> impl Future<Output = TryRequestResult<Option<crate::models::summoner_v4::Summoner>>> + 'a
2785    {
2786        let route_str = route.into();
2787        let request = self.base.request(Method::GET, route_str, &format!("/lol/summoner/v4/summoners/by-puuid/{}", encrypted_puuid));
2788        let future = self.base.try_execute_opt::<crate::models::summoner_v4::Summoner>("summoner-v4.getByPUUID", route_str, request, min_capacity);
2789        #[cfg(feature = "tracing")]
2790        let future = future.instrument(tracing::info_span!("summoner-v4.getByPUUID", route = route_str));
2791        #[cfg(feature = "metrics")]
2792        let future = metrics::try_timed(future, "summoner-v4.getByPUUID", route_str);
2793        future
2794    }
2795
2796    /// Get a summoner by access token.
2797    /// # Parameters
2798    /// * `route` - Route to query.
2799    /// * `access_token` - RSO access token.
2800    /// # RSO
2801    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
2802    /// via the `access_token` parameter, instead of the Riot API key.
2803    /// # Riot Developer API Reference
2804    /// <a href="https://developer.riotgames.com/api-methods/#summoner-v4/GET_getByAccessToken" target="_blank">`summoner-v4.getByAccessToken`</a>
2805    ///
2806    /// Note: this method is automatically generated.
2807    pub fn get_by_access_token(&self, route: PlatformRoute, access_token: impl std::fmt::Display)
2808        -> impl Future<Output = Result<crate::models::summoner_v4::Summoner>> + 'a
2809    {
2810        let route_str = route.into();
2811        let request = self.base.request(Method::GET, route_str, "/lol/summoner/v4/summoners/me");
2812        let mut request = request.bearer_auth(access_token);
2813        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
2814        let future = self.base.execute_val::<crate::models::summoner_v4::Summoner>("summoner-v4.getByAccessToken", route_str, request);
2815        #[cfg(feature = "tracing")]
2816        let future = future.instrument(tracing::info_span!("summoner-v4.getByAccessToken", route = route_str));
2817        #[cfg(feature = "metrics")]
2818        let future = metrics::timed(future, "summoner-v4.getByAccessToken", route_str);
2819        future
2820    }
2821
2822    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2823    /// See `get_by_access_token` for detailed documentation
2824    /// # Parameters
2825    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2826    /// * `route` - Route to query.
2827    /// * `access_token` - RSO access token.
2828    /// # RSO
2829    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
2830    /// via the `access_token` parameter, instead of the Riot API key.
2831    /// # Riot Developer API Reference
2832    /// <a href="https://developer.riotgames.com/api-methods/#summoner-v4/GET_getByAccessToken" target="_blank">`summoner-v4.getByAccessToken`</a>
2833    ///
2834    /// Note: this method is automatically generated.
2835    pub fn try_get_by_access_token(&self, min_capacity: f32, route: PlatformRoute, access_token: impl std::fmt::Display)
2836        -> impl Future<Output = TryRequestResult<crate::models::summoner_v4::Summoner>> + 'a
2837    {
2838        let route_str = route.into();
2839        let request = self.base.request(Method::GET, route_str, "/lol/summoner/v4/summoners/me");
2840        let mut request = request.bearer_auth(access_token);
2841        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
2842        let future = self.base.try_execute_val::<crate::models::summoner_v4::Summoner>("summoner-v4.getByAccessToken", route_str, request, min_capacity);
2843        #[cfg(feature = "tracing")]
2844        let future = future.instrument(tracing::info_span!("summoner-v4.getByAccessToken", route = route_str));
2845        #[cfg(feature = "metrics")]
2846        let future = metrics::try_timed(future, "summoner-v4.getByAccessToken", route_str);
2847        future
2848    }
2849
2850}
2851
2852/// TftLeagueV1 endpoints handle, accessed by calling [`tft_league_v1()`](RiotApi::tft_league_v1) on a [`RiotApi`] instance.
2853/// # Riot Developer API Reference
2854/// <a href="https://developer.riotgames.com/apis#tft-league-v1" target="_blank">`tft-league-v1`</a>
2855///
2856/// Note: this struct is automatically generated.
2857#[repr(transparent)]
2858pub struct TftLeagueV1<'a> {
2859    base: &'a RiotApi,
2860}
2861impl<'a> TftLeagueV1<'a> {
2862    /// Get league entries in all queues for a given puuid
2863    /// # Parameters
2864    /// * `route` - Route to query.
2865    /// * `puuid` (required, in path)
2866    /// # Riot Developer API Reference
2867    /// <a href="https://developer.riotgames.com/api-methods/#tft-league-v1/GET_getLeagueEntriesByPUUID" target="_blank">`tft-league-v1.getLeagueEntriesByPUUID`</a>
2868    ///
2869    /// Note: this method is automatically generated.
2870    pub fn get_league_entries_by_puuid(&self, route: PlatformRoute, puuid: &str)
2871        -> impl Future<Output = Result<Vec<crate::models::tft_league_v1::LeagueEntry>>> + 'a
2872    {
2873        let route_str = route.into();
2874        let request = self.base.request(Method::GET, route_str, &format!("/tft/league/v1/by-puuid/{}", puuid));
2875        let future = self.base.execute_val::<Vec<crate::models::tft_league_v1::LeagueEntry>>("tft-league-v1.getLeagueEntriesByPUUID", route_str, request);
2876        #[cfg(feature = "tracing")]
2877        let future = future.instrument(tracing::info_span!("tft-league-v1.getLeagueEntriesByPUUID", route = route_str));
2878        #[cfg(feature = "metrics")]
2879        let future = metrics::timed(future, "tft-league-v1.getLeagueEntriesByPUUID", route_str);
2880        future
2881    }
2882
2883    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2884    /// See `get_league_entries_by_puuid` for detailed documentation
2885    /// # Parameters
2886    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2887    /// * `route` - Route to query.
2888    /// * `puuid` (required, in path)
2889    /// # Riot Developer API Reference
2890    /// <a href="https://developer.riotgames.com/api-methods/#tft-league-v1/GET_getLeagueEntriesByPUUID" target="_blank">`tft-league-v1.getLeagueEntriesByPUUID`</a>
2891    ///
2892    /// Note: this method is automatically generated.
2893    pub fn try_get_league_entries_by_puuid(&self, min_capacity: f32, route: PlatformRoute, puuid: &str)
2894        -> impl Future<Output = TryRequestResult<Vec<crate::models::tft_league_v1::LeagueEntry>>> + 'a
2895    {
2896        let route_str = route.into();
2897        let request = self.base.request(Method::GET, route_str, &format!("/tft/league/v1/by-puuid/{}", puuid));
2898        let future = self.base.try_execute_val::<Vec<crate::models::tft_league_v1::LeagueEntry>>("tft-league-v1.getLeagueEntriesByPUUID", route_str, request, min_capacity);
2899        #[cfg(feature = "tracing")]
2900        let future = future.instrument(tracing::info_span!("tft-league-v1.getLeagueEntriesByPUUID", route = route_str));
2901        #[cfg(feature = "metrics")]
2902        let future = metrics::try_timed(future, "tft-league-v1.getLeagueEntriesByPUUID", route_str);
2903        future
2904    }
2905
2906    /// Get the challenger league.
2907    /// # Parameters
2908    /// * `route` - Route to query.
2909    /// * `queue` (optional, in query) - Defaults to RANKED_TFT.
2910    /// # Riot Developer API Reference
2911    /// <a href="https://developer.riotgames.com/api-methods/#tft-league-v1/GET_getChallengerLeague" target="_blank">`tft-league-v1.getChallengerLeague`</a>
2912    ///
2913    /// Note: this method is automatically generated.
2914    pub fn get_challenger_league(&self, route: PlatformRoute, queue: Option<&str>)
2915        -> impl Future<Output = Result<crate::models::tft_league_v1::LeagueList>> + 'a
2916    {
2917        let route_str = route.into();
2918        let request = self.base.request(Method::GET, route_str, "/tft/league/v1/challenger");
2919        let request = if let Some(queue) = queue { request.query(&[ ("queue", queue) ]) } else { request };
2920        let future = self.base.execute_val::<crate::models::tft_league_v1::LeagueList>("tft-league-v1.getChallengerLeague", route_str, request);
2921        #[cfg(feature = "tracing")]
2922        let future = future.instrument(tracing::info_span!("tft-league-v1.getChallengerLeague", route = route_str));
2923        #[cfg(feature = "metrics")]
2924        let future = metrics::timed(future, "tft-league-v1.getChallengerLeague", route_str);
2925        future
2926    }
2927
2928    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2929    /// See `get_challenger_league` for detailed documentation
2930    /// # Parameters
2931    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2932    /// * `route` - Route to query.
2933    /// * `queue` (optional, in query) - Defaults to RANKED_TFT.
2934    /// # Riot Developer API Reference
2935    /// <a href="https://developer.riotgames.com/api-methods/#tft-league-v1/GET_getChallengerLeague" target="_blank">`tft-league-v1.getChallengerLeague`</a>
2936    ///
2937    /// Note: this method is automatically generated.
2938    pub fn try_get_challenger_league(&self, min_capacity: f32, route: PlatformRoute, queue: Option<&str>)
2939        -> impl Future<Output = TryRequestResult<crate::models::tft_league_v1::LeagueList>> + 'a
2940    {
2941        let route_str = route.into();
2942        let request = self.base.request(Method::GET, route_str, "/tft/league/v1/challenger");
2943        let request = if let Some(queue) = queue { request.query(&[ ("queue", queue) ]) } else { request };
2944        let future = self.base.try_execute_val::<crate::models::tft_league_v1::LeagueList>("tft-league-v1.getChallengerLeague", route_str, request, min_capacity);
2945        #[cfg(feature = "tracing")]
2946        let future = future.instrument(tracing::info_span!("tft-league-v1.getChallengerLeague", route = route_str));
2947        #[cfg(feature = "metrics")]
2948        let future = metrics::try_timed(future, "tft-league-v1.getChallengerLeague", route_str);
2949        future
2950    }
2951
2952    /// Get all the league entries.
2953    /// # Parameters
2954    /// * `route` - Route to query.
2955    /// * `tier` (required, in path)
2956    /// * `division` (required, in path)
2957    /// * `queue` (optional, in query) - Defaults to RANKED_TFT.
2958    /// * `page` (optional, in query) - Defaults to 1. Starts with page 1.
2959    /// # Riot Developer API Reference
2960    /// <a href="https://developer.riotgames.com/api-methods/#tft-league-v1/GET_getLeagueEntries" target="_blank">`tft-league-v1.getLeagueEntries`</a>
2961    ///
2962    /// Note: this method is automatically generated.
2963    pub fn get_league_entries(&self, route: PlatformRoute, tier: crate::consts::Tier, division: &str, page: Option<i32>, queue: Option<&str>)
2964        -> impl Future<Output = Result<Vec<crate::models::tft_league_v1::LeagueEntry>>> + 'a
2965    {
2966        let route_str = route.into();
2967        let request = self.base.request(Method::GET, route_str, &format!("/tft/league/v1/entries/{}/{}", tier, division));
2968        let request = if let Some(page) = page { request.query(&[ ("page", page) ]) } else { request };
2969        let request = if let Some(queue) = queue { request.query(&[ ("queue", queue) ]) } else { request };
2970        let future = self.base.execute_val::<Vec<crate::models::tft_league_v1::LeagueEntry>>("tft-league-v1.getLeagueEntries", route_str, request);
2971        #[cfg(feature = "tracing")]
2972        let future = future.instrument(tracing::info_span!("tft-league-v1.getLeagueEntries", route = route_str));
2973        #[cfg(feature = "metrics")]
2974        let future = metrics::timed(future, "tft-league-v1.getLeagueEntries", route_str);
2975        future
2976    }
2977
2978    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
2979    /// See `get_league_entries` for detailed documentation
2980    /// # Parameters
2981    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
2982    /// * `route` - Route to query.
2983    /// * `tier` (required, in path)
2984    /// * `division` (required, in path)
2985    /// * `queue` (optional, in query) - Defaults to RANKED_TFT.
2986    /// * `page` (optional, in query) - Defaults to 1. Starts with page 1.
2987    /// # Riot Developer API Reference
2988    /// <a href="https://developer.riotgames.com/api-methods/#tft-league-v1/GET_getLeagueEntries" target="_blank">`tft-league-v1.getLeagueEntries`</a>
2989    ///
2990    /// Note: this method is automatically generated.
2991    pub fn try_get_league_entries(&self, min_capacity: f32, route: PlatformRoute, tier: crate::consts::Tier, division: &str, page: Option<i32>, queue: Option<&str>)
2992        -> impl Future<Output = TryRequestResult<Vec<crate::models::tft_league_v1::LeagueEntry>>> + 'a
2993    {
2994        let route_str = route.into();
2995        let request = self.base.request(Method::GET, route_str, &format!("/tft/league/v1/entries/{}/{}", tier, division));
2996        let request = if let Some(page) = page { request.query(&[ ("page", page) ]) } else { request };
2997        let request = if let Some(queue) = queue { request.query(&[ ("queue", queue) ]) } else { request };
2998        let future = self.base.try_execute_val::<Vec<crate::models::tft_league_v1::LeagueEntry>>("tft-league-v1.getLeagueEntries", route_str, request, min_capacity);
2999        #[cfg(feature = "tracing")]
3000        let future = future.instrument(tracing::info_span!("tft-league-v1.getLeagueEntries", route = route_str));
3001        #[cfg(feature = "metrics")]
3002        let future = metrics::try_timed(future, "tft-league-v1.getLeagueEntries", route_str);
3003        future
3004    }
3005
3006    /// Get the grandmaster league.
3007    /// # Parameters
3008    /// * `route` - Route to query.
3009    /// * `queue` (optional, in query) - Defaults to RANKED_TFT.
3010    /// # Riot Developer API Reference
3011    /// <a href="https://developer.riotgames.com/api-methods/#tft-league-v1/GET_getGrandmasterLeague" target="_blank">`tft-league-v1.getGrandmasterLeague`</a>
3012    ///
3013    /// Note: this method is automatically generated.
3014    pub fn get_grandmaster_league(&self, route: PlatformRoute, queue: Option<&str>)
3015        -> impl Future<Output = Result<crate::models::tft_league_v1::LeagueList>> + 'a
3016    {
3017        let route_str = route.into();
3018        let request = self.base.request(Method::GET, route_str, "/tft/league/v1/grandmaster");
3019        let request = if let Some(queue) = queue { request.query(&[ ("queue", queue) ]) } else { request };
3020        let future = self.base.execute_val::<crate::models::tft_league_v1::LeagueList>("tft-league-v1.getGrandmasterLeague", route_str, request);
3021        #[cfg(feature = "tracing")]
3022        let future = future.instrument(tracing::info_span!("tft-league-v1.getGrandmasterLeague", route = route_str));
3023        #[cfg(feature = "metrics")]
3024        let future = metrics::timed(future, "tft-league-v1.getGrandmasterLeague", route_str);
3025        future
3026    }
3027
3028    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3029    /// See `get_grandmaster_league` for detailed documentation
3030    /// # Parameters
3031    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3032    /// * `route` - Route to query.
3033    /// * `queue` (optional, in query) - Defaults to RANKED_TFT.
3034    /// # Riot Developer API Reference
3035    /// <a href="https://developer.riotgames.com/api-methods/#tft-league-v1/GET_getGrandmasterLeague" target="_blank">`tft-league-v1.getGrandmasterLeague`</a>
3036    ///
3037    /// Note: this method is automatically generated.
3038    pub fn try_get_grandmaster_league(&self, min_capacity: f32, route: PlatformRoute, queue: Option<&str>)
3039        -> impl Future<Output = TryRequestResult<crate::models::tft_league_v1::LeagueList>> + 'a
3040    {
3041        let route_str = route.into();
3042        let request = self.base.request(Method::GET, route_str, "/tft/league/v1/grandmaster");
3043        let request = if let Some(queue) = queue { request.query(&[ ("queue", queue) ]) } else { request };
3044        let future = self.base.try_execute_val::<crate::models::tft_league_v1::LeagueList>("tft-league-v1.getGrandmasterLeague", route_str, request, min_capacity);
3045        #[cfg(feature = "tracing")]
3046        let future = future.instrument(tracing::info_span!("tft-league-v1.getGrandmasterLeague", route = route_str));
3047        #[cfg(feature = "metrics")]
3048        let future = metrics::try_timed(future, "tft-league-v1.getGrandmasterLeague", route_str);
3049        future
3050    }
3051
3052    /// Get league with given ID, including inactive entries.
3053    /// # Parameters
3054    /// * `route` - Route to query.
3055    /// * `league_id` (required, in path) - The UUID of the league.
3056    /// # Riot Developer API Reference
3057    /// <a href="https://developer.riotgames.com/api-methods/#tft-league-v1/GET_getLeagueById" target="_blank">`tft-league-v1.getLeagueById`</a>
3058    ///
3059    /// Note: this method is automatically generated.
3060    pub fn get_league_by_id(&self, route: PlatformRoute, league_id: &str)
3061        -> impl Future<Output = Result<Option<crate::models::tft_league_v1::LeagueList>>> + 'a
3062    {
3063        let route_str = route.into();
3064        let request = self.base.request(Method::GET, route_str, &format!("/tft/league/v1/leagues/{}", league_id));
3065        let future = self.base.execute_opt::<crate::models::tft_league_v1::LeagueList>("tft-league-v1.getLeagueById", route_str, request);
3066        #[cfg(feature = "tracing")]
3067        let future = future.instrument(tracing::info_span!("tft-league-v1.getLeagueById", route = route_str));
3068        #[cfg(feature = "metrics")]
3069        let future = metrics::timed(future, "tft-league-v1.getLeagueById", route_str);
3070        future
3071    }
3072
3073    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3074    /// See `get_league_by_id` for detailed documentation
3075    /// # Parameters
3076    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3077    /// * `route` - Route to query.
3078    /// * `league_id` (required, in path) - The UUID of the league.
3079    /// # Riot Developer API Reference
3080    /// <a href="https://developer.riotgames.com/api-methods/#tft-league-v1/GET_getLeagueById" target="_blank">`tft-league-v1.getLeagueById`</a>
3081    ///
3082    /// Note: this method is automatically generated.
3083    pub fn try_get_league_by_id(&self, min_capacity: f32, route: PlatformRoute, league_id: &str)
3084        -> impl Future<Output = TryRequestResult<Option<crate::models::tft_league_v1::LeagueList>>> + 'a
3085    {
3086        let route_str = route.into();
3087        let request = self.base.request(Method::GET, route_str, &format!("/tft/league/v1/leagues/{}", league_id));
3088        let future = self.base.try_execute_opt::<crate::models::tft_league_v1::LeagueList>("tft-league-v1.getLeagueById", route_str, request, min_capacity);
3089        #[cfg(feature = "tracing")]
3090        let future = future.instrument(tracing::info_span!("tft-league-v1.getLeagueById", route = route_str));
3091        #[cfg(feature = "metrics")]
3092        let future = metrics::try_timed(future, "tft-league-v1.getLeagueById", route_str);
3093        future
3094    }
3095
3096    /// Get the master league.
3097    /// # Parameters
3098    /// * `route` - Route to query.
3099    /// * `queue` (optional, in query) - Defaults to RANKED_TFT.
3100    /// # Riot Developer API Reference
3101    /// <a href="https://developer.riotgames.com/api-methods/#tft-league-v1/GET_getMasterLeague" target="_blank">`tft-league-v1.getMasterLeague`</a>
3102    ///
3103    /// Note: this method is automatically generated.
3104    pub fn get_master_league(&self, route: PlatformRoute, queue: Option<&str>)
3105        -> impl Future<Output = Result<crate::models::tft_league_v1::LeagueList>> + 'a
3106    {
3107        let route_str = route.into();
3108        let request = self.base.request(Method::GET, route_str, "/tft/league/v1/master");
3109        let request = if let Some(queue) = queue { request.query(&[ ("queue", queue) ]) } else { request };
3110        let future = self.base.execute_val::<crate::models::tft_league_v1::LeagueList>("tft-league-v1.getMasterLeague", route_str, request);
3111        #[cfg(feature = "tracing")]
3112        let future = future.instrument(tracing::info_span!("tft-league-v1.getMasterLeague", route = route_str));
3113        #[cfg(feature = "metrics")]
3114        let future = metrics::timed(future, "tft-league-v1.getMasterLeague", route_str);
3115        future
3116    }
3117
3118    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3119    /// See `get_master_league` for detailed documentation
3120    /// # Parameters
3121    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3122    /// * `route` - Route to query.
3123    /// * `queue` (optional, in query) - Defaults to RANKED_TFT.
3124    /// # Riot Developer API Reference
3125    /// <a href="https://developer.riotgames.com/api-methods/#tft-league-v1/GET_getMasterLeague" target="_blank">`tft-league-v1.getMasterLeague`</a>
3126    ///
3127    /// Note: this method is automatically generated.
3128    pub fn try_get_master_league(&self, min_capacity: f32, route: PlatformRoute, queue: Option<&str>)
3129        -> impl Future<Output = TryRequestResult<crate::models::tft_league_v1::LeagueList>> + 'a
3130    {
3131        let route_str = route.into();
3132        let request = self.base.request(Method::GET, route_str, "/tft/league/v1/master");
3133        let request = if let Some(queue) = queue { request.query(&[ ("queue", queue) ]) } else { request };
3134        let future = self.base.try_execute_val::<crate::models::tft_league_v1::LeagueList>("tft-league-v1.getMasterLeague", route_str, request, min_capacity);
3135        #[cfg(feature = "tracing")]
3136        let future = future.instrument(tracing::info_span!("tft-league-v1.getMasterLeague", route = route_str));
3137        #[cfg(feature = "metrics")]
3138        let future = metrics::try_timed(future, "tft-league-v1.getMasterLeague", route_str);
3139        future
3140    }
3141
3142    /// Get the top rated ladder for given queue
3143    /// # Parameters
3144    /// * `route` - Route to query.
3145    /// * `queue` (required, in path)
3146    /// # Riot Developer API Reference
3147    /// <a href="https://developer.riotgames.com/api-methods/#tft-league-v1/GET_getTopRatedLadder" target="_blank">`tft-league-v1.getTopRatedLadder`</a>
3148    ///
3149    /// Note: this method is automatically generated.
3150    pub fn get_top_rated_ladder(&self, route: PlatformRoute, queue: crate::consts::QueueType)
3151        -> impl Future<Output = Result<Vec<crate::models::tft_league_v1::TopRatedLadderEntry>>> + 'a
3152    {
3153        let route_str = route.into();
3154        let request = self.base.request(Method::GET, route_str, &format!("/tft/league/v1/rated-ladders/{}/top", queue));
3155        let future = self.base.execute_val::<Vec<crate::models::tft_league_v1::TopRatedLadderEntry>>("tft-league-v1.getTopRatedLadder", route_str, request);
3156        #[cfg(feature = "tracing")]
3157        let future = future.instrument(tracing::info_span!("tft-league-v1.getTopRatedLadder", route = route_str));
3158        #[cfg(feature = "metrics")]
3159        let future = metrics::timed(future, "tft-league-v1.getTopRatedLadder", route_str);
3160        future
3161    }
3162
3163    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3164    /// See `get_top_rated_ladder` for detailed documentation
3165    /// # Parameters
3166    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3167    /// * `route` - Route to query.
3168    /// * `queue` (required, in path)
3169    /// # Riot Developer API Reference
3170    /// <a href="https://developer.riotgames.com/api-methods/#tft-league-v1/GET_getTopRatedLadder" target="_blank">`tft-league-v1.getTopRatedLadder`</a>
3171    ///
3172    /// Note: this method is automatically generated.
3173    pub fn try_get_top_rated_ladder(&self, min_capacity: f32, route: PlatformRoute, queue: crate::consts::QueueType)
3174        -> impl Future<Output = TryRequestResult<Vec<crate::models::tft_league_v1::TopRatedLadderEntry>>> + 'a
3175    {
3176        let route_str = route.into();
3177        let request = self.base.request(Method::GET, route_str, &format!("/tft/league/v1/rated-ladders/{}/top", queue));
3178        let future = self.base.try_execute_val::<Vec<crate::models::tft_league_v1::TopRatedLadderEntry>>("tft-league-v1.getTopRatedLadder", route_str, request, min_capacity);
3179        #[cfg(feature = "tracing")]
3180        let future = future.instrument(tracing::info_span!("tft-league-v1.getTopRatedLadder", route = route_str));
3181        #[cfg(feature = "metrics")]
3182        let future = metrics::try_timed(future, "tft-league-v1.getTopRatedLadder", route_str);
3183        future
3184    }
3185
3186}
3187
3188/// TftMatchV1 endpoints handle, accessed by calling [`tft_match_v1()`](RiotApi::tft_match_v1) on a [`RiotApi`] instance.
3189/// # Riot Developer API Reference
3190/// <a href="https://developer.riotgames.com/apis#tft-match-v1" target="_blank">`tft-match-v1`</a>
3191///
3192/// Note: this struct is automatically generated.
3193#[repr(transparent)]
3194pub struct TftMatchV1<'a> {
3195    base: &'a RiotApi,
3196}
3197impl<'a> TftMatchV1<'a> {
3198    /// Get a list of match ids by PUUID
3199    /// # Parameters
3200    /// * `route` - Route to query.
3201    /// * `puuid` (required, in path)
3202    /// * `start` (optional, in query) - Defaults to 0. Start index.
3203    /// * `end_time` (optional, in query) - Epoch timestamp in seconds.
3204    /// * `start_time` (optional, in query) - Epoch timestamp in seconds. The matchlist started storing timestamps on June 16th, 2021. Any matches played before June 16th, 2021 won't be included in the results if the startTime filter is set.
3205    /// * `count` (optional, in query) - Defaults to 20. Number of match ids to return.
3206    /// # Riot Developer API Reference
3207    /// <a href="https://developer.riotgames.com/api-methods/#tft-match-v1/GET_getMatchIdsByPUUID" target="_blank">`tft-match-v1.getMatchIdsByPUUID`</a>
3208    ///
3209    /// Note: this method is automatically generated.
3210    pub fn get_match_ids_by_puuid(&self, route: RegionalRoute, puuid: &str, count: Option<i32>, end_time: Option<i64>, start: Option<i32>, start_time: Option<i64>)
3211        -> impl Future<Output = Result<Vec<String>>> + 'a
3212    {
3213        let route_str = route.into();
3214        let request = self.base.request(Method::GET, route_str, &format!("/tft/match/v1/matches/by-puuid/{}/ids", puuid));
3215        let request = if let Some(count) = count { request.query(&[ ("count", count) ]) } else { request };
3216        let request = if let Some(end_time) = end_time { request.query(&[ ("endTime", end_time) ]) } else { request };
3217        let request = if let Some(start) = start { request.query(&[ ("start", start) ]) } else { request };
3218        let request = if let Some(start_time) = start_time { request.query(&[ ("startTime", start_time) ]) } else { request };
3219        let future = self.base.execute_val::<Vec<String>>("tft-match-v1.getMatchIdsByPUUID", route_str, request);
3220        #[cfg(feature = "tracing")]
3221        let future = future.instrument(tracing::info_span!("tft-match-v1.getMatchIdsByPUUID", route = route_str));
3222        #[cfg(feature = "metrics")]
3223        let future = metrics::timed(future, "tft-match-v1.getMatchIdsByPUUID", route_str);
3224        future
3225    }
3226
3227    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3228    /// See `get_match_ids_by_puuid` for detailed documentation
3229    /// # Parameters
3230    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3231    /// * `route` - Route to query.
3232    /// * `puuid` (required, in path)
3233    /// * `start` (optional, in query) - Defaults to 0. Start index.
3234    /// * `end_time` (optional, in query) - Epoch timestamp in seconds.
3235    /// * `start_time` (optional, in query) - Epoch timestamp in seconds. The matchlist started storing timestamps on June 16th, 2021. Any matches played before June 16th, 2021 won't be included in the results if the startTime filter is set.
3236    /// * `count` (optional, in query) - Defaults to 20. Number of match ids to return.
3237    /// # Riot Developer API Reference
3238    /// <a href="https://developer.riotgames.com/api-methods/#tft-match-v1/GET_getMatchIdsByPUUID" target="_blank">`tft-match-v1.getMatchIdsByPUUID`</a>
3239    ///
3240    /// Note: this method is automatically generated.
3241    pub fn try_get_match_ids_by_puuid(&self, min_capacity: f32, route: RegionalRoute, puuid: &str, count: Option<i32>, end_time: Option<i64>, start: Option<i32>, start_time: Option<i64>)
3242        -> impl Future<Output = TryRequestResult<Vec<String>>> + 'a
3243    {
3244        let route_str = route.into();
3245        let request = self.base.request(Method::GET, route_str, &format!("/tft/match/v1/matches/by-puuid/{}/ids", puuid));
3246        let request = if let Some(count) = count { request.query(&[ ("count", count) ]) } else { request };
3247        let request = if let Some(end_time) = end_time { request.query(&[ ("endTime", end_time) ]) } else { request };
3248        let request = if let Some(start) = start { request.query(&[ ("start", start) ]) } else { request };
3249        let request = if let Some(start_time) = start_time { request.query(&[ ("startTime", start_time) ]) } else { request };
3250        let future = self.base.try_execute_val::<Vec<String>>("tft-match-v1.getMatchIdsByPUUID", route_str, request, min_capacity);
3251        #[cfg(feature = "tracing")]
3252        let future = future.instrument(tracing::info_span!("tft-match-v1.getMatchIdsByPUUID", route = route_str));
3253        #[cfg(feature = "metrics")]
3254        let future = metrics::try_timed(future, "tft-match-v1.getMatchIdsByPUUID", route_str);
3255        future
3256    }
3257
3258    /// Get a match by match id
3259    /// # Parameters
3260    /// * `route` - Route to query.
3261    /// * `match_id` (required, in path)
3262    /// # Riot Developer API Reference
3263    /// <a href="https://developer.riotgames.com/api-methods/#tft-match-v1/GET_getMatch" target="_blank">`tft-match-v1.getMatch`</a>
3264    ///
3265    /// Note: this method is automatically generated.
3266    pub fn get_match(&self, route: RegionalRoute, match_id: &str)
3267        -> impl Future<Output = Result<Option<crate::models::tft_match_v1::Match>>> + 'a
3268    {
3269        let route_str = route.into();
3270        let request = self.base.request(Method::GET, route_str, &format!("/tft/match/v1/matches/{}", match_id));
3271        let future = self.base.execute_opt::<crate::models::tft_match_v1::Match>("tft-match-v1.getMatch", route_str, request);
3272        #[cfg(feature = "tracing")]
3273        let future = future.instrument(tracing::info_span!("tft-match-v1.getMatch", route = route_str));
3274        #[cfg(feature = "metrics")]
3275        let future = metrics::timed(future, "tft-match-v1.getMatch", route_str);
3276        future
3277    }
3278
3279    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3280    /// See `get_match` for detailed documentation
3281    /// # Parameters
3282    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3283    /// * `route` - Route to query.
3284    /// * `match_id` (required, in path)
3285    /// # Riot Developer API Reference
3286    /// <a href="https://developer.riotgames.com/api-methods/#tft-match-v1/GET_getMatch" target="_blank">`tft-match-v1.getMatch`</a>
3287    ///
3288    /// Note: this method is automatically generated.
3289    pub fn try_get_match(&self, min_capacity: f32, route: RegionalRoute, match_id: &str)
3290        -> impl Future<Output = TryRequestResult<Option<crate::models::tft_match_v1::Match>>> + 'a
3291    {
3292        let route_str = route.into();
3293        let request = self.base.request(Method::GET, route_str, &format!("/tft/match/v1/matches/{}", match_id));
3294        let future = self.base.try_execute_opt::<crate::models::tft_match_v1::Match>("tft-match-v1.getMatch", route_str, request, min_capacity);
3295        #[cfg(feature = "tracing")]
3296        let future = future.instrument(tracing::info_span!("tft-match-v1.getMatch", route = route_str));
3297        #[cfg(feature = "metrics")]
3298        let future = metrics::try_timed(future, "tft-match-v1.getMatch", route_str);
3299        future
3300    }
3301
3302}
3303
3304/// TftStatusV1 endpoints handle, accessed by calling [`tft_status_v1()`](RiotApi::tft_status_v1) on a [`RiotApi`] instance.
3305/// # Riot Developer API Reference
3306/// <a href="https://developer.riotgames.com/apis#tft-status-v1" target="_blank">`tft-status-v1`</a>
3307///
3308/// Note: this struct is automatically generated.
3309#[repr(transparent)]
3310pub struct TftStatusV1<'a> {
3311    base: &'a RiotApi,
3312}
3313impl<'a> TftStatusV1<'a> {
3314    /// Get Teamfight Tactics status for the given platform.
3315    /// # Parameters
3316    /// * `route` - Route to query.
3317    /// # Riot Developer API Reference
3318    /// <a href="https://developer.riotgames.com/api-methods/#tft-status-v1/GET_getPlatformData" target="_blank">`tft-status-v1.getPlatformData`</a>
3319    ///
3320    /// Note: this method is automatically generated.
3321    pub fn get_platform_data(&self, route: PlatformRoute)
3322        -> impl Future<Output = Result<crate::models::tft_status_v1::PlatformData>> + 'a
3323    {
3324        let route_str = route.into();
3325        let request = self.base.request(Method::GET, route_str, "/tft/status/v1/platform-data");
3326        let future = self.base.execute_val::<crate::models::tft_status_v1::PlatformData>("tft-status-v1.getPlatformData", route_str, request);
3327        #[cfg(feature = "tracing")]
3328        let future = future.instrument(tracing::info_span!("tft-status-v1.getPlatformData", route = route_str));
3329        #[cfg(feature = "metrics")]
3330        let future = metrics::timed(future, "tft-status-v1.getPlatformData", route_str);
3331        future
3332    }
3333
3334    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3335    /// See `get_platform_data` for detailed documentation
3336    /// # Parameters
3337    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3338    /// * `route` - Route to query.
3339    /// # Riot Developer API Reference
3340    /// <a href="https://developer.riotgames.com/api-methods/#tft-status-v1/GET_getPlatformData" target="_blank">`tft-status-v1.getPlatformData`</a>
3341    ///
3342    /// Note: this method is automatically generated.
3343    pub fn try_get_platform_data(&self, min_capacity: f32, route: PlatformRoute)
3344        -> impl Future<Output = TryRequestResult<crate::models::tft_status_v1::PlatformData>> + 'a
3345    {
3346        let route_str = route.into();
3347        let request = self.base.request(Method::GET, route_str, "/tft/status/v1/platform-data");
3348        let future = self.base.try_execute_val::<crate::models::tft_status_v1::PlatformData>("tft-status-v1.getPlatformData", route_str, request, min_capacity);
3349        #[cfg(feature = "tracing")]
3350        let future = future.instrument(tracing::info_span!("tft-status-v1.getPlatformData", route = route_str));
3351        #[cfg(feature = "metrics")]
3352        let future = metrics::try_timed(future, "tft-status-v1.getPlatformData", route_str);
3353        future
3354    }
3355
3356}
3357
3358/// TftSummonerV1 endpoints handle, accessed by calling [`tft_summoner_v1()`](RiotApi::tft_summoner_v1) on a [`RiotApi`] instance.
3359/// # Riot Developer API Reference
3360/// <a href="https://developer.riotgames.com/apis#tft-summoner-v1" target="_blank">`tft-summoner-v1`</a>
3361///
3362/// Note: this struct is automatically generated.
3363#[repr(transparent)]
3364pub struct TftSummonerV1<'a> {
3365    base: &'a RiotApi,
3366}
3367impl<'a> TftSummonerV1<'a> {
3368    /// Get a summoner by PUUID.
3369    /// # Parameters
3370    /// * `route` - Route to query.
3371    /// * `encrypted_puuid` (required, in path) - Summoner ID
3372    /// # Riot Developer API Reference
3373    /// <a href="https://developer.riotgames.com/api-methods/#tft-summoner-v1/GET_getByPUUID" target="_blank">`tft-summoner-v1.getByPUUID`</a>
3374    ///
3375    /// Note: this method is automatically generated.
3376    pub fn get_by_puuid(&self, route: PlatformRoute, encrypted_puuid: &str)
3377        -> impl Future<Output = Result<crate::models::tft_summoner_v1::Summoner>> + 'a
3378    {
3379        let route_str = route.into();
3380        let request = self.base.request(Method::GET, route_str, &format!("/tft/summoner/v1/summoners/by-puuid/{}", encrypted_puuid));
3381        let future = self.base.execute_val::<crate::models::tft_summoner_v1::Summoner>("tft-summoner-v1.getByPUUID", route_str, request);
3382        #[cfg(feature = "tracing")]
3383        let future = future.instrument(tracing::info_span!("tft-summoner-v1.getByPUUID", route = route_str));
3384        #[cfg(feature = "metrics")]
3385        let future = metrics::timed(future, "tft-summoner-v1.getByPUUID", route_str);
3386        future
3387    }
3388
3389    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3390    /// See `get_by_puuid` for detailed documentation
3391    /// # Parameters
3392    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3393    /// * `route` - Route to query.
3394    /// * `encrypted_puuid` (required, in path) - Summoner ID
3395    /// # Riot Developer API Reference
3396    /// <a href="https://developer.riotgames.com/api-methods/#tft-summoner-v1/GET_getByPUUID" target="_blank">`tft-summoner-v1.getByPUUID`</a>
3397    ///
3398    /// Note: this method is automatically generated.
3399    pub fn try_get_by_puuid(&self, min_capacity: f32, route: PlatformRoute, encrypted_puuid: &str)
3400        -> impl Future<Output = TryRequestResult<crate::models::tft_summoner_v1::Summoner>> + 'a
3401    {
3402        let route_str = route.into();
3403        let request = self.base.request(Method::GET, route_str, &format!("/tft/summoner/v1/summoners/by-puuid/{}", encrypted_puuid));
3404        let future = self.base.try_execute_val::<crate::models::tft_summoner_v1::Summoner>("tft-summoner-v1.getByPUUID", route_str, request, min_capacity);
3405        #[cfg(feature = "tracing")]
3406        let future = future.instrument(tracing::info_span!("tft-summoner-v1.getByPUUID", route = route_str));
3407        #[cfg(feature = "metrics")]
3408        let future = metrics::try_timed(future, "tft-summoner-v1.getByPUUID", route_str);
3409        future
3410    }
3411
3412    /// Get a summoner by access token.
3413    /// # Parameters
3414    /// * `route` - Route to query.
3415    /// * `access_token` - RSO access token.
3416    /// # RSO
3417    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
3418    /// via the `access_token` parameter, instead of the Riot API key.
3419    /// # Riot Developer API Reference
3420    /// <a href="https://developer.riotgames.com/api-methods/#tft-summoner-v1/GET_getByAccessToken" target="_blank">`tft-summoner-v1.getByAccessToken`</a>
3421    ///
3422    /// Note: this method is automatically generated.
3423    pub fn get_by_access_token(&self, route: PlatformRoute, access_token: impl std::fmt::Display)
3424        -> impl Future<Output = Result<crate::models::tft_summoner_v1::Summoner>> + 'a
3425    {
3426        let route_str = route.into();
3427        let request = self.base.request(Method::GET, route_str, "/tft/summoner/v1/summoners/me");
3428        let mut request = request.bearer_auth(access_token);
3429        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
3430        let future = self.base.execute_val::<crate::models::tft_summoner_v1::Summoner>("tft-summoner-v1.getByAccessToken", route_str, request);
3431        #[cfg(feature = "tracing")]
3432        let future = future.instrument(tracing::info_span!("tft-summoner-v1.getByAccessToken", route = route_str));
3433        #[cfg(feature = "metrics")]
3434        let future = metrics::timed(future, "tft-summoner-v1.getByAccessToken", route_str);
3435        future
3436    }
3437
3438    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3439    /// See `get_by_access_token` for detailed documentation
3440    /// # Parameters
3441    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3442    /// * `route` - Route to query.
3443    /// * `access_token` - RSO access token.
3444    /// # RSO
3445    /// This endpoint uses [Riot Sign On](https://developer.riotgames.com/docs/lol#rso-integration)
3446    /// via the `access_token` parameter, instead of the Riot API key.
3447    /// # Riot Developer API Reference
3448    /// <a href="https://developer.riotgames.com/api-methods/#tft-summoner-v1/GET_getByAccessToken" target="_blank">`tft-summoner-v1.getByAccessToken`</a>
3449    ///
3450    /// Note: this method is automatically generated.
3451    pub fn try_get_by_access_token(&self, min_capacity: f32, route: PlatformRoute, access_token: impl std::fmt::Display)
3452        -> impl Future<Output = TryRequestResult<crate::models::tft_summoner_v1::Summoner>> + 'a
3453    {
3454        let route_str = route.into();
3455        let request = self.base.request(Method::GET, route_str, "/tft/summoner/v1/summoners/me");
3456        let mut request = request.bearer_auth(access_token);
3457        if let Some(clear) = self.base.get_rso_clear_header() { request = request.header(clear, "") }
3458        let future = self.base.try_execute_val::<crate::models::tft_summoner_v1::Summoner>("tft-summoner-v1.getByAccessToken", route_str, request, min_capacity);
3459        #[cfg(feature = "tracing")]
3460        let future = future.instrument(tracing::info_span!("tft-summoner-v1.getByAccessToken", route = route_str));
3461        #[cfg(feature = "metrics")]
3462        let future = metrics::try_timed(future, "tft-summoner-v1.getByAccessToken", route_str);
3463        future
3464    }
3465
3466}
3467
3468/// TournamentStubV5 endpoints handle, accessed by calling [`tournament_stub_v5()`](RiotApi::tournament_stub_v5) on a [`RiotApi`] instance.
3469/// # Riot Developer API Reference
3470/// <a href="https://developer.riotgames.com/apis#tournament-stub-v5" target="_blank">`tournament-stub-v5`</a>
3471///
3472/// Note: this struct is automatically generated.
3473#[repr(transparent)]
3474pub struct TournamentStubV5<'a> {
3475    base: &'a RiotApi,
3476}
3477impl<'a> TournamentStubV5<'a> {
3478    /// Create a tournament code for the given tournament - Stub method
3479    /// # Parameters
3480    /// * `route` - Route to query.
3481    /// * `count` (optional, in query) - The number of codes to create (max 1000)
3482    /// * `tournament_id` (required, in query) - The tournament ID
3483    /// # Riot Developer API Reference
3484    /// <a href="https://developer.riotgames.com/api-methods/#tournament-stub-v5/POST_createTournamentCode" target="_blank">`tournament-stub-v5.createTournamentCode`</a>
3485    ///
3486    /// Note: this method is automatically generated.
3487    pub fn create_tournament_code(&self, route: RegionalRoute, body: &crate::models::tournament_stub_v5::TournamentCodeParametersV5, tournament_id: i64, count: Option<i32>)
3488        -> impl Future<Output = Result<Vec<String>>> + 'a
3489    {
3490        let route_str = route.into();
3491        let request = self.base.request(Method::POST, route_str, "/lol/tournament-stub/v5/codes");
3492        let request = request.query(&[ ("tournamentId", tournament_id) ]);
3493        let request = if let Some(count) = count { request.query(&[ ("count", count) ]) } else { request };
3494        let request = request
3495            .body(serde_json::ser::to_vec(body).unwrap())
3496            .header(reqwest::header::CONTENT_TYPE, "application/json");
3497        let future = self.base.execute_val::<Vec<String>>("tournament-stub-v5.createTournamentCode", route_str, request);
3498        #[cfg(feature = "tracing")]
3499        let future = future.instrument(tracing::info_span!("tournament-stub-v5.createTournamentCode", route = route_str));
3500        #[cfg(feature = "metrics")]
3501        let future = metrics::timed(future, "tournament-stub-v5.createTournamentCode", route_str);
3502        future
3503    }
3504
3505    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3506    /// See `create_tournament_code` for detailed documentation
3507    /// # Parameters
3508    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3509    /// * `route` - Route to query.
3510    /// * `count` (optional, in query) - The number of codes to create (max 1000)
3511    /// * `tournament_id` (required, in query) - The tournament ID
3512    /// # Riot Developer API Reference
3513    /// <a href="https://developer.riotgames.com/api-methods/#tournament-stub-v5/POST_createTournamentCode" target="_blank">`tournament-stub-v5.createTournamentCode`</a>
3514    ///
3515    /// Note: this method is automatically generated.
3516    pub fn try_create_tournament_code(&self, min_capacity: f32, route: RegionalRoute, body: &crate::models::tournament_stub_v5::TournamentCodeParametersV5, tournament_id: i64, count: Option<i32>)
3517        -> impl Future<Output = TryRequestResult<Vec<String>>> + 'a
3518    {
3519        let route_str = route.into();
3520        let request = self.base.request(Method::POST, route_str, "/lol/tournament-stub/v5/codes");
3521        let request = request.query(&[ ("tournamentId", tournament_id) ]);
3522        let request = if let Some(count) = count { request.query(&[ ("count", count) ]) } else { request };
3523        let request = request.body(serde_json::ser::to_vec(body).unwrap());
3524        let future = self.base.try_execute_val::<Vec<String>>("tournament-stub-v5.createTournamentCode", route_str, request, min_capacity);
3525        #[cfg(feature = "tracing")]
3526        let future = future.instrument(tracing::info_span!("tournament-stub-v5.createTournamentCode", route = route_str));
3527        #[cfg(feature = "metrics")]
3528        let future = metrics::try_timed(future, "tournament-stub-v5.createTournamentCode", route_str);
3529        future
3530    }
3531
3532    /// Returns the tournament code DTO associated with a tournament code string - Stub Method
3533    /// # Parameters
3534    /// * `route` - Route to query.
3535    /// * `tournament_code` (required, in path) - The tournament code string.
3536    /// # Riot Developer API Reference
3537    /// <a href="https://developer.riotgames.com/api-methods/#tournament-stub-v5/GET_getTournamentCode" target="_blank">`tournament-stub-v5.getTournamentCode`</a>
3538    ///
3539    /// Note: this method is automatically generated.
3540    pub fn get_tournament_code(&self, route: RegionalRoute, tournament_code: &str)
3541        -> impl Future<Output = Result<crate::models::tournament_stub_v5::TournamentCodeV5>> + 'a
3542    {
3543        let route_str = route.into();
3544        let request = self.base.request(Method::GET, route_str, &format!("/lol/tournament-stub/v5/codes/{}", tournament_code));
3545        let future = self.base.execute_val::<crate::models::tournament_stub_v5::TournamentCodeV5>("tournament-stub-v5.getTournamentCode", route_str, request);
3546        #[cfg(feature = "tracing")]
3547        let future = future.instrument(tracing::info_span!("tournament-stub-v5.getTournamentCode", route = route_str));
3548        #[cfg(feature = "metrics")]
3549        let future = metrics::timed(future, "tournament-stub-v5.getTournamentCode", route_str);
3550        future
3551    }
3552
3553    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3554    /// See `get_tournament_code` for detailed documentation
3555    /// # Parameters
3556    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3557    /// * `route` - Route to query.
3558    /// * `tournament_code` (required, in path) - The tournament code string.
3559    /// # Riot Developer API Reference
3560    /// <a href="https://developer.riotgames.com/api-methods/#tournament-stub-v5/GET_getTournamentCode" target="_blank">`tournament-stub-v5.getTournamentCode`</a>
3561    ///
3562    /// Note: this method is automatically generated.
3563    pub fn try_get_tournament_code(&self, min_capacity: f32, route: RegionalRoute, tournament_code: &str)
3564        -> impl Future<Output = TryRequestResult<crate::models::tournament_stub_v5::TournamentCodeV5>> + 'a
3565    {
3566        let route_str = route.into();
3567        let request = self.base.request(Method::GET, route_str, &format!("/lol/tournament-stub/v5/codes/{}", tournament_code));
3568        let future = self.base.try_execute_val::<crate::models::tournament_stub_v5::TournamentCodeV5>("tournament-stub-v5.getTournamentCode", route_str, request, min_capacity);
3569        #[cfg(feature = "tracing")]
3570        let future = future.instrument(tracing::info_span!("tournament-stub-v5.getTournamentCode", route = route_str));
3571        #[cfg(feature = "metrics")]
3572        let future = metrics::try_timed(future, "tournament-stub-v5.getTournamentCode", route_str);
3573        future
3574    }
3575
3576    /// Gets a list of lobby events by tournament code - Stub method
3577    /// # Parameters
3578    /// * `route` - Route to query.
3579    /// * `tournament_code` (required, in path) - The short code to look up lobby events for
3580    /// # Riot Developer API Reference
3581    /// <a href="https://developer.riotgames.com/api-methods/#tournament-stub-v5/GET_getLobbyEventsByCode" target="_blank">`tournament-stub-v5.getLobbyEventsByCode`</a>
3582    ///
3583    /// Note: this method is automatically generated.
3584    pub fn get_lobby_events_by_code(&self, route: RegionalRoute, tournament_code: &str)
3585        -> impl Future<Output = Result<crate::models::tournament_stub_v5::LobbyEventV5Wrapper>> + 'a
3586    {
3587        let route_str = route.into();
3588        let request = self.base.request(Method::GET, route_str, &format!("/lol/tournament-stub/v5/lobby-events/by-code/{}", tournament_code));
3589        let future = self.base.execute_val::<crate::models::tournament_stub_v5::LobbyEventV5Wrapper>("tournament-stub-v5.getLobbyEventsByCode", route_str, request);
3590        #[cfg(feature = "tracing")]
3591        let future = future.instrument(tracing::info_span!("tournament-stub-v5.getLobbyEventsByCode", route = route_str));
3592        #[cfg(feature = "metrics")]
3593        let future = metrics::timed(future, "tournament-stub-v5.getLobbyEventsByCode", route_str);
3594        future
3595    }
3596
3597    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3598    /// See `get_lobby_events_by_code` for detailed documentation
3599    /// # Parameters
3600    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3601    /// * `route` - Route to query.
3602    /// * `tournament_code` (required, in path) - The short code to look up lobby events for
3603    /// # Riot Developer API Reference
3604    /// <a href="https://developer.riotgames.com/api-methods/#tournament-stub-v5/GET_getLobbyEventsByCode" target="_blank">`tournament-stub-v5.getLobbyEventsByCode`</a>
3605    ///
3606    /// Note: this method is automatically generated.
3607    pub fn try_get_lobby_events_by_code(&self, min_capacity: f32, route: RegionalRoute, tournament_code: &str)
3608        -> impl Future<Output = TryRequestResult<crate::models::tournament_stub_v5::LobbyEventV5Wrapper>> + 'a
3609    {
3610        let route_str = route.into();
3611        let request = self.base.request(Method::GET, route_str, &format!("/lol/tournament-stub/v5/lobby-events/by-code/{}", tournament_code));
3612        let future = self.base.try_execute_val::<crate::models::tournament_stub_v5::LobbyEventV5Wrapper>("tournament-stub-v5.getLobbyEventsByCode", route_str, request, min_capacity);
3613        #[cfg(feature = "tracing")]
3614        let future = future.instrument(tracing::info_span!("tournament-stub-v5.getLobbyEventsByCode", route = route_str));
3615        #[cfg(feature = "metrics")]
3616        let future = metrics::try_timed(future, "tournament-stub-v5.getLobbyEventsByCode", route_str);
3617        future
3618    }
3619
3620    /// Creates a tournament provider and returns its ID - Stub method
3621    /// ## Implementation Notes
3622    /// Providers will need to call this endpoint first to register their callback URL and their API key with the tournament system before any other tournament provider endpoints will work.
3623    /// # Parameters
3624    /// * `route` - Route to query.
3625    /// # Riot Developer API Reference
3626    /// <a href="https://developer.riotgames.com/api-methods/#tournament-stub-v5/POST_registerProviderData" target="_blank">`tournament-stub-v5.registerProviderData`</a>
3627    ///
3628    /// Note: this method is automatically generated.
3629    pub fn register_provider_data(&self, route: RegionalRoute, body: &crate::models::tournament_stub_v5::ProviderRegistrationParametersV5)
3630        -> impl Future<Output = Result<i32>> + 'a
3631    {
3632        let route_str = route.into();
3633        let request = self.base.request(Method::POST, route_str, "/lol/tournament-stub/v5/providers");
3634        let request = request
3635            .body(serde_json::ser::to_vec(body).unwrap())
3636            .header(reqwest::header::CONTENT_TYPE, "application/json");
3637        let future = self.base.execute_val::<i32>("tournament-stub-v5.registerProviderData", route_str, request);
3638        #[cfg(feature = "tracing")]
3639        let future = future.instrument(tracing::info_span!("tournament-stub-v5.registerProviderData", route = route_str));
3640        #[cfg(feature = "metrics")]
3641        let future = metrics::timed(future, "tournament-stub-v5.registerProviderData", route_str);
3642        future
3643    }
3644
3645    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3646    /// See `register_provider_data` for detailed documentation
3647    /// # Parameters
3648    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3649    /// * `route` - Route to query.
3650    /// # Riot Developer API Reference
3651    /// <a href="https://developer.riotgames.com/api-methods/#tournament-stub-v5/POST_registerProviderData" target="_blank">`tournament-stub-v5.registerProviderData`</a>
3652    ///
3653    /// Note: this method is automatically generated.
3654    pub fn try_register_provider_data(&self, min_capacity: f32, route: RegionalRoute, body: &crate::models::tournament_stub_v5::ProviderRegistrationParametersV5)
3655        -> impl Future<Output = TryRequestResult<i32>> + 'a
3656    {
3657        let route_str = route.into();
3658        let request = self.base.request(Method::POST, route_str, "/lol/tournament-stub/v5/providers");
3659        let request = request.body(serde_json::ser::to_vec(body).unwrap());
3660        let future = self.base.try_execute_val::<i32>("tournament-stub-v5.registerProviderData", route_str, request, min_capacity);
3661        #[cfg(feature = "tracing")]
3662        let future = future.instrument(tracing::info_span!("tournament-stub-v5.registerProviderData", route = route_str));
3663        #[cfg(feature = "metrics")]
3664        let future = metrics::try_timed(future, "tournament-stub-v5.registerProviderData", route_str);
3665        future
3666    }
3667
3668    /// Creates a tournament and returns its ID - Stub method
3669    /// # Parameters
3670    /// * `route` - Route to query.
3671    /// # Riot Developer API Reference
3672    /// <a href="https://developer.riotgames.com/api-methods/#tournament-stub-v5/POST_registerTournament" target="_blank">`tournament-stub-v5.registerTournament`</a>
3673    ///
3674    /// Note: this method is automatically generated.
3675    pub fn register_tournament(&self, route: RegionalRoute, body: &crate::models::tournament_stub_v5::TournamentRegistrationParametersV5)
3676        -> impl Future<Output = Result<i32>> + 'a
3677    {
3678        let route_str = route.into();
3679        let request = self.base.request(Method::POST, route_str, "/lol/tournament-stub/v5/tournaments");
3680        let request = request
3681            .body(serde_json::ser::to_vec(body).unwrap())
3682            .header(reqwest::header::CONTENT_TYPE, "application/json");
3683        let future = self.base.execute_val::<i32>("tournament-stub-v5.registerTournament", route_str, request);
3684        #[cfg(feature = "tracing")]
3685        let future = future.instrument(tracing::info_span!("tournament-stub-v5.registerTournament", route = route_str));
3686        #[cfg(feature = "metrics")]
3687        let future = metrics::timed(future, "tournament-stub-v5.registerTournament", route_str);
3688        future
3689    }
3690
3691    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3692    /// See `register_tournament` for detailed documentation
3693    /// # Parameters
3694    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3695    /// * `route` - Route to query.
3696    /// # Riot Developer API Reference
3697    /// <a href="https://developer.riotgames.com/api-methods/#tournament-stub-v5/POST_registerTournament" target="_blank">`tournament-stub-v5.registerTournament`</a>
3698    ///
3699    /// Note: this method is automatically generated.
3700    pub fn try_register_tournament(&self, min_capacity: f32, route: RegionalRoute, body: &crate::models::tournament_stub_v5::TournamentRegistrationParametersV5)
3701        -> impl Future<Output = TryRequestResult<i32>> + 'a
3702    {
3703        let route_str = route.into();
3704        let request = self.base.request(Method::POST, route_str, "/lol/tournament-stub/v5/tournaments");
3705        let request = request.body(serde_json::ser::to_vec(body).unwrap());
3706        let future = self.base.try_execute_val::<i32>("tournament-stub-v5.registerTournament", route_str, request, min_capacity);
3707        #[cfg(feature = "tracing")]
3708        let future = future.instrument(tracing::info_span!("tournament-stub-v5.registerTournament", route = route_str));
3709        #[cfg(feature = "metrics")]
3710        let future = metrics::try_timed(future, "tournament-stub-v5.registerTournament", route_str);
3711        future
3712    }
3713
3714}
3715
3716/// TournamentV5 endpoints handle, accessed by calling [`tournament_v5()`](RiotApi::tournament_v5) on a [`RiotApi`] instance.
3717/// # Riot Developer API Reference
3718/// <a href="https://developer.riotgames.com/apis#tournament-v5" target="_blank">`tournament-v5`</a>
3719///
3720/// Note: this struct is automatically generated.
3721#[repr(transparent)]
3722pub struct TournamentV5<'a> {
3723    base: &'a RiotApi,
3724}
3725impl<'a> TournamentV5<'a> {
3726    /// Create a tournament code for the given tournament.
3727    /// # Parameters
3728    /// * `route` - Route to query.
3729    /// * `tournament_id` (required, in query) - The tournament ID
3730    /// * `count` (optional, in query) - The number of codes to create (max 1000)
3731    /// # Riot Developer API Reference
3732    /// <a href="https://developer.riotgames.com/api-methods/#tournament-v5/POST_createTournamentCode" target="_blank">`tournament-v5.createTournamentCode`</a>
3733    ///
3734    /// Note: this method is automatically generated.
3735    pub fn create_tournament_code(&self, route: RegionalRoute, body: &crate::models::tournament_v5::TournamentCodeParametersV5, tournament_id: i64, count: Option<i32>)
3736        -> impl Future<Output = Result<Vec<String>>> + 'a
3737    {
3738        let route_str = route.into();
3739        let request = self.base.request(Method::POST, route_str, "/lol/tournament/v5/codes");
3740        let request = request.query(&[ ("tournamentId", tournament_id) ]);
3741        let request = if let Some(count) = count { request.query(&[ ("count", count) ]) } else { request };
3742        let request = request
3743            .body(serde_json::ser::to_vec(body).unwrap())
3744            .header(reqwest::header::CONTENT_TYPE, "application/json");
3745        let future = self.base.execute_val::<Vec<String>>("tournament-v5.createTournamentCode", route_str, request);
3746        #[cfg(feature = "tracing")]
3747        let future = future.instrument(tracing::info_span!("tournament-v5.createTournamentCode", route = route_str));
3748        #[cfg(feature = "metrics")]
3749        let future = metrics::timed(future, "tournament-v5.createTournamentCode", route_str);
3750        future
3751    }
3752
3753    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3754    /// See `create_tournament_code` for detailed documentation
3755    /// # Parameters
3756    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3757    /// * `route` - Route to query.
3758    /// * `tournament_id` (required, in query) - The tournament ID
3759    /// * `count` (optional, in query) - The number of codes to create (max 1000)
3760    /// # Riot Developer API Reference
3761    /// <a href="https://developer.riotgames.com/api-methods/#tournament-v5/POST_createTournamentCode" target="_blank">`tournament-v5.createTournamentCode`</a>
3762    ///
3763    /// Note: this method is automatically generated.
3764    pub fn try_create_tournament_code(&self, min_capacity: f32, route: RegionalRoute, body: &crate::models::tournament_v5::TournamentCodeParametersV5, tournament_id: i64, count: Option<i32>)
3765        -> impl Future<Output = TryRequestResult<Vec<String>>> + 'a
3766    {
3767        let route_str = route.into();
3768        let request = self.base.request(Method::POST, route_str, "/lol/tournament/v5/codes");
3769        let request = request.query(&[ ("tournamentId", tournament_id) ]);
3770        let request = if let Some(count) = count { request.query(&[ ("count", count) ]) } else { request };
3771        let request = request.body(serde_json::ser::to_vec(body).unwrap());
3772        let future = self.base.try_execute_val::<Vec<String>>("tournament-v5.createTournamentCode", route_str, request, min_capacity);
3773        #[cfg(feature = "tracing")]
3774        let future = future.instrument(tracing::info_span!("tournament-v5.createTournamentCode", route = route_str));
3775        #[cfg(feature = "metrics")]
3776        let future = metrics::try_timed(future, "tournament-v5.createTournamentCode", route_str);
3777        future
3778    }
3779
3780    /// Returns the tournament code DTO associated with a tournament code string.
3781    /// # Parameters
3782    /// * `route` - Route to query.
3783    /// * `tournament_code` (required, in path) - The tournament code string.
3784    /// # Riot Developer API Reference
3785    /// <a href="https://developer.riotgames.com/api-methods/#tournament-v5/GET_getTournamentCode" target="_blank">`tournament-v5.getTournamentCode`</a>
3786    ///
3787    /// Note: this method is automatically generated.
3788    pub fn get_tournament_code(&self, route: RegionalRoute, tournament_code: &str)
3789        -> impl Future<Output = Result<crate::models::tournament_v5::TournamentCodeV5>> + 'a
3790    {
3791        let route_str = route.into();
3792        let request = self.base.request(Method::GET, route_str, &format!("/lol/tournament/v5/codes/{}", tournament_code));
3793        let future = self.base.execute_val::<crate::models::tournament_v5::TournamentCodeV5>("tournament-v5.getTournamentCode", route_str, request);
3794        #[cfg(feature = "tracing")]
3795        let future = future.instrument(tracing::info_span!("tournament-v5.getTournamentCode", route = route_str));
3796        #[cfg(feature = "metrics")]
3797        let future = metrics::timed(future, "tournament-v5.getTournamentCode", route_str);
3798        future
3799    }
3800
3801    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3802    /// See `get_tournament_code` for detailed documentation
3803    /// # Parameters
3804    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3805    /// * `route` - Route to query.
3806    /// * `tournament_code` (required, in path) - The tournament code string.
3807    /// # Riot Developer API Reference
3808    /// <a href="https://developer.riotgames.com/api-methods/#tournament-v5/GET_getTournamentCode" target="_blank">`tournament-v5.getTournamentCode`</a>
3809    ///
3810    /// Note: this method is automatically generated.
3811    pub fn try_get_tournament_code(&self, min_capacity: f32, route: RegionalRoute, tournament_code: &str)
3812        -> impl Future<Output = TryRequestResult<crate::models::tournament_v5::TournamentCodeV5>> + 'a
3813    {
3814        let route_str = route.into();
3815        let request = self.base.request(Method::GET, route_str, &format!("/lol/tournament/v5/codes/{}", tournament_code));
3816        let future = self.base.try_execute_val::<crate::models::tournament_v5::TournamentCodeV5>("tournament-v5.getTournamentCode", route_str, request, min_capacity);
3817        #[cfg(feature = "tracing")]
3818        let future = future.instrument(tracing::info_span!("tournament-v5.getTournamentCode", route = route_str));
3819        #[cfg(feature = "metrics")]
3820        let future = metrics::try_timed(future, "tournament-v5.getTournamentCode", route_str);
3821        future
3822    }
3823
3824    /// Update the pick type, map, spectator type, or allowed puuids for a code.
3825    /// # Parameters
3826    /// * `route` - Route to query.
3827    /// * `tournament_code` (required, in path) - The tournament code to update
3828    /// # Riot Developer API Reference
3829    /// <a href="https://developer.riotgames.com/api-methods/#tournament-v5/PUT_updateCode" target="_blank">`tournament-v5.updateCode`</a>
3830    ///
3831    /// Note: this method is automatically generated.
3832    pub fn update_code(&self, route: RegionalRoute, body: &crate::models::tournament_v5::TournamentCodeUpdateParametersV5, tournament_code: &str)
3833        -> impl Future<Output = Result<()>> + 'a
3834    {
3835        let route_str = route.into();
3836        let request = self.base.request(Method::PUT, route_str, &format!("/lol/tournament/v5/codes/{}", tournament_code));
3837        let request = request
3838            .body(serde_json::ser::to_vec(body).unwrap())
3839            .header(reqwest::header::CONTENT_TYPE, "application/json");
3840        let future = self.base.execute("tournament-v5.updateCode", route_str, request);
3841        #[cfg(feature = "tracing")]
3842        let future = future.instrument(tracing::info_span!("tournament-v5.updateCode", route = route_str));
3843        #[cfg(feature = "metrics")]
3844        let future = metrics::timed(future, "tournament-v5.updateCode", route_str);
3845        future
3846    }
3847
3848    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3849    /// See `update_code` for detailed documentation
3850    /// # Parameters
3851    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3852    /// * `route` - Route to query.
3853    /// * `tournament_code` (required, in path) - The tournament code to update
3854    /// # Riot Developer API Reference
3855    /// <a href="https://developer.riotgames.com/api-methods/#tournament-v5/PUT_updateCode" target="_blank">`tournament-v5.updateCode`</a>
3856    ///
3857    /// Note: this method is automatically generated.
3858    pub fn try_update_code(&self, min_capacity: f32, route: RegionalRoute, body: &crate::models::tournament_v5::TournamentCodeUpdateParametersV5, tournament_code: &str)
3859        -> impl Future<Output = TryRequestResult<()>> + 'a
3860    {
3861        let route_str = route.into();
3862        let request = self.base.request(Method::PUT, route_str, &format!("/lol/tournament/v5/codes/{}", tournament_code));
3863        let request = request.body(serde_json::ser::to_vec(body).unwrap());
3864        let future = self.base.try_execute("tournament-v5.updateCode", route_str, request, min_capacity);
3865        #[cfg(feature = "tracing")]
3866        let future = future.instrument(tracing::info_span!("tournament-v5.updateCode", route = route_str));
3867        #[cfg(feature = "metrics")]
3868        let future = metrics::try_timed(future, "tournament-v5.updateCode", route_str);
3869        future
3870    }
3871
3872    /// Get games details
3873    /// ## Implementation Notes
3874    /// Additional endpoint to get tournament games. From this endpoint, you are able to get participants PUUID (the callback doesn't contain this info).
3875    ///
3876    /// You can also use it to check if the game was recorded and validate callbacks. If the endpoint returns the game, it means a callback was attempted.
3877    ///
3878    /// This will only work for tournament codes created after November 10, 2023.
3879    /// # Parameters
3880    /// * `route` - Route to query.
3881    /// * `tournament_code` (required, in path)
3882    /// # Riot Developer API Reference
3883    /// <a href="https://developer.riotgames.com/api-methods/#tournament-v5/GET_getGames" target="_blank">`tournament-v5.getGames`</a>
3884    ///
3885    /// Note: this method is automatically generated.
3886    pub fn get_games(&self, route: RegionalRoute, tournament_code: &str)
3887        -> impl Future<Output = Result<Vec<crate::models::tournament_v5::TournamentGamesV5>>> + 'a
3888    {
3889        let route_str = route.into();
3890        let request = self.base.request(Method::GET, route_str, &format!("/lol/tournament/v5/games/by-code/{}", tournament_code));
3891        let future = self.base.execute_val::<Vec<crate::models::tournament_v5::TournamentGamesV5>>("tournament-v5.getGames", route_str, request);
3892        #[cfg(feature = "tracing")]
3893        let future = future.instrument(tracing::info_span!("tournament-v5.getGames", route = route_str));
3894        #[cfg(feature = "metrics")]
3895        let future = metrics::timed(future, "tournament-v5.getGames", route_str);
3896        future
3897    }
3898
3899    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3900    /// See `get_games` for detailed documentation
3901    /// # Parameters
3902    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3903    /// * `route` - Route to query.
3904    /// * `tournament_code` (required, in path)
3905    /// # Riot Developer API Reference
3906    /// <a href="https://developer.riotgames.com/api-methods/#tournament-v5/GET_getGames" target="_blank">`tournament-v5.getGames`</a>
3907    ///
3908    /// Note: this method is automatically generated.
3909    pub fn try_get_games(&self, min_capacity: f32, route: RegionalRoute, tournament_code: &str)
3910        -> impl Future<Output = TryRequestResult<Vec<crate::models::tournament_v5::TournamentGamesV5>>> + 'a
3911    {
3912        let route_str = route.into();
3913        let request = self.base.request(Method::GET, route_str, &format!("/lol/tournament/v5/games/by-code/{}", tournament_code));
3914        let future = self.base.try_execute_val::<Vec<crate::models::tournament_v5::TournamentGamesV5>>("tournament-v5.getGames", route_str, request, min_capacity);
3915        #[cfg(feature = "tracing")]
3916        let future = future.instrument(tracing::info_span!("tournament-v5.getGames", route = route_str));
3917        #[cfg(feature = "metrics")]
3918        let future = metrics::try_timed(future, "tournament-v5.getGames", route_str);
3919        future
3920    }
3921
3922    /// Gets a list of lobby events by tournament code.
3923    /// # Parameters
3924    /// * `route` - Route to query.
3925    /// * `tournament_code` (required, in path) - The short code to look up lobby events for
3926    /// # Riot Developer API Reference
3927    /// <a href="https://developer.riotgames.com/api-methods/#tournament-v5/GET_getLobbyEventsByCode" target="_blank">`tournament-v5.getLobbyEventsByCode`</a>
3928    ///
3929    /// Note: this method is automatically generated.
3930    pub fn get_lobby_events_by_code(&self, route: RegionalRoute, tournament_code: &str)
3931        -> impl Future<Output = Result<crate::models::tournament_v5::LobbyEventV5Wrapper>> + 'a
3932    {
3933        let route_str = route.into();
3934        let request = self.base.request(Method::GET, route_str, &format!("/lol/tournament/v5/lobby-events/by-code/{}", tournament_code));
3935        let future = self.base.execute_val::<crate::models::tournament_v5::LobbyEventV5Wrapper>("tournament-v5.getLobbyEventsByCode", route_str, request);
3936        #[cfg(feature = "tracing")]
3937        let future = future.instrument(tracing::info_span!("tournament-v5.getLobbyEventsByCode", route = route_str));
3938        #[cfg(feature = "metrics")]
3939        let future = metrics::timed(future, "tournament-v5.getLobbyEventsByCode", route_str);
3940        future
3941    }
3942
3943    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3944    /// See `get_lobby_events_by_code` for detailed documentation
3945    /// # Parameters
3946    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3947    /// * `route` - Route to query.
3948    /// * `tournament_code` (required, in path) - The short code to look up lobby events for
3949    /// # Riot Developer API Reference
3950    /// <a href="https://developer.riotgames.com/api-methods/#tournament-v5/GET_getLobbyEventsByCode" target="_blank">`tournament-v5.getLobbyEventsByCode`</a>
3951    ///
3952    /// Note: this method is automatically generated.
3953    pub fn try_get_lobby_events_by_code(&self, min_capacity: f32, route: RegionalRoute, tournament_code: &str)
3954        -> impl Future<Output = TryRequestResult<crate::models::tournament_v5::LobbyEventV5Wrapper>> + 'a
3955    {
3956        let route_str = route.into();
3957        let request = self.base.request(Method::GET, route_str, &format!("/lol/tournament/v5/lobby-events/by-code/{}", tournament_code));
3958        let future = self.base.try_execute_val::<crate::models::tournament_v5::LobbyEventV5Wrapper>("tournament-v5.getLobbyEventsByCode", route_str, request, min_capacity);
3959        #[cfg(feature = "tracing")]
3960        let future = future.instrument(tracing::info_span!("tournament-v5.getLobbyEventsByCode", route = route_str));
3961        #[cfg(feature = "metrics")]
3962        let future = metrics::try_timed(future, "tournament-v5.getLobbyEventsByCode", route_str);
3963        future
3964    }
3965
3966    /// Creates a tournament provider and returns its ID.
3967    /// ## Implementation Notes
3968    /// Providers will need to call this endpoint first to register their callback URL and their API key with the tournament system before any other tournament provider endpoints will work.
3969    /// # Parameters
3970    /// * `route` - Route to query.
3971    /// # Riot Developer API Reference
3972    /// <a href="https://developer.riotgames.com/api-methods/#tournament-v5/POST_registerProviderData" target="_blank">`tournament-v5.registerProviderData`</a>
3973    ///
3974    /// Note: this method is automatically generated.
3975    pub fn register_provider_data(&self, route: RegionalRoute, body: &crate::models::tournament_v5::ProviderRegistrationParametersV5)
3976        -> impl Future<Output = Result<i32>> + 'a
3977    {
3978        let route_str = route.into();
3979        let request = self.base.request(Method::POST, route_str, "/lol/tournament/v5/providers");
3980        let request = request
3981            .body(serde_json::ser::to_vec(body).unwrap())
3982            .header(reqwest::header::CONTENT_TYPE, "application/json");
3983        let future = self.base.execute_val::<i32>("tournament-v5.registerProviderData", route_str, request);
3984        #[cfg(feature = "tracing")]
3985        let future = future.instrument(tracing::info_span!("tournament-v5.registerProviderData", route = route_str));
3986        #[cfg(feature = "metrics")]
3987        let future = metrics::timed(future, "tournament-v5.registerProviderData", route_str);
3988        future
3989    }
3990
3991    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
3992    /// See `register_provider_data` for detailed documentation
3993    /// # Parameters
3994    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
3995    /// * `route` - Route to query.
3996    /// # Riot Developer API Reference
3997    /// <a href="https://developer.riotgames.com/api-methods/#tournament-v5/POST_registerProviderData" target="_blank">`tournament-v5.registerProviderData`</a>
3998    ///
3999    /// Note: this method is automatically generated.
4000    pub fn try_register_provider_data(&self, min_capacity: f32, route: RegionalRoute, body: &crate::models::tournament_v5::ProviderRegistrationParametersV5)
4001        -> impl Future<Output = TryRequestResult<i32>> + 'a
4002    {
4003        let route_str = route.into();
4004        let request = self.base.request(Method::POST, route_str, "/lol/tournament/v5/providers");
4005        let request = request.body(serde_json::ser::to_vec(body).unwrap());
4006        let future = self.base.try_execute_val::<i32>("tournament-v5.registerProviderData", route_str, request, min_capacity);
4007        #[cfg(feature = "tracing")]
4008        let future = future.instrument(tracing::info_span!("tournament-v5.registerProviderData", route = route_str));
4009        #[cfg(feature = "metrics")]
4010        let future = metrics::try_timed(future, "tournament-v5.registerProviderData", route_str);
4011        future
4012    }
4013
4014    /// Creates a tournament and returns its ID.
4015    /// # Parameters
4016    /// * `route` - Route to query.
4017    /// # Riot Developer API Reference
4018    /// <a href="https://developer.riotgames.com/api-methods/#tournament-v5/POST_registerTournament" target="_blank">`tournament-v5.registerTournament`</a>
4019    ///
4020    /// Note: this method is automatically generated.
4021    pub fn register_tournament(&self, route: RegionalRoute, body: &crate::models::tournament_v5::TournamentRegistrationParametersV5)
4022        -> impl Future<Output = Result<i32>> + 'a
4023    {
4024        let route_str = route.into();
4025        let request = self.base.request(Method::POST, route_str, "/lol/tournament/v5/tournaments");
4026        let request = request
4027            .body(serde_json::ser::to_vec(body).unwrap())
4028            .header(reqwest::header::CONTENT_TYPE, "application/json");
4029        let future = self.base.execute_val::<i32>("tournament-v5.registerTournament", route_str, request);
4030        #[cfg(feature = "tracing")]
4031        let future = future.instrument(tracing::info_span!("tournament-v5.registerTournament", route = route_str));
4032        #[cfg(feature = "metrics")]
4033        let future = metrics::timed(future, "tournament-v5.registerTournament", route_str);
4034        future
4035    }
4036
4037    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
4038    /// See `register_tournament` for detailed documentation
4039    /// # Parameters
4040    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
4041    /// * `route` - Route to query.
4042    /// # Riot Developer API Reference
4043    /// <a href="https://developer.riotgames.com/api-methods/#tournament-v5/POST_registerTournament" target="_blank">`tournament-v5.registerTournament`</a>
4044    ///
4045    /// Note: this method is automatically generated.
4046    pub fn try_register_tournament(&self, min_capacity: f32, route: RegionalRoute, body: &crate::models::tournament_v5::TournamentRegistrationParametersV5)
4047        -> impl Future<Output = TryRequestResult<i32>> + 'a
4048    {
4049        let route_str = route.into();
4050        let request = self.base.request(Method::POST, route_str, "/lol/tournament/v5/tournaments");
4051        let request = request.body(serde_json::ser::to_vec(body).unwrap());
4052        let future = self.base.try_execute_val::<i32>("tournament-v5.registerTournament", route_str, request, min_capacity);
4053        #[cfg(feature = "tracing")]
4054        let future = future.instrument(tracing::info_span!("tournament-v5.registerTournament", route = route_str));
4055        #[cfg(feature = "metrics")]
4056        let future = metrics::try_timed(future, "tournament-v5.registerTournament", route_str);
4057        future
4058    }
4059
4060}
4061
4062/// ValConsoleMatchV1 endpoints handle, accessed by calling [`val_console_match_v1()`](RiotApi::val_console_match_v1) on a [`RiotApi`] instance.
4063/// # Riot Developer API Reference
4064/// <a href="https://developer.riotgames.com/apis#val-console-match-v1" target="_blank">`val-console-match-v1`</a>
4065///
4066/// Note: this struct is automatically generated.
4067#[repr(transparent)]
4068pub struct ValConsoleMatchV1<'a> {
4069    base: &'a RiotApi,
4070}
4071impl<'a> ValConsoleMatchV1<'a> {
4072    /// Get match by id
4073    /// # Parameters
4074    /// * `route` - Route to query.
4075    /// * `match_id` (required, in path)
4076    /// # Riot Developer API Reference
4077    /// <a href="https://developer.riotgames.com/api-methods/#val-console-match-v1/GET_getMatch" target="_blank">`val-console-match-v1.getMatch`</a>
4078    ///
4079    /// Note: this method is automatically generated.
4080    pub fn get_match(&self, route: ValPlatformRoute, match_id: &str)
4081        -> impl Future<Output = Result<Option<crate::models::val_console_match_v1::Match>>> + 'a
4082    {
4083        let route_str = route.into();
4084        let request = self.base.request(Method::GET, route_str, &format!("/val/match/console/v1/matches/{}", match_id));
4085        let future = self.base.execute_opt::<crate::models::val_console_match_v1::Match>("val-console-match-v1.getMatch", route_str, request);
4086        #[cfg(feature = "tracing")]
4087        let future = future.instrument(tracing::info_span!("val-console-match-v1.getMatch", route = route_str));
4088        #[cfg(feature = "metrics")]
4089        let future = metrics::timed(future, "val-console-match-v1.getMatch", route_str);
4090        future
4091    }
4092
4093    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
4094    /// See `get_match` for detailed documentation
4095    /// # Parameters
4096    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
4097    /// * `route` - Route to query.
4098    /// * `match_id` (required, in path)
4099    /// # Riot Developer API Reference
4100    /// <a href="https://developer.riotgames.com/api-methods/#val-console-match-v1/GET_getMatch" target="_blank">`val-console-match-v1.getMatch`</a>
4101    ///
4102    /// Note: this method is automatically generated.
4103    pub fn try_get_match(&self, min_capacity: f32, route: ValPlatformRoute, match_id: &str)
4104        -> impl Future<Output = TryRequestResult<Option<crate::models::val_console_match_v1::Match>>> + 'a
4105    {
4106        let route_str = route.into();
4107        let request = self.base.request(Method::GET, route_str, &format!("/val/match/console/v1/matches/{}", match_id));
4108        let future = self.base.try_execute_opt::<crate::models::val_console_match_v1::Match>("val-console-match-v1.getMatch", route_str, request, min_capacity);
4109        #[cfg(feature = "tracing")]
4110        let future = future.instrument(tracing::info_span!("val-console-match-v1.getMatch", route = route_str));
4111        #[cfg(feature = "metrics")]
4112        let future = metrics::try_timed(future, "val-console-match-v1.getMatch", route_str);
4113        future
4114    }
4115
4116    /// Get matchlist for games played by puuid and platform type
4117    /// # Parameters
4118    /// * `route` - Route to query.
4119    /// * `puuid` (required, in path)
4120    /// * `platform_type` (required, in query)
4121    /// # Riot Developer API Reference
4122    /// <a href="https://developer.riotgames.com/api-methods/#val-console-match-v1/GET_getMatchlist" target="_blank">`val-console-match-v1.getMatchlist`</a>
4123    ///
4124    /// Note: this method is automatically generated.
4125    pub fn get_matchlist(&self, route: ValPlatformRoute, puuid: &str, platform_type: &str)
4126        -> impl Future<Output = Result<crate::models::val_console_match_v1::Matchlist>> + 'a
4127    {
4128        let route_str = route.into();
4129        let request = self.base.request(Method::GET, route_str, &format!("/val/match/console/v1/matchlists/by-puuid/{}", puuid));
4130        let request = request.query(&[ ("platformType", platform_type) ]);
4131        let future = self.base.execute_val::<crate::models::val_console_match_v1::Matchlist>("val-console-match-v1.getMatchlist", route_str, request);
4132        #[cfg(feature = "tracing")]
4133        let future = future.instrument(tracing::info_span!("val-console-match-v1.getMatchlist", route = route_str));
4134        #[cfg(feature = "metrics")]
4135        let future = metrics::timed(future, "val-console-match-v1.getMatchlist", route_str);
4136        future
4137    }
4138
4139    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
4140    /// See `get_matchlist` for detailed documentation
4141    /// # Parameters
4142    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
4143    /// * `route` - Route to query.
4144    /// * `puuid` (required, in path)
4145    /// * `platform_type` (required, in query)
4146    /// # Riot Developer API Reference
4147    /// <a href="https://developer.riotgames.com/api-methods/#val-console-match-v1/GET_getMatchlist" target="_blank">`val-console-match-v1.getMatchlist`</a>
4148    ///
4149    /// Note: this method is automatically generated.
4150    pub fn try_get_matchlist(&self, min_capacity: f32, route: ValPlatformRoute, puuid: &str, platform_type: &str)
4151        -> impl Future<Output = TryRequestResult<crate::models::val_console_match_v1::Matchlist>> + 'a
4152    {
4153        let route_str = route.into();
4154        let request = self.base.request(Method::GET, route_str, &format!("/val/match/console/v1/matchlists/by-puuid/{}", puuid));
4155        let request = request.query(&[ ("platformType", platform_type) ]);
4156        let future = self.base.try_execute_val::<crate::models::val_console_match_v1::Matchlist>("val-console-match-v1.getMatchlist", route_str, request, min_capacity);
4157        #[cfg(feature = "tracing")]
4158        let future = future.instrument(tracing::info_span!("val-console-match-v1.getMatchlist", route = route_str));
4159        #[cfg(feature = "metrics")]
4160        let future = metrics::try_timed(future, "val-console-match-v1.getMatchlist", route_str);
4161        future
4162    }
4163
4164    /// Get recent matches
4165    /// ## Implementation Notes
4166    /// Returns a list of match ids that have completed in the last 10 minutes for live regions and 12 hours for the esports routing value. NA/LATAM/BR share a match history deployment. As such, recent matches will return a combined list of matches from those three regions. Requests are load balanced so you may see some inconsistencies as matches are added/removed from the list.
4167    /// # Parameters
4168    /// * `route` - Route to query.
4169    /// * `queue` (required, in path)
4170    /// # Riot Developer API Reference
4171    /// <a href="https://developer.riotgames.com/api-methods/#val-console-match-v1/GET_getRecent" target="_blank">`val-console-match-v1.getRecent`</a>
4172    ///
4173    /// Note: this method is automatically generated.
4174    pub fn get_recent(&self, route: ValPlatformRoute, queue: &str)
4175        -> impl Future<Output = Result<crate::models::val_console_match_v1::RecentMatches>> + 'a
4176    {
4177        let route_str = route.into();
4178        let request = self.base.request(Method::GET, route_str, &format!("/val/match/console/v1/recent-matches/by-queue/{}", queue));
4179        let future = self.base.execute_val::<crate::models::val_console_match_v1::RecentMatches>("val-console-match-v1.getRecent", route_str, request);
4180        #[cfg(feature = "tracing")]
4181        let future = future.instrument(tracing::info_span!("val-console-match-v1.getRecent", route = route_str));
4182        #[cfg(feature = "metrics")]
4183        let future = metrics::timed(future, "val-console-match-v1.getRecent", route_str);
4184        future
4185    }
4186
4187    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
4188    /// See `get_recent` for detailed documentation
4189    /// # Parameters
4190    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
4191    /// * `route` - Route to query.
4192    /// * `queue` (required, in path)
4193    /// # Riot Developer API Reference
4194    /// <a href="https://developer.riotgames.com/api-methods/#val-console-match-v1/GET_getRecent" target="_blank">`val-console-match-v1.getRecent`</a>
4195    ///
4196    /// Note: this method is automatically generated.
4197    pub fn try_get_recent(&self, min_capacity: f32, route: ValPlatformRoute, queue: &str)
4198        -> impl Future<Output = TryRequestResult<crate::models::val_console_match_v1::RecentMatches>> + 'a
4199    {
4200        let route_str = route.into();
4201        let request = self.base.request(Method::GET, route_str, &format!("/val/match/console/v1/recent-matches/by-queue/{}", queue));
4202        let future = self.base.try_execute_val::<crate::models::val_console_match_v1::RecentMatches>("val-console-match-v1.getRecent", route_str, request, min_capacity);
4203        #[cfg(feature = "tracing")]
4204        let future = future.instrument(tracing::info_span!("val-console-match-v1.getRecent", route = route_str));
4205        #[cfg(feature = "metrics")]
4206        let future = metrics::try_timed(future, "val-console-match-v1.getRecent", route_str);
4207        future
4208    }
4209
4210}
4211
4212/// ValConsoleRankedV1 endpoints handle, accessed by calling [`val_console_ranked_v1()`](RiotApi::val_console_ranked_v1) on a [`RiotApi`] instance.
4213/// # Riot Developer API Reference
4214/// <a href="https://developer.riotgames.com/apis#val-console-ranked-v1" target="_blank">`val-console-ranked-v1`</a>
4215///
4216/// Note: this struct is automatically generated.
4217#[repr(transparent)]
4218pub struct ValConsoleRankedV1<'a> {
4219    base: &'a RiotApi,
4220}
4221impl<'a> ValConsoleRankedV1<'a> {
4222    /// Get leaderboard for the competitive queue
4223    /// # Parameters
4224    /// * `route` - Route to query.
4225    /// * `act_id` (required, in path) - Act ids can be found using the val-content API.
4226    /// * `platform_type` (required, in query)
4227    /// * `start_index` (optional, in query) - Defaults to 0.
4228    /// * `size` (optional, in query) - Defaults to 200. Valid values: 1 to 200.
4229    /// # Riot Developer API Reference
4230    /// <a href="https://developer.riotgames.com/api-methods/#val-console-ranked-v1/GET_getLeaderboard" target="_blank">`val-console-ranked-v1.getLeaderboard`</a>
4231    ///
4232    /// Note: this method is automatically generated.
4233    pub fn get_leaderboard(&self, route: ValPlatformRoute, act_id: &str, platform_type: &str, size: Option<i32>, start_index: Option<i32>)
4234        -> impl Future<Output = Result<Option<crate::models::val_console_ranked_v1::Leaderboard>>> + 'a
4235    {
4236        let route_str = route.into();
4237        let request = self.base.request(Method::GET, route_str, &format!("/val/console/ranked/v1/leaderboards/by-act/{}", act_id));
4238        let request = request.query(&[ ("platformType", platform_type) ]);
4239        let request = if let Some(size) = size { request.query(&[ ("size", size) ]) } else { request };
4240        let request = if let Some(start_index) = start_index { request.query(&[ ("startIndex", start_index) ]) } else { request };
4241        let future = self.base.execute_opt::<crate::models::val_console_ranked_v1::Leaderboard>("val-console-ranked-v1.getLeaderboard", route_str, request);
4242        #[cfg(feature = "tracing")]
4243        let future = future.instrument(tracing::info_span!("val-console-ranked-v1.getLeaderboard", route = route_str));
4244        #[cfg(feature = "metrics")]
4245        let future = metrics::timed(future, "val-console-ranked-v1.getLeaderboard", route_str);
4246        future
4247    }
4248
4249    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
4250    /// See `get_leaderboard` for detailed documentation
4251    /// # Parameters
4252    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
4253    /// * `route` - Route to query.
4254    /// * `act_id` (required, in path) - Act ids can be found using the val-content API.
4255    /// * `platform_type` (required, in query)
4256    /// * `start_index` (optional, in query) - Defaults to 0.
4257    /// * `size` (optional, in query) - Defaults to 200. Valid values: 1 to 200.
4258    /// # Riot Developer API Reference
4259    /// <a href="https://developer.riotgames.com/api-methods/#val-console-ranked-v1/GET_getLeaderboard" target="_blank">`val-console-ranked-v1.getLeaderboard`</a>
4260    ///
4261    /// Note: this method is automatically generated.
4262    pub fn try_get_leaderboard(&self, min_capacity: f32, route: ValPlatformRoute, act_id: &str, platform_type: &str, size: Option<i32>, start_index: Option<i32>)
4263        -> impl Future<Output = TryRequestResult<Option<crate::models::val_console_ranked_v1::Leaderboard>>> + 'a
4264    {
4265        let route_str = route.into();
4266        let request = self.base.request(Method::GET, route_str, &format!("/val/console/ranked/v1/leaderboards/by-act/{}", act_id));
4267        let request = request.query(&[ ("platformType", platform_type) ]);
4268        let request = if let Some(size) = size { request.query(&[ ("size", size) ]) } else { request };
4269        let request = if let Some(start_index) = start_index { request.query(&[ ("startIndex", start_index) ]) } else { request };
4270        let future = self.base.try_execute_opt::<crate::models::val_console_ranked_v1::Leaderboard>("val-console-ranked-v1.getLeaderboard", route_str, request, min_capacity);
4271        #[cfg(feature = "tracing")]
4272        let future = future.instrument(tracing::info_span!("val-console-ranked-v1.getLeaderboard", route = route_str));
4273        #[cfg(feature = "metrics")]
4274        let future = metrics::try_timed(future, "val-console-ranked-v1.getLeaderboard", route_str);
4275        future
4276    }
4277
4278}
4279
4280/// ValContentV1 endpoints handle, accessed by calling [`val_content_v1()`](RiotApi::val_content_v1) on a [`RiotApi`] instance.
4281/// # Riot Developer API Reference
4282/// <a href="https://developer.riotgames.com/apis#val-content-v1" target="_blank">`val-content-v1`</a>
4283///
4284/// Note: this struct is automatically generated.
4285#[repr(transparent)]
4286pub struct ValContentV1<'a> {
4287    base: &'a RiotApi,
4288}
4289impl<'a> ValContentV1<'a> {
4290    /// Get content optionally filtered by locale
4291    /// # Parameters
4292    /// * `route` - Route to query.
4293    /// * `locale` (optional, in query)
4294    /// # Riot Developer API Reference
4295    /// <a href="https://developer.riotgames.com/api-methods/#val-content-v1/GET_getContent" target="_blank">`val-content-v1.getContent`</a>
4296    ///
4297    /// Note: this method is automatically generated.
4298    pub fn get_content(&self, route: ValPlatformRoute, locale: Option<&str>)
4299        -> impl Future<Output = Result<crate::models::val_content_v1::Content>> + 'a
4300    {
4301        let route_str = route.into();
4302        let request = self.base.request(Method::GET, route_str, "/val/content/v1/contents");
4303        let request = if let Some(locale) = locale { request.query(&[ ("locale", locale) ]) } else { request };
4304        let future = self.base.execute_val::<crate::models::val_content_v1::Content>("val-content-v1.getContent", route_str, request);
4305        #[cfg(feature = "tracing")]
4306        let future = future.instrument(tracing::info_span!("val-content-v1.getContent", route = route_str));
4307        #[cfg(feature = "metrics")]
4308        let future = metrics::timed(future, "val-content-v1.getContent", route_str);
4309        future
4310    }
4311
4312    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
4313    /// See `get_content` for detailed documentation
4314    /// # Parameters
4315    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
4316    /// * `route` - Route to query.
4317    /// * `locale` (optional, in query)
4318    /// # Riot Developer API Reference
4319    /// <a href="https://developer.riotgames.com/api-methods/#val-content-v1/GET_getContent" target="_blank">`val-content-v1.getContent`</a>
4320    ///
4321    /// Note: this method is automatically generated.
4322    pub fn try_get_content(&self, min_capacity: f32, route: ValPlatformRoute, locale: Option<&str>)
4323        -> impl Future<Output = TryRequestResult<crate::models::val_content_v1::Content>> + 'a
4324    {
4325        let route_str = route.into();
4326        let request = self.base.request(Method::GET, route_str, "/val/content/v1/contents");
4327        let request = if let Some(locale) = locale { request.query(&[ ("locale", locale) ]) } else { request };
4328        let future = self.base.try_execute_val::<crate::models::val_content_v1::Content>("val-content-v1.getContent", route_str, request, min_capacity);
4329        #[cfg(feature = "tracing")]
4330        let future = future.instrument(tracing::info_span!("val-content-v1.getContent", route = route_str));
4331        #[cfg(feature = "metrics")]
4332        let future = metrics::try_timed(future, "val-content-v1.getContent", route_str);
4333        future
4334    }
4335
4336}
4337
4338/// ValMatchV1 endpoints handle, accessed by calling [`val_match_v1()`](RiotApi::val_match_v1) on a [`RiotApi`] instance.
4339/// # Riot Developer API Reference
4340/// <a href="https://developer.riotgames.com/apis#val-match-v1" target="_blank">`val-match-v1`</a>
4341///
4342/// Note: this struct is automatically generated.
4343#[repr(transparent)]
4344pub struct ValMatchV1<'a> {
4345    base: &'a RiotApi,
4346}
4347impl<'a> ValMatchV1<'a> {
4348    /// Get match by id
4349    /// # Parameters
4350    /// * `route` - Route to query.
4351    /// * `match_id` (required, in path)
4352    /// # Riot Developer API Reference
4353    /// <a href="https://developer.riotgames.com/api-methods/#val-match-v1/GET_getMatch" target="_blank">`val-match-v1.getMatch`</a>
4354    ///
4355    /// Note: this method is automatically generated.
4356    pub fn get_match(&self, route: ValPlatformRoute, match_id: &str)
4357        -> impl Future<Output = Result<Option<crate::models::val_match_v1::Match>>> + 'a
4358    {
4359        let route_str = route.into();
4360        let request = self.base.request(Method::GET, route_str, &format!("/val/match/v1/matches/{}", match_id));
4361        let future = self.base.execute_opt::<crate::models::val_match_v1::Match>("val-match-v1.getMatch", route_str, request);
4362        #[cfg(feature = "tracing")]
4363        let future = future.instrument(tracing::info_span!("val-match-v1.getMatch", route = route_str));
4364        #[cfg(feature = "metrics")]
4365        let future = metrics::timed(future, "val-match-v1.getMatch", route_str);
4366        future
4367    }
4368
4369    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
4370    /// See `get_match` for detailed documentation
4371    /// # Parameters
4372    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
4373    /// * `route` - Route to query.
4374    /// * `match_id` (required, in path)
4375    /// # Riot Developer API Reference
4376    /// <a href="https://developer.riotgames.com/api-methods/#val-match-v1/GET_getMatch" target="_blank">`val-match-v1.getMatch`</a>
4377    ///
4378    /// Note: this method is automatically generated.
4379    pub fn try_get_match(&self, min_capacity: f32, route: ValPlatformRoute, match_id: &str)
4380        -> impl Future<Output = TryRequestResult<Option<crate::models::val_match_v1::Match>>> + 'a
4381    {
4382        let route_str = route.into();
4383        let request = self.base.request(Method::GET, route_str, &format!("/val/match/v1/matches/{}", match_id));
4384        let future = self.base.try_execute_opt::<crate::models::val_match_v1::Match>("val-match-v1.getMatch", route_str, request, min_capacity);
4385        #[cfg(feature = "tracing")]
4386        let future = future.instrument(tracing::info_span!("val-match-v1.getMatch", route = route_str));
4387        #[cfg(feature = "metrics")]
4388        let future = metrics::try_timed(future, "val-match-v1.getMatch", route_str);
4389        future
4390    }
4391
4392    /// Get matchlist for games played by puuid
4393    /// # Parameters
4394    /// * `route` - Route to query.
4395    /// * `puuid` (required, in path)
4396    /// # Riot Developer API Reference
4397    /// <a href="https://developer.riotgames.com/api-methods/#val-match-v1/GET_getMatchlist" target="_blank">`val-match-v1.getMatchlist`</a>
4398    ///
4399    /// Note: this method is automatically generated.
4400    pub fn get_matchlist(&self, route: ValPlatformRoute, puuid: &str)
4401        -> impl Future<Output = Result<crate::models::val_match_v1::Matchlist>> + 'a
4402    {
4403        let route_str = route.into();
4404        let request = self.base.request(Method::GET, route_str, &format!("/val/match/v1/matchlists/by-puuid/{}", puuid));
4405        let future = self.base.execute_val::<crate::models::val_match_v1::Matchlist>("val-match-v1.getMatchlist", route_str, request);
4406        #[cfg(feature = "tracing")]
4407        let future = future.instrument(tracing::info_span!("val-match-v1.getMatchlist", route = route_str));
4408        #[cfg(feature = "metrics")]
4409        let future = metrics::timed(future, "val-match-v1.getMatchlist", route_str);
4410        future
4411    }
4412
4413    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
4414    /// See `get_matchlist` for detailed documentation
4415    /// # Parameters
4416    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
4417    /// * `route` - Route to query.
4418    /// * `puuid` (required, in path)
4419    /// # Riot Developer API Reference
4420    /// <a href="https://developer.riotgames.com/api-methods/#val-match-v1/GET_getMatchlist" target="_blank">`val-match-v1.getMatchlist`</a>
4421    ///
4422    /// Note: this method is automatically generated.
4423    pub fn try_get_matchlist(&self, min_capacity: f32, route: ValPlatformRoute, puuid: &str)
4424        -> impl Future<Output = TryRequestResult<crate::models::val_match_v1::Matchlist>> + 'a
4425    {
4426        let route_str = route.into();
4427        let request = self.base.request(Method::GET, route_str, &format!("/val/match/v1/matchlists/by-puuid/{}", puuid));
4428        let future = self.base.try_execute_val::<crate::models::val_match_v1::Matchlist>("val-match-v1.getMatchlist", route_str, request, min_capacity);
4429        #[cfg(feature = "tracing")]
4430        let future = future.instrument(tracing::info_span!("val-match-v1.getMatchlist", route = route_str));
4431        #[cfg(feature = "metrics")]
4432        let future = metrics::try_timed(future, "val-match-v1.getMatchlist", route_str);
4433        future
4434    }
4435
4436    /// Get recent matches
4437    /// ## Implementation Notes
4438    /// Returns a list of match ids that have completed in the last 10 minutes for live regions and 12 hours for the esports routing value. NA/LATAM/BR share a match history deployment. As such, recent matches will return a combined list of matches from those three regions. Requests are load balanced so you may see some inconsistencies as matches are added/removed from the list.
4439    /// # Parameters
4440    /// * `route` - Route to query.
4441    /// * `queue` (required, in path)
4442    /// # Riot Developer API Reference
4443    /// <a href="https://developer.riotgames.com/api-methods/#val-match-v1/GET_getRecent" target="_blank">`val-match-v1.getRecent`</a>
4444    ///
4445    /// Note: this method is automatically generated.
4446    pub fn get_recent(&self, route: ValPlatformRoute, queue: &str)
4447        -> impl Future<Output = Result<crate::models::val_match_v1::RecentMatches>> + 'a
4448    {
4449        let route_str = route.into();
4450        let request = self.base.request(Method::GET, route_str, &format!("/val/match/v1/recent-matches/by-queue/{}", queue));
4451        let future = self.base.execute_val::<crate::models::val_match_v1::RecentMatches>("val-match-v1.getRecent", route_str, request);
4452        #[cfg(feature = "tracing")]
4453        let future = future.instrument(tracing::info_span!("val-match-v1.getRecent", route = route_str));
4454        #[cfg(feature = "metrics")]
4455        let future = metrics::timed(future, "val-match-v1.getRecent", route_str);
4456        future
4457    }
4458
4459    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
4460    /// See `get_recent` for detailed documentation
4461    /// # Parameters
4462    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
4463    /// * `route` - Route to query.
4464    /// * `queue` (required, in path)
4465    /// # Riot Developer API Reference
4466    /// <a href="https://developer.riotgames.com/api-methods/#val-match-v1/GET_getRecent" target="_blank">`val-match-v1.getRecent`</a>
4467    ///
4468    /// Note: this method is automatically generated.
4469    pub fn try_get_recent(&self, min_capacity: f32, route: ValPlatformRoute, queue: &str)
4470        -> impl Future<Output = TryRequestResult<crate::models::val_match_v1::RecentMatches>> + 'a
4471    {
4472        let route_str = route.into();
4473        let request = self.base.request(Method::GET, route_str, &format!("/val/match/v1/recent-matches/by-queue/{}", queue));
4474        let future = self.base.try_execute_val::<crate::models::val_match_v1::RecentMatches>("val-match-v1.getRecent", route_str, request, min_capacity);
4475        #[cfg(feature = "tracing")]
4476        let future = future.instrument(tracing::info_span!("val-match-v1.getRecent", route = route_str));
4477        #[cfg(feature = "metrics")]
4478        let future = metrics::try_timed(future, "val-match-v1.getRecent", route_str);
4479        future
4480    }
4481
4482}
4483
4484/// ValRankedV1 endpoints handle, accessed by calling [`val_ranked_v1()`](RiotApi::val_ranked_v1) on a [`RiotApi`] instance.
4485/// # Riot Developer API Reference
4486/// <a href="https://developer.riotgames.com/apis#val-ranked-v1" target="_blank">`val-ranked-v1`</a>
4487///
4488/// Note: this struct is automatically generated.
4489#[repr(transparent)]
4490pub struct ValRankedV1<'a> {
4491    base: &'a RiotApi,
4492}
4493impl<'a> ValRankedV1<'a> {
4494    /// Get leaderboard for the competitive queue
4495    /// # Parameters
4496    /// * `route` - Route to query.
4497    /// * `act_id` (required, in path) - Act ids can be found using the val-content API.
4498    /// * `size` (optional, in query) - Defaults to 200. Valid values: 1 to 200.
4499    /// * `start_index` (optional, in query) - Defaults to 0.
4500    /// # Riot Developer API Reference
4501    /// <a href="https://developer.riotgames.com/api-methods/#val-ranked-v1/GET_getLeaderboard" target="_blank">`val-ranked-v1.getLeaderboard`</a>
4502    ///
4503    /// Note: this method is automatically generated.
4504    pub fn get_leaderboard(&self, route: ValPlatformRoute, act_id: &str, size: Option<i32>, start_index: Option<i32>)
4505        -> impl Future<Output = Result<Option<crate::models::val_ranked_v1::Leaderboard>>> + 'a
4506    {
4507        let route_str = route.into();
4508        let request = self.base.request(Method::GET, route_str, &format!("/val/ranked/v1/leaderboards/by-act/{}", act_id));
4509        let request = if let Some(size) = size { request.query(&[ ("size", size) ]) } else { request };
4510        let request = if let Some(start_index) = start_index { request.query(&[ ("startIndex", start_index) ]) } else { request };
4511        let future = self.base.execute_opt::<crate::models::val_ranked_v1::Leaderboard>("val-ranked-v1.getLeaderboard", route_str, request);
4512        #[cfg(feature = "tracing")]
4513        let future = future.instrument(tracing::info_span!("val-ranked-v1.getLeaderboard", route = route_str));
4514        #[cfg(feature = "metrics")]
4515        let future = metrics::timed(future, "val-ranked-v1.getLeaderboard", route_str);
4516        future
4517    }
4518
4519    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
4520    /// See `get_leaderboard` for detailed documentation
4521    /// # Parameters
4522    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
4523    /// * `route` - Route to query.
4524    /// * `act_id` (required, in path) - Act ids can be found using the val-content API.
4525    /// * `size` (optional, in query) - Defaults to 200. Valid values: 1 to 200.
4526    /// * `start_index` (optional, in query) - Defaults to 0.
4527    /// # Riot Developer API Reference
4528    /// <a href="https://developer.riotgames.com/api-methods/#val-ranked-v1/GET_getLeaderboard" target="_blank">`val-ranked-v1.getLeaderboard`</a>
4529    ///
4530    /// Note: this method is automatically generated.
4531    pub fn try_get_leaderboard(&self, min_capacity: f32, route: ValPlatformRoute, act_id: &str, size: Option<i32>, start_index: Option<i32>)
4532        -> impl Future<Output = TryRequestResult<Option<crate::models::val_ranked_v1::Leaderboard>>> + 'a
4533    {
4534        let route_str = route.into();
4535        let request = self.base.request(Method::GET, route_str, &format!("/val/ranked/v1/leaderboards/by-act/{}", act_id));
4536        let request = if let Some(size) = size { request.query(&[ ("size", size) ]) } else { request };
4537        let request = if let Some(start_index) = start_index { request.query(&[ ("startIndex", start_index) ]) } else { request };
4538        let future = self.base.try_execute_opt::<crate::models::val_ranked_v1::Leaderboard>("val-ranked-v1.getLeaderboard", route_str, request, min_capacity);
4539        #[cfg(feature = "tracing")]
4540        let future = future.instrument(tracing::info_span!("val-ranked-v1.getLeaderboard", route = route_str));
4541        #[cfg(feature = "metrics")]
4542        let future = metrics::try_timed(future, "val-ranked-v1.getLeaderboard", route_str);
4543        future
4544    }
4545
4546}
4547
4548/// ValStatusV1 endpoints handle, accessed by calling [`val_status_v1()`](RiotApi::val_status_v1) on a [`RiotApi`] instance.
4549/// # Riot Developer API Reference
4550/// <a href="https://developer.riotgames.com/apis#val-status-v1" target="_blank">`val-status-v1`</a>
4551///
4552/// Note: this struct is automatically generated.
4553#[repr(transparent)]
4554pub struct ValStatusV1<'a> {
4555    base: &'a RiotApi,
4556}
4557impl<'a> ValStatusV1<'a> {
4558    /// Get VALORANT status for the given platform.
4559    /// # Parameters
4560    /// * `route` - Route to query.
4561    /// # Riot Developer API Reference
4562    /// <a href="https://developer.riotgames.com/api-methods/#val-status-v1/GET_getPlatformData" target="_blank">`val-status-v1.getPlatformData`</a>
4563    ///
4564    /// Note: this method is automatically generated.
4565    pub fn get_platform_data(&self, route: ValPlatformRoute)
4566        -> impl Future<Output = Result<crate::models::val_status_v1::PlatformData>> + 'a
4567    {
4568        let route_str = route.into();
4569        let request = self.base.request(Method::GET, route_str, "/val/status/v1/platform-data");
4570        let future = self.base.execute_val::<crate::models::val_status_v1::PlatformData>("val-status-v1.getPlatformData", route_str, request);
4571        #[cfg(feature = "tracing")]
4572        let future = future.instrument(tracing::info_span!("val-status-v1.getPlatformData", route = route_str));
4573        #[cfg(feature = "metrics")]
4574        let future = metrics::timed(future, "val-status-v1.getPlatformData", route_str);
4575        future
4576    }
4577
4578    /// Variation that checks for minimum capacity before making the request, returning None if insufficent capacity
4579    /// See `get_platform_data` for detailed documentation
4580    /// # Parameters
4581    /// * `min_capacity` - Minimum capacity required as a float from 1.0 (all capacity) to 0.0 (no capacity) excluding burst
4582    /// * `route` - Route to query.
4583    /// # Riot Developer API Reference
4584    /// <a href="https://developer.riotgames.com/api-methods/#val-status-v1/GET_getPlatformData" target="_blank">`val-status-v1.getPlatformData`</a>
4585    ///
4586    /// Note: this method is automatically generated.
4587    pub fn try_get_platform_data(&self, min_capacity: f32, route: ValPlatformRoute)
4588        -> impl Future<Output = TryRequestResult<crate::models::val_status_v1::PlatformData>> + 'a
4589    {
4590        let route_str = route.into();
4591        let request = self.base.request(Method::GET, route_str, "/val/status/v1/platform-data");
4592        let future = self.base.try_execute_val::<crate::models::val_status_v1::PlatformData>("val-status-v1.getPlatformData", route_str, request, min_capacity);
4593        #[cfg(feature = "tracing")]
4594        let future = future.instrument(tracing::info_span!("val-status-v1.getPlatformData", route = route_str));
4595        #[cfg(feature = "metrics")]
4596        let future = metrics::try_timed(future, "val-status-v1.getPlatformData", route_str);
4597        future
4598    }
4599
4600}