warframestat_rs/apis/
static_processing_data_api.rs

1/*
2 * WarframeStat.us API
3 *
4 * Simple API for data from the game Warframe. [Parser Docs](https://wfcd.github.io/warframe-worldstate-parser/) [Items Types](https://github.com/WFCD/warframe-items/blob/master/index.d.ts) 
5 *
6 * The version of the OpenAPI document: living
7 * Contact: tobiah@protonmail.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12use reqwest;
13
14use crate::apis::ResponseContent;
15use super::{Error, configuration};
16
17
18/// struct for typed errors of method [`arcanes_get`]
19#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum ArcanesGetError {
22    Status400(crate::models::InlineResponse400),
23    Status500(crate::models::InlineResponse400),
24    UnknownValue(serde_json::Value),
25}
26
27/// struct for typed errors of method [`conclave_get`]
28#[derive(Debug, Clone, Serialize, Deserialize)]
29#[serde(untagged)]
30pub enum ConclaveGetError {
31    Status400(crate::models::InlineResponse400),
32    Status500(crate::models::InlineResponse400),
33    UnknownValue(serde_json::Value),
34}
35
36/// struct for typed errors of method [`events_get`]
37#[derive(Debug, Clone, Serialize, Deserialize)]
38#[serde(untagged)]
39pub enum EventsGetError {
40    Status400(crate::models::InlineResponse400),
41    Status500(crate::models::InlineResponse400),
42    UnknownValue(serde_json::Value),
43}
44
45/// struct for typed errors of method [`factions_get`]
46#[derive(Debug, Clone, Serialize, Deserialize)]
47#[serde(untagged)]
48pub enum FactionsGetError {
49    Status400(crate::models::InlineResponse400),
50    Status500(crate::models::InlineResponse400),
51    UnknownValue(serde_json::Value),
52}
53
54/// struct for typed errors of method [`fissure_modifiers_get`]
55#[derive(Debug, Clone, Serialize, Deserialize)]
56#[serde(untagged)]
57pub enum FissureModifiersGetError {
58    Status400(crate::models::InlineResponse400),
59    Status500(crate::models::InlineResponse400),
60    UnknownValue(serde_json::Value),
61}
62
63/// struct for typed errors of method [`items_get`]
64#[derive(Debug, Clone, Serialize, Deserialize)]
65#[serde(untagged)]
66pub enum ItemsGetError {
67    Status400(crate::models::InlineResponse400),
68    Status500(crate::models::InlineResponse400),
69    UnknownValue(serde_json::Value),
70}
71
72/// struct for typed errors of method [`items_query_get`]
73#[derive(Debug, Clone, Serialize, Deserialize)]
74#[serde(untagged)]
75pub enum ItemsQueryGetError {
76    Status400(crate::models::InlineResponse400),
77    Status500(crate::models::InlineResponse400),
78    UnknownValue(serde_json::Value),
79}
80
81/// struct for typed errors of method [`languages_get`]
82#[derive(Debug, Clone, Serialize, Deserialize)]
83#[serde(untagged)]
84pub enum LanguagesGetError {
85    Status400(crate::models::InlineResponse400),
86    Status500(crate::models::InlineResponse400),
87    UnknownValue(serde_json::Value),
88}
89
90/// struct for typed errors of method [`locales_get`]
91#[derive(Debug, Clone, Serialize, Deserialize)]
92#[serde(untagged)]
93pub enum LocalesGetError {
94    UnknownValue(serde_json::Value),
95}
96
97/// struct for typed errors of method [`mission_types_get`]
98#[derive(Debug, Clone, Serialize, Deserialize)]
99#[serde(untagged)]
100pub enum MissionTypesGetError {
101    Status400(crate::models::InlineResponse400),
102    Status500(crate::models::InlineResponse400),
103    UnknownValue(serde_json::Value),
104}
105
106/// struct for typed errors of method [`mods_get`]
107#[derive(Debug, Clone, Serialize, Deserialize)]
108#[serde(untagged)]
109pub enum ModsGetError {
110    Status400(crate::models::InlineResponse400),
111    Status500(crate::models::InlineResponse400),
112    UnknownValue(serde_json::Value),
113}
114
115/// struct for typed errors of method [`mods_query_get`]
116#[derive(Debug, Clone, Serialize, Deserialize)]
117#[serde(untagged)]
118pub enum ModsQueryGetError {
119    Status400(crate::models::InlineResponse400),
120    Status500(crate::models::InlineResponse400),
121    UnknownValue(serde_json::Value),
122}
123
124/// struct for typed errors of method [`mods_search_query_get`]
125#[derive(Debug, Clone, Serialize, Deserialize)]
126#[serde(untagged)]
127pub enum ModsSearchQueryGetError {
128    Status400(crate::models::InlineResponse400),
129    Status500(crate::models::InlineResponse400),
130    UnknownValue(serde_json::Value),
131}
132
133/// struct for typed errors of method [`operation_types_get`]
134#[derive(Debug, Clone, Serialize, Deserialize)]
135#[serde(untagged)]
136pub enum OperationTypesGetError {
137    Status400(crate::models::InlineResponse400),
138    Status500(crate::models::InlineResponse400),
139    UnknownValue(serde_json::Value),
140}
141
142/// struct for typed errors of method [`persistent_enemy_get`]
143#[derive(Debug, Clone, Serialize, Deserialize)]
144#[serde(untagged)]
145pub enum PersistentEnemyGetError {
146    Status400(crate::models::InlineResponse400),
147    Status500(crate::models::InlineResponse400),
148    UnknownValue(serde_json::Value),
149}
150
151/// struct for typed errors of method [`sol_nodes_get`]
152#[derive(Debug, Clone, Serialize, Deserialize)]
153#[serde(untagged)]
154pub enum SolNodesGetError {
155    Status400(crate::models::InlineResponse400),
156    Status500(crate::models::InlineResponse400),
157    UnknownValue(serde_json::Value),
158}
159
160/// struct for typed errors of method [`sortie_get`]
161#[derive(Debug, Clone, Serialize, Deserialize)]
162#[serde(untagged)]
163pub enum SortieGetError {
164    Status400(crate::models::InlineResponse400),
165    Status500(crate::models::InlineResponse400),
166    UnknownValue(serde_json::Value),
167}
168
169/// struct for typed errors of method [`syndicates_get`]
170#[derive(Debug, Clone, Serialize, Deserialize)]
171#[serde(untagged)]
172pub enum SyndicatesGetError {
173    Status400(crate::models::InlineResponse400),
174    Status500(crate::models::InlineResponse400),
175    UnknownValue(serde_json::Value),
176}
177
178/// struct for typed errors of method [`tutorials_get`]
179#[derive(Debug, Clone, Serialize, Deserialize)]
180#[serde(untagged)]
181pub enum TutorialsGetError {
182    Status400(crate::models::InlineResponse400),
183    Status500(crate::models::InlineResponse400),
184    UnknownValue(serde_json::Value),
185}
186
187/// struct for typed errors of method [`upgrade_types_get`]
188#[derive(Debug, Clone, Serialize, Deserialize)]
189#[serde(untagged)]
190pub enum UpgradeTypesGetError {
191    Status400(crate::models::InlineResponse400),
192    Status500(crate::models::InlineResponse400),
193    UnknownValue(serde_json::Value),
194}
195
196/// struct for typed errors of method [`warframes_get`]
197#[derive(Debug, Clone, Serialize, Deserialize)]
198#[serde(untagged)]
199pub enum WarframesGetError {
200    Status400(crate::models::InlineResponse400),
201    Status500(crate::models::InlineResponse400),
202    UnknownValue(serde_json::Value),
203}
204
205/// struct for typed errors of method [`warframes_query_get`]
206#[derive(Debug, Clone, Serialize, Deserialize)]
207#[serde(untagged)]
208pub enum WarframesQueryGetError {
209    Status400(crate::models::InlineResponse400),
210    Status500(crate::models::InlineResponse400),
211    UnknownValue(serde_json::Value),
212}
213
214/// struct for typed errors of method [`weapons_get`]
215#[derive(Debug, Clone, Serialize, Deserialize)]
216#[serde(untagged)]
217pub enum WeaponsGetError {
218    Status400(crate::models::InlineResponse400),
219    Status500(crate::models::InlineResponse400),
220    UnknownValue(serde_json::Value),
221}
222
223/// struct for typed errors of method [`weapons_query_get`]
224#[derive(Debug, Clone, Serialize, Deserialize)]
225#[serde(untagged)]
226pub enum WeaponsQueryGetError {
227    Status400(crate::models::InlineResponse400),
228    Status500(crate::models::InlineResponse400),
229    UnknownValue(serde_json::Value),
230}
231
232/// struct for typed errors of method [`weapons_search_query_get`]
233#[derive(Debug, Clone, Serialize, Deserialize)]
234#[serde(untagged)]
235pub enum WeaponsSearchQueryGetError {
236    Status400(crate::models::InlineResponse400),
237    Status500(crate::models::InlineResponse400),
238    UnknownValue(serde_json::Value),
239}
240
241
242/// Available Arcane Enhancements
243pub async fn arcanes_get(configuration: &configuration::Configuration, ) -> Result<crate::models::Arcane, Error<ArcanesGetError>> {
244    let local_var_configuration = configuration;
245
246    let local_var_client = &local_var_configuration.client;
247
248    let local_var_uri_str = format!("{}/arcanes", local_var_configuration.base_path);
249    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
250
251    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
252        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
253    }
254
255    let local_var_req = local_var_req_builder.build()?;
256    let local_var_resp = local_var_client.execute(local_var_req).await?;
257
258    let local_var_status = local_var_resp.status();
259    let local_var_content = local_var_resp.text().await?;
260
261    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
262        serde_json::from_str(&local_var_content).map_err(Error::from)
263    } else {
264        let local_var_entity: Option<ArcanesGetError> = serde_json::from_str(&local_var_content).ok();
265        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
266        Err(Error::ResponseError(local_var_error))
267    }
268}
269
270/// Data about conclave challenges
271pub async fn conclave_get(configuration: &configuration::Configuration, ) -> Result<crate::models::Conclave, Error<ConclaveGetError>> {
272    let local_var_configuration = configuration;
273
274    let local_var_client = &local_var_configuration.client;
275
276    let local_var_uri_str = format!("{}/conclave", local_var_configuration.base_path);
277    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
278
279    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
280        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
281    }
282
283    let local_var_req = local_var_req_builder.build()?;
284    let local_var_resp = local_var_client.execute(local_var_req).await?;
285
286    let local_var_status = local_var_resp.status();
287    let local_var_content = local_var_resp.text().await?;
288
289    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
290        serde_json::from_str(&local_var_content).map_err(Error::from)
291    } else {
292        let local_var_entity: Option<ConclaveGetError> = serde_json::from_str(&local_var_content).ok();
293        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
294        Err(Error::ResponseError(local_var_error))
295    }
296}
297
298/// Data about events
299pub async fn events_get(configuration: &configuration::Configuration, ) -> Result<serde_json::Value, Error<EventsGetError>> {
300    let local_var_configuration = configuration;
301
302    let local_var_client = &local_var_configuration.client;
303
304    let local_var_uri_str = format!("{}/events", local_var_configuration.base_path);
305    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
306
307    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
308        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
309    }
310
311    let local_var_req = local_var_req_builder.build()?;
312    let local_var_resp = local_var_client.execute(local_var_req).await?;
313
314    let local_var_status = local_var_resp.status();
315    let local_var_content = local_var_resp.text().await?;
316
317    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
318        serde_json::from_str(&local_var_content).map_err(Error::from)
319    } else {
320        let local_var_entity: Option<EventsGetError> = serde_json::from_str(&local_var_content).ok();
321        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
322        Err(Error::ResponseError(local_var_error))
323    }
324}
325
326/// Strings for translating faction identifiers.
327pub async fn factions_get(configuration: &configuration::Configuration, ) -> Result<crate::models::Factions, Error<FactionsGetError>> {
328    let local_var_configuration = configuration;
329
330    let local_var_client = &local_var_configuration.client;
331
332    let local_var_uri_str = format!("{}/factions", local_var_configuration.base_path);
333    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
334
335    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
336        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
337    }
338
339    let local_var_req = local_var_req_builder.build()?;
340    let local_var_resp = local_var_client.execute(local_var_req).await?;
341
342    let local_var_status = local_var_resp.status();
343    let local_var_content = local_var_resp.text().await?;
344
345    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
346        serde_json::from_str(&local_var_content).map_err(Error::from)
347    } else {
348        let local_var_entity: Option<FactionsGetError> = serde_json::from_str(&local_var_content).ok();
349        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
350        Err(Error::ResponseError(local_var_error))
351    }
352}
353
354/// Fissure translation identifiers
355pub async fn fissure_modifiers_get(configuration: &configuration::Configuration, ) -> Result<crate::models::FissureModifiers, Error<FissureModifiersGetError>> {
356    let local_var_configuration = configuration;
357
358    let local_var_client = &local_var_configuration.client;
359
360    let local_var_uri_str = format!("{}/fissureModifiers", local_var_configuration.base_path);
361    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
362
363    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
364        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
365    }
366
367    let local_var_req = local_var_req_builder.build()?;
368    let local_var_resp = local_var_client.execute(local_var_req).await?;
369
370    let local_var_status = local_var_resp.status();
371    let local_var_content = local_var_resp.text().await?;
372
373    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
374        serde_json::from_str(&local_var_content).map_err(Error::from)
375    } else {
376        let local_var_entity: Option<FissureModifiersGetError> = serde_json::from_str(&local_var_content).ok();
377        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
378        Err(Error::ResponseError(local_var_error))
379    }
380}
381
382/// Item information.
383pub async fn items_get(configuration: &configuration::Configuration, only: Option<&str>, remove: Option<&str>) -> Result<Vec<crate::models::ItemsFields>, Error<ItemsGetError>> {
384    let local_var_configuration = configuration;
385
386    let local_var_client = &local_var_configuration.client;
387
388    let local_var_uri_str = format!("{}/items", local_var_configuration.base_path);
389    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
390
391    if let Some(ref local_var_str) = only {
392        local_var_req_builder = local_var_req_builder.query(&[("only", &local_var_str.to_string())]);
393    }
394    if let Some(ref local_var_str) = remove {
395        local_var_req_builder = local_var_req_builder.query(&[("remove", &local_var_str.to_string())]);
396    }
397    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
398        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
399    }
400
401    let local_var_req = local_var_req_builder.build()?;
402    let local_var_resp = local_var_client.execute(local_var_req).await?;
403
404    let local_var_status = local_var_resp.status();
405    let local_var_content = local_var_resp.text().await?;
406
407    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
408        serde_json::from_str(&local_var_content).map_err(Error::from)
409    } else {
410        let local_var_entity: Option<ItemsGetError> = serde_json::from_str(&local_var_content).ok();
411        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
412        Err(Error::ResponseError(local_var_error))
413    }
414}
415
416/// Item information.
417pub async fn items_query_get(configuration: &configuration::Configuration, query: &str, only: Option<&str>, remove: Option<&str>, by: Option<&str>) -> Result<crate::models::Item, Error<ItemsQueryGetError>> {
418    let local_var_configuration = configuration;
419
420    let local_var_client = &local_var_configuration.client;
421
422    let local_var_uri_str = format!("{}/items/{query}", local_var_configuration.base_path, query=crate::apis::urlencode(query));
423    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
424
425    if let Some(ref local_var_str) = only {
426        local_var_req_builder = local_var_req_builder.query(&[("only", &local_var_str.to_string())]);
427    }
428    if let Some(ref local_var_str) = remove {
429        local_var_req_builder = local_var_req_builder.query(&[("remove", &local_var_str.to_string())]);
430    }
431    if let Some(ref local_var_str) = by {
432        local_var_req_builder = local_var_req_builder.query(&[("by", &local_var_str.to_string())]);
433    }
434    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
435        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
436    }
437
438    let local_var_req = local_var_req_builder.build()?;
439    let local_var_resp = local_var_client.execute(local_var_req).await?;
440
441    let local_var_status = local_var_resp.status();
442    let local_var_content = local_var_resp.text().await?;
443
444    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
445        serde_json::from_str(&local_var_content).map_err(Error::from)
446    } else {
447        let local_var_entity: Option<ItemsQueryGetError> = serde_json::from_str(&local_var_content).ok();
448        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
449        Err(Error::ResponseError(local_var_error))
450    }
451}
452
453/// Get language strings to assist translation. (Prefer the /languages/search/:query route)
454pub async fn languages_get(configuration: &configuration::Configuration, ) -> Result<crate::models::Languages, Error<LanguagesGetError>> {
455    let local_var_configuration = configuration;
456
457    let local_var_client = &local_var_configuration.client;
458
459    let local_var_uri_str = format!("{}/languages", local_var_configuration.base_path);
460    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
461
462    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
463        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
464    }
465
466    let local_var_req = local_var_req_builder.build()?;
467    let local_var_resp = local_var_client.execute(local_var_req).await?;
468
469    let local_var_status = local_var_resp.status();
470    let local_var_content = local_var_resp.text().await?;
471
472    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
473        serde_json::from_str(&local_var_content).map_err(Error::from)
474    } else {
475        let local_var_entity: Option<LanguagesGetError> = serde_json::from_str(&local_var_content).ok();
476        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
477        Err(Error::ResponseError(local_var_error))
478    }
479}
480
481/// Locales supported by the API
482pub async fn locales_get(configuration: &configuration::Configuration, ) -> Result<Vec<crate::models::Language>, Error<LocalesGetError>> {
483    let local_var_configuration = configuration;
484
485    let local_var_client = &local_var_configuration.client;
486
487    let local_var_uri_str = format!("{}/locales", local_var_configuration.base_path);
488    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
489
490    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
491        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
492    }
493
494    let local_var_req = local_var_req_builder.build()?;
495    let local_var_resp = local_var_client.execute(local_var_req).await?;
496
497    let local_var_status = local_var_resp.status();
498    let local_var_content = local_var_resp.text().await?;
499
500    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
501        serde_json::from_str(&local_var_content).map_err(Error::from)
502    } else {
503        let local_var_entity: Option<LocalesGetError> = serde_json::from_str(&local_var_content).ok();
504        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
505        Err(Error::ResponseError(local_var_error))
506    }
507}
508
509/// Mission Type information to aid translating identifiers
510pub async fn mission_types_get(configuration: &configuration::Configuration, ) -> Result<crate::models::MissionTypes, Error<MissionTypesGetError>> {
511    let local_var_configuration = configuration;
512
513    let local_var_client = &local_var_configuration.client;
514
515    let local_var_uri_str = format!("{}/missionTypes", local_var_configuration.base_path);
516    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
517
518    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
519        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
520    }
521
522    let local_var_req = local_var_req_builder.build()?;
523    let local_var_resp = local_var_client.execute(local_var_req).await?;
524
525    let local_var_status = local_var_resp.status();
526    let local_var_content = local_var_resp.text().await?;
527
528    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
529        serde_json::from_str(&local_var_content).map_err(Error::from)
530    } else {
531        let local_var_entity: Option<MissionTypesGetError> = serde_json::from_str(&local_var_content).ok();
532        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
533        Err(Error::ResponseError(local_var_error))
534    }
535}
536
537/// Item information.
538pub async fn mods_get(configuration: &configuration::Configuration, only: Option<&str>, remove: Option<&str>) -> Result<Vec<crate::models::ModelMod>, Error<ModsGetError>> {
539    let local_var_configuration = configuration;
540
541    let local_var_client = &local_var_configuration.client;
542
543    let local_var_uri_str = format!("{}/mods", local_var_configuration.base_path);
544    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
545
546    if let Some(ref local_var_str) = only {
547        local_var_req_builder = local_var_req_builder.query(&[("only", &local_var_str.to_string())]);
548    }
549    if let Some(ref local_var_str) = remove {
550        local_var_req_builder = local_var_req_builder.query(&[("remove", &local_var_str.to_string())]);
551    }
552    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
553        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
554    }
555
556    let local_var_req = local_var_req_builder.build()?;
557    let local_var_resp = local_var_client.execute(local_var_req).await?;
558
559    let local_var_status = local_var_resp.status();
560    let local_var_content = local_var_resp.text().await?;
561
562    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
563        serde_json::from_str(&local_var_content).map_err(Error::from)
564    } else {
565        let local_var_entity: Option<ModsGetError> = serde_json::from_str(&local_var_content).ok();
566        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
567        Err(Error::ResponseError(local_var_error))
568    }
569}
570
571/// Mod information.
572pub async fn mods_query_get(configuration: &configuration::Configuration, query: &str, only: Option<&str>, remove: Option<&str>, by: Option<&str>) -> Result<crate::models::ModelMod, Error<ModsQueryGetError>> {
573    let local_var_configuration = configuration;
574
575    let local_var_client = &local_var_configuration.client;
576
577    let local_var_uri_str = format!("{}/mods/{query}", local_var_configuration.base_path, query=crate::apis::urlencode(query));
578    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
579
580    if let Some(ref local_var_str) = only {
581        local_var_req_builder = local_var_req_builder.query(&[("only", &local_var_str.to_string())]);
582    }
583    if let Some(ref local_var_str) = remove {
584        local_var_req_builder = local_var_req_builder.query(&[("remove", &local_var_str.to_string())]);
585    }
586    if let Some(ref local_var_str) = by {
587        local_var_req_builder = local_var_req_builder.query(&[("by", &local_var_str.to_string())]);
588    }
589    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
590        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
591    }
592
593    let local_var_req = local_var_req_builder.build()?;
594    let local_var_resp = local_var_client.execute(local_var_req).await?;
595
596    let local_var_status = local_var_resp.status();
597    let local_var_content = local_var_resp.text().await?;
598
599    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
600        serde_json::from_str(&local_var_content).map_err(Error::from)
601    } else {
602        let local_var_entity: Option<ModsQueryGetError> = serde_json::from_str(&local_var_content).ok();
603        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
604        Err(Error::ResponseError(local_var_error))
605    }
606}
607
608/// Item information, such as name, unique name, type, and image name.
609pub async fn mods_search_query_get(configuration: &configuration::Configuration, query: &str, only: Option<&str>, remove: Option<&str>, by: Option<&str>) -> Result<Vec<crate::models::ModelMod>, Error<ModsSearchQueryGetError>> {
610    let local_var_configuration = configuration;
611
612    let local_var_client = &local_var_configuration.client;
613
614    let local_var_uri_str = format!("{}/mods/search/{query}", local_var_configuration.base_path, query=crate::apis::urlencode(query));
615    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
616
617    if let Some(ref local_var_str) = only {
618        local_var_req_builder = local_var_req_builder.query(&[("only", &local_var_str.to_string())]);
619    }
620    if let Some(ref local_var_str) = remove {
621        local_var_req_builder = local_var_req_builder.query(&[("remove", &local_var_str.to_string())]);
622    }
623    if let Some(ref local_var_str) = by {
624        local_var_req_builder = local_var_req_builder.query(&[("by", &local_var_str.to_string())]);
625    }
626    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
627        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
628    }
629
630    let local_var_req = local_var_req_builder.build()?;
631    let local_var_resp = local_var_client.execute(local_var_req).await?;
632
633    let local_var_status = local_var_resp.status();
634    let local_var_content = local_var_resp.text().await?;
635
636    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
637        serde_json::from_str(&local_var_content).map_err(Error::from)
638    } else {
639        let local_var_entity: Option<ModsSearchQueryGetError> = serde_json::from_str(&local_var_content).ok();
640        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
641        Err(Error::ResponseError(local_var_error))
642    }
643}
644
645/// Operation Types information to aid translating identifiers for global upgrades
646pub async fn operation_types_get(configuration: &configuration::Configuration, ) -> Result<crate::models::OperationTypes, Error<OperationTypesGetError>> {
647    let local_var_configuration = configuration;
648
649    let local_var_client = &local_var_configuration.client;
650
651    let local_var_uri_str = format!("{}/operationTypes", local_var_configuration.base_path);
652    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
653
654    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
655        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
656    }
657
658    let local_var_req = local_var_req_builder.build()?;
659    let local_var_resp = local_var_client.execute(local_var_req).await?;
660
661    let local_var_status = local_var_resp.status();
662    let local_var_content = local_var_resp.text().await?;
663
664    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
665        serde_json::from_str(&local_var_content).map_err(Error::from)
666    } else {
667        let local_var_entity: Option<OperationTypesGetError> = serde_json::from_str(&local_var_content).ok();
668        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
669        Err(Error::ResponseError(local_var_error))
670    }
671}
672
673/// Persistent Enemy translation information for aiding translation of identifiers.
674pub async fn persistent_enemy_get(configuration: &configuration::Configuration, ) -> Result<Vec<serde_json::Value>, Error<PersistentEnemyGetError>> {
675    let local_var_configuration = configuration;
676
677    let local_var_client = &local_var_configuration.client;
678
679    let local_var_uri_str = format!("{}/persistentEnemy", local_var_configuration.base_path);
680    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
681
682    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
683        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
684    }
685
686    let local_var_req = local_var_req_builder.build()?;
687    let local_var_resp = local_var_client.execute(local_var_req).await?;
688
689    let local_var_status = local_var_resp.status();
690    let local_var_content = local_var_resp.text().await?;
691
692    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
693        serde_json::from_str(&local_var_content).map_err(Error::from)
694    } else {
695        let local_var_entity: Option<PersistentEnemyGetError> = serde_json::from_str(&local_var_content).ok();
696        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
697        Err(Error::ResponseError(local_var_error))
698    }
699}
700
701/// Sol Node translation information for aiding the translation of identifiers.
702pub async fn sol_nodes_get(configuration: &configuration::Configuration, ) -> Result<crate::models::SolNode, Error<SolNodesGetError>> {
703    let local_var_configuration = configuration;
704
705    let local_var_client = &local_var_configuration.client;
706
707    let local_var_uri_str = format!("{}/solNodes", local_var_configuration.base_path);
708    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
709
710    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
711        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
712    }
713
714    let local_var_req = local_var_req_builder.build()?;
715    let local_var_resp = local_var_client.execute(local_var_req).await?;
716
717    let local_var_status = local_var_resp.status();
718    let local_var_content = local_var_resp.text().await?;
719
720    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
721        serde_json::from_str(&local_var_content).map_err(Error::from)
722    } else {
723        let local_var_entity: Option<SolNodesGetError> = serde_json::from_str(&local_var_content).ok();
724        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
725        Err(Error::ResponseError(local_var_error))
726    }
727}
728
729/// Sortie translation information for assisting translation of identifiers.
730pub async fn sortie_get(configuration: &configuration::Configuration, ) -> Result<crate::models::SortieData, Error<SortieGetError>> {
731    let local_var_configuration = configuration;
732
733    let local_var_client = &local_var_configuration.client;
734
735    let local_var_uri_str = format!("{}/sortie", local_var_configuration.base_path);
736    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
737
738    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
739        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
740    }
741
742    let local_var_req = local_var_req_builder.build()?;
743    let local_var_resp = local_var_client.execute(local_var_req).await?;
744
745    let local_var_status = local_var_resp.status();
746    let local_var_content = local_var_resp.text().await?;
747
748    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
749        serde_json::from_str(&local_var_content).map_err(Error::from)
750    } else {
751        let local_var_entity: Option<SortieGetError> = serde_json::from_str(&local_var_content).ok();
752        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
753        Err(Error::ResponseError(local_var_error))
754    }
755}
756
757/// Information to assist translating syndicate identifiers.
758pub async fn syndicates_get(configuration: &configuration::Configuration, ) -> Result<crate::models::Syndicates, Error<SyndicatesGetError>> {
759    let local_var_configuration = configuration;
760
761    let local_var_client = &local_var_configuration.client;
762
763    let local_var_uri_str = format!("{}/syndicates", local_var_configuration.base_path);
764    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
765
766    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
767        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
768    }
769
770    let local_var_req = local_var_req_builder.build()?;
771    let local_var_resp = local_var_client.execute(local_var_req).await?;
772
773    let local_var_status = local_var_resp.status();
774    let local_var_content = local_var_resp.text().await?;
775
776    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
777        serde_json::from_str(&local_var_content).map_err(Error::from)
778    } else {
779        let local_var_entity: Option<SyndicatesGetError> = serde_json::from_str(&local_var_content).ok();
780        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
781        Err(Error::ResponseError(local_var_error))
782    }
783}
784
785/// Tutorials data from DE
786pub async fn tutorials_get(configuration: &configuration::Configuration, ) -> Result<Vec<serde_json::Value>, Error<TutorialsGetError>> {
787    let local_var_configuration = configuration;
788
789    let local_var_client = &local_var_configuration.client;
790
791    let local_var_uri_str = format!("{}/tutorials", local_var_configuration.base_path);
792    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
793
794    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
795        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
796    }
797
798    let local_var_req = local_var_req_builder.build()?;
799    let local_var_resp = local_var_client.execute(local_var_req).await?;
800
801    let local_var_status = local_var_resp.status();
802    let local_var_content = local_var_resp.text().await?;
803
804    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
805        serde_json::from_str(&local_var_content).map_err(Error::from)
806    } else {
807        let local_var_entity: Option<TutorialsGetError> = serde_json::from_str(&local_var_content).ok();
808        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
809        Err(Error::ResponseError(local_var_error))
810    }
811}
812
813/// Upgrade types for what can be changed by global modifiers, such as double credit weekends.
814pub async fn upgrade_types_get(configuration: &configuration::Configuration, ) -> Result<crate::models::UpgradeTypes, Error<UpgradeTypesGetError>> {
815    let local_var_configuration = configuration;
816
817    let local_var_client = &local_var_configuration.client;
818
819    let local_var_uri_str = format!("{}/upgradeTypes", local_var_configuration.base_path);
820    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
821
822    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
823        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
824    }
825
826    let local_var_req = local_var_req_builder.build()?;
827    let local_var_resp = local_var_client.execute(local_var_req).await?;
828
829    let local_var_status = local_var_resp.status();
830    let local_var_content = local_var_resp.text().await?;
831
832    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
833        serde_json::from_str(&local_var_content).map_err(Error::from)
834    } else {
835        let local_var_entity: Option<UpgradeTypesGetError> = serde_json::from_str(&local_var_content).ok();
836        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
837        Err(Error::ResponseError(local_var_error))
838    }
839}
840
841/// Warframe stats and general information.
842pub async fn warframes_get(configuration: &configuration::Configuration, only: Option<&str>, remove: Option<&str>) -> Result<Vec<crate::models::Warframe>, Error<WarframesGetError>> {
843    let local_var_configuration = configuration;
844
845    let local_var_client = &local_var_configuration.client;
846
847    let local_var_uri_str = format!("{}/warframes", local_var_configuration.base_path);
848    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
849
850    if let Some(ref local_var_str) = only {
851        local_var_req_builder = local_var_req_builder.query(&[("only", &local_var_str.to_string())]);
852    }
853    if let Some(ref local_var_str) = remove {
854        local_var_req_builder = local_var_req_builder.query(&[("remove", &local_var_str.to_string())]);
855    }
856    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
857        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
858    }
859
860    let local_var_req = local_var_req_builder.build()?;
861    let local_var_resp = local_var_client.execute(local_var_req).await?;
862
863    let local_var_status = local_var_resp.status();
864    let local_var_content = local_var_resp.text().await?;
865
866    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
867        serde_json::from_str(&local_var_content).map_err(Error::from)
868    } else {
869        let local_var_entity: Option<WarframesGetError> = serde_json::from_str(&local_var_content).ok();
870        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
871        Err(Error::ResponseError(local_var_error))
872    }
873}
874
875/// Mod information.
876pub async fn warframes_query_get(configuration: &configuration::Configuration, query: &str, by: Option<&str>) -> Result<crate::models::Warframe, Error<WarframesQueryGetError>> {
877    let local_var_configuration = configuration;
878
879    let local_var_client = &local_var_configuration.client;
880
881    let local_var_uri_str = format!("{}/warframes/{query}", local_var_configuration.base_path, query=crate::apis::urlencode(query));
882    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
883
884    if let Some(ref local_var_str) = by {
885        local_var_req_builder = local_var_req_builder.query(&[("by", &local_var_str.to_string())]);
886    }
887    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
888        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
889    }
890
891    let local_var_req = local_var_req_builder.build()?;
892    let local_var_resp = local_var_client.execute(local_var_req).await?;
893
894    let local_var_status = local_var_resp.status();
895    let local_var_content = local_var_resp.text().await?;
896
897    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
898        serde_json::from_str(&local_var_content).map_err(Error::from)
899    } else {
900        let local_var_entity: Option<WarframesQueryGetError> = serde_json::from_str(&local_var_content).ok();
901        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
902        Err(Error::ResponseError(local_var_error))
903    }
904}
905
906/// Weapon statistics.
907pub async fn weapons_get(configuration: &configuration::Configuration, only: Option<&str>, remove: Option<&str>, by: Option<&str>) -> Result<Vec<crate::models::WeaponsFields>, Error<WeaponsGetError>> {
908    let local_var_configuration = configuration;
909
910    let local_var_client = &local_var_configuration.client;
911
912    let local_var_uri_str = format!("{}/weapons", local_var_configuration.base_path);
913    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
914
915    if let Some(ref local_var_str) = only {
916        local_var_req_builder = local_var_req_builder.query(&[("only", &local_var_str.to_string())]);
917    }
918    if let Some(ref local_var_str) = remove {
919        local_var_req_builder = local_var_req_builder.query(&[("remove", &local_var_str.to_string())]);
920    }
921    if let Some(ref local_var_str) = by {
922        local_var_req_builder = local_var_req_builder.query(&[("by", &local_var_str.to_string())]);
923    }
924    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
925        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
926    }
927
928    let local_var_req = local_var_req_builder.build()?;
929    let local_var_resp = local_var_client.execute(local_var_req).await?;
930
931    let local_var_status = local_var_resp.status();
932    let local_var_content = local_var_resp.text().await?;
933
934    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
935        serde_json::from_str(&local_var_content).map_err(Error::from)
936    } else {
937        let local_var_entity: Option<WeaponsGetError> = serde_json::from_str(&local_var_content).ok();
938        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
939        Err(Error::ResponseError(local_var_error))
940    }
941}
942
943/// Mod information.
944pub async fn weapons_query_get(configuration: &configuration::Configuration, query: &str, only: Option<&str>, remove: Option<&str>, by: Option<&str>) -> Result<crate::models::Weapon, Error<WeaponsQueryGetError>> {
945    let local_var_configuration = configuration;
946
947    let local_var_client = &local_var_configuration.client;
948
949    let local_var_uri_str = format!("{}/weapons/{query}", local_var_configuration.base_path, query=crate::apis::urlencode(query));
950    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
951
952    if let Some(ref local_var_str) = only {
953        local_var_req_builder = local_var_req_builder.query(&[("only", &local_var_str.to_string())]);
954    }
955    if let Some(ref local_var_str) = remove {
956        local_var_req_builder = local_var_req_builder.query(&[("remove", &local_var_str.to_string())]);
957    }
958    if let Some(ref local_var_str) = by {
959        local_var_req_builder = local_var_req_builder.query(&[("by", &local_var_str.to_string())]);
960    }
961    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
962        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
963    }
964
965    let local_var_req = local_var_req_builder.build()?;
966    let local_var_resp = local_var_client.execute(local_var_req).await?;
967
968    let local_var_status = local_var_resp.status();
969    let local_var_content = local_var_resp.text().await?;
970
971    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
972        serde_json::from_str(&local_var_content).map_err(Error::from)
973    } else {
974        let local_var_entity: Option<WeaponsQueryGetError> = serde_json::from_str(&local_var_content).ok();
975        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
976        Err(Error::ResponseError(local_var_error))
977    }
978}
979
980/// Weapon statistics.
981pub async fn weapons_search_query_get(configuration: &configuration::Configuration, query: &str, only: Option<&str>, remove: Option<&str>, by: Option<&str>) -> Result<Vec<crate::models::WeaponsFields>, Error<WeaponsSearchQueryGetError>> {
982    let local_var_configuration = configuration;
983
984    let local_var_client = &local_var_configuration.client;
985
986    let local_var_uri_str = format!("{}/weapons/search/{query}", local_var_configuration.base_path, query=crate::apis::urlencode(query));
987    let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str());
988
989    if let Some(ref local_var_str) = only {
990        local_var_req_builder = local_var_req_builder.query(&[("only", &local_var_str.to_string())]);
991    }
992    if let Some(ref local_var_str) = remove {
993        local_var_req_builder = local_var_req_builder.query(&[("remove", &local_var_str.to_string())]);
994    }
995    if let Some(ref local_var_str) = by {
996        local_var_req_builder = local_var_req_builder.query(&[("by", &local_var_str.to_string())]);
997    }
998    if let Some(ref local_var_user_agent) = local_var_configuration.user_agent {
999        local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone());
1000    }
1001
1002    let local_var_req = local_var_req_builder.build()?;
1003    let local_var_resp = local_var_client.execute(local_var_req).await?;
1004
1005    let local_var_status = local_var_resp.status();
1006    let local_var_content = local_var_resp.text().await?;
1007
1008    if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
1009        serde_json::from_str(&local_var_content).map_err(Error::from)
1010    } else {
1011        let local_var_entity: Option<WeaponsSearchQueryGetError> = serde_json::from_str(&local_var_content).ok();
1012        let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity };
1013        Err(Error::ResponseError(local_var_error))
1014    }
1015}
1016