1use reqwest;
13use serde::{Deserialize, Serialize, de::Error as _};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration, ContentType};
16
17
18#[derive(Debug, Clone, Serialize, Deserialize)]
20#[serde(untagged)]
21pub enum GetAcolytesByPlatformError {
22 Status400(models::InlineObject),
23 Status500(models::InlineObject),
24 UnknownValue(serde_json::Value),
25}
26
27#[derive(Debug, Clone, Serialize, Deserialize)]
29#[serde(untagged)]
30pub enum GetAlertsByPlatformError {
31 Status400(models::InlineObject),
32 Status500(models::InlineObject),
33 UnknownValue(serde_json::Value),
34}
35
36#[derive(Debug, Clone, Serialize, Deserialize)]
38#[serde(untagged)]
39pub enum GetArbitrationByPlatformError {
40 Status400(models::InlineObject),
41 Status500(models::InlineObject),
42 UnknownValue(serde_json::Value),
43}
44
45#[derive(Debug, Clone, Serialize, Deserialize)]
47#[serde(untagged)]
48pub enum GetArchonHuntByPlatformError {
49 Status400(models::InlineObject),
50 Status500(models::InlineObject),
51 UnknownValue(serde_json::Value),
52}
53
54#[derive(Debug, Clone, Serialize, Deserialize)]
56#[serde(untagged)]
57pub enum GetBaroByPlatformError {
58 Status400(models::InlineObject),
59 Status500(models::InlineObject),
60 UnknownValue(serde_json::Value),
61}
62
63#[derive(Debug, Clone, Serialize, Deserialize)]
65#[serde(untagged)]
66pub enum GetCambionByPlatformError {
67 Status400(models::InlineObject),
68 Status500(models::InlineObject),
69 UnknownValue(serde_json::Value),
70}
71
72#[derive(Debug, Clone, Serialize, Deserialize)]
74#[serde(untagged)]
75pub enum GetCetusByPlatformError {
76 Status400(models::InlineObject),
77 Status500(models::InlineObject),
78 UnknownValue(serde_json::Value),
79}
80
81#[derive(Debug, Clone, Serialize, Deserialize)]
83#[serde(untagged)]
84pub enum GetConclaveChallengesByPlatformError {
85 Status400(models::InlineObject),
86 Status500(models::InlineObject),
87 UnknownValue(serde_json::Value),
88}
89
90#[derive(Debug, Clone, Serialize, Deserialize)]
92#[serde(untagged)]
93pub enum GetConstructionByPlatformError {
94 Status400(models::InlineObject),
95 Status500(models::InlineObject),
96 UnknownValue(serde_json::Value),
97}
98
99#[derive(Debug, Clone, Serialize, Deserialize)]
101#[serde(untagged)]
102pub enum GetDarkSectorsByPlatformError {
103 Status400(models::InlineObject),
104 Status500(models::InlineObject),
105 UnknownValue(serde_json::Value),
106}
107
108#[derive(Debug, Clone, Serialize, Deserialize)]
110#[serde(untagged)]
111pub enum GetDealsByPlatformError {
112 Status400(models::InlineObject),
113 Status500(models::InlineObject),
114 UnknownValue(serde_json::Value),
115}
116
117#[derive(Debug, Clone, Serialize, Deserialize)]
119#[serde(untagged)]
120pub enum GetDeepArchimedeaByPlatformError {
121 Status400(models::InlineObject),
122 Status500(models::InlineObject),
123 UnknownValue(serde_json::Value),
124}
125
126#[derive(Debug, Clone, Serialize, Deserialize)]
128#[serde(untagged)]
129pub enum GetEarthByPlatformError {
130 Status400(models::InlineObject),
131 Status500(models::InlineObject),
132 UnknownValue(serde_json::Value),
133}
134
135#[derive(Debug, Clone, Serialize, Deserialize)]
137#[serde(untagged)]
138pub enum GetEventsByPlatformError {
139 Status400(models::InlineObject),
140 Status500(models::InlineObject),
141 UnknownValue(serde_json::Value),
142}
143
144#[derive(Debug, Clone, Serialize, Deserialize)]
146#[serde(untagged)]
147pub enum GetFissuresByPlatformError {
148 Status400(models::InlineObject),
149 Status500(models::InlineObject),
150 UnknownValue(serde_json::Value),
151}
152
153#[derive(Debug, Clone, Serialize, Deserialize)]
155#[serde(untagged)]
156pub enum GetGlobalEffectsByPlatformError {
157 Status400(models::InlineObject),
158 Status500(models::InlineObject),
159 UnknownValue(serde_json::Value),
160}
161
162#[derive(Debug, Clone, Serialize, Deserialize)]
164#[serde(untagged)]
165pub enum GetInvasionsByPlatformError {
166 Status400(models::InlineObject),
167 Status500(models::InlineObject),
168 UnknownValue(serde_json::Value),
169}
170
171#[derive(Debug, Clone, Serialize, Deserialize)]
173#[serde(untagged)]
174pub enum GetKuvaByPlatformError {
175 Status400(models::InlineObject),
176 Status500(models::InlineObject),
177 UnknownValue(serde_json::Value),
178}
179
180#[derive(Debug, Clone, Serialize, Deserialize)]
182#[serde(untagged)]
183pub enum GetNewsByPlatformError {
184 Status400(models::InlineObject),
185 Status500(models::InlineObject),
186 UnknownValue(serde_json::Value),
187}
188
189#[derive(Debug, Clone, Serialize, Deserialize)]
191#[serde(untagged)]
192pub enum GetNightwaveByPlatformError {
193 Status400(models::InlineObject),
194 Status500(models::InlineObject),
195 UnknownValue(serde_json::Value),
196}
197
198#[derive(Debug, Clone, Serialize, Deserialize)]
200#[serde(untagged)]
201pub enum GetOutpostsByPlatformError {
202 Status400(models::InlineObject),
203 Status500(models::InlineObject),
204 UnknownValue(serde_json::Value),
205}
206
207#[derive(Debug, Clone, Serialize, Deserialize)]
209#[serde(untagged)]
210pub enum GetRivensByPlatformError {
211 Status400(models::InlineObject),
212 Status500(models::InlineObject),
213 UnknownValue(serde_json::Value),
214}
215
216#[derive(Debug, Clone, Serialize, Deserialize)]
218#[serde(untagged)]
219pub enum GetSalesByPlatformError {
220 Status400(models::InlineObject),
221 Status500(models::InlineObject),
222 UnknownValue(serde_json::Value),
223}
224
225#[derive(Debug, Clone, Serialize, Deserialize)]
227#[serde(untagged)]
228pub enum GetSimarisByPlatformError {
229 Status400(models::InlineObject),
230 Status500(models::InlineObject),
231 UnknownValue(serde_json::Value),
232}
233
234#[derive(Debug, Clone, Serialize, Deserialize)]
236#[serde(untagged)]
237pub enum GetSortieByPlatformError {
238 Status400(models::InlineObject),
239 Status500(models::InlineObject),
240 UnknownValue(serde_json::Value),
241}
242
243#[derive(Debug, Clone, Serialize, Deserialize)]
245#[serde(untagged)]
246pub enum GetSteelPathByPlatformError {
247 Status400(models::InlineObject),
248 Status500(models::InlineObject),
249 UnknownValue(serde_json::Value),
250}
251
252#[derive(Debug, Clone, Serialize, Deserialize)]
254#[serde(untagged)]
255pub enum GetSyndicatesByPlatformError {
256 Status400(models::InlineObject),
257 Status500(models::InlineObject),
258 UnknownValue(serde_json::Value),
259}
260
261#[derive(Debug, Clone, Serialize, Deserialize)]
263#[serde(untagged)]
264pub enum GetTimestampByPlatformError {
265 Status400(models::InlineObject),
266 Status500(models::InlineObject),
267 UnknownValue(serde_json::Value),
268}
269
270#[derive(Debug, Clone, Serialize, Deserialize)]
272#[serde(untagged)]
273pub enum GetVallisByPlatformError {
274 Status400(models::InlineObject),
275 Status500(models::InlineObject),
276 UnknownValue(serde_json::Value),
277}
278
279#[derive(Debug, Clone, Serialize, Deserialize)]
281#[serde(untagged)]
282pub enum GetVarziaByPlatformError {
283 Status400(models::InlineObject),
284 Status500(models::InlineObject),
285 UnknownValue(serde_json::Value),
286}
287
288#[derive(Debug, Clone, Serialize, Deserialize)]
290#[serde(untagged)]
291pub enum GetVoidTradersByPlatformError {
292 Status400(models::InlineObject),
293 Status500(models::InlineObject),
294 UnknownValue(serde_json::Value),
295}
296
297#[derive(Debug, Clone, Serialize, Deserialize)]
299#[serde(untagged)]
300pub enum GetWorldstateByPlatformError {
301 Status400(models::InlineObject),
302 Status404(models::InlineObject1),
303 Status500(models::InlineObject),
304 UnknownValue(serde_json::Value),
305}
306
307#[derive(Debug, Clone, Serialize, Deserialize)]
309#[serde(untagged)]
310pub enum SearchRivensByPlatformError {
311 Status400(models::InlineObject),
312 Status500(models::InlineObject),
313 UnknownValue(serde_json::Value),
314}
315
316
317pub async fn get_acolytes_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<Vec<models::PersistentEnemiesInner>, Error<GetAcolytesByPlatformError>> {
319 let p_query_language = language;
321 let p_header_accept_language = accept_language;
322
323 let uri_str = format!("{}/pc/persistentEnemies", configuration.base_path);
324 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
325
326 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
327 if let Some(ref user_agent) = configuration.user_agent {
328 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
329 }
330 if let Some(param_value) = p_header_accept_language {
331 req_builder = req_builder.header("Accept-Language", param_value.to_string());
332 }
333
334 let req = req_builder.build()?;
335 let resp = configuration.client.execute(req).await?;
336
337 let status = resp.status();
338 let content_type = resp
339 .headers()
340 .get("content-type")
341 .and_then(|v| v.to_str().ok())
342 .unwrap_or("application/octet-stream");
343 let content_type = super::ContentType::from(content_type);
344
345 if !status.is_client_error() && !status.is_server_error() {
346 let content = resp.text().await?;
347 match content_type {
348 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
349 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::PersistentEnemiesInner>`"))),
350 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<models::PersistentEnemiesInner>`")))),
351 }
352 } else {
353 let content = resp.text().await?;
354 let entity: Option<GetAcolytesByPlatformError> = serde_json::from_str(&content).ok();
355 Err(Error::ResponseError(ResponseContent { status, content, entity }))
356 }
357}
358
359pub async fn get_alerts_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<Vec<models::AlertsInner>, Error<GetAlertsByPlatformError>> {
361 let p_query_language = language;
363 let p_header_accept_language = accept_language;
364
365 let uri_str = format!("{}/pc/alerts", configuration.base_path);
366 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
367
368 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
369 if let Some(ref user_agent) = configuration.user_agent {
370 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
371 }
372 if let Some(param_value) = p_header_accept_language {
373 req_builder = req_builder.header("Accept-Language", param_value.to_string());
374 }
375
376 let req = req_builder.build()?;
377 let resp = configuration.client.execute(req).await?;
378
379 let status = resp.status();
380 let content_type = resp
381 .headers()
382 .get("content-type")
383 .and_then(|v| v.to_str().ok())
384 .unwrap_or("application/octet-stream");
385 let content_type = super::ContentType::from(content_type);
386
387 if !status.is_client_error() && !status.is_server_error() {
388 let content = resp.text().await?;
389 match content_type {
390 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
391 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::AlertsInner>`"))),
392 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<models::AlertsInner>`")))),
393 }
394 } else {
395 let content = resp.text().await?;
396 let entity: Option<GetAlertsByPlatformError> = serde_json::from_str(&content).ok();
397 Err(Error::ResponseError(ResponseContent { status, content, entity }))
398 }
399}
400
401pub async fn get_arbitration_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::Arbitration, Error<GetArbitrationByPlatformError>> {
403 let p_query_language = language;
405 let p_header_accept_language = accept_language;
406
407 let uri_str = format!("{}/pc/arbitration", configuration.base_path);
408 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
409
410 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
411 if let Some(ref user_agent) = configuration.user_agent {
412 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
413 }
414 if let Some(param_value) = p_header_accept_language {
415 req_builder = req_builder.header("Accept-Language", param_value.to_string());
416 }
417
418 let req = req_builder.build()?;
419 let resp = configuration.client.execute(req).await?;
420
421 let status = resp.status();
422 let content_type = resp
423 .headers()
424 .get("content-type")
425 .and_then(|v| v.to_str().ok())
426 .unwrap_or("application/octet-stream");
427 let content_type = super::ContentType::from(content_type);
428
429 if !status.is_client_error() && !status.is_server_error() {
430 let content = resp.text().await?;
431 match content_type {
432 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
433 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Arbitration`"))),
434 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::Arbitration`")))),
435 }
436 } else {
437 let content = resp.text().await?;
438 let entity: Option<GetArbitrationByPlatformError> = serde_json::from_str(&content).ok();
439 Err(Error::ResponseError(ResponseContent { status, content, entity }))
440 }
441}
442
443pub async fn get_archon_hunt_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::ArchonHunt, Error<GetArchonHuntByPlatformError>> {
445 let p_query_language = language;
447 let p_header_accept_language = accept_language;
448
449 let uri_str = format!("{}/pc/archonHunt", configuration.base_path);
450 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
451
452 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
453 if let Some(ref user_agent) = configuration.user_agent {
454 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
455 }
456 if let Some(param_value) = p_header_accept_language {
457 req_builder = req_builder.header("Accept-Language", param_value.to_string());
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::ArchonHunt`"))),
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::ArchonHunt`")))),
477 }
478 } else {
479 let content = resp.text().await?;
480 let entity: Option<GetArchonHuntByPlatformError> = serde_json::from_str(&content).ok();
481 Err(Error::ResponseError(ResponseContent { status, content, entity }))
482 }
483}
484
485pub async fn get_baro_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::VoidTrader, Error<GetBaroByPlatformError>> {
487 let p_query_language = language;
489 let p_header_accept_language = accept_language;
490
491 let uri_str = format!("{}/pc/voidTrader", configuration.base_path);
492 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
493
494 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
495 if let Some(ref user_agent) = configuration.user_agent {
496 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
497 }
498 if let Some(param_value) = p_header_accept_language {
499 req_builder = req_builder.header("Accept-Language", param_value.to_string());
500 }
501
502 let req = req_builder.build()?;
503 let resp = configuration.client.execute(req).await?;
504
505 let status = resp.status();
506 let content_type = resp
507 .headers()
508 .get("content-type")
509 .and_then(|v| v.to_str().ok())
510 .unwrap_or("application/octet-stream");
511 let content_type = super::ContentType::from(content_type);
512
513 if !status.is_client_error() && !status.is_server_error() {
514 let content = resp.text().await?;
515 match content_type {
516 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
517 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::VoidTrader`"))),
518 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::VoidTrader`")))),
519 }
520 } else {
521 let content = resp.text().await?;
522 let entity: Option<GetBaroByPlatformError> = serde_json::from_str(&content).ok();
523 Err(Error::ResponseError(ResponseContent { status, content, entity }))
524 }
525}
526
527pub async fn get_cambion_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::CambionCycle, Error<GetCambionByPlatformError>> {
529 let p_query_language = language;
531 let p_header_accept_language = accept_language;
532
533 let uri_str = format!("{}/pc/cambionCycle", configuration.base_path);
534 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
535
536 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
537 if let Some(ref user_agent) = configuration.user_agent {
538 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
539 }
540 if let Some(param_value) = p_header_accept_language {
541 req_builder = req_builder.header("Accept-Language", param_value.to_string());
542 }
543
544 let req = req_builder.build()?;
545 let resp = configuration.client.execute(req).await?;
546
547 let status = resp.status();
548 let content_type = resp
549 .headers()
550 .get("content-type")
551 .and_then(|v| v.to_str().ok())
552 .unwrap_or("application/octet-stream");
553 let content_type = super::ContentType::from(content_type);
554
555 if !status.is_client_error() && !status.is_server_error() {
556 let content = resp.text().await?;
557 match content_type {
558 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
559 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CambionCycle`"))),
560 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::CambionCycle`")))),
561 }
562 } else {
563 let content = resp.text().await?;
564 let entity: Option<GetCambionByPlatformError> = serde_json::from_str(&content).ok();
565 Err(Error::ResponseError(ResponseContent { status, content, entity }))
566 }
567}
568
569pub async fn get_cetus_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::CetusCycle, Error<GetCetusByPlatformError>> {
571 let p_query_language = language;
573 let p_header_accept_language = accept_language;
574
575 let uri_str = format!("{}/pc/cetusCycle", configuration.base_path);
576 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
577
578 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
579 if let Some(ref user_agent) = configuration.user_agent {
580 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
581 }
582 if let Some(param_value) = p_header_accept_language {
583 req_builder = req_builder.header("Accept-Language", param_value.to_string());
584 }
585
586 let req = req_builder.build()?;
587 let resp = configuration.client.execute(req).await?;
588
589 let status = resp.status();
590 let content_type = resp
591 .headers()
592 .get("content-type")
593 .and_then(|v| v.to_str().ok())
594 .unwrap_or("application/octet-stream");
595 let content_type = super::ContentType::from(content_type);
596
597 if !status.is_client_error() && !status.is_server_error() {
598 let content = resp.text().await?;
599 match content_type {
600 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
601 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::CetusCycle`"))),
602 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::CetusCycle`")))),
603 }
604 } else {
605 let content = resp.text().await?;
606 let entity: Option<GetCetusByPlatformError> = serde_json::from_str(&content).ok();
607 Err(Error::ResponseError(ResponseContent { status, content, entity }))
608 }
609}
610
611pub async fn get_conclave_challenges_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<Vec<models::ConclaveChallengesInner>, Error<GetConclaveChallengesByPlatformError>> {
613 let p_query_language = language;
615 let p_header_accept_language = accept_language;
616
617 let uri_str = format!("{}/pc/conclaveChallenges", configuration.base_path);
618 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
619
620 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
621 if let Some(ref user_agent) = configuration.user_agent {
622 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
623 }
624 if let Some(param_value) = p_header_accept_language {
625 req_builder = req_builder.header("Accept-Language", param_value.to_string());
626 }
627
628 let req = req_builder.build()?;
629 let resp = configuration.client.execute(req).await?;
630
631 let status = resp.status();
632 let content_type = resp
633 .headers()
634 .get("content-type")
635 .and_then(|v| v.to_str().ok())
636 .unwrap_or("application/octet-stream");
637 let content_type = super::ContentType::from(content_type);
638
639 if !status.is_client_error() && !status.is_server_error() {
640 let content = resp.text().await?;
641 match content_type {
642 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
643 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::ConclaveChallengesInner>`"))),
644 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<models::ConclaveChallengesInner>`")))),
645 }
646 } else {
647 let content = resp.text().await?;
648 let entity: Option<GetConclaveChallengesByPlatformError> = serde_json::from_str(&content).ok();
649 Err(Error::ResponseError(ResponseContent { status, content, entity }))
650 }
651}
652
653pub async fn get_construction_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::Construction, Error<GetConstructionByPlatformError>> {
655 let p_query_language = language;
657 let p_header_accept_language = accept_language;
658
659 let uri_str = format!("{}/pc/constructionProgress", configuration.base_path);
660 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
661
662 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
663 if let Some(ref user_agent) = configuration.user_agent {
664 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
665 }
666 if let Some(param_value) = p_header_accept_language {
667 req_builder = req_builder.header("Accept-Language", param_value.to_string());
668 }
669
670 let req = req_builder.build()?;
671 let resp = configuration.client.execute(req).await?;
672
673 let status = resp.status();
674 let content_type = resp
675 .headers()
676 .get("content-type")
677 .and_then(|v| v.to_str().ok())
678 .unwrap_or("application/octet-stream");
679 let content_type = super::ContentType::from(content_type);
680
681 if !status.is_client_error() && !status.is_server_error() {
682 let content = resp.text().await?;
683 match content_type {
684 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
685 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Construction`"))),
686 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::Construction`")))),
687 }
688 } else {
689 let content = resp.text().await?;
690 let entity: Option<GetConstructionByPlatformError> = serde_json::from_str(&content).ok();
691 Err(Error::ResponseError(ResponseContent { status, content, entity }))
692 }
693}
694
695pub async fn get_dark_sectors_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<Vec<models::DarkSectorsInner>, Error<GetDarkSectorsByPlatformError>> {
697 let p_query_language = language;
699 let p_header_accept_language = accept_language;
700
701 let uri_str = format!("{}/pc/darkSectors", configuration.base_path);
702 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
703
704 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
705 if let Some(ref user_agent) = configuration.user_agent {
706 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
707 }
708 if let Some(param_value) = p_header_accept_language {
709 req_builder = req_builder.header("Accept-Language", param_value.to_string());
710 }
711
712 let req = req_builder.build()?;
713 let resp = configuration.client.execute(req).await?;
714
715 let status = resp.status();
716 let content_type = resp
717 .headers()
718 .get("content-type")
719 .and_then(|v| v.to_str().ok())
720 .unwrap_or("application/octet-stream");
721 let content_type = super::ContentType::from(content_type);
722
723 if !status.is_client_error() && !status.is_server_error() {
724 let content = resp.text().await?;
725 match content_type {
726 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
727 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::DarkSectorsInner>`"))),
728 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<models::DarkSectorsInner>`")))),
729 }
730 } else {
731 let content = resp.text().await?;
732 let entity: Option<GetDarkSectorsByPlatformError> = serde_json::from_str(&content).ok();
733 Err(Error::ResponseError(ResponseContent { status, content, entity }))
734 }
735}
736
737pub async fn get_deals_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<Vec<models::DailyDealsInner>, Error<GetDealsByPlatformError>> {
739 let p_query_language = language;
741 let p_header_accept_language = accept_language;
742
743 let uri_str = format!("{}/pc/dailyDeals", configuration.base_path);
744 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
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<models::DailyDealsInner>`"))),
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<models::DailyDealsInner>`")))),
771 }
772 } else {
773 let content = resp.text().await?;
774 let entity: Option<GetDealsByPlatformError> = serde_json::from_str(&content).ok();
775 Err(Error::ResponseError(ResponseContent { status, content, entity }))
776 }
777}
778
779pub async fn get_deep_archimedea_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::DeepArchimedea, Error<GetDeepArchimedeaByPlatformError>> {
781 let p_query_language = language;
783 let p_header_accept_language = accept_language;
784
785 let uri_str = format!("{}/pc/deepArchimedea", configuration.base_path);
786 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
787
788 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
789 if let Some(ref user_agent) = configuration.user_agent {
790 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
791 }
792 if let Some(param_value) = p_header_accept_language {
793 req_builder = req_builder.header("Accept-Language", param_value.to_string());
794 }
795
796 let req = req_builder.build()?;
797 let resp = configuration.client.execute(req).await?;
798
799 let status = resp.status();
800 let content_type = resp
801 .headers()
802 .get("content-type")
803 .and_then(|v| v.to_str().ok())
804 .unwrap_or("application/octet-stream");
805 let content_type = super::ContentType::from(content_type);
806
807 if !status.is_client_error() && !status.is_server_error() {
808 let content = resp.text().await?;
809 match content_type {
810 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
811 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::DeepArchimedea`"))),
812 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::DeepArchimedea`")))),
813 }
814 } else {
815 let content = resp.text().await?;
816 let entity: Option<GetDeepArchimedeaByPlatformError> = serde_json::from_str(&content).ok();
817 Err(Error::ResponseError(ResponseContent { status, content, entity }))
818 }
819}
820
821pub async fn get_earth_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::EarthCycle, Error<GetEarthByPlatformError>> {
823 let p_query_language = language;
825 let p_header_accept_language = accept_language;
826
827 let uri_str = format!("{}/pc/earthCycle", configuration.base_path);
828 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
829
830 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
831 if let Some(ref user_agent) = configuration.user_agent {
832 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
833 }
834 if let Some(param_value) = p_header_accept_language {
835 req_builder = req_builder.header("Accept-Language", param_value.to_string());
836 }
837
838 let req = req_builder.build()?;
839 let resp = configuration.client.execute(req).await?;
840
841 let status = resp.status();
842 let content_type = resp
843 .headers()
844 .get("content-type")
845 .and_then(|v| v.to_str().ok())
846 .unwrap_or("application/octet-stream");
847 let content_type = super::ContentType::from(content_type);
848
849 if !status.is_client_error() && !status.is_server_error() {
850 let content = resp.text().await?;
851 match content_type {
852 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
853 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::EarthCycle`"))),
854 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::EarthCycle`")))),
855 }
856 } else {
857 let content = resp.text().await?;
858 let entity: Option<GetEarthByPlatformError> = serde_json::from_str(&content).ok();
859 Err(Error::ResponseError(ResponseContent { status, content, entity }))
860 }
861}
862
863pub async fn get_events_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<Vec<models::Event>, Error<GetEventsByPlatformError>> {
865 let p_query_language = language;
867 let p_header_accept_language = accept_language;
868
869 let uri_str = format!("{}/pc/events", configuration.base_path);
870 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
871
872 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
873 if let Some(ref user_agent) = configuration.user_agent {
874 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
875 }
876 if let Some(param_value) = p_header_accept_language {
877 req_builder = req_builder.header("Accept-Language", param_value.to_string());
878 }
879
880 let req = req_builder.build()?;
881 let resp = configuration.client.execute(req).await?;
882
883 let status = resp.status();
884 let content_type = resp
885 .headers()
886 .get("content-type")
887 .and_then(|v| v.to_str().ok())
888 .unwrap_or("application/octet-stream");
889 let content_type = super::ContentType::from(content_type);
890
891 if !status.is_client_error() && !status.is_server_error() {
892 let content = resp.text().await?;
893 match content_type {
894 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
895 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Event>`"))),
896 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<models::Event>`")))),
897 }
898 } else {
899 let content = resp.text().await?;
900 let entity: Option<GetEventsByPlatformError> = serde_json::from_str(&content).ok();
901 Err(Error::ResponseError(ResponseContent { status, content, entity }))
902 }
903}
904
905pub async fn get_fissures_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<serde_json::Value, Error<GetFissuresByPlatformError>> {
907 let p_query_language = language;
909 let p_header_accept_language = accept_language;
910
911 let uri_str = format!("{}/pc/fissures", configuration.base_path);
912 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
913
914 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
915 if let Some(ref user_agent) = configuration.user_agent {
916 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
917 }
918 if let Some(param_value) = p_header_accept_language {
919 req_builder = req_builder.header("Accept-Language", param_value.to_string());
920 }
921
922 let req = req_builder.build()?;
923 let resp = configuration.client.execute(req).await?;
924
925 let status = resp.status();
926 let content_type = resp
927 .headers()
928 .get("content-type")
929 .and_then(|v| v.to_str().ok())
930 .unwrap_or("application/octet-stream");
931 let content_type = super::ContentType::from(content_type);
932
933 if !status.is_client_error() && !status.is_server_error() {
934 let content = resp.text().await?;
935 match content_type {
936 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
937 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `serde_json::Value`"))),
938 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`")))),
939 }
940 } else {
941 let content = resp.text().await?;
942 let entity: Option<GetFissuresByPlatformError> = serde_json::from_str(&content).ok();
943 Err(Error::ResponseError(ResponseContent { status, content, entity }))
944 }
945}
946
947pub async fn get_global_effects_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<Vec<models::GlobalUpgradesInner>, Error<GetGlobalEffectsByPlatformError>> {
949 let p_query_language = language;
951 let p_header_accept_language = accept_language;
952
953 let uri_str = format!("{}/pc/globalUpgrades", configuration.base_path);
954 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
955
956 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
957 if let Some(ref user_agent) = configuration.user_agent {
958 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
959 }
960 if let Some(param_value) = p_header_accept_language {
961 req_builder = req_builder.header("Accept-Language", param_value.to_string());
962 }
963
964 let req = req_builder.build()?;
965 let resp = configuration.client.execute(req).await?;
966
967 let status = resp.status();
968 let content_type = resp
969 .headers()
970 .get("content-type")
971 .and_then(|v| v.to_str().ok())
972 .unwrap_or("application/octet-stream");
973 let content_type = super::ContentType::from(content_type);
974
975 if !status.is_client_error() && !status.is_server_error() {
976 let content = resp.text().await?;
977 match content_type {
978 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
979 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::GlobalUpgradesInner>`"))),
980 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<models::GlobalUpgradesInner>`")))),
981 }
982 } else {
983 let content = resp.text().await?;
984 let entity: Option<GetGlobalEffectsByPlatformError> = serde_json::from_str(&content).ok();
985 Err(Error::ResponseError(ResponseContent { status, content, entity }))
986 }
987}
988
989pub async fn get_invasions_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<Vec<models::Invasion>, Error<GetInvasionsByPlatformError>> {
991 let p_query_language = language;
993 let p_header_accept_language = accept_language;
994
995 let uri_str = format!("{}/pc/invasions", configuration.base_path);
996 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
997
998 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
999 if let Some(ref user_agent) = configuration.user_agent {
1000 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1001 }
1002 if let Some(param_value) = p_header_accept_language {
1003 req_builder = req_builder.header("Accept-Language", param_value.to_string());
1004 }
1005
1006 let req = req_builder.build()?;
1007 let resp = configuration.client.execute(req).await?;
1008
1009 let status = resp.status();
1010 let content_type = resp
1011 .headers()
1012 .get("content-type")
1013 .and_then(|v| v.to_str().ok())
1014 .unwrap_or("application/octet-stream");
1015 let content_type = super::ContentType::from(content_type);
1016
1017 if !status.is_client_error() && !status.is_server_error() {
1018 let content = resp.text().await?;
1019 match content_type {
1020 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1021 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Invasion>`"))),
1022 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<models::Invasion>`")))),
1023 }
1024 } else {
1025 let content = resp.text().await?;
1026 let entity: Option<GetInvasionsByPlatformError> = serde_json::from_str(&content).ok();
1027 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1028 }
1029}
1030
1031pub async fn get_kuva_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<Vec<models::Arbitration>, Error<GetKuvaByPlatformError>> {
1033 let p_query_language = language;
1035 let p_header_accept_language = accept_language;
1036
1037 let uri_str = format!("{}/pc/kuva", configuration.base_path);
1038 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1039
1040 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1041 if let Some(ref user_agent) = configuration.user_agent {
1042 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1043 }
1044 if let Some(param_value) = p_header_accept_language {
1045 req_builder = req_builder.header("Accept-Language", param_value.to_string());
1046 }
1047
1048 let req = req_builder.build()?;
1049 let resp = configuration.client.execute(req).await?;
1050
1051 let status = resp.status();
1052 let content_type = resp
1053 .headers()
1054 .get("content-type")
1055 .and_then(|v| v.to_str().ok())
1056 .unwrap_or("application/octet-stream");
1057 let content_type = super::ContentType::from(content_type);
1058
1059 if !status.is_client_error() && !status.is_server_error() {
1060 let content = resp.text().await?;
1061 match content_type {
1062 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1063 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::Arbitration>`"))),
1064 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<models::Arbitration>`")))),
1065 }
1066 } else {
1067 let content = resp.text().await?;
1068 let entity: Option<GetKuvaByPlatformError> = serde_json::from_str(&content).ok();
1069 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1070 }
1071}
1072
1073pub async fn get_news_by_platform(configuration: &configuration::Configuration, ) -> Result<Vec<models::NewsInner>, Error<GetNewsByPlatformError>> {
1075
1076 let uri_str = format!("{}/pc/news", configuration.base_path);
1077 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1078
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
1083 let req = req_builder.build()?;
1084 let resp = configuration.client.execute(req).await?;
1085
1086 let status = resp.status();
1087 let content_type = resp
1088 .headers()
1089 .get("content-type")
1090 .and_then(|v| v.to_str().ok())
1091 .unwrap_or("application/octet-stream");
1092 let content_type = super::ContentType::from(content_type);
1093
1094 if !status.is_client_error() && !status.is_server_error() {
1095 let content = resp.text().await?;
1096 match content_type {
1097 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1098 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::NewsInner>`"))),
1099 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<models::NewsInner>`")))),
1100 }
1101 } else {
1102 let content = resp.text().await?;
1103 let entity: Option<GetNewsByPlatformError> = serde_json::from_str(&content).ok();
1104 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1105 }
1106}
1107
1108pub async fn get_nightwave_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::Nightwave, Error<GetNightwaveByPlatformError>> {
1110 let p_query_language = language;
1112 let p_header_accept_language = accept_language;
1113
1114 let uri_str = format!("{}/pc/nightwave", configuration.base_path);
1115 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1116
1117 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1118 if let Some(ref user_agent) = configuration.user_agent {
1119 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1120 }
1121 if let Some(param_value) = p_header_accept_language {
1122 req_builder = req_builder.header("Accept-Language", param_value.to_string());
1123 }
1124
1125 let req = req_builder.build()?;
1126 let resp = configuration.client.execute(req).await?;
1127
1128 let status = resp.status();
1129 let content_type = resp
1130 .headers()
1131 .get("content-type")
1132 .and_then(|v| v.to_str().ok())
1133 .unwrap_or("application/octet-stream");
1134 let content_type = super::ContentType::from(content_type);
1135
1136 if !status.is_client_error() && !status.is_server_error() {
1137 let content = resp.text().await?;
1138 match content_type {
1139 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1140 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Nightwave`"))),
1141 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::Nightwave`")))),
1142 }
1143 } else {
1144 let content = resp.text().await?;
1145 let entity: Option<GetNightwaveByPlatformError> = serde_json::from_str(&content).ok();
1146 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1147 }
1148}
1149
1150pub async fn get_outposts_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::SentientOutposts, Error<GetOutpostsByPlatformError>> {
1152 let p_query_language = language;
1154 let p_header_accept_language = accept_language;
1155
1156 let uri_str = format!("{}/pc/sentientOutposts", configuration.base_path);
1157 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1158
1159 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1160 if let Some(ref user_agent) = configuration.user_agent {
1161 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1162 }
1163 if let Some(param_value) = p_header_accept_language {
1164 req_builder = req_builder.header("Accept-Language", param_value.to_string());
1165 }
1166
1167 let req = req_builder.build()?;
1168 let resp = configuration.client.execute(req).await?;
1169
1170 let status = resp.status();
1171 let content_type = resp
1172 .headers()
1173 .get("content-type")
1174 .and_then(|v| v.to_str().ok())
1175 .unwrap_or("application/octet-stream");
1176 let content_type = super::ContentType::from(content_type);
1177
1178 if !status.is_client_error() && !status.is_server_error() {
1179 let content = resp.text().await?;
1180 match content_type {
1181 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1182 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SentientOutposts`"))),
1183 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::SentientOutposts`")))),
1184 }
1185 } else {
1186 let content = resp.text().await?;
1187 let entity: Option<GetOutpostsByPlatformError> = serde_json::from_str(&content).ok();
1188 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1189 }
1190}
1191
1192pub async fn get_rivens_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<std::collections::HashMap<String, models::Riven>, Error<GetRivensByPlatformError>> {
1194 let p_query_language = language;
1196 let p_header_accept_language = accept_language;
1197
1198 let uri_str = format!("{}/pc/rivens", configuration.base_path);
1199 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1200
1201 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1202 if let Some(ref user_agent) = configuration.user_agent {
1203 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1204 }
1205 if let Some(param_value) = p_header_accept_language {
1206 req_builder = req_builder.header("Accept-Language", param_value.to_string());
1207 }
1208
1209 let req = req_builder.build()?;
1210 let resp = configuration.client.execute(req).await?;
1211
1212 let status = resp.status();
1213 let content_type = resp
1214 .headers()
1215 .get("content-type")
1216 .and_then(|v| v.to_str().ok())
1217 .unwrap_or("application/octet-stream");
1218 let content_type = super::ContentType::from(content_type);
1219
1220 if !status.is_client_error() && !status.is_server_error() {
1221 let content = resp.text().await?;
1222 match content_type {
1223 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1224 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::Riven>`"))),
1225 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::Riven>`")))),
1226 }
1227 } else {
1228 let content = resp.text().await?;
1229 let entity: Option<GetRivensByPlatformError> = serde_json::from_str(&content).ok();
1230 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1231 }
1232}
1233
1234pub async fn get_sales_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::FlashSales, Error<GetSalesByPlatformError>> {
1236 let p_query_language = language;
1238 let p_header_accept_language = accept_language;
1239
1240 let uri_str = format!("{}/pc/flashSales", configuration.base_path);
1241 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1242
1243 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1244 if let Some(ref user_agent) = configuration.user_agent {
1245 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1246 }
1247 if let Some(param_value) = p_header_accept_language {
1248 req_builder = req_builder.header("Accept-Language", param_value.to_string());
1249 }
1250
1251 let req = req_builder.build()?;
1252 let resp = configuration.client.execute(req).await?;
1253
1254 let status = resp.status();
1255 let content_type = resp
1256 .headers()
1257 .get("content-type")
1258 .and_then(|v| v.to_str().ok())
1259 .unwrap_or("application/octet-stream");
1260 let content_type = super::ContentType::from(content_type);
1261
1262 if !status.is_client_error() && !status.is_server_error() {
1263 let content = resp.text().await?;
1264 match content_type {
1265 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1266 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::FlashSales`"))),
1267 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::FlashSales`")))),
1268 }
1269 } else {
1270 let content = resp.text().await?;
1271 let entity: Option<GetSalesByPlatformError> = serde_json::from_str(&content).ok();
1272 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1273 }
1274}
1275
1276pub async fn get_simaris_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::Simaris, Error<GetSimarisByPlatformError>> {
1278 let p_query_language = language;
1280 let p_header_accept_language = accept_language;
1281
1282 let uri_str = format!("{}/pc/simaris", configuration.base_path);
1283 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1284
1285 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1286 if let Some(ref user_agent) = configuration.user_agent {
1287 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1288 }
1289 if let Some(param_value) = p_header_accept_language {
1290 req_builder = req_builder.header("Accept-Language", param_value.to_string());
1291 }
1292
1293 let req = req_builder.build()?;
1294 let resp = configuration.client.execute(req).await?;
1295
1296 let status = resp.status();
1297 let content_type = resp
1298 .headers()
1299 .get("content-type")
1300 .and_then(|v| v.to_str().ok())
1301 .unwrap_or("application/octet-stream");
1302 let content_type = super::ContentType::from(content_type);
1303
1304 if !status.is_client_error() && !status.is_server_error() {
1305 let content = resp.text().await?;
1306 match content_type {
1307 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1308 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Simaris`"))),
1309 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::Simaris`")))),
1310 }
1311 } else {
1312 let content = resp.text().await?;
1313 let entity: Option<GetSimarisByPlatformError> = serde_json::from_str(&content).ok();
1314 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1315 }
1316}
1317
1318pub async fn get_sortie_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::Sortie, Error<GetSortieByPlatformError>> {
1320 let p_query_language = language;
1322 let p_header_accept_language = accept_language;
1323
1324 let uri_str = format!("{}/pc/sortie", configuration.base_path);
1325 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1326
1327 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1328 if let Some(ref user_agent) = configuration.user_agent {
1329 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1330 }
1331 if let Some(param_value) = p_header_accept_language {
1332 req_builder = req_builder.header("Accept-Language", param_value.to_string());
1333 }
1334
1335 let req = req_builder.build()?;
1336 let resp = configuration.client.execute(req).await?;
1337
1338 let status = resp.status();
1339 let content_type = resp
1340 .headers()
1341 .get("content-type")
1342 .and_then(|v| v.to_str().ok())
1343 .unwrap_or("application/octet-stream");
1344 let content_type = super::ContentType::from(content_type);
1345
1346 if !status.is_client_error() && !status.is_server_error() {
1347 let content = resp.text().await?;
1348 match content_type {
1349 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1350 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Sortie`"))),
1351 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::Sortie`")))),
1352 }
1353 } else {
1354 let content = resp.text().await?;
1355 let entity: Option<GetSortieByPlatformError> = serde_json::from_str(&content).ok();
1356 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1357 }
1358}
1359
1360pub async fn get_steel_path_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::SteelPath, Error<GetSteelPathByPlatformError>> {
1362 let p_query_language = language;
1364 let p_header_accept_language = accept_language;
1365
1366 let uri_str = format!("{}/pc/steelPath", configuration.base_path);
1367 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1368
1369 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1370 if let Some(ref user_agent) = configuration.user_agent {
1371 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1372 }
1373 if let Some(param_value) = p_header_accept_language {
1374 req_builder = req_builder.header("Accept-Language", param_value.to_string());
1375 }
1376
1377 let req = req_builder.build()?;
1378 let resp = configuration.client.execute(req).await?;
1379
1380 let status = resp.status();
1381 let content_type = resp
1382 .headers()
1383 .get("content-type")
1384 .and_then(|v| v.to_str().ok())
1385 .unwrap_or("application/octet-stream");
1386 let content_type = super::ContentType::from(content_type);
1387
1388 if !status.is_client_error() && !status.is_server_error() {
1389 let content = resp.text().await?;
1390 match content_type {
1391 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1392 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::SteelPath`"))),
1393 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::SteelPath`")))),
1394 }
1395 } else {
1396 let content = resp.text().await?;
1397 let entity: Option<GetSteelPathByPlatformError> = serde_json::from_str(&content).ok();
1398 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1399 }
1400}
1401
1402pub async fn get_syndicates_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<Vec<models::SyndicateMission>, Error<GetSyndicatesByPlatformError>> {
1404 let p_query_language = language;
1406 let p_header_accept_language = accept_language;
1407
1408 let uri_str = format!("{}/pc/syndicateMissions", configuration.base_path);
1409 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1410
1411 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1412 if let Some(ref user_agent) = configuration.user_agent {
1413 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1414 }
1415 if let Some(param_value) = p_header_accept_language {
1416 req_builder = req_builder.header("Accept-Language", param_value.to_string());
1417 }
1418
1419 let req = req_builder.build()?;
1420 let resp = configuration.client.execute(req).await?;
1421
1422 let status = resp.status();
1423 let content_type = resp
1424 .headers()
1425 .get("content-type")
1426 .and_then(|v| v.to_str().ok())
1427 .unwrap_or("application/octet-stream");
1428 let content_type = super::ContentType::from(content_type);
1429
1430 if !status.is_client_error() && !status.is_server_error() {
1431 let content = resp.text().await?;
1432 match content_type {
1433 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1434 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::SyndicateMission>`"))),
1435 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<models::SyndicateMission>`")))),
1436 }
1437 } else {
1438 let content = resp.text().await?;
1439 let entity: Option<GetSyndicatesByPlatformError> = serde_json::from_str(&content).ok();
1440 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1441 }
1442}
1443
1444pub async fn get_timestamp_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<String, Error<GetTimestampByPlatformError>> {
1446 let p_query_language = language;
1448 let p_header_accept_language = accept_language;
1449
1450 let uri_str = format!("{}/pc/timestamp", configuration.base_path);
1451 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1452
1453 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1454 if let Some(ref user_agent) = configuration.user_agent {
1455 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1456 }
1457 if let Some(param_value) = p_header_accept_language {
1458 req_builder = req_builder.header("Accept-Language", param_value.to_string());
1459 }
1460
1461 let req = req_builder.build()?;
1462 let resp = configuration.client.execute(req).await?;
1463
1464 let status = resp.status();
1465 let content_type = resp
1466 .headers()
1467 .get("content-type")
1468 .and_then(|v| v.to_str().ok())
1469 .unwrap_or("application/octet-stream");
1470 let content_type = super::ContentType::from(content_type);
1471
1472 if !status.is_client_error() && !status.is_server_error() {
1473 let content = resp.text().await?;
1474 match content_type {
1475 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1476 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `String`"))),
1477 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `String`")))),
1478 }
1479 } else {
1480 let content = resp.text().await?;
1481 let entity: Option<GetTimestampByPlatformError> = serde_json::from_str(&content).ok();
1482 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1483 }
1484}
1485
1486pub async fn get_vallis_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::VallisCycle, Error<GetVallisByPlatformError>> {
1488 let p_query_language = language;
1490 let p_header_accept_language = accept_language;
1491
1492 let uri_str = format!("{}/pc/vallisCycle", configuration.base_path);
1493 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1494
1495 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1496 if let Some(ref user_agent) = configuration.user_agent {
1497 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1498 }
1499 if let Some(param_value) = p_header_accept_language {
1500 req_builder = req_builder.header("Accept-Language", param_value.to_string());
1501 }
1502
1503 let req = req_builder.build()?;
1504 let resp = configuration.client.execute(req).await?;
1505
1506 let status = resp.status();
1507 let content_type = resp
1508 .headers()
1509 .get("content-type")
1510 .and_then(|v| v.to_str().ok())
1511 .unwrap_or("application/octet-stream");
1512 let content_type = super::ContentType::from(content_type);
1513
1514 if !status.is_client_error() && !status.is_server_error() {
1515 let content = resp.text().await?;
1516 match content_type {
1517 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1518 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::VallisCycle`"))),
1519 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::VallisCycle`")))),
1520 }
1521 } else {
1522 let content = resp.text().await?;
1523 let entity: Option<GetVallisByPlatformError> = serde_json::from_str(&content).ok();
1524 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1525 }
1526}
1527
1528pub async fn get_varzia_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::VoidTrader, Error<GetVarziaByPlatformError>> {
1530 let p_query_language = language;
1532 let p_header_accept_language = accept_language;
1533
1534 let uri_str = format!("{}/pc/vaultTrader", configuration.base_path);
1535 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1536
1537 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1538 if let Some(ref user_agent) = configuration.user_agent {
1539 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1540 }
1541 if let Some(param_value) = p_header_accept_language {
1542 req_builder = req_builder.header("Accept-Language", param_value.to_string());
1543 }
1544
1545 let req = req_builder.build()?;
1546 let resp = configuration.client.execute(req).await?;
1547
1548 let status = resp.status();
1549 let content_type = resp
1550 .headers()
1551 .get("content-type")
1552 .and_then(|v| v.to_str().ok())
1553 .unwrap_or("application/octet-stream");
1554 let content_type = super::ContentType::from(content_type);
1555
1556 if !status.is_client_error() && !status.is_server_error() {
1557 let content = resp.text().await?;
1558 match content_type {
1559 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1560 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::VoidTrader`"))),
1561 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::VoidTrader`")))),
1562 }
1563 } else {
1564 let content = resp.text().await?;
1565 let entity: Option<GetVarziaByPlatformError> = serde_json::from_str(&content).ok();
1566 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1567 }
1568}
1569
1570pub async fn get_void_traders_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<Vec<models::VoidTrader>, Error<GetVoidTradersByPlatformError>> {
1572 let p_query_language = language;
1574 let p_header_accept_language = accept_language;
1575
1576 let uri_str = format!("{}/pc/voidTraders", configuration.base_path);
1577 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1578
1579 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1580 if let Some(ref user_agent) = configuration.user_agent {
1581 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1582 }
1583 if let Some(param_value) = p_header_accept_language {
1584 req_builder = req_builder.header("Accept-Language", param_value.to_string());
1585 }
1586
1587 let req = req_builder.build()?;
1588 let resp = configuration.client.execute(req).await?;
1589
1590 let status = resp.status();
1591 let content_type = resp
1592 .headers()
1593 .get("content-type")
1594 .and_then(|v| v.to_str().ok())
1595 .unwrap_or("application/octet-stream");
1596 let content_type = super::ContentType::from(content_type);
1597
1598 if !status.is_client_error() && !status.is_server_error() {
1599 let content = resp.text().await?;
1600 match content_type {
1601 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1602 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `Vec<models::VoidTrader>`"))),
1603 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<models::VoidTrader>`")))),
1604 }
1605 } else {
1606 let content = resp.text().await?;
1607 let entity: Option<GetVoidTradersByPlatformError> = serde_json::from_str(&content).ok();
1608 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1609 }
1610}
1611
1612pub async fn get_worldstate_by_platform(configuration: &configuration::Configuration, language: models::Language, accept_language: Option<models::Language>) -> Result<models::Ws, Error<GetWorldstateByPlatformError>> {
1614 let p_query_language = language;
1616 let p_header_accept_language = accept_language;
1617
1618 let uri_str = format!("{}/pc", configuration.base_path);
1619 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1620
1621 req_builder = req_builder.query(&[("language", &p_query_language.to_string())]);
1622 if let Some(ref user_agent) = configuration.user_agent {
1623 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1624 }
1625 if let Some(param_value) = p_header_accept_language {
1626 req_builder = req_builder.header("Accept-Language", param_value.to_string());
1627 }
1628
1629 let req = req_builder.build()?;
1630 let resp = configuration.client.execute(req).await?;
1631
1632 let status = resp.status();
1633 let content_type = resp
1634 .headers()
1635 .get("content-type")
1636 .and_then(|v| v.to_str().ok())
1637 .unwrap_or("application/octet-stream");
1638 let content_type = super::ContentType::from(content_type);
1639
1640 if !status.is_client_error() && !status.is_server_error() {
1641 let content = resp.text().await?;
1642 match content_type {
1643 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1644 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::Ws`"))),
1645 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::Ws`")))),
1646 }
1647 } else {
1648 let content = resp.text().await?;
1649 let entity: Option<GetWorldstateByPlatformError> = serde_json::from_str(&content).ok();
1650 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1651 }
1652}
1653
1654pub async fn search_rivens_by_platform(configuration: &configuration::Configuration, query: &str) -> Result<std::collections::HashMap<String, models::Riven>, Error<SearchRivensByPlatformError>> {
1656 let p_path_query = query;
1658
1659 let uri_str = format!("{}/pc/rivens/search/{query}", configuration.base_path, query=crate::apis::urlencode(p_path_query));
1660 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1661
1662 if let Some(ref user_agent) = configuration.user_agent {
1663 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1664 }
1665
1666 let req = req_builder.build()?;
1667 let resp = configuration.client.execute(req).await?;
1668
1669 let status = resp.status();
1670 let content_type = resp
1671 .headers()
1672 .get("content-type")
1673 .and_then(|v| v.to_str().ok())
1674 .unwrap_or("application/octet-stream");
1675 let content_type = super::ContentType::from(content_type);
1676
1677 if !status.is_client_error() && !status.is_server_error() {
1678 let content = resp.text().await?;
1679 match content_type {
1680 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1681 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `std::collections::HashMap<String, models::Riven>`"))),
1682 ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `std::collections::HashMap<String, models::Riven>`")))),
1683 }
1684 } else {
1685 let content = resp.text().await?;
1686 let entity: Option<SearchRivensByPlatformError> = serde_json::from_str(&content).ok();
1687 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1688 }
1689}
1690