warframe_client/apis/
searchable_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: 2.0.8
7 * Contact: tobiah@protonmail.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12use reqwest;
13use serde::{Deserialize, Serialize, de::Error as _};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration, ContentType};
16
17
18/// struct for typed errors of method [`search_acolytes_data`]
19#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum SearchAcolytesDataError {
22    Status400(models::InlineObject),
23    Status500(models::InlineObject),
24    UnknownValue(serde_json::Value),
25}
26
27/// struct for typed errors of method [`search_arcanes_data`]
28#[derive(Debug, Clone, Serialize, Deserialize)]
29#[serde(untagged)]
30pub enum SearchArcanesDataError {
31    Status400(models::InlineObject),
32    Status500(models::InlineObject),
33    UnknownValue(serde_json::Value),
34}
35
36/// struct for typed errors of method [`search_conclaves_data`]
37#[derive(Debug, Clone, Serialize, Deserialize)]
38#[serde(untagged)]
39pub enum SearchConclavesDataError {
40    Status400(models::InlineObject),
41    Status500(models::InlineObject),
42    UnknownValue(serde_json::Value),
43}
44
45/// struct for typed errors of method [`search_drops_data`]
46#[derive(Debug, Clone, Serialize, Deserialize)]
47#[serde(untagged)]
48pub enum SearchDropsDataError {
49    Status400(models::InlineObject),
50    Status500(models::InlineObject),
51    UnknownValue(serde_json::Value),
52}
53
54/// struct for typed errors of method [`search_events_data`]
55#[derive(Debug, Clone, Serialize, Deserialize)]
56#[serde(untagged)]
57pub enum SearchEventsDataError {
58    Status400(models::InlineObject),
59    Status500(models::InlineObject),
60    UnknownValue(serde_json::Value),
61}
62
63/// struct for typed errors of method [`search_factions_data`]
64#[derive(Debug, Clone, Serialize, Deserialize)]
65#[serde(untagged)]
66pub enum SearchFactionsDataError {
67    Status400(models::InlineObject),
68    Status500(models::InlineObject),
69    UnknownValue(serde_json::Value),
70}
71
72/// struct for typed errors of method [`search_fissures_data`]
73#[derive(Debug, Clone, Serialize, Deserialize)]
74#[serde(untagged)]
75pub enum SearchFissuresDataError {
76    Status400(models::InlineObject),
77    Status500(models::InlineObject),
78    UnknownValue(serde_json::Value),
79}
80
81/// struct for typed errors of method [`search_item_data`]
82#[derive(Debug, Clone, Serialize, Deserialize)]
83#[serde(untagged)]
84pub enum SearchItemDataError {
85    Status400(models::InlineObject),
86    Status500(models::InlineObject),
87    UnknownValue(serde_json::Value),
88}
89
90/// struct for typed errors of method [`search_items_data`]
91#[derive(Debug, Clone, Serialize, Deserialize)]
92#[serde(untagged)]
93pub enum SearchItemsDataError {
94    Status400(models::InlineObject),
95    Status500(models::InlineObject),
96    UnknownValue(serde_json::Value),
97}
98
99/// struct for typed errors of method [`search_languages_data`]
100#[derive(Debug, Clone, Serialize, Deserialize)]
101#[serde(untagged)]
102pub enum SearchLanguagesDataError {
103    Status400(models::InlineObject),
104    Status500(models::InlineObject),
105    UnknownValue(serde_json::Value),
106}
107
108/// struct for typed errors of method [`search_mission_types_data`]
109#[derive(Debug, Clone, Serialize, Deserialize)]
110#[serde(untagged)]
111pub enum SearchMissionTypesDataError {
112    Status400(models::InlineObject),
113    Status500(models::InlineObject),
114    UnknownValue(serde_json::Value),
115}
116
117/// struct for typed errors of method [`search_mod_data`]
118#[derive(Debug, Clone, Serialize, Deserialize)]
119#[serde(untagged)]
120pub enum SearchModDataError {
121    Status400(models::InlineObject),
122    Status500(models::InlineObject),
123    UnknownValue(serde_json::Value),
124}
125
126/// struct for typed errors of method [`search_mods_data`]
127#[derive(Debug, Clone, Serialize, Deserialize)]
128#[serde(untagged)]
129pub enum SearchModsDataError {
130    Status400(models::InlineObject),
131    Status500(models::InlineObject),
132    UnknownValue(serde_json::Value),
133}
134
135/// struct for typed errors of method [`search_nodes_data`]
136#[derive(Debug, Clone, Serialize, Deserialize)]
137#[serde(untagged)]
138pub enum SearchNodesDataError {
139    Status400(models::InlineObject),
140    Status500(models::InlineObject),
141    UnknownValue(serde_json::Value),
142}
143
144/// struct for typed errors of method [`search_operations_data`]
145#[derive(Debug, Clone, Serialize, Deserialize)]
146#[serde(untagged)]
147pub enum SearchOperationsDataError {
148    Status400(models::InlineObject),
149    Status500(models::InlineObject),
150    UnknownValue(serde_json::Value),
151}
152
153/// struct for typed errors of method [`search_sorties_data`]
154#[derive(Debug, Clone, Serialize, Deserialize)]
155#[serde(untagged)]
156pub enum SearchSortiesDataError {
157    Status400(models::InlineObject),
158    Status500(models::InlineObject),
159    UnknownValue(serde_json::Value),
160}
161
162/// struct for typed errors of method [`search_syndicates_data`]
163#[derive(Debug, Clone, Serialize, Deserialize)]
164#[serde(untagged)]
165pub enum SearchSyndicatesDataError {
166    Status400(models::InlineObject),
167    Status500(models::InlineObject),
168    UnknownValue(serde_json::Value),
169}
170
171/// struct for typed errors of method [`search_tutorials_data`]
172#[derive(Debug, Clone, Serialize, Deserialize)]
173#[serde(untagged)]
174pub enum SearchTutorialsDataError {
175    Status400(models::InlineObject),
176    Status500(models::InlineObject),
177    UnknownValue(serde_json::Value),
178}
179
180/// struct for typed errors of method [`search_upgrade_types_data`]
181#[derive(Debug, Clone, Serialize, Deserialize)]
182#[serde(untagged)]
183pub enum SearchUpgradeTypesDataError {
184    Status400(models::InlineObject),
185    Status500(models::InlineObject),
186    UnknownValue(serde_json::Value),
187}
188
189/// struct for typed errors of method [`search_warframe_data`]
190#[derive(Debug, Clone, Serialize, Deserialize)]
191#[serde(untagged)]
192pub enum SearchWarframeDataError {
193    Status400(models::InlineObject),
194    Status500(models::InlineObject),
195    UnknownValue(serde_json::Value),
196}
197
198/// struct for typed errors of method [`search_warframes_data`]
199#[derive(Debug, Clone, Serialize, Deserialize)]
200#[serde(untagged)]
201pub enum SearchWarframesDataError {
202    Status400(models::InlineObject),
203    Status500(models::InlineObject),
204    UnknownValue(serde_json::Value),
205}
206
207/// struct for typed errors of method [`search_weapon_data`]
208#[derive(Debug, Clone, Serialize, Deserialize)]
209#[serde(untagged)]
210pub enum SearchWeaponDataError {
211    Status400(models::InlineObject),
212    Status500(models::InlineObject),
213    UnknownValue(serde_json::Value),
214}
215
216/// struct for typed errors of method [`search_weapons_data`]
217#[derive(Debug, Clone, Serialize, Deserialize)]
218#[serde(untagged)]
219pub enum SearchWeaponsDataError {
220    Status400(models::InlineObject),
221    Status500(models::InlineObject),
222    UnknownValue(serde_json::Value),
223}
224
225
226/// Persistent Enemy translation information for aiding translation of identifiers.
227pub async fn search_acolytes_data(configuration: &configuration::Configuration, query: &str) -> Result<models::AcolyteI18n, Error<SearchAcolytesDataError>> {
228    // add a prefix to parameters to efficiently prevent name collisions
229    let p_path_query = query;
230
231    let uri_str = format!("{}/persistentEnemy/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
232    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
233
234    if let Some(ref user_agent) = configuration.user_agent {
235        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
236    }
237
238    let req = req_builder.build()?;
239    let resp = configuration.client.execute(req).await?;
240
241    let status = resp.status();
242    let content_type = resp
243        .headers()
244        .get("content-type")
245        .and_then(|v| v.to_str().ok())
246        .unwrap_or("application/octet-stream");
247    let content_type = super::ContentType::from(content_type);
248
249    if !status.is_client_error() && !status.is_server_error() {
250        let content = resp.text().await?;
251        match content_type {
252            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
253            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AcolyteI18n`"))),
254            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::AcolyteI18n`")))),
255        }
256    } else {
257        let content = resp.text().await?;
258        let entity: Option<SearchAcolytesDataError> = serde_json::from_str(&content).ok();
259        Err(Error::ResponseError(ResponseContent { status, content, entity }))
260    }
261}
262
263/// Available Arcane Enhancements
264pub async fn search_arcanes_data(configuration: &configuration::Configuration, query: &str) -> Result<Vec<models::Arcane>, Error<SearchArcanesDataError>> {
265    // add a prefix to parameters to efficiently prevent name collisions
266    let p_path_query = query;
267
268    let uri_str = format!("{}/arcanes/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
269    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
270
271    if let Some(ref user_agent) = configuration.user_agent {
272        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
273    }
274
275    let req = req_builder.build()?;
276    let resp = configuration.client.execute(req).await?;
277
278    let status = resp.status();
279    let content_type = resp
280        .headers()
281        .get("content-type")
282        .and_then(|v| v.to_str().ok())
283        .unwrap_or("application/octet-stream");
284    let content_type = super::ContentType::from(content_type);
285
286    if !status.is_client_error() && !status.is_server_error() {
287        let content = resp.text().await?;
288        match content_type {
289            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
290            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::Arcane&gt;`"))),
291            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::Arcane&gt;`")))),
292        }
293    } else {
294        let content = resp.text().await?;
295        let entity: Option<SearchArcanesDataError> = serde_json::from_str(&content).ok();
296        Err(Error::ResponseError(ResponseContent { status, content, entity }))
297    }
298}
299
300/// Data about conclave challenges
301pub async fn search_conclaves_data(configuration: &configuration::Configuration, query: &str) -> Result<models::Conclave, Error<SearchConclavesDataError>> {
302    // add a prefix to parameters to efficiently prevent name collisions
303    let p_path_query = query;
304
305    let uri_str = format!("{}/conclave/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
306    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
307
308    if let Some(ref user_agent) = configuration.user_agent {
309        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
310    }
311
312    let req = req_builder.build()?;
313    let resp = configuration.client.execute(req).await?;
314
315    let status = resp.status();
316    let content_type = resp
317        .headers()
318        .get("content-type")
319        .and_then(|v| v.to_str().ok())
320        .unwrap_or("application/octet-stream");
321    let content_type = super::ContentType::from(content_type);
322
323    if !status.is_client_error() && !status.is_server_error() {
324        let content = resp.text().await?;
325        match content_type {
326            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
327            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Conclave`"))),
328            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Conclave`")))),
329        }
330    } else {
331        let content = resp.text().await?;
332        let entity: Option<SearchConclavesDataError> = serde_json::from_str(&content).ok();
333        Err(Error::ResponseError(ResponseContent { status, content, entity }))
334    }
335}
336
337/// Percentages for Warframe drops in different areas of the game
338pub async fn search_drops_data(configuration: &configuration::Configuration, query: &str) -> Result<Vec<models::DropsInner>, Error<SearchDropsDataError>> {
339    // add a prefix to parameters to efficiently prevent name collisions
340    let p_path_query = query;
341
342    let uri_str = format!("{}/drops/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
343    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
344
345    if let Some(ref user_agent) = configuration.user_agent {
346        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
347    }
348
349    let req = req_builder.build()?;
350    let resp = configuration.client.execute(req).await?;
351
352    let status = resp.status();
353    let content_type = resp
354        .headers()
355        .get("content-type")
356        .and_then(|v| v.to_str().ok())
357        .unwrap_or("application/octet-stream");
358    let content_type = super::ContentType::from(content_type);
359
360    if !status.is_client_error() && !status.is_server_error() {
361        let content = resp.text().await?;
362        match content_type {
363            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
364            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::DropsInner&gt;`"))),
365            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::DropsInner&gt;`")))),
366        }
367    } else {
368        let content = resp.text().await?;
369        let entity: Option<SearchDropsDataError> = serde_json::from_str(&content).ok();
370        Err(Error::ResponseError(ResponseContent { status, content, entity }))
371    }
372}
373
374/// Data about events
375pub async fn search_events_data(configuration: &configuration::Configuration, query: &str) -> Result<serde_json::Value, Error<SearchEventsDataError>> {
376    // add a prefix to parameters to efficiently prevent name collisions
377    let p_path_query = query;
378
379    let uri_str = format!("{}/events/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
380    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
381
382    if let Some(ref user_agent) = configuration.user_agent {
383        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
384    }
385
386    let req = req_builder.build()?;
387    let resp = configuration.client.execute(req).await?;
388
389    let status = resp.status();
390    let content_type = resp
391        .headers()
392        .get("content-type")
393        .and_then(|v| v.to_str().ok())
394        .unwrap_or("application/octet-stream");
395    let content_type = super::ContentType::from(content_type);
396
397    if !status.is_client_error() && !status.is_server_error() {
398        let content = resp.text().await?;
399        match content_type {
400            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
401            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))),
402            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `serde_json::Value`")))),
403        }
404    } else {
405        let content = resp.text().await?;
406        let entity: Option<SearchEventsDataError> = serde_json::from_str(&content).ok();
407        Err(Error::ResponseError(ResponseContent { status, content, entity }))
408    }
409}
410
411/// Strings for translating faction identifiers.
412pub async fn search_factions_data(configuration: &configuration::Configuration, query: &str) -> Result<models::Factions, Error<SearchFactionsDataError>> {
413    // add a prefix to parameters to efficiently prevent name collisions
414    let p_path_query = query;
415
416    let uri_str = format!("{}/factions/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
417    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
418
419    if let Some(ref user_agent) = configuration.user_agent {
420        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
421    }
422
423    let req = req_builder.build()?;
424    let resp = configuration.client.execute(req).await?;
425
426    let status = resp.status();
427    let content_type = resp
428        .headers()
429        .get("content-type")
430        .and_then(|v| v.to_str().ok())
431        .unwrap_or("application/octet-stream");
432    let content_type = super::ContentType::from(content_type);
433
434    if !status.is_client_error() && !status.is_server_error() {
435        let content = resp.text().await?;
436        match content_type {
437            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
438            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Factions`"))),
439            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Factions`")))),
440        }
441    } else {
442        let content = resp.text().await?;
443        let entity: Option<SearchFactionsDataError> = serde_json::from_str(&content).ok();
444        Err(Error::ResponseError(ResponseContent { status, content, entity }))
445    }
446}
447
448/// Fissure translation identifiers
449pub async fn search_fissures_data(configuration: &configuration::Configuration, query: &str) -> Result<models::FissureModifiers, Error<SearchFissuresDataError>> {
450    // add a prefix to parameters to efficiently prevent name collisions
451    let p_path_query = query;
452
453    let uri_str = format!("{}/fissureModifiers/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
454    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
455
456    if let Some(ref user_agent) = configuration.user_agent {
457        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
458    }
459
460    let req = req_builder.build()?;
461    let resp = configuration.client.execute(req).await?;
462
463    let status = resp.status();
464    let content_type = resp
465        .headers()
466        .get("content-type")
467        .and_then(|v| v.to_str().ok())
468        .unwrap_or("application/octet-stream");
469    let content_type = super::ContentType::from(content_type);
470
471    if !status.is_client_error() && !status.is_server_error() {
472        let content = resp.text().await?;
473        match content_type {
474            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
475            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FissureModifiers`"))),
476            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::FissureModifiers`")))),
477        }
478    } else {
479        let content = resp.text().await?;
480        let entity: Option<SearchFissuresDataError> = serde_json::from_str(&content).ok();
481        Err(Error::ResponseError(ResponseContent { status, content, entity }))
482    }
483}
484
485/// Item information.
486pub async fn search_item_data(configuration: &configuration::Configuration, query: &str, language: models::Language, only: Option<&str>, remove: Option<&str>, by: Option<&str>, accept_language: Option<models::Language>) -> Result<models::Item, Error<SearchItemDataError>> {
487    // add a prefix to parameters to efficiently prevent name collisions
488    let p_path_query = query;
489    let p_query_language = language;
490    let p_query_only = only;
491    let p_query_remove = remove;
492    let p_query_by = by;
493    let p_header_accept_language = accept_language;
494
495    let uri_str = format!("{}/items/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
496    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
497
498    if let Some(ref param_value) = p_query_only {
499        req_builder = req_builder.query(&[("only", &param_value.to_string())]);
500    }
501    if let Some(ref param_value) = p_query_remove {
502        req_builder = req_builder.query(&[("remove", &param_value.to_string())]);
503    }
504    if let Some(ref param_value) = p_query_by {
505        req_builder = req_builder.query(&[("by", &param_value.to_string())]);
506    }
507    req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
508    if let Some(ref user_agent) = configuration.user_agent {
509        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
510    }
511    if let Some(param_value) = p_header_accept_language {
512        req_builder = req_builder.header("Accept-Language", param_value.to_string());
513    }
514
515    let req = req_builder.build()?;
516    let resp = configuration.client.execute(req).await?;
517
518    let status = resp.status();
519    let content_type = resp
520        .headers()
521        .get("content-type")
522        .and_then(|v| v.to_str().ok())
523        .unwrap_or("application/octet-stream");
524    let content_type = super::ContentType::from(content_type);
525
526    if !status.is_client_error() && !status.is_server_error() {
527        let content = resp.text().await?;
528        match content_type {
529            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
530            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Item`"))),
531            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Item`")))),
532        }
533    } else {
534        let content = resp.text().await?;
535        let entity: Option<SearchItemDataError> = serde_json::from_str(&content).ok();
536        Err(Error::ResponseError(ResponseContent { status, content, entity }))
537    }
538}
539
540/// Item information, such as name, unique name, type, and image name.
541pub async fn search_items_data(configuration: &configuration::Configuration, query: &str, language: models::Language, only: Option<&str>, remove: Option<&str>, by: Option<&str>, accept_language: Option<models::Language>) -> Result<Vec<models::ItemsInner>, Error<SearchItemsDataError>> {
542    // add a prefix to parameters to efficiently prevent name collisions
543    let p_path_query = query;
544    let p_query_language = language;
545    let p_query_only = only;
546    let p_query_remove = remove;
547    let p_query_by = by;
548    let p_header_accept_language = accept_language;
549
550    let uri_str = format!("{}/items/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
551    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
552
553    if let Some(ref param_value) = p_query_only {
554        req_builder = req_builder.query(&[("only", &param_value.to_string())]);
555    }
556    if let Some(ref param_value) = p_query_remove {
557        req_builder = req_builder.query(&[("remove", &param_value.to_string())]);
558    }
559    if let Some(ref param_value) = p_query_by {
560        req_builder = req_builder.query(&[("by", &param_value.to_string())]);
561    }
562    req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
563    if let Some(ref user_agent) = configuration.user_agent {
564        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
565    }
566    if let Some(param_value) = p_header_accept_language {
567        req_builder = req_builder.header("Accept-Language", param_value.to_string());
568    }
569
570    let req = req_builder.build()?;
571    let resp = configuration.client.execute(req).await?;
572
573    let status = resp.status();
574    let content_type = resp
575        .headers()
576        .get("content-type")
577        .and_then(|v| v.to_str().ok())
578        .unwrap_or("application/octet-stream");
579    let content_type = super::ContentType::from(content_type);
580
581    if !status.is_client_error() && !status.is_server_error() {
582        let content = resp.text().await?;
583        match content_type {
584            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
585            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::ItemsInner&gt;`"))),
586            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::ItemsInner&gt;`")))),
587        }
588    } else {
589        let content = resp.text().await?;
590        let entity: Option<SearchItemsDataError> = serde_json::from_str(&content).ok();
591        Err(Error::ResponseError(ResponseContent { status, content, entity }))
592    }
593}
594
595/// Get language strings to assist translation.
596pub async fn search_languages_data(configuration: &configuration::Configuration, query: &str) -> Result<models::Languages, Error<SearchLanguagesDataError>> {
597    // add a prefix to parameters to efficiently prevent name collisions
598    let p_path_query = query;
599
600    let uri_str = format!("{}/languages/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
601    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
602
603    if let Some(ref user_agent) = configuration.user_agent {
604        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
605    }
606
607    let req = req_builder.build()?;
608    let resp = configuration.client.execute(req).await?;
609
610    let status = resp.status();
611    let content_type = resp
612        .headers()
613        .get("content-type")
614        .and_then(|v| v.to_str().ok())
615        .unwrap_or("application/octet-stream");
616    let content_type = super::ContentType::from(content_type);
617
618    if !status.is_client_error() && !status.is_server_error() {
619        let content = resp.text().await?;
620        match content_type {
621            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
622            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Languages`"))),
623            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Languages`")))),
624        }
625    } else {
626        let content = resp.text().await?;
627        let entity: Option<SearchLanguagesDataError> = serde_json::from_str(&content).ok();
628        Err(Error::ResponseError(ResponseContent { status, content, entity }))
629    }
630}
631
632/// Mission Type information to aid translating identifiers
633pub async fn search_mission_types_data(configuration: &configuration::Configuration, query: &str) -> Result<models::MissionTypes, Error<SearchMissionTypesDataError>> {
634    // add a prefix to parameters to efficiently prevent name collisions
635    let p_path_query = query;
636
637    let uri_str = format!("{}/missionTypes/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
638    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
639
640    if let Some(ref user_agent) = configuration.user_agent {
641        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
642    }
643
644    let req = req_builder.build()?;
645    let resp = configuration.client.execute(req).await?;
646
647    let status = resp.status();
648    let content_type = resp
649        .headers()
650        .get("content-type")
651        .and_then(|v| v.to_str().ok())
652        .unwrap_or("application/octet-stream");
653    let content_type = super::ContentType::from(content_type);
654
655    if !status.is_client_error() && !status.is_server_error() {
656        let content = resp.text().await?;
657        match content_type {
658            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
659            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::MissionTypes`"))),
660            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::MissionTypes`")))),
661        }
662    } else {
663        let content = resp.text().await?;
664        let entity: Option<SearchMissionTypesDataError> = serde_json::from_str(&content).ok();
665        Err(Error::ResponseError(ResponseContent { status, content, entity }))
666    }
667}
668
669/// Mod information.
670pub async fn search_mod_data(configuration: &configuration::Configuration, query: &str, language: models::Language, only: Option<&str>, remove: Option<&str>, by: Option<&str>, accept_language: Option<models::Language>) -> Result<models::Mod, Error<SearchModDataError>> {
671    // add a prefix to parameters to efficiently prevent name collisions
672    let p_path_query = query;
673    let p_query_language = language;
674    let p_query_only = only;
675    let p_query_remove = remove;
676    let p_query_by = by;
677    let p_header_accept_language = accept_language;
678
679    let uri_str = format!("{}/mods/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
680    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
681
682    if let Some(ref param_value) = p_query_only {
683        req_builder = req_builder.query(&[("only", &param_value.to_string())]);
684    }
685    if let Some(ref param_value) = p_query_remove {
686        req_builder = req_builder.query(&[("remove", &param_value.to_string())]);
687    }
688    if let Some(ref param_value) = p_query_by {
689        req_builder = req_builder.query(&[("by", &param_value.to_string())]);
690    }
691    req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
692    if let Some(ref user_agent) = configuration.user_agent {
693        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
694    }
695    if let Some(param_value) = p_header_accept_language {
696        req_builder = req_builder.header("Accept-Language", param_value.to_string());
697    }
698
699    let req = req_builder.build()?;
700    let resp = configuration.client.execute(req).await?;
701
702    let status = resp.status();
703    let content_type = resp
704        .headers()
705        .get("content-type")
706        .and_then(|v| v.to_str().ok())
707        .unwrap_or("application/octet-stream");
708    let content_type = super::ContentType::from(content_type);
709
710    if !status.is_client_error() && !status.is_server_error() {
711        let content = resp.text().await?;
712        match content_type {
713            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
714            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Mod`"))),
715            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Mod`")))),
716        }
717    } else {
718        let content = resp.text().await?;
719        let entity: Option<SearchModDataError> = serde_json::from_str(&content).ok();
720        Err(Error::ResponseError(ResponseContent { status, content, entity }))
721    }
722}
723
724/// Mod information, such as name, unique name, type, and image name.
725pub async fn search_mods_data(configuration: &configuration::Configuration, query: &str, language: models::Language, only: Option<&str>, remove: Option<&str>, by: Option<&str>, accept_language: Option<models::Language>) -> Result<Vec<models::Mod>, Error<SearchModsDataError>> {
726    // add a prefix to parameters to efficiently prevent name collisions
727    let p_path_query = query;
728    let p_query_language = language;
729    let p_query_only = only;
730    let p_query_remove = remove;
731    let p_query_by = by;
732    let p_header_accept_language = accept_language;
733
734    let uri_str = format!("{}/mods/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
735    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
736
737    if let Some(ref param_value) = p_query_only {
738        req_builder = req_builder.query(&[("only", &param_value.to_string())]);
739    }
740    if let Some(ref param_value) = p_query_remove {
741        req_builder = req_builder.query(&[("remove", &param_value.to_string())]);
742    }
743    if let Some(ref param_value) = p_query_by {
744        req_builder = req_builder.query(&[("by", &param_value.to_string())]);
745    }
746    req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
747    if let Some(ref user_agent) = configuration.user_agent {
748        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
749    }
750    if let Some(param_value) = p_header_accept_language {
751        req_builder = req_builder.header("Accept-Language", param_value.to_string());
752    }
753
754    let req = req_builder.build()?;
755    let resp = configuration.client.execute(req).await?;
756
757    let status = resp.status();
758    let content_type = resp
759        .headers()
760        .get("content-type")
761        .and_then(|v| v.to_str().ok())
762        .unwrap_or("application/octet-stream");
763    let content_type = super::ContentType::from(content_type);
764
765    if !status.is_client_error() && !status.is_server_error() {
766        let content = resp.text().await?;
767        match content_type {
768            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
769            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::Mod&gt;`"))),
770            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::Mod&gt;`")))),
771        }
772    } else {
773        let content = resp.text().await?;
774        let entity: Option<SearchModsDataError> = serde_json::from_str(&content).ok();
775        Err(Error::ResponseError(ResponseContent { status, content, entity }))
776    }
777}
778
779/// Sol Node translation information for aiding the translation of identifiers.
780pub async fn search_nodes_data(configuration: &configuration::Configuration, query: &str) -> Result<Vec<models::SolNodeSearchInner>, Error<SearchNodesDataError>> {
781    // add a prefix to parameters to efficiently prevent name collisions
782    let p_path_query = query;
783
784    let uri_str = format!("{}/solNodes/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
785    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
786
787    if let Some(ref user_agent) = configuration.user_agent {
788        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
789    }
790
791    let req = req_builder.build()?;
792    let resp = configuration.client.execute(req).await?;
793
794    let status = resp.status();
795    let content_type = resp
796        .headers()
797        .get("content-type")
798        .and_then(|v| v.to_str().ok())
799        .unwrap_or("application/octet-stream");
800    let content_type = super::ContentType::from(content_type);
801
802    if !status.is_client_error() && !status.is_server_error() {
803        let content = resp.text().await?;
804        match content_type {
805            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
806            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::SolNodeSearchInner&gt;`"))),
807            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::SolNodeSearchInner&gt;`")))),
808        }
809    } else {
810        let content = resp.text().await?;
811        let entity: Option<SearchNodesDataError> = serde_json::from_str(&content).ok();
812        Err(Error::ResponseError(ResponseContent { status, content, entity }))
813    }
814}
815
816/// Operation Types information to aid translating identifiers for global upgrades
817pub async fn search_operations_data(configuration: &configuration::Configuration, query: &str) -> Result<models::OperationTypes, Error<SearchOperationsDataError>> {
818    // add a prefix to parameters to efficiently prevent name collisions
819    let p_path_query = query;
820
821    let uri_str = format!("{}/operationTypes/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
822    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
823
824    if let Some(ref user_agent) = configuration.user_agent {
825        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
826    }
827
828    let req = req_builder.build()?;
829    let resp = configuration.client.execute(req).await?;
830
831    let status = resp.status();
832    let content_type = resp
833        .headers()
834        .get("content-type")
835        .and_then(|v| v.to_str().ok())
836        .unwrap_or("application/octet-stream");
837    let content_type = super::ContentType::from(content_type);
838
839    if !status.is_client_error() && !status.is_server_error() {
840        let content = resp.text().await?;
841        match content_type {
842            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
843            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OperationTypes`"))),
844            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::OperationTypes`")))),
845        }
846    } else {
847        let content = resp.text().await?;
848        let entity: Option<SearchOperationsDataError> = serde_json::from_str(&content).ok();
849        Err(Error::ResponseError(ResponseContent { status, content, entity }))
850    }
851}
852
853/// Sortie translation information for assisting translation of identifiers.
854pub async fn search_sorties_data(configuration: &configuration::Configuration, query: &str) -> Result<models::SortieData, Error<SearchSortiesDataError>> {
855    // add a prefix to parameters to efficiently prevent name collisions
856    let p_path_query = query;
857
858    let uri_str = format!("{}/sortie/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
859    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
860
861    if let Some(ref user_agent) = configuration.user_agent {
862        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
863    }
864
865    let req = req_builder.build()?;
866    let resp = configuration.client.execute(req).await?;
867
868    let status = resp.status();
869    let content_type = resp
870        .headers()
871        .get("content-type")
872        .and_then(|v| v.to_str().ok())
873        .unwrap_or("application/octet-stream");
874    let content_type = super::ContentType::from(content_type);
875
876    if !status.is_client_error() && !status.is_server_error() {
877        let content = resp.text().await?;
878        match content_type {
879            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
880            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SortieData`"))),
881            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::SortieData`")))),
882        }
883    } else {
884        let content = resp.text().await?;
885        let entity: Option<SearchSortiesDataError> = serde_json::from_str(&content).ok();
886        Err(Error::ResponseError(ResponseContent { status, content, entity }))
887    }
888}
889
890/// Information to assist translating syndicate identifiers.
891pub async fn search_syndicates_data(configuration: &configuration::Configuration, query: &str) -> Result<models::Syndicates, Error<SearchSyndicatesDataError>> {
892    // add a prefix to parameters to efficiently prevent name collisions
893    let p_path_query = query;
894
895    let uri_str = format!("{}/syndicates/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
896    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
897
898    if let Some(ref user_agent) = configuration.user_agent {
899        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
900    }
901
902    let req = req_builder.build()?;
903    let resp = configuration.client.execute(req).await?;
904
905    let status = resp.status();
906    let content_type = resp
907        .headers()
908        .get("content-type")
909        .and_then(|v| v.to_str().ok())
910        .unwrap_or("application/octet-stream");
911    let content_type = super::ContentType::from(content_type);
912
913    if !status.is_client_error() && !status.is_server_error() {
914        let content = resp.text().await?;
915        match content_type {
916            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
917            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Syndicates`"))),
918            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Syndicates`")))),
919        }
920    } else {
921        let content = resp.text().await?;
922        let entity: Option<SearchSyndicatesDataError> = serde_json::from_str(&content).ok();
923        Err(Error::ResponseError(ResponseContent { status, content, entity }))
924    }
925}
926
927/// Tutorials data from DE
928pub async fn search_tutorials_data(configuration: &configuration::Configuration, query: &str) -> Result<Vec<models::TutorialsInner>, Error<SearchTutorialsDataError>> {
929    // add a prefix to parameters to efficiently prevent name collisions
930    let p_path_query = query;
931
932    let uri_str = format!("{}/tutorials/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
933    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
934
935    if let Some(ref user_agent) = configuration.user_agent {
936        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
937    }
938
939    let req = req_builder.build()?;
940    let resp = configuration.client.execute(req).await?;
941
942    let status = resp.status();
943    let content_type = resp
944        .headers()
945        .get("content-type")
946        .and_then(|v| v.to_str().ok())
947        .unwrap_or("application/octet-stream");
948    let content_type = super::ContentType::from(content_type);
949
950    if !status.is_client_error() && !status.is_server_error() {
951        let content = resp.text().await?;
952        match content_type {
953            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
954            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::TutorialsInner&gt;`"))),
955            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::TutorialsInner&gt;`")))),
956        }
957    } else {
958        let content = resp.text().await?;
959        let entity: Option<SearchTutorialsDataError> = serde_json::from_str(&content).ok();
960        Err(Error::ResponseError(ResponseContent { status, content, entity }))
961    }
962}
963
964/// Upgrade types for what can be changed by global modifiers, such as double credit weekends.
965pub async fn search_upgrade_types_data(configuration: &configuration::Configuration, query: &str) -> Result<models::UpgradeTypes, Error<SearchUpgradeTypesDataError>> {
966    // add a prefix to parameters to efficiently prevent name collisions
967    let p_path_query = query;
968
969    let uri_str = format!("{}/upgradeTypes/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
970    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
971
972    if let Some(ref user_agent) = configuration.user_agent {
973        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
974    }
975
976    let req = req_builder.build()?;
977    let resp = configuration.client.execute(req).await?;
978
979    let status = resp.status();
980    let content_type = resp
981        .headers()
982        .get("content-type")
983        .and_then(|v| v.to_str().ok())
984        .unwrap_or("application/octet-stream");
985    let content_type = super::ContentType::from(content_type);
986
987    if !status.is_client_error() && !status.is_server_error() {
988        let content = resp.text().await?;
989        match content_type {
990            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
991            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UpgradeTypes`"))),
992            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::UpgradeTypes`")))),
993        }
994    } else {
995        let content = resp.text().await?;
996        let entity: Option<SearchUpgradeTypesDataError> = serde_json::from_str(&content).ok();
997        Err(Error::ResponseError(ResponseContent { status, content, entity }))
998    }
999}
1000
1001/// Mod information.
1002pub async fn search_warframe_data(configuration: &configuration::Configuration, query: &str, language: models::Language, only: Option<&str>, remove: Option<&str>, by: Option<&str>, accept_language: Option<models::Language>) -> Result<models::Warframe, Error<SearchWarframeDataError>> {
1003    // add a prefix to parameters to efficiently prevent name collisions
1004    let p_path_query = query;
1005    let p_query_language = language;
1006    let p_query_only = only;
1007    let p_query_remove = remove;
1008    let p_query_by = by;
1009    let p_header_accept_language = accept_language;
1010
1011    let uri_str = format!("{}/warframes/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
1012    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1013
1014    if let Some(ref param_value) = p_query_only {
1015        req_builder = req_builder.query(&[("only", &param_value.to_string())]);
1016    }
1017    if let Some(ref param_value) = p_query_remove {
1018        req_builder = req_builder.query(&[("remove", &param_value.to_string())]);
1019    }
1020    if let Some(ref param_value) = p_query_by {
1021        req_builder = req_builder.query(&[("by", &param_value.to_string())]);
1022    }
1023    req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1024    if let Some(ref user_agent) = configuration.user_agent {
1025        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1026    }
1027    if let Some(param_value) = p_header_accept_language {
1028        req_builder = req_builder.header("Accept-Language", param_value.to_string());
1029    }
1030
1031    let req = req_builder.build()?;
1032    let resp = configuration.client.execute(req).await?;
1033
1034    let status = resp.status();
1035    let content_type = resp
1036        .headers()
1037        .get("content-type")
1038        .and_then(|v| v.to_str().ok())
1039        .unwrap_or("application/octet-stream");
1040    let content_type = super::ContentType::from(content_type);
1041
1042    if !status.is_client_error() && !status.is_server_error() {
1043        let content = resp.text().await?;
1044        match content_type {
1045            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1046            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Warframe`"))),
1047            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Warframe`")))),
1048        }
1049    } else {
1050        let content = resp.text().await?;
1051        let entity: Option<SearchWarframeDataError> = serde_json::from_str(&content).ok();
1052        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1053    }
1054}
1055
1056/// Warframe stats and general information.
1057pub async fn search_warframes_data(configuration: &configuration::Configuration, query: &str, language: models::Language, only: Option<&str>, remove: Option<&str>, by: Option<&str>, accept_language: Option<models::Language>) -> Result<Vec<models::Warframe>, Error<SearchWarframesDataError>> {
1058    // add a prefix to parameters to efficiently prevent name collisions
1059    let p_path_query = query;
1060    let p_query_language = language;
1061    let p_query_only = only;
1062    let p_query_remove = remove;
1063    let p_query_by = by;
1064    let p_header_accept_language = accept_language;
1065
1066    let uri_str = format!("{}/warframes/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
1067    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1068
1069    if let Some(ref param_value) = p_query_only {
1070        req_builder = req_builder.query(&[("only", &param_value.to_string())]);
1071    }
1072    if let Some(ref param_value) = p_query_remove {
1073        req_builder = req_builder.query(&[("remove", &param_value.to_string())]);
1074    }
1075    if let Some(ref param_value) = p_query_by {
1076        req_builder = req_builder.query(&[("by", &param_value.to_string())]);
1077    }
1078    req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1079    if let Some(ref user_agent) = configuration.user_agent {
1080        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1081    }
1082    if let Some(param_value) = p_header_accept_language {
1083        req_builder = req_builder.header("Accept-Language", param_value.to_string());
1084    }
1085
1086    let req = req_builder.build()?;
1087    let resp = configuration.client.execute(req).await?;
1088
1089    let status = resp.status();
1090    let content_type = resp
1091        .headers()
1092        .get("content-type")
1093        .and_then(|v| v.to_str().ok())
1094        .unwrap_or("application/octet-stream");
1095    let content_type = super::ContentType::from(content_type);
1096
1097    if !status.is_client_error() && !status.is_server_error() {
1098        let content = resp.text().await?;
1099        match content_type {
1100            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1101            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::Warframe&gt;`"))),
1102            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::Warframe&gt;`")))),
1103        }
1104    } else {
1105        let content = resp.text().await?;
1106        let entity: Option<SearchWarframesDataError> = serde_json::from_str(&content).ok();
1107        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1108    }
1109}
1110
1111/// Mod information.
1112pub async fn search_weapon_data(configuration: &configuration::Configuration, query: &str, language: models::Language, only: Option<&str>, remove: Option<&str>, by: Option<&str>, accept_language: Option<models::Language>) -> Result<models::Weapon, Error<SearchWeaponDataError>> {
1113    // add a prefix to parameters to efficiently prevent name collisions
1114    let p_path_query = query;
1115    let p_query_language = language;
1116    let p_query_only = only;
1117    let p_query_remove = remove;
1118    let p_query_by = by;
1119    let p_header_accept_language = accept_language;
1120
1121    let uri_str = format!("{}/weapons/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
1122    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1123
1124    if let Some(ref param_value) = p_query_only {
1125        req_builder = req_builder.query(&[("only", &param_value.to_string())]);
1126    }
1127    if let Some(ref param_value) = p_query_remove {
1128        req_builder = req_builder.query(&[("remove", &param_value.to_string())]);
1129    }
1130    if let Some(ref param_value) = p_query_by {
1131        req_builder = req_builder.query(&[("by", &param_value.to_string())]);
1132    }
1133    req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1134    if let Some(ref user_agent) = configuration.user_agent {
1135        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1136    }
1137    if let Some(param_value) = p_header_accept_language {
1138        req_builder = req_builder.header("Accept-Language", param_value.to_string());
1139    }
1140
1141    let req = req_builder.build()?;
1142    let resp = configuration.client.execute(req).await?;
1143
1144    let status = resp.status();
1145    let content_type = resp
1146        .headers()
1147        .get("content-type")
1148        .and_then(|v| v.to_str().ok())
1149        .unwrap_or("application/octet-stream");
1150    let content_type = super::ContentType::from(content_type);
1151
1152    if !status.is_client_error() && !status.is_server_error() {
1153        let content = resp.text().await?;
1154        match content_type {
1155            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1156            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Weapon`"))),
1157            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::Weapon`")))),
1158        }
1159    } else {
1160        let content = resp.text().await?;
1161        let entity: Option<SearchWeaponDataError> = serde_json::from_str(&content).ok();
1162        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1163    }
1164}
1165
1166/// Weapon statistics.
1167pub async fn search_weapons_data(configuration: &configuration::Configuration, query: &str, language: models::Language, only: Option<&str>, remove: Option<&str>, by: Option<&str>, accept_language: Option<models::Language>) -> Result<Vec<models::WeaponsInner>, Error<SearchWeaponsDataError>> {
1168    // add a prefix to parameters to efficiently prevent name collisions
1169    let p_path_query = query;
1170    let p_query_language = language;
1171    let p_query_only = only;
1172    let p_query_remove = remove;
1173    let p_query_by = by;
1174    let p_header_accept_language = accept_language;
1175
1176    let uri_str = format!("{}/weapons/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
1177    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1178
1179    if let Some(ref param_value) = p_query_only {
1180        req_builder = req_builder.query(&[("only", &param_value.to_string())]);
1181    }
1182    if let Some(ref param_value) = p_query_remove {
1183        req_builder = req_builder.query(&[("remove", &param_value.to_string())]);
1184    }
1185    if let Some(ref param_value) = p_query_by {
1186        req_builder = req_builder.query(&[("by", &param_value.to_string())]);
1187    }
1188    req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1189    if let Some(ref user_agent) = configuration.user_agent {
1190        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1191    }
1192    if let Some(param_value) = p_header_accept_language {
1193        req_builder = req_builder.header("Accept-Language", param_value.to_string());
1194    }
1195
1196    let req = req_builder.build()?;
1197    let resp = configuration.client.execute(req).await?;
1198
1199    let status = resp.status();
1200    let content_type = resp
1201        .headers()
1202        .get("content-type")
1203        .and_then(|v| v.to_str().ok())
1204        .unwrap_or("application/octet-stream");
1205    let content_type = super::ContentType::from(content_type);
1206
1207    if !status.is_client_error() && !status.is_server_error() {
1208        let content = resp.text().await?;
1209        match content_type {
1210            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1211            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::WeaponsInner&gt;`"))),
1212            ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `Vec&lt;models::WeaponsInner&gt;`")))),
1213        }
1214    } else {
1215        let content = resp.text().await?;
1216        let entity: Option<SearchWeaponsDataError> = serde_json::from_str(&content).ok();
1217        Err(Error::ResponseError(ResponseContent { status, content, entity }))
1218    }
1219}
1220