warframe_client/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: 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 [`get_acolyte_data`]
19#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum GetAcolyteDataError {
22    Status400(models::InlineObject),
23    Status500(models::InlineObject),
24    UnknownValue(serde_json::Value),
25}
26
27/// struct for typed errors of method [`get_arcanes_data`]
28#[derive(Debug, Clone, Serialize, Deserialize)]
29#[serde(untagged)]
30pub enum GetArcanesDataError {
31    Status400(models::InlineObject),
32    Status500(models::InlineObject),
33    UnknownValue(serde_json::Value),
34}
35
36/// struct for typed errors of method [`get_conclave_data`]
37#[derive(Debug, Clone, Serialize, Deserialize)]
38#[serde(untagged)]
39pub enum GetConclaveDataError {
40    Status400(models::InlineObject),
41    Status500(models::InlineObject),
42    UnknownValue(serde_json::Value),
43}
44
45/// struct for typed errors of method [`get_events_data`]
46#[derive(Debug, Clone, Serialize, Deserialize)]
47#[serde(untagged)]
48pub enum GetEventsDataError {
49    Status400(models::InlineObject),
50    Status500(models::InlineObject),
51    UnknownValue(serde_json::Value),
52}
53
54/// struct for typed errors of method [`get_factions_data`]
55#[derive(Debug, Clone, Serialize, Deserialize)]
56#[serde(untagged)]
57pub enum GetFactionsDataError {
58    Status400(models::InlineObject),
59    Status500(models::InlineObject),
60    UnknownValue(serde_json::Value),
61}
62
63/// struct for typed errors of method [`get_fissures_data`]
64#[derive(Debug, Clone, Serialize, Deserialize)]
65#[serde(untagged)]
66pub enum GetFissuresDataError {
67    Status400(models::InlineObject),
68    Status500(models::InlineObject),
69    UnknownValue(serde_json::Value),
70}
71
72/// struct for typed errors of method [`get_language_data`]
73#[derive(Debug, Clone, Serialize, Deserialize)]
74#[serde(untagged)]
75pub enum GetLanguageDataError {
76    Status400(models::InlineObject),
77    Status500(models::InlineObject),
78    UnknownValue(serde_json::Value),
79}
80
81/// struct for typed errors of method [`get_locales`]
82#[derive(Debug, Clone, Serialize, Deserialize)]
83#[serde(untagged)]
84pub enum GetLocalesError {
85    Status400(models::InlineObject),
86    Status500(models::InlineObject),
87    UnknownValue(serde_json::Value),
88}
89
90/// struct for typed errors of method [`get_mission_data`]
91#[derive(Debug, Clone, Serialize, Deserialize)]
92#[serde(untagged)]
93pub enum GetMissionDataError {
94    Status400(models::InlineObject),
95    Status500(models::InlineObject),
96    UnknownValue(serde_json::Value),
97}
98
99/// struct for typed errors of method [`get_node_data`]
100#[derive(Debug, Clone, Serialize, Deserialize)]
101#[serde(untagged)]
102pub enum GetNodeDataError {
103    Status400(models::InlineObject),
104    Status500(models::InlineObject),
105    UnknownValue(serde_json::Value),
106}
107
108/// struct for typed errors of method [`get_operations_data`]
109#[derive(Debug, Clone, Serialize, Deserialize)]
110#[serde(untagged)]
111pub enum GetOperationsDataError {
112    Status400(models::InlineObject),
113    Status500(models::InlineObject),
114    UnknownValue(serde_json::Value),
115}
116
117/// struct for typed errors of method [`get_sortie_data`]
118#[derive(Debug, Clone, Serialize, Deserialize)]
119#[serde(untagged)]
120pub enum GetSortieDataError {
121    Status400(models::InlineObject),
122    Status500(models::InlineObject),
123    UnknownValue(serde_json::Value),
124}
125
126/// struct for typed errors of method [`get_syndicate_data`]
127#[derive(Debug, Clone, Serialize, Deserialize)]
128#[serde(untagged)]
129pub enum GetSyndicateDataError {
130    Status400(models::InlineObject),
131    Status500(models::InlineObject),
132    UnknownValue(serde_json::Value),
133}
134
135/// struct for typed errors of method [`get_tutorial_data`]
136#[derive(Debug, Clone, Serialize, Deserialize)]
137#[serde(untagged)]
138pub enum GetTutorialDataError {
139    Status400(models::InlineObject),
140    Status500(models::InlineObject),
141    UnknownValue(serde_json::Value),
142}
143
144/// struct for typed errors of method [`get_upgrade_types_data`]
145#[derive(Debug, Clone, Serialize, Deserialize)]
146#[serde(untagged)]
147pub enum GetUpgradeTypesDataError {
148    Status400(models::InlineObject),
149    Status500(models::InlineObject),
150    UnknownValue(serde_json::Value),
151}
152
153
154/// Persistent Enemy translation information for aiding translation of identifiers.
155pub async fn get_acolyte_data(configuration: &configuration::Configuration, ) -> Result<models::AcolyteI18n, Error<GetAcolyteDataError>> {
156
157    let uri_str = format!("{}/persistentEnemy", configuration.base_path);
158    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
159
160    if let Some(ref user_agent) = configuration.user_agent {
161        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
162    }
163
164    let req = req_builder.build()?;
165    let resp = configuration.client.execute(req).await?;
166
167    let status = resp.status();
168    let content_type = resp
169        .headers()
170        .get("content-type")
171        .and_then(|v| v.to_str().ok())
172        .unwrap_or("application/octet-stream");
173    let content_type = super::ContentType::from(content_type);
174
175    if !status.is_client_error() && !status.is_server_error() {
176        let content = resp.text().await?;
177        match content_type {
178            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
179            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::AcolyteI18n`"))),
180            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`")))),
181        }
182    } else {
183        let content = resp.text().await?;
184        let entity: Option<GetAcolyteDataError> = serde_json::from_str(&content).ok();
185        Err(Error::ResponseError(ResponseContent { status, content, entity }))
186    }
187}
188
189/// Available Arcane Enhancements
190pub async fn get_arcanes_data(configuration: &configuration::Configuration, ) -> Result<Vec<models::Arcane>, Error<GetArcanesDataError>> {
191
192    let uri_str = format!("{}/arcanes", configuration.base_path);
193    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
194
195    if let Some(ref user_agent) = configuration.user_agent {
196        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
197    }
198
199    let req = req_builder.build()?;
200    let resp = configuration.client.execute(req).await?;
201
202    let status = resp.status();
203    let content_type = resp
204        .headers()
205        .get("content-type")
206        .and_then(|v| v.to_str().ok())
207        .unwrap_or("application/octet-stream");
208    let content_type = super::ContentType::from(content_type);
209
210    if !status.is_client_error() && !status.is_server_error() {
211        let content = resp.text().await?;
212        match content_type {
213            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
214            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;`"))),
215            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;`")))),
216        }
217    } else {
218        let content = resp.text().await?;
219        let entity: Option<GetArcanesDataError> = serde_json::from_str(&content).ok();
220        Err(Error::ResponseError(ResponseContent { status, content, entity }))
221    }
222}
223
224/// Data about conclave challenges
225pub async fn get_conclave_data(configuration: &configuration::Configuration, ) -> Result<models::Conclave, Error<GetConclaveDataError>> {
226
227    let uri_str = format!("{}/conclave", configuration.base_path);
228    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
229
230    if let Some(ref user_agent) = configuration.user_agent {
231        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
232    }
233
234    let req = req_builder.build()?;
235    let resp = configuration.client.execute(req).await?;
236
237    let status = resp.status();
238    let content_type = resp
239        .headers()
240        .get("content-type")
241        .and_then(|v| v.to_str().ok())
242        .unwrap_or("application/octet-stream");
243    let content_type = super::ContentType::from(content_type);
244
245    if !status.is_client_error() && !status.is_server_error() {
246        let content = resp.text().await?;
247        match content_type {
248            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
249            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Conclave`"))),
250            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`")))),
251        }
252    } else {
253        let content = resp.text().await?;
254        let entity: Option<GetConclaveDataError> = serde_json::from_str(&content).ok();
255        Err(Error::ResponseError(ResponseContent { status, content, entity }))
256    }
257}
258
259/// Data about events
260pub async fn get_events_data(configuration: &configuration::Configuration, ) -> Result<serde_json::Value, Error<GetEventsDataError>> {
261
262    let uri_str = format!("{}/events", configuration.base_path);
263    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
264
265    if let Some(ref user_agent) = configuration.user_agent {
266        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
267    }
268
269    let req = req_builder.build()?;
270    let resp = configuration.client.execute(req).await?;
271
272    let status = resp.status();
273    let content_type = resp
274        .headers()
275        .get("content-type")
276        .and_then(|v| v.to_str().ok())
277        .unwrap_or("application/octet-stream");
278    let content_type = super::ContentType::from(content_type);
279
280    if !status.is_client_error() && !status.is_server_error() {
281        let content = resp.text().await?;
282        match content_type {
283            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
284            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))),
285            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`")))),
286        }
287    } else {
288        let content = resp.text().await?;
289        let entity: Option<GetEventsDataError> = serde_json::from_str(&content).ok();
290        Err(Error::ResponseError(ResponseContent { status, content, entity }))
291    }
292}
293
294/// Strings for translating faction identifiers.
295pub async fn get_factions_data(configuration: &configuration::Configuration, ) -> Result<models::Factions, Error<GetFactionsDataError>> {
296
297    let uri_str = format!("{}/factions", configuration.base_path);
298    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
299
300    if let Some(ref user_agent) = configuration.user_agent {
301        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
302    }
303
304    let req = req_builder.build()?;
305    let resp = configuration.client.execute(req).await?;
306
307    let status = resp.status();
308    let content_type = resp
309        .headers()
310        .get("content-type")
311        .and_then(|v| v.to_str().ok())
312        .unwrap_or("application/octet-stream");
313    let content_type = super::ContentType::from(content_type);
314
315    if !status.is_client_error() && !status.is_server_error() {
316        let content = resp.text().await?;
317        match content_type {
318            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
319            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Factions`"))),
320            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`")))),
321        }
322    } else {
323        let content = resp.text().await?;
324        let entity: Option<GetFactionsDataError> = serde_json::from_str(&content).ok();
325        Err(Error::ResponseError(ResponseContent { status, content, entity }))
326    }
327}
328
329/// Fissure translation identifiers
330pub async fn get_fissures_data(configuration: &configuration::Configuration, ) -> Result<models::FissureModifiers, Error<GetFissuresDataError>> {
331
332    let uri_str = format!("{}/fissureModifiers", configuration.base_path);
333    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
334
335    if let Some(ref user_agent) = configuration.user_agent {
336        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
337    }
338
339    let req = req_builder.build()?;
340    let resp = configuration.client.execute(req).await?;
341
342    let status = resp.status();
343    let content_type = resp
344        .headers()
345        .get("content-type")
346        .and_then(|v| v.to_str().ok())
347        .unwrap_or("application/octet-stream");
348    let content_type = super::ContentType::from(content_type);
349
350    if !status.is_client_error() && !status.is_server_error() {
351        let content = resp.text().await?;
352        match content_type {
353            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
354            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FissureModifiers`"))),
355            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`")))),
356        }
357    } else {
358        let content = resp.text().await?;
359        let entity: Option<GetFissuresDataError> = serde_json::from_str(&content).ok();
360        Err(Error::ResponseError(ResponseContent { status, content, entity }))
361    }
362}
363
364/// Get language strings to assist translation. (Prefer the /languages/search/:query route)
365pub async fn get_language_data(configuration: &configuration::Configuration, ) -> Result<models::Languages, Error<GetLanguageDataError>> {
366
367    let uri_str = format!("{}/languages", configuration.base_path);
368    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
369
370    if let Some(ref user_agent) = configuration.user_agent {
371        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
372    }
373
374    let req = req_builder.build()?;
375    let resp = configuration.client.execute(req).await?;
376
377    let status = resp.status();
378    let content_type = resp
379        .headers()
380        .get("content-type")
381        .and_then(|v| v.to_str().ok())
382        .unwrap_or("application/octet-stream");
383    let content_type = super::ContentType::from(content_type);
384
385    if !status.is_client_error() && !status.is_server_error() {
386        let content = resp.text().await?;
387        match content_type {
388            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
389            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Languages`"))),
390            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`")))),
391        }
392    } else {
393        let content = resp.text().await?;
394        let entity: Option<GetLanguageDataError> = serde_json::from_str(&content).ok();
395        Err(Error::ResponseError(ResponseContent { status, content, entity }))
396    }
397}
398
399/// Locales supported by the API
400pub async fn get_locales(configuration: &configuration::Configuration, ) -> Result<Vec<models::Language>, Error<GetLocalesError>> {
401
402    let uri_str = format!("{}/locales", configuration.base_path);
403    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
404
405    if let Some(ref user_agent) = configuration.user_agent {
406        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
407    }
408
409    let req = req_builder.build()?;
410    let resp = configuration.client.execute(req).await?;
411
412    let status = resp.status();
413    let content_type = resp
414        .headers()
415        .get("content-type")
416        .and_then(|v| v.to_str().ok())
417        .unwrap_or("application/octet-stream");
418    let content_type = super::ContentType::from(content_type);
419
420    if !status.is_client_error() && !status.is_server_error() {
421        let content = resp.text().await?;
422        match content_type {
423            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
424            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec&lt;models::Language&gt;`"))),
425            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::Language&gt;`")))),
426        }
427    } else {
428        let content = resp.text().await?;
429        let entity: Option<GetLocalesError> = serde_json::from_str(&content).ok();
430        Err(Error::ResponseError(ResponseContent { status, content, entity }))
431    }
432}
433
434/// Mission Type information to aid translating identifiers
435pub async fn get_mission_data(configuration: &configuration::Configuration, ) -> Result<models::MissionTypes, Error<GetMissionDataError>> {
436
437    let uri_str = format!("{}/missionTypes", configuration.base_path);
438    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
439
440    if let Some(ref user_agent) = configuration.user_agent {
441        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
442    }
443
444    let req = req_builder.build()?;
445    let resp = configuration.client.execute(req).await?;
446
447    let status = resp.status();
448    let content_type = resp
449        .headers()
450        .get("content-type")
451        .and_then(|v| v.to_str().ok())
452        .unwrap_or("application/octet-stream");
453    let content_type = super::ContentType::from(content_type);
454
455    if !status.is_client_error() && !status.is_server_error() {
456        let content = resp.text().await?;
457        match content_type {
458            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
459            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::MissionTypes`"))),
460            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`")))),
461        }
462    } else {
463        let content = resp.text().await?;
464        let entity: Option<GetMissionDataError> = serde_json::from_str(&content).ok();
465        Err(Error::ResponseError(ResponseContent { status, content, entity }))
466    }
467}
468
469/// Sol Node translation information for aiding the translation of identifiers.
470pub async fn get_node_data(configuration: &configuration::Configuration, ) -> Result<models::SolNode, Error<GetNodeDataError>> {
471
472    let uri_str = format!("{}/solNodes", configuration.base_path);
473    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
474
475    if let Some(ref user_agent) = configuration.user_agent {
476        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
477    }
478
479    let req = req_builder.build()?;
480    let resp = configuration.client.execute(req).await?;
481
482    let status = resp.status();
483    let content_type = resp
484        .headers()
485        .get("content-type")
486        .and_then(|v| v.to_str().ok())
487        .unwrap_or("application/octet-stream");
488    let content_type = super::ContentType::from(content_type);
489
490    if !status.is_client_error() && !status.is_server_error() {
491        let content = resp.text().await?;
492        match content_type {
493            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
494            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SolNode`"))),
495            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::SolNode`")))),
496        }
497    } else {
498        let content = resp.text().await?;
499        let entity: Option<GetNodeDataError> = serde_json::from_str(&content).ok();
500        Err(Error::ResponseError(ResponseContent { status, content, entity }))
501    }
502}
503
504/// Operation Types information to aid translating identifiers for global upgrades
505pub async fn get_operations_data(configuration: &configuration::Configuration, ) -> Result<models::OperationTypes, Error<GetOperationsDataError>> {
506
507    let uri_str = format!("{}/operationTypes", configuration.base_path);
508    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
509
510    if let Some(ref user_agent) = configuration.user_agent {
511        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
512    }
513
514    let req = req_builder.build()?;
515    let resp = configuration.client.execute(req).await?;
516
517    let status = resp.status();
518    let content_type = resp
519        .headers()
520        .get("content-type")
521        .and_then(|v| v.to_str().ok())
522        .unwrap_or("application/octet-stream");
523    let content_type = super::ContentType::from(content_type);
524
525    if !status.is_client_error() && !status.is_server_error() {
526        let content = resp.text().await?;
527        match content_type {
528            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
529            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::OperationTypes`"))),
530            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`")))),
531        }
532    } else {
533        let content = resp.text().await?;
534        let entity: Option<GetOperationsDataError> = serde_json::from_str(&content).ok();
535        Err(Error::ResponseError(ResponseContent { status, content, entity }))
536    }
537}
538
539/// Sortie translation information for assisting translation of identifiers.
540pub async fn get_sortie_data(configuration: &configuration::Configuration, ) -> Result<models::SortieData, Error<GetSortieDataError>> {
541
542    let uri_str = format!("{}/sortie", configuration.base_path);
543    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
544
545    if let Some(ref user_agent) = configuration.user_agent {
546        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
547    }
548
549    let req = req_builder.build()?;
550    let resp = configuration.client.execute(req).await?;
551
552    let status = resp.status();
553    let content_type = resp
554        .headers()
555        .get("content-type")
556        .and_then(|v| v.to_str().ok())
557        .unwrap_or("application/octet-stream");
558    let content_type = super::ContentType::from(content_type);
559
560    if !status.is_client_error() && !status.is_server_error() {
561        let content = resp.text().await?;
562        match content_type {
563            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
564            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SortieData`"))),
565            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`")))),
566        }
567    } else {
568        let content = resp.text().await?;
569        let entity: Option<GetSortieDataError> = serde_json::from_str(&content).ok();
570        Err(Error::ResponseError(ResponseContent { status, content, entity }))
571    }
572}
573
574/// Information to assist translating syndicate identifiers.
575pub async fn get_syndicate_data(configuration: &configuration::Configuration, ) -> Result<models::Syndicates, Error<GetSyndicateDataError>> {
576
577    let uri_str = format!("{}/syndicates", configuration.base_path);
578    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
579
580    if let Some(ref user_agent) = configuration.user_agent {
581        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
582    }
583
584    let req = req_builder.build()?;
585    let resp = configuration.client.execute(req).await?;
586
587    let status = resp.status();
588    let content_type = resp
589        .headers()
590        .get("content-type")
591        .and_then(|v| v.to_str().ok())
592        .unwrap_or("application/octet-stream");
593    let content_type = super::ContentType::from(content_type);
594
595    if !status.is_client_error() && !status.is_server_error() {
596        let content = resp.text().await?;
597        match content_type {
598            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
599            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Syndicates`"))),
600            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`")))),
601        }
602    } else {
603        let content = resp.text().await?;
604        let entity: Option<GetSyndicateDataError> = serde_json::from_str(&content).ok();
605        Err(Error::ResponseError(ResponseContent { status, content, entity }))
606    }
607}
608
609/// Tutorials data from DE
610pub async fn get_tutorial_data(configuration: &configuration::Configuration, ) -> Result<Vec<models::TutorialsInner>, Error<GetTutorialDataError>> {
611
612    let uri_str = format!("{}/tutorials", configuration.base_path);
613    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
614
615    if let Some(ref user_agent) = configuration.user_agent {
616        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
617    }
618
619    let req = req_builder.build()?;
620    let resp = configuration.client.execute(req).await?;
621
622    let status = resp.status();
623    let content_type = resp
624        .headers()
625        .get("content-type")
626        .and_then(|v| v.to_str().ok())
627        .unwrap_or("application/octet-stream");
628    let content_type = super::ContentType::from(content_type);
629
630    if !status.is_client_error() && !status.is_server_error() {
631        let content = resp.text().await?;
632        match content_type {
633            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
634            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;`"))),
635            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;`")))),
636        }
637    } else {
638        let content = resp.text().await?;
639        let entity: Option<GetTutorialDataError> = serde_json::from_str(&content).ok();
640        Err(Error::ResponseError(ResponseContent { status, content, entity }))
641    }
642}
643
644/// Upgrade types for what can be changed by global modifiers, such as double credit weekends.
645pub async fn get_upgrade_types_data(configuration: &configuration::Configuration, ) -> Result<models::UpgradeTypes, Error<GetUpgradeTypesDataError>> {
646
647    let uri_str = format!("{}/upgradeTypes", configuration.base_path);
648    let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
649
650    if let Some(ref user_agent) = configuration.user_agent {
651        req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
652    }
653
654    let req = req_builder.build()?;
655    let resp = configuration.client.execute(req).await?;
656
657    let status = resp.status();
658    let content_type = resp
659        .headers()
660        .get("content-type")
661        .and_then(|v| v.to_str().ok())
662        .unwrap_or("application/octet-stream");
663    let content_type = super::ContentType::from(content_type);
664
665    if !status.is_client_error() && !status.is_server_error() {
666        let content = resp.text().await?;
667        match content_type {
668            ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
669            ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::UpgradeTypes`"))),
670            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`")))),
671        }
672    } else {
673        let content = resp.text().await?;
674        let entity: Option<GetUpgradeTypesDataError> = serde_json::from_str(&content).ok();
675        Err(Error::ResponseError(ResponseContent { status, content, entity }))
676    }
677}
678