1use reqwest;
13use serde::{Deserialize, Serialize, de::Error as _};
14use crate::{apis::ResponseContent, models};
15use super::{Error, configuration, ContentType};
16
17#[derive(Clone, Debug, Default, Serialize, Deserialize)]
19pub struct GetAnalystRatingsLightParams {
20 pub symbol: Option<String>,
22 pub figi: Option<String>,
24 pub isin: Option<String>,
26 pub cusip: Option<String>,
28 pub exchange: Option<String>,
30 pub rating_change: Option<String>,
32 pub outputsize: Option<i64>,
34 pub country: Option<String>
36}
37
38impl GetAnalystRatingsLightParams {
39 pub fn builder() -> GetAnalystRatingsLightParamsBuilder {
41 GetAnalystRatingsLightParamsBuilder::default()
42 }
43}
44
45#[derive(Clone, Debug, Default)]
47pub struct GetAnalystRatingsLightParamsBuilder {
48 symbol: Option<String>,
50 figi: Option<String>,
52 isin: Option<String>,
54 cusip: Option<String>,
56 exchange: Option<String>,
58 rating_change: Option<String>,
60 outputsize: Option<i64>,
62 country: Option<String>
64}
65
66impl GetAnalystRatingsLightParamsBuilder {
67 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
69 self.symbol = Some(symbol.into());
70 self
71 }
72 pub fn figi(mut self, figi: impl Into<String>) -> Self {
74 self.figi = Some(figi.into());
75 self
76 }
77 pub fn isin(mut self, isin: impl Into<String>) -> Self {
79 self.isin = Some(isin.into());
80 self
81 }
82 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
84 self.cusip = Some(cusip.into());
85 self
86 }
87 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
89 self.exchange = Some(exchange.into());
90 self
91 }
92 pub fn rating_change(mut self, rating_change: impl Into<String>) -> Self {
94 self.rating_change = Some(rating_change.into());
95 self
96 }
97 pub fn outputsize(mut self, outputsize: i64) -> Self {
99 self.outputsize = Some(outputsize);
100 self
101 }
102 pub fn country(mut self, country: impl Into<String>) -> Self {
104 self.country = Some(country.into());
105 self
106 }
107
108 pub fn build(self) -> GetAnalystRatingsLightParams {
110 GetAnalystRatingsLightParams {
111 symbol: self.symbol,
112 figi: self.figi,
113 isin: self.isin,
114 cusip: self.cusip,
115 exchange: self.exchange,
116 rating_change: self.rating_change,
117 outputsize: self.outputsize,
118 country: self.country
119 }
120 }
121}
122
123#[derive(Clone, Debug, Default, Serialize, Deserialize)]
125pub struct GetAnalystRatingsUsEquitiesParams {
126 pub symbol: Option<String>,
128 pub figi: Option<String>,
130 pub isin: Option<String>,
132 pub cusip: Option<String>,
134 pub exchange: Option<String>,
136 pub rating_change: Option<String>,
138 pub outputsize: Option<i64>
140}
141
142impl GetAnalystRatingsUsEquitiesParams {
143 pub fn builder() -> GetAnalystRatingsUsEquitiesParamsBuilder {
145 GetAnalystRatingsUsEquitiesParamsBuilder::default()
146 }
147}
148
149#[derive(Clone, Debug, Default)]
151pub struct GetAnalystRatingsUsEquitiesParamsBuilder {
152 symbol: Option<String>,
154 figi: Option<String>,
156 isin: Option<String>,
158 cusip: Option<String>,
160 exchange: Option<String>,
162 rating_change: Option<String>,
164 outputsize: Option<i64>
166}
167
168impl GetAnalystRatingsUsEquitiesParamsBuilder {
169 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
171 self.symbol = Some(symbol.into());
172 self
173 }
174 pub fn figi(mut self, figi: impl Into<String>) -> Self {
176 self.figi = Some(figi.into());
177 self
178 }
179 pub fn isin(mut self, isin: impl Into<String>) -> Self {
181 self.isin = Some(isin.into());
182 self
183 }
184 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
186 self.cusip = Some(cusip.into());
187 self
188 }
189 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
191 self.exchange = Some(exchange.into());
192 self
193 }
194 pub fn rating_change(mut self, rating_change: impl Into<String>) -> Self {
196 self.rating_change = Some(rating_change.into());
197 self
198 }
199 pub fn outputsize(mut self, outputsize: i64) -> Self {
201 self.outputsize = Some(outputsize);
202 self
203 }
204
205 pub fn build(self) -> GetAnalystRatingsUsEquitiesParams {
207 GetAnalystRatingsUsEquitiesParams {
208 symbol: self.symbol,
209 figi: self.figi,
210 isin: self.isin,
211 cusip: self.cusip,
212 exchange: self.exchange,
213 rating_change: self.rating_change,
214 outputsize: self.outputsize
215 }
216 }
217}
218
219#[derive(Clone, Debug, Default, Serialize, Deserialize)]
221pub struct GetEarningsEstimateParams {
222 pub symbol: Option<String>,
224 pub figi: Option<String>,
226 pub isin: Option<String>,
228 pub cusip: Option<String>,
230 pub country: Option<String>,
232 pub exchange: Option<String>
234}
235
236impl GetEarningsEstimateParams {
237 pub fn builder() -> GetEarningsEstimateParamsBuilder {
239 GetEarningsEstimateParamsBuilder::default()
240 }
241}
242
243#[derive(Clone, Debug, Default)]
245pub struct GetEarningsEstimateParamsBuilder {
246 symbol: Option<String>,
248 figi: Option<String>,
250 isin: Option<String>,
252 cusip: Option<String>,
254 country: Option<String>,
256 exchange: Option<String>
258}
259
260impl GetEarningsEstimateParamsBuilder {
261 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
263 self.symbol = Some(symbol.into());
264 self
265 }
266 pub fn figi(mut self, figi: impl Into<String>) -> Self {
268 self.figi = Some(figi.into());
269 self
270 }
271 pub fn isin(mut self, isin: impl Into<String>) -> Self {
273 self.isin = Some(isin.into());
274 self
275 }
276 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
278 self.cusip = Some(cusip.into());
279 self
280 }
281 pub fn country(mut self, country: impl Into<String>) -> Self {
283 self.country = Some(country.into());
284 self
285 }
286 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
288 self.exchange = Some(exchange.into());
289 self
290 }
291
292 pub fn build(self) -> GetEarningsEstimateParams {
294 GetEarningsEstimateParams {
295 symbol: self.symbol,
296 figi: self.figi,
297 isin: self.isin,
298 cusip: self.cusip,
299 country: self.country,
300 exchange: self.exchange
301 }
302 }
303}
304
305#[derive(Clone, Debug, Default, Serialize, Deserialize)]
307pub struct GetEdgarFilingsArchiveParams {
308 pub symbol: Option<String>,
310 pub figi: Option<String>,
312 pub isin: Option<String>,
314 pub cusip: Option<String>,
316 pub exchange: Option<String>,
318 pub mic_code: Option<String>,
320 pub country: Option<String>,
322 pub form_type: Option<String>,
324 pub filled_from: Option<String>,
326 pub filled_to: Option<String>,
328 pub page: Option<i64>,
330 pub page_size: Option<i64>
332}
333
334impl GetEdgarFilingsArchiveParams {
335 pub fn builder() -> GetEdgarFilingsArchiveParamsBuilder {
337 GetEdgarFilingsArchiveParamsBuilder::default()
338 }
339}
340
341#[derive(Clone, Debug, Default)]
343pub struct GetEdgarFilingsArchiveParamsBuilder {
344 symbol: Option<String>,
346 figi: Option<String>,
348 isin: Option<String>,
350 cusip: Option<String>,
352 exchange: Option<String>,
354 mic_code: Option<String>,
356 country: Option<String>,
358 form_type: Option<String>,
360 filled_from: Option<String>,
362 filled_to: Option<String>,
364 page: Option<i64>,
366 page_size: Option<i64>
368}
369
370impl GetEdgarFilingsArchiveParamsBuilder {
371 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
373 self.symbol = Some(symbol.into());
374 self
375 }
376 pub fn figi(mut self, figi: impl Into<String>) -> Self {
378 self.figi = Some(figi.into());
379 self
380 }
381 pub fn isin(mut self, isin: impl Into<String>) -> Self {
383 self.isin = Some(isin.into());
384 self
385 }
386 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
388 self.cusip = Some(cusip.into());
389 self
390 }
391 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
393 self.exchange = Some(exchange.into());
394 self
395 }
396 pub fn mic_code(mut self, mic_code: impl Into<String>) -> Self {
398 self.mic_code = Some(mic_code.into());
399 self
400 }
401 pub fn country(mut self, country: impl Into<String>) -> Self {
403 self.country = Some(country.into());
404 self
405 }
406 pub fn form_type(mut self, form_type: impl Into<String>) -> Self {
408 self.form_type = Some(form_type.into());
409 self
410 }
411 pub fn filled_from(mut self, filled_from: impl Into<String>) -> Self {
413 self.filled_from = Some(filled_from.into());
414 self
415 }
416 pub fn filled_to(mut self, filled_to: impl Into<String>) -> Self {
418 self.filled_to = Some(filled_to.into());
419 self
420 }
421 pub fn page(mut self, page: i64) -> Self {
423 self.page = Some(page);
424 self
425 }
426 pub fn page_size(mut self, page_size: i64) -> Self {
428 self.page_size = Some(page_size);
429 self
430 }
431
432 pub fn build(self) -> GetEdgarFilingsArchiveParams {
434 GetEdgarFilingsArchiveParams {
435 symbol: self.symbol,
436 figi: self.figi,
437 isin: self.isin,
438 cusip: self.cusip,
439 exchange: self.exchange,
440 mic_code: self.mic_code,
441 country: self.country,
442 form_type: self.form_type,
443 filled_from: self.filled_from,
444 filled_to: self.filled_to,
445 page: self.page,
446 page_size: self.page_size
447 }
448 }
449}
450
451#[derive(Clone, Debug, Default, Serialize, Deserialize)]
453pub struct GetEpsRevisionsParams {
454 pub symbol: Option<String>,
456 pub figi: Option<String>,
458 pub isin: Option<String>,
460 pub cusip: Option<String>,
462 pub country: Option<String>,
464 pub exchange: Option<String>
466}
467
468impl GetEpsRevisionsParams {
469 pub fn builder() -> GetEpsRevisionsParamsBuilder {
471 GetEpsRevisionsParamsBuilder::default()
472 }
473}
474
475#[derive(Clone, Debug, Default)]
477pub struct GetEpsRevisionsParamsBuilder {
478 symbol: Option<String>,
480 figi: Option<String>,
482 isin: Option<String>,
484 cusip: Option<String>,
486 country: Option<String>,
488 exchange: Option<String>
490}
491
492impl GetEpsRevisionsParamsBuilder {
493 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
495 self.symbol = Some(symbol.into());
496 self
497 }
498 pub fn figi(mut self, figi: impl Into<String>) -> Self {
500 self.figi = Some(figi.into());
501 self
502 }
503 pub fn isin(mut self, isin: impl Into<String>) -> Self {
505 self.isin = Some(isin.into());
506 self
507 }
508 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
510 self.cusip = Some(cusip.into());
511 self
512 }
513 pub fn country(mut self, country: impl Into<String>) -> Self {
515 self.country = Some(country.into());
516 self
517 }
518 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
520 self.exchange = Some(exchange.into());
521 self
522 }
523
524 pub fn build(self) -> GetEpsRevisionsParams {
526 GetEpsRevisionsParams {
527 symbol: self.symbol,
528 figi: self.figi,
529 isin: self.isin,
530 cusip: self.cusip,
531 country: self.country,
532 exchange: self.exchange
533 }
534 }
535}
536
537#[derive(Clone, Debug, Default, Serialize, Deserialize)]
539pub struct GetEpsTrendParams {
540 pub symbol: Option<String>,
542 pub figi: Option<String>,
544 pub isin: Option<String>,
546 pub cusip: Option<String>,
548 pub country: Option<String>,
550 pub exchange: Option<String>
552}
553
554impl GetEpsTrendParams {
555 pub fn builder() -> GetEpsTrendParamsBuilder {
557 GetEpsTrendParamsBuilder::default()
558 }
559}
560
561#[derive(Clone, Debug, Default)]
563pub struct GetEpsTrendParamsBuilder {
564 symbol: Option<String>,
566 figi: Option<String>,
568 isin: Option<String>,
570 cusip: Option<String>,
572 country: Option<String>,
574 exchange: Option<String>
576}
577
578impl GetEpsTrendParamsBuilder {
579 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
581 self.symbol = Some(symbol.into());
582 self
583 }
584 pub fn figi(mut self, figi: impl Into<String>) -> Self {
586 self.figi = Some(figi.into());
587 self
588 }
589 pub fn isin(mut self, isin: impl Into<String>) -> Self {
591 self.isin = Some(isin.into());
592 self
593 }
594 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
596 self.cusip = Some(cusip.into());
597 self
598 }
599 pub fn country(mut self, country: impl Into<String>) -> Self {
601 self.country = Some(country.into());
602 self
603 }
604 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
606 self.exchange = Some(exchange.into());
607 self
608 }
609
610 pub fn build(self) -> GetEpsTrendParams {
612 GetEpsTrendParams {
613 symbol: self.symbol,
614 figi: self.figi,
615 isin: self.isin,
616 cusip: self.cusip,
617 country: self.country,
618 exchange: self.exchange
619 }
620 }
621}
622
623#[derive(Clone, Debug, Default, Serialize, Deserialize)]
625pub struct GetGrowthEstimatesParams {
626 pub symbol: Option<String>,
628 pub figi: Option<String>,
630 pub isin: Option<String>,
632 pub cusip: Option<String>,
634 pub country: Option<String>,
636 pub exchange: Option<String>
638}
639
640impl GetGrowthEstimatesParams {
641 pub fn builder() -> GetGrowthEstimatesParamsBuilder {
643 GetGrowthEstimatesParamsBuilder::default()
644 }
645}
646
647#[derive(Clone, Debug, Default)]
649pub struct GetGrowthEstimatesParamsBuilder {
650 symbol: Option<String>,
652 figi: Option<String>,
654 isin: Option<String>,
656 cusip: Option<String>,
658 country: Option<String>,
660 exchange: Option<String>
662}
663
664impl GetGrowthEstimatesParamsBuilder {
665 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
667 self.symbol = Some(symbol.into());
668 self
669 }
670 pub fn figi(mut self, figi: impl Into<String>) -> Self {
672 self.figi = Some(figi.into());
673 self
674 }
675 pub fn isin(mut self, isin: impl Into<String>) -> Self {
677 self.isin = Some(isin.into());
678 self
679 }
680 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
682 self.cusip = Some(cusip.into());
683 self
684 }
685 pub fn country(mut self, country: impl Into<String>) -> Self {
687 self.country = Some(country.into());
688 self
689 }
690 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
692 self.exchange = Some(exchange.into());
693 self
694 }
695
696 pub fn build(self) -> GetGrowthEstimatesParams {
698 GetGrowthEstimatesParams {
699 symbol: self.symbol,
700 figi: self.figi,
701 isin: self.isin,
702 cusip: self.cusip,
703 country: self.country,
704 exchange: self.exchange
705 }
706 }
707}
708
709#[derive(Clone, Debug, Default, Serialize, Deserialize)]
711pub struct GetPriceTargetParams {
712 pub symbol: Option<String>,
714 pub figi: Option<String>,
716 pub isin: Option<String>,
718 pub cusip: Option<String>,
720 pub country: Option<String>,
722 pub exchange: Option<String>
724}
725
726impl GetPriceTargetParams {
727 pub fn builder() -> GetPriceTargetParamsBuilder {
729 GetPriceTargetParamsBuilder::default()
730 }
731}
732
733#[derive(Clone, Debug, Default)]
735pub struct GetPriceTargetParamsBuilder {
736 symbol: Option<String>,
738 figi: Option<String>,
740 isin: Option<String>,
742 cusip: Option<String>,
744 country: Option<String>,
746 exchange: Option<String>
748}
749
750impl GetPriceTargetParamsBuilder {
751 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
753 self.symbol = Some(symbol.into());
754 self
755 }
756 pub fn figi(mut self, figi: impl Into<String>) -> Self {
758 self.figi = Some(figi.into());
759 self
760 }
761 pub fn isin(mut self, isin: impl Into<String>) -> Self {
763 self.isin = Some(isin.into());
764 self
765 }
766 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
768 self.cusip = Some(cusip.into());
769 self
770 }
771 pub fn country(mut self, country: impl Into<String>) -> Self {
773 self.country = Some(country.into());
774 self
775 }
776 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
778 self.exchange = Some(exchange.into());
779 self
780 }
781
782 pub fn build(self) -> GetPriceTargetParams {
784 GetPriceTargetParams {
785 symbol: self.symbol,
786 figi: self.figi,
787 isin: self.isin,
788 cusip: self.cusip,
789 country: self.country,
790 exchange: self.exchange
791 }
792 }
793}
794
795#[derive(Clone, Debug, Default, Serialize, Deserialize)]
797pub struct GetRecommendationsParams {
798 pub symbol: Option<String>,
800 pub figi: Option<String>,
802 pub isin: Option<String>,
804 pub cusip: Option<String>,
806 pub country: Option<String>,
808 pub exchange: Option<String>
810}
811
812impl GetRecommendationsParams {
813 pub fn builder() -> GetRecommendationsParamsBuilder {
815 GetRecommendationsParamsBuilder::default()
816 }
817}
818
819#[derive(Clone, Debug, Default)]
821pub struct GetRecommendationsParamsBuilder {
822 symbol: Option<String>,
824 figi: Option<String>,
826 isin: Option<String>,
828 cusip: Option<String>,
830 country: Option<String>,
832 exchange: Option<String>
834}
835
836impl GetRecommendationsParamsBuilder {
837 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
839 self.symbol = Some(symbol.into());
840 self
841 }
842 pub fn figi(mut self, figi: impl Into<String>) -> Self {
844 self.figi = Some(figi.into());
845 self
846 }
847 pub fn isin(mut self, isin: impl Into<String>) -> Self {
849 self.isin = Some(isin.into());
850 self
851 }
852 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
854 self.cusip = Some(cusip.into());
855 self
856 }
857 pub fn country(mut self, country: impl Into<String>) -> Self {
859 self.country = Some(country.into());
860 self
861 }
862 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
864 self.exchange = Some(exchange.into());
865 self
866 }
867
868 pub fn build(self) -> GetRecommendationsParams {
870 GetRecommendationsParams {
871 symbol: self.symbol,
872 figi: self.figi,
873 isin: self.isin,
874 cusip: self.cusip,
875 country: self.country,
876 exchange: self.exchange
877 }
878 }
879}
880
881#[derive(Clone, Debug, Default, Serialize, Deserialize)]
883pub struct GetRevenueEstimateParams {
884 pub symbol: Option<String>,
886 pub figi: Option<String>,
888 pub isin: Option<String>,
890 pub cusip: Option<String>,
892 pub country: Option<String>,
894 pub exchange: Option<String>,
896 pub dp: Option<i64>
898}
899
900impl GetRevenueEstimateParams {
901 pub fn builder() -> GetRevenueEstimateParamsBuilder {
903 GetRevenueEstimateParamsBuilder::default()
904 }
905}
906
907#[derive(Clone, Debug, Default)]
909pub struct GetRevenueEstimateParamsBuilder {
910 symbol: Option<String>,
912 figi: Option<String>,
914 isin: Option<String>,
916 cusip: Option<String>,
918 country: Option<String>,
920 exchange: Option<String>,
922 dp: Option<i64>
924}
925
926impl GetRevenueEstimateParamsBuilder {
927 pub fn symbol(mut self, symbol: impl Into<String>) -> Self {
929 self.symbol = Some(symbol.into());
930 self
931 }
932 pub fn figi(mut self, figi: impl Into<String>) -> Self {
934 self.figi = Some(figi.into());
935 self
936 }
937 pub fn isin(mut self, isin: impl Into<String>) -> Self {
939 self.isin = Some(isin.into());
940 self
941 }
942 pub fn cusip(mut self, cusip: impl Into<String>) -> Self {
944 self.cusip = Some(cusip.into());
945 self
946 }
947 pub fn country(mut self, country: impl Into<String>) -> Self {
949 self.country = Some(country.into());
950 self
951 }
952 pub fn exchange(mut self, exchange: impl Into<String>) -> Self {
954 self.exchange = Some(exchange.into());
955 self
956 }
957 pub fn dp(mut self, dp: i64) -> Self {
959 self.dp = Some(dp);
960 self
961 }
962
963 pub fn build(self) -> GetRevenueEstimateParams {
965 GetRevenueEstimateParams {
966 symbol: self.symbol,
967 figi: self.figi,
968 isin: self.isin,
969 cusip: self.cusip,
970 country: self.country,
971 exchange: self.exchange,
972 dp: self.dp
973 }
974 }
975}
976
977
978#[derive(Debug, Clone, Serialize, Deserialize)]
980#[serde(untagged)]
981pub enum GetAnalystRatingsLightError {
982 UnknownValue(serde_json::Value),
983}
984
985#[derive(Debug, Clone, Serialize, Deserialize)]
987#[serde(untagged)]
988pub enum GetAnalystRatingsUsEquitiesError {
989 UnknownValue(serde_json::Value),
990}
991
992#[derive(Debug, Clone, Serialize, Deserialize)]
994#[serde(untagged)]
995pub enum GetEarningsEstimateError {
996 UnknownValue(serde_json::Value),
997}
998
999#[derive(Debug, Clone, Serialize, Deserialize)]
1001#[serde(untagged)]
1002pub enum GetEdgarFilingsArchiveError {
1003 UnknownValue(serde_json::Value),
1004}
1005
1006#[derive(Debug, Clone, Serialize, Deserialize)]
1008#[serde(untagged)]
1009pub enum GetEpsRevisionsError {
1010 UnknownValue(serde_json::Value),
1011}
1012
1013#[derive(Debug, Clone, Serialize, Deserialize)]
1015#[serde(untagged)]
1016pub enum GetEpsTrendError {
1017 UnknownValue(serde_json::Value),
1018}
1019
1020#[derive(Debug, Clone, Serialize, Deserialize)]
1022#[serde(untagged)]
1023pub enum GetGrowthEstimatesError {
1024 UnknownValue(serde_json::Value),
1025}
1026
1027#[derive(Debug, Clone, Serialize, Deserialize)]
1029#[serde(untagged)]
1030pub enum GetPriceTargetError {
1031 UnknownValue(serde_json::Value),
1032}
1033
1034#[derive(Debug, Clone, Serialize, Deserialize)]
1036#[serde(untagged)]
1037pub enum GetRecommendationsError {
1038 UnknownValue(serde_json::Value),
1039}
1040
1041#[derive(Debug, Clone, Serialize, Deserialize)]
1043#[serde(untagged)]
1044pub enum GetRevenueEstimateError {
1045 UnknownValue(serde_json::Value),
1046}
1047
1048
1049pub async fn get_analyst_ratings_light(configuration: &configuration::Configuration, params: GetAnalystRatingsLightParams) -> Result<models::GetAnalystRatingsLight200Response, Error<GetAnalystRatingsLightError>> {
1051 let p_query_symbol = params.symbol;
1053 let p_query_figi = params.figi;
1054 let p_query_isin = params.isin;
1055 let p_query_cusip = params.cusip;
1056 let p_query_exchange = params.exchange;
1057 let p_query_rating_change = params.rating_change;
1058 let p_query_outputsize = params.outputsize;
1059 let p_query_country = params.country;
1060
1061 let uri_str = format!("{}/analyst_ratings/light", configuration.base_path);
1062 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1063
1064 if let Some(ref param_value) = p_query_symbol {
1065 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
1066 }
1067 if let Some(ref param_value) = p_query_figi {
1068 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
1069 }
1070 if let Some(ref param_value) = p_query_isin {
1071 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
1072 }
1073 if let Some(ref param_value) = p_query_cusip {
1074 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
1075 }
1076 if let Some(ref param_value) = p_query_exchange {
1077 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
1078 }
1079 if let Some(ref param_value) = p_query_rating_change {
1080 req_builder = req_builder.query(&[("rating_change", &serde_json::to_string(param_value)?)]);
1081 }
1082 if let Some(ref param_value) = p_query_outputsize {
1083 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
1084 }
1085 if let Some(ref param_value) = p_query_country {
1086 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
1087 }
1088 if let Some(ref user_agent) = configuration.user_agent {
1089 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1090 }
1091 if let Some(ref apikey) = configuration.api_key {
1092 let key = apikey.key.clone();
1093 let value = match apikey.prefix {
1094 Some(ref prefix) => format!("{} {}", prefix, key),
1095 None => key,
1096 };
1097 req_builder = req_builder.header("Authorization", value);
1098 };
1099
1100 let req = req_builder.build()?;
1101 let resp = configuration.client.execute(req).await?;
1102
1103 let status = resp.status();
1104 let content_type = resp
1105 .headers()
1106 .get("content-type")
1107 .and_then(|v| v.to_str().ok())
1108 .unwrap_or("application/octet-stream");
1109 let content_type = super::ContentType::from(content_type);
1110
1111 if !status.is_client_error() && !status.is_server_error() {
1112 let content = resp.text().await?;
1113 match content_type {
1114 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1115 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetAnalystRatingsLight200Response`"))),
1116 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::GetAnalystRatingsLight200Response`")))),
1117 }
1118 } else {
1119 let content = resp.text().await?;
1120 let entity: Option<GetAnalystRatingsLightError> = serde_json::from_str(&content).ok();
1121 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1122 }
1123}
1124
1125pub async fn get_analyst_ratings_us_equities(configuration: &configuration::Configuration, params: GetAnalystRatingsUsEquitiesParams) -> Result<models::GetAnalystRatingsUsEquities200Response, Error<GetAnalystRatingsUsEquitiesError>> {
1127 let p_query_symbol = params.symbol;
1129 let p_query_figi = params.figi;
1130 let p_query_isin = params.isin;
1131 let p_query_cusip = params.cusip;
1132 let p_query_exchange = params.exchange;
1133 let p_query_rating_change = params.rating_change;
1134 let p_query_outputsize = params.outputsize;
1135
1136 let uri_str = format!("{}/analyst_ratings/us_equities", configuration.base_path);
1137 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1138
1139 if let Some(ref param_value) = p_query_symbol {
1140 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
1141 }
1142 if let Some(ref param_value) = p_query_figi {
1143 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
1144 }
1145 if let Some(ref param_value) = p_query_isin {
1146 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
1147 }
1148 if let Some(ref param_value) = p_query_cusip {
1149 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
1150 }
1151 if let Some(ref param_value) = p_query_exchange {
1152 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
1153 }
1154 if let Some(ref param_value) = p_query_rating_change {
1155 req_builder = req_builder.query(&[("rating_change", &serde_json::to_string(param_value)?)]);
1156 }
1157 if let Some(ref param_value) = p_query_outputsize {
1158 req_builder = req_builder.query(&[("outputsize", ¶m_value.to_string())]);
1159 }
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(ref apikey) = configuration.api_key {
1164 let key = apikey.key.clone();
1165 let value = match apikey.prefix {
1166 Some(ref prefix) => format!("{} {}", prefix, key),
1167 None => key,
1168 };
1169 req_builder = req_builder.header("Authorization", value);
1170 };
1171
1172 let req = req_builder.build()?;
1173 let resp = configuration.client.execute(req).await?;
1174
1175 let status = resp.status();
1176 let content_type = resp
1177 .headers()
1178 .get("content-type")
1179 .and_then(|v| v.to_str().ok())
1180 .unwrap_or("application/octet-stream");
1181 let content_type = super::ContentType::from(content_type);
1182
1183 if !status.is_client_error() && !status.is_server_error() {
1184 let content = resp.text().await?;
1185 match content_type {
1186 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1187 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetAnalystRatingsUsEquities200Response`"))),
1188 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::GetAnalystRatingsUsEquities200Response`")))),
1189 }
1190 } else {
1191 let content = resp.text().await?;
1192 let entity: Option<GetAnalystRatingsUsEquitiesError> = serde_json::from_str(&content).ok();
1193 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1194 }
1195}
1196
1197pub async fn get_earnings_estimate(configuration: &configuration::Configuration, params: GetEarningsEstimateParams) -> Result<models::GetEarningsEstimate200Response, Error<GetEarningsEstimateError>> {
1199 let p_query_symbol = params.symbol;
1201 let p_query_figi = params.figi;
1202 let p_query_isin = params.isin;
1203 let p_query_cusip = params.cusip;
1204 let p_query_country = params.country;
1205 let p_query_exchange = params.exchange;
1206
1207 let uri_str = format!("{}/earnings_estimate", configuration.base_path);
1208 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1209
1210 if let Some(ref param_value) = p_query_symbol {
1211 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
1212 }
1213 if let Some(ref param_value) = p_query_figi {
1214 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
1215 }
1216 if let Some(ref param_value) = p_query_isin {
1217 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
1218 }
1219 if let Some(ref param_value) = p_query_cusip {
1220 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
1221 }
1222 if let Some(ref param_value) = p_query_country {
1223 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
1224 }
1225 if let Some(ref param_value) = p_query_exchange {
1226 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
1227 }
1228 if let Some(ref user_agent) = configuration.user_agent {
1229 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1230 }
1231 if let Some(ref apikey) = configuration.api_key {
1232 let key = apikey.key.clone();
1233 let value = match apikey.prefix {
1234 Some(ref prefix) => format!("{} {}", prefix, key),
1235 None => key,
1236 };
1237 req_builder = req_builder.header("Authorization", value);
1238 };
1239
1240 let req = req_builder.build()?;
1241 let resp = configuration.client.execute(req).await?;
1242
1243 let status = resp.status();
1244 let content_type = resp
1245 .headers()
1246 .get("content-type")
1247 .and_then(|v| v.to_str().ok())
1248 .unwrap_or("application/octet-stream");
1249 let content_type = super::ContentType::from(content_type);
1250
1251 if !status.is_client_error() && !status.is_server_error() {
1252 let content = resp.text().await?;
1253 match content_type {
1254 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1255 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetEarningsEstimate200Response`"))),
1256 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::GetEarningsEstimate200Response`")))),
1257 }
1258 } else {
1259 let content = resp.text().await?;
1260 let entity: Option<GetEarningsEstimateError> = serde_json::from_str(&content).ok();
1261 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1262 }
1263}
1264
1265pub async fn get_edgar_filings_archive(configuration: &configuration::Configuration, params: GetEdgarFilingsArchiveParams) -> Result<models::GetEdgarFilingsArchive200Response, Error<GetEdgarFilingsArchiveError>> {
1267 let p_query_symbol = params.symbol;
1269 let p_query_figi = params.figi;
1270 let p_query_isin = params.isin;
1271 let p_query_cusip = params.cusip;
1272 let p_query_exchange = params.exchange;
1273 let p_query_mic_code = params.mic_code;
1274 let p_query_country = params.country;
1275 let p_query_form_type = params.form_type;
1276 let p_query_filled_from = params.filled_from;
1277 let p_query_filled_to = params.filled_to;
1278 let p_query_page = params.page;
1279 let p_query_page_size = params.page_size;
1280
1281 let uri_str = format!("{}/edgar_filings/archive", configuration.base_path);
1282 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1283
1284 if let Some(ref param_value) = p_query_symbol {
1285 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
1286 }
1287 if let Some(ref param_value) = p_query_figi {
1288 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
1289 }
1290 if let Some(ref param_value) = p_query_isin {
1291 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
1292 }
1293 if let Some(ref param_value) = p_query_cusip {
1294 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
1295 }
1296 if let Some(ref param_value) = p_query_exchange {
1297 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
1298 }
1299 if let Some(ref param_value) = p_query_mic_code {
1300 req_builder = req_builder.query(&[("mic_code", ¶m_value.to_string())]);
1301 }
1302 if let Some(ref param_value) = p_query_country {
1303 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
1304 }
1305 if let Some(ref param_value) = p_query_form_type {
1306 req_builder = req_builder.query(&[("form_type", ¶m_value.to_string())]);
1307 }
1308 if let Some(ref param_value) = p_query_filled_from {
1309 req_builder = req_builder.query(&[("filled_from", ¶m_value.to_string())]);
1310 }
1311 if let Some(ref param_value) = p_query_filled_to {
1312 req_builder = req_builder.query(&[("filled_to", ¶m_value.to_string())]);
1313 }
1314 if let Some(ref param_value) = p_query_page {
1315 req_builder = req_builder.query(&[("page", ¶m_value.to_string())]);
1316 }
1317 if let Some(ref param_value) = p_query_page_size {
1318 req_builder = req_builder.query(&[("page_size", ¶m_value.to_string())]);
1319 }
1320 if let Some(ref user_agent) = configuration.user_agent {
1321 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1322 }
1323 if let Some(ref apikey) = configuration.api_key {
1324 let key = apikey.key.clone();
1325 let value = match apikey.prefix {
1326 Some(ref prefix) => format!("{} {}", prefix, key),
1327 None => key,
1328 };
1329 req_builder = req_builder.header("Authorization", value);
1330 };
1331
1332 let req = req_builder.build()?;
1333 let resp = configuration.client.execute(req).await?;
1334
1335 let status = resp.status();
1336 let content_type = resp
1337 .headers()
1338 .get("content-type")
1339 .and_then(|v| v.to_str().ok())
1340 .unwrap_or("application/octet-stream");
1341 let content_type = super::ContentType::from(content_type);
1342
1343 if !status.is_client_error() && !status.is_server_error() {
1344 let content = resp.text().await?;
1345 match content_type {
1346 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1347 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetEdgarFilingsArchive200Response`"))),
1348 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::GetEdgarFilingsArchive200Response`")))),
1349 }
1350 } else {
1351 let content = resp.text().await?;
1352 let entity: Option<GetEdgarFilingsArchiveError> = serde_json::from_str(&content).ok();
1353 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1354 }
1355}
1356
1357pub async fn get_eps_revisions(configuration: &configuration::Configuration, params: GetEpsRevisionsParams) -> Result<models::GetEpsRevisions200Response, Error<GetEpsRevisionsError>> {
1359 let p_query_symbol = params.symbol;
1361 let p_query_figi = params.figi;
1362 let p_query_isin = params.isin;
1363 let p_query_cusip = params.cusip;
1364 let p_query_country = params.country;
1365 let p_query_exchange = params.exchange;
1366
1367 let uri_str = format!("{}/eps_revisions", configuration.base_path);
1368 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1369
1370 if let Some(ref param_value) = p_query_symbol {
1371 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
1372 }
1373 if let Some(ref param_value) = p_query_figi {
1374 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
1375 }
1376 if let Some(ref param_value) = p_query_isin {
1377 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
1378 }
1379 if let Some(ref param_value) = p_query_cusip {
1380 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
1381 }
1382 if let Some(ref param_value) = p_query_country {
1383 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
1384 }
1385 if let Some(ref param_value) = p_query_exchange {
1386 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
1387 }
1388 if let Some(ref user_agent) = configuration.user_agent {
1389 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1390 }
1391 if let Some(ref apikey) = configuration.api_key {
1392 let key = apikey.key.clone();
1393 let value = match apikey.prefix {
1394 Some(ref prefix) => format!("{} {}", prefix, key),
1395 None => key,
1396 };
1397 req_builder = req_builder.header("Authorization", value);
1398 };
1399
1400 let req = req_builder.build()?;
1401 let resp = configuration.client.execute(req).await?;
1402
1403 let status = resp.status();
1404 let content_type = resp
1405 .headers()
1406 .get("content-type")
1407 .and_then(|v| v.to_str().ok())
1408 .unwrap_or("application/octet-stream");
1409 let content_type = super::ContentType::from(content_type);
1410
1411 if !status.is_client_error() && !status.is_server_error() {
1412 let content = resp.text().await?;
1413 match content_type {
1414 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1415 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetEpsRevisions200Response`"))),
1416 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::GetEpsRevisions200Response`")))),
1417 }
1418 } else {
1419 let content = resp.text().await?;
1420 let entity: Option<GetEpsRevisionsError> = serde_json::from_str(&content).ok();
1421 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1422 }
1423}
1424
1425pub async fn get_eps_trend(configuration: &configuration::Configuration, params: GetEpsTrendParams) -> Result<models::GetEpsTrend200Response, Error<GetEpsTrendError>> {
1427 let p_query_symbol = params.symbol;
1429 let p_query_figi = params.figi;
1430 let p_query_isin = params.isin;
1431 let p_query_cusip = params.cusip;
1432 let p_query_country = params.country;
1433 let p_query_exchange = params.exchange;
1434
1435 let uri_str = format!("{}/eps_trend", configuration.base_path);
1436 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1437
1438 if let Some(ref param_value) = p_query_symbol {
1439 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
1440 }
1441 if let Some(ref param_value) = p_query_figi {
1442 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
1443 }
1444 if let Some(ref param_value) = p_query_isin {
1445 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
1446 }
1447 if let Some(ref param_value) = p_query_cusip {
1448 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
1449 }
1450 if let Some(ref param_value) = p_query_country {
1451 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
1452 }
1453 if let Some(ref param_value) = p_query_exchange {
1454 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
1455 }
1456 if let Some(ref user_agent) = configuration.user_agent {
1457 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1458 }
1459 if let Some(ref apikey) = configuration.api_key {
1460 let key = apikey.key.clone();
1461 let value = match apikey.prefix {
1462 Some(ref prefix) => format!("{} {}", prefix, key),
1463 None => key,
1464 };
1465 req_builder = req_builder.header("Authorization", value);
1466 };
1467
1468 let req = req_builder.build()?;
1469 let resp = configuration.client.execute(req).await?;
1470
1471 let status = resp.status();
1472 let content_type = resp
1473 .headers()
1474 .get("content-type")
1475 .and_then(|v| v.to_str().ok())
1476 .unwrap_or("application/octet-stream");
1477 let content_type = super::ContentType::from(content_type);
1478
1479 if !status.is_client_error() && !status.is_server_error() {
1480 let content = resp.text().await?;
1481 match content_type {
1482 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1483 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetEpsTrend200Response`"))),
1484 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::GetEpsTrend200Response`")))),
1485 }
1486 } else {
1487 let content = resp.text().await?;
1488 let entity: Option<GetEpsTrendError> = serde_json::from_str(&content).ok();
1489 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1490 }
1491}
1492
1493pub async fn get_growth_estimates(configuration: &configuration::Configuration, params: GetGrowthEstimatesParams) -> Result<models::GetGrowthEstimates200Response, Error<GetGrowthEstimatesError>> {
1495 let p_query_symbol = params.symbol;
1497 let p_query_figi = params.figi;
1498 let p_query_isin = params.isin;
1499 let p_query_cusip = params.cusip;
1500 let p_query_country = params.country;
1501 let p_query_exchange = params.exchange;
1502
1503 let uri_str = format!("{}/growth_estimates", configuration.base_path);
1504 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1505
1506 if let Some(ref param_value) = p_query_symbol {
1507 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
1508 }
1509 if let Some(ref param_value) = p_query_figi {
1510 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
1511 }
1512 if let Some(ref param_value) = p_query_isin {
1513 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
1514 }
1515 if let Some(ref param_value) = p_query_cusip {
1516 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
1517 }
1518 if let Some(ref param_value) = p_query_country {
1519 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
1520 }
1521 if let Some(ref param_value) = p_query_exchange {
1522 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
1523 }
1524 if let Some(ref user_agent) = configuration.user_agent {
1525 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1526 }
1527 if let Some(ref apikey) = configuration.api_key {
1528 let key = apikey.key.clone();
1529 let value = match apikey.prefix {
1530 Some(ref prefix) => format!("{} {}", prefix, key),
1531 None => key,
1532 };
1533 req_builder = req_builder.header("Authorization", value);
1534 };
1535
1536 let req = req_builder.build()?;
1537 let resp = configuration.client.execute(req).await?;
1538
1539 let status = resp.status();
1540 let content_type = resp
1541 .headers()
1542 .get("content-type")
1543 .and_then(|v| v.to_str().ok())
1544 .unwrap_or("application/octet-stream");
1545 let content_type = super::ContentType::from(content_type);
1546
1547 if !status.is_client_error() && !status.is_server_error() {
1548 let content = resp.text().await?;
1549 match content_type {
1550 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1551 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetGrowthEstimates200Response`"))),
1552 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::GetGrowthEstimates200Response`")))),
1553 }
1554 } else {
1555 let content = resp.text().await?;
1556 let entity: Option<GetGrowthEstimatesError> = serde_json::from_str(&content).ok();
1557 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1558 }
1559}
1560
1561pub async fn get_price_target(configuration: &configuration::Configuration, params: GetPriceTargetParams) -> Result<models::GetPriceTarget200Response, Error<GetPriceTargetError>> {
1563 let p_query_symbol = params.symbol;
1565 let p_query_figi = params.figi;
1566 let p_query_isin = params.isin;
1567 let p_query_cusip = params.cusip;
1568 let p_query_country = params.country;
1569 let p_query_exchange = params.exchange;
1570
1571 let uri_str = format!("{}/price_target", configuration.base_path);
1572 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1573
1574 if let Some(ref param_value) = p_query_symbol {
1575 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
1576 }
1577 if let Some(ref param_value) = p_query_figi {
1578 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
1579 }
1580 if let Some(ref param_value) = p_query_isin {
1581 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
1582 }
1583 if let Some(ref param_value) = p_query_cusip {
1584 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
1585 }
1586 if let Some(ref param_value) = p_query_country {
1587 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
1588 }
1589 if let Some(ref param_value) = p_query_exchange {
1590 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
1591 }
1592 if let Some(ref user_agent) = configuration.user_agent {
1593 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1594 }
1595 if let Some(ref apikey) = configuration.api_key {
1596 let key = apikey.key.clone();
1597 let value = match apikey.prefix {
1598 Some(ref prefix) => format!("{} {}", prefix, key),
1599 None => key,
1600 };
1601 req_builder = req_builder.header("Authorization", value);
1602 };
1603
1604 let req = req_builder.build()?;
1605 let resp = configuration.client.execute(req).await?;
1606
1607 let status = resp.status();
1608 let content_type = resp
1609 .headers()
1610 .get("content-type")
1611 .and_then(|v| v.to_str().ok())
1612 .unwrap_or("application/octet-stream");
1613 let content_type = super::ContentType::from(content_type);
1614
1615 if !status.is_client_error() && !status.is_server_error() {
1616 let content = resp.text().await?;
1617 match content_type {
1618 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1619 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetPriceTarget200Response`"))),
1620 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::GetPriceTarget200Response`")))),
1621 }
1622 } else {
1623 let content = resp.text().await?;
1624 let entity: Option<GetPriceTargetError> = serde_json::from_str(&content).ok();
1625 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1626 }
1627}
1628
1629pub async fn get_recommendations(configuration: &configuration::Configuration, params: GetRecommendationsParams) -> Result<models::GetRecommendations200Response, Error<GetRecommendationsError>> {
1631 let p_query_symbol = params.symbol;
1633 let p_query_figi = params.figi;
1634 let p_query_isin = params.isin;
1635 let p_query_cusip = params.cusip;
1636 let p_query_country = params.country;
1637 let p_query_exchange = params.exchange;
1638
1639 let uri_str = format!("{}/recommendations", configuration.base_path);
1640 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1641
1642 if let Some(ref param_value) = p_query_symbol {
1643 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
1644 }
1645 if let Some(ref param_value) = p_query_figi {
1646 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
1647 }
1648 if let Some(ref param_value) = p_query_isin {
1649 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
1650 }
1651 if let Some(ref param_value) = p_query_cusip {
1652 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
1653 }
1654 if let Some(ref param_value) = p_query_country {
1655 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
1656 }
1657 if let Some(ref param_value) = p_query_exchange {
1658 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
1659 }
1660 if let Some(ref user_agent) = configuration.user_agent {
1661 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1662 }
1663 if let Some(ref apikey) = configuration.api_key {
1664 let key = apikey.key.clone();
1665 let value = match apikey.prefix {
1666 Some(ref prefix) => format!("{} {}", prefix, key),
1667 None => key,
1668 };
1669 req_builder = req_builder.header("Authorization", value);
1670 };
1671
1672 let req = req_builder.build()?;
1673 let resp = configuration.client.execute(req).await?;
1674
1675 let status = resp.status();
1676 let content_type = resp
1677 .headers()
1678 .get("content-type")
1679 .and_then(|v| v.to_str().ok())
1680 .unwrap_or("application/octet-stream");
1681 let content_type = super::ContentType::from(content_type);
1682
1683 if !status.is_client_error() && !status.is_server_error() {
1684 let content = resp.text().await?;
1685 match content_type {
1686 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1687 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetRecommendations200Response`"))),
1688 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::GetRecommendations200Response`")))),
1689 }
1690 } else {
1691 let content = resp.text().await?;
1692 let entity: Option<GetRecommendationsError> = serde_json::from_str(&content).ok();
1693 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1694 }
1695}
1696
1697pub async fn get_revenue_estimate(configuration: &configuration::Configuration, params: GetRevenueEstimateParams) -> Result<models::GetRevenueEstimate200Response, Error<GetRevenueEstimateError>> {
1699 let p_query_symbol = params.symbol;
1701 let p_query_figi = params.figi;
1702 let p_query_isin = params.isin;
1703 let p_query_cusip = params.cusip;
1704 let p_query_country = params.country;
1705 let p_query_exchange = params.exchange;
1706 let p_query_dp = params.dp;
1707
1708 let uri_str = format!("{}/revenue_estimate", configuration.base_path);
1709 let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str);
1710
1711 if let Some(ref param_value) = p_query_symbol {
1712 req_builder = req_builder.query(&[("symbol", ¶m_value.to_string())]);
1713 }
1714 if let Some(ref param_value) = p_query_figi {
1715 req_builder = req_builder.query(&[("figi", ¶m_value.to_string())]);
1716 }
1717 if let Some(ref param_value) = p_query_isin {
1718 req_builder = req_builder.query(&[("isin", ¶m_value.to_string())]);
1719 }
1720 if let Some(ref param_value) = p_query_cusip {
1721 req_builder = req_builder.query(&[("cusip", ¶m_value.to_string())]);
1722 }
1723 if let Some(ref param_value) = p_query_country {
1724 req_builder = req_builder.query(&[("country", ¶m_value.to_string())]);
1725 }
1726 if let Some(ref param_value) = p_query_exchange {
1727 req_builder = req_builder.query(&[("exchange", ¶m_value.to_string())]);
1728 }
1729 if let Some(ref param_value) = p_query_dp {
1730 req_builder = req_builder.query(&[("dp", ¶m_value.to_string())]);
1731 }
1732 if let Some(ref user_agent) = configuration.user_agent {
1733 req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone());
1734 }
1735 if let Some(ref apikey) = configuration.api_key {
1736 let key = apikey.key.clone();
1737 let value = match apikey.prefix {
1738 Some(ref prefix) => format!("{} {}", prefix, key),
1739 None => key,
1740 };
1741 req_builder = req_builder.header("Authorization", value);
1742 };
1743
1744 let req = req_builder.build()?;
1745 let resp = configuration.client.execute(req).await?;
1746
1747 let status = resp.status();
1748 let content_type = resp
1749 .headers()
1750 .get("content-type")
1751 .and_then(|v| v.to_str().ok())
1752 .unwrap_or("application/octet-stream");
1753 let content_type = super::ContentType::from(content_type);
1754
1755 if !status.is_client_error() && !status.is_server_error() {
1756 let content = resp.text().await?;
1757 match content_type {
1758 ContentType::Json => serde_json::from_str(&content).map_err(Error::from),
1759 ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::GetRevenueEstimate200Response`"))),
1760 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::GetRevenueEstimate200Response`")))),
1761 }
1762 } else {
1763 let content = resp.text().await?;
1764 let entity: Option<GetRevenueEstimateError> = serde_json::from_str(&content).ok();
1765 Err(Error::ResponseError(ResponseContent { status, content, entity }))
1766 }
1767}
1768