1use std::time::Duration;
7
8use reqwest::Method;
9
10use super::models::*;
11use crate::client::Client;
12use crate::errors::Error;
13use crate::options::{FetchOptions, Query, RequestOptions};
14use crate::references::{ProfileReference, Reference, ResourceReference};
15use crate::response::{Items, Page, Response};
16use crate::transport::Scope;
17
18impl Client {
19 pub fn instagram(&self) -> InstagramResource {
21 InstagramResource {
22 scope: Scope::new(self.clone()),
23 }
24 }
25
26 pub fn reddit(&self) -> RedditResource {
28 RedditResource {
29 scope: Scope::new(self.clone()),
30 }
31 }
32
33 pub fn test_data(&self) -> TestDataResource {
35 TestDataResource {
36 scope: Scope::new(self.clone()),
37 }
38 }
39
40 pub fn tiktok(&self) -> TikTokResource {
42 TikTokResource {
43 scope: Scope::new(self.clone()),
44 }
45 }
46
47 pub fn twitter(&self) -> TwitterResource {
49 TwitterResource {
50 scope: Scope::new(self.clone()),
51 }
52 }
53
54 pub fn youtube(&self) -> YouTubeResource {
56 YouTubeResource {
57 scope: Scope::new(self.clone()),
58 }
59 }
60
61 pub async fn fetch(
70 &self,
71 url: &str,
72 options: impl Into<Option<FetchOptions>>,
73 ) -> Result<FetchResponse, Error> {
74 let options = options.into().unwrap_or_default();
75 Scope::new(self.clone())
76 .fetch(url, options.freshness, options.request_options)?
77 .send_fetch()
78 .await
79 }
80}
81
82#[derive(Clone, Debug)]
86pub struct InstagramResource {
87 scope: Scope,
88}
89
90impl InstagramResource {
91 pub fn comment(&self, reference: impl Into<ResourceReference>) -> InstagramCommentResource {
97 InstagramCommentResource {
98 scope: self.scope.select(
99 "identifier",
100 "instagram",
101 "comment",
102 Reference::from(reference.into()),
103 ),
104 }
105 }
106
107 pub fn hashtag(&self, reference: impl Into<ResourceReference>) -> InstagramHashtagResource {
113 InstagramHashtagResource {
114 scope: self.scope.select(
115 "identifier",
116 "instagram",
117 "hashtag",
118 Reference::from(reference.into()),
119 ),
120 }
121 }
122
123 pub fn highlight(&self, reference: impl Into<ResourceReference>) -> InstagramHighlightResource {
129 InstagramHighlightResource {
130 scope: self.scope.select(
131 "identifier",
132 "instagram",
133 "highlight",
134 Reference::from(reference.into()),
135 ),
136 }
137 }
138
139 pub fn location(&self, reference: impl Into<ResourceReference>) -> InstagramLocationResource {
145 InstagramLocationResource {
146 scope: self.scope.select(
147 "identifier",
148 "instagram",
149 "location",
150 Reference::from(reference.into()),
151 ),
152 }
153 }
154
155 pub fn music(&self, reference: impl Into<ResourceReference>) -> InstagramMusicResource {
161 InstagramMusicResource {
162 scope: self.scope.select(
163 "identifier",
164 "instagram",
165 "music",
166 Reference::from(reference.into()),
167 ),
168 }
169 }
170
171 pub fn post(&self, reference: impl Into<ResourceReference>) -> InstagramPostResource {
177 InstagramPostResource {
178 scope: self.scope.select(
179 "identifier",
180 "instagram",
181 "post",
182 Reference::from(reference.into()),
183 ),
184 }
185 }
186
187 pub fn profile(&self, reference: impl Into<ProfileReference>) -> InstagramProfileResource {
193 InstagramProfileResource {
194 scope: self.scope.select(
195 "identifier",
196 "instagram",
197 "profile",
198 Reference::from(reference.into()),
199 ),
200 }
201 }
202
203 pub fn search(&self) -> InstagramSearchResource {
205 InstagramSearchResource {
206 scope: self.scope.clone(),
207 }
208 }
209
210 pub fn story(&self, reference: impl Into<ResourceReference>) -> InstagramStoryResource {
216 InstagramStoryResource {
217 scope: self.scope.select(
218 "identifier",
219 "instagram",
220 "story",
221 Reference::from(reference.into()),
222 ),
223 }
224 }
225}
226
227#[derive(Clone, Debug)]
231pub struct InstagramCommentResource {
232 scope: Scope,
233}
234
235impl InstagramCommentResource {
236 pub fn likers(&self) -> InstagramCommentLikersResource {
238 InstagramCommentLikersResource {
239 scope: self.scope.clone(),
240 }
241 }
242}
243
244#[derive(Clone, Debug)]
248pub struct InstagramCommentLikersResource {
249 scope: Scope,
250}
251
252impl InstagramCommentLikersResource {
253 pub async fn list(
261 &self,
262 options: InstagramCommentLikersOptions,
263 ) -> Result<InstagramCommentLikersPage, Error> {
264 self.scope
265 .operation(
266 Method::GET,
267 "/v1/instagram/comments/{identifier}/likers",
268 options.query(),
269 options.request_options,
270 )?
271 .send_page()
272 .await
273 }
274
275 pub fn items(&self, options: InstagramCommentLikersOptions) -> Items<InstagramProfileSummary> {
277 Items::new(self.scope.operation(
278 Method::GET,
279 "/v1/instagram/comments/{identifier}/likers",
280 options.query(),
281 options.request_options,
282 ))
283 }
284}
285
286#[derive(Clone, Debug)]
290pub struct InstagramHashtagResource {
291 scope: Scope,
292}
293
294impl InstagramHashtagResource {
295 pub fn posts(&self) -> InstagramHashtagPostsResource {
297 InstagramHashtagPostsResource {
298 scope: self.scope.clone(),
299 }
300 }
301
302 pub fn reels(&self) -> InstagramHashtagReelsResource {
304 InstagramHashtagReelsResource {
305 scope: self.scope.clone(),
306 }
307 }
308
309 pub async fn get(
317 &self,
318 options: impl Into<Option<InstagramHashtagOptions>>,
319 ) -> Result<InstagramHashtagResponse, Error> {
320 let options = options.into().unwrap_or_default();
321 self.scope
322 .operation(
323 Method::GET,
324 "/v1/instagram/hashtags/{identifier}",
325 options.query(),
326 options.request_options,
327 )?
328 .send()
329 .await
330 }
331}
332
333#[derive(Clone, Debug)]
337pub struct InstagramHashtagPostsResource {
338 scope: Scope,
339}
340
341impl InstagramHashtagPostsResource {
342 pub async fn list(
350 &self,
351 options: impl Into<Option<InstagramHashtagPostsOptions>>,
352 ) -> Result<InstagramHashtagPostsPage, Error> {
353 let options = options.into().unwrap_or_default();
354 self.scope
355 .operation(
356 Method::GET,
357 "/v1/instagram/hashtags/{identifier}/posts",
358 options.query(),
359 options.request_options,
360 )?
361 .send_page()
362 .await
363 }
364
365 pub fn items(
367 &self,
368 options: impl Into<Option<InstagramHashtagPostsOptions>>,
369 ) -> Items<InstagramPost> {
370 let options = options.into().unwrap_or_default();
371 Items::new(self.scope.operation(
372 Method::GET,
373 "/v1/instagram/hashtags/{identifier}/posts",
374 options.query(),
375 options.request_options,
376 ))
377 }
378}
379
380#[derive(Clone, Debug)]
384pub struct InstagramHashtagReelsResource {
385 scope: Scope,
386}
387
388impl InstagramHashtagReelsResource {
389 pub async fn list(
397 &self,
398 options: impl Into<Option<InstagramHashtagReelsOptions>>,
399 ) -> Result<InstagramHashtagReelsPage, Error> {
400 let options = options.into().unwrap_or_default();
401 self.scope
402 .operation(
403 Method::GET,
404 "/v1/instagram/hashtags/{identifier}/reels",
405 options.query(),
406 options.request_options,
407 )?
408 .send_page()
409 .await
410 }
411
412 pub fn items(
414 &self,
415 options: impl Into<Option<InstagramHashtagReelsOptions>>,
416 ) -> Items<InstagramPost> {
417 let options = options.into().unwrap_or_default();
418 Items::new(self.scope.operation(
419 Method::GET,
420 "/v1/instagram/hashtags/{identifier}/reels",
421 options.query(),
422 options.request_options,
423 ))
424 }
425}
426
427#[derive(Clone, Debug)]
431pub struct InstagramHighlightResource {
432 scope: Scope,
433}
434
435impl InstagramHighlightResource {
436 pub async fn get(
444 &self,
445 options: impl Into<Option<InstagramHighlightOptions>>,
446 ) -> Result<InstagramHighlightResponse, Error> {
447 let options = options.into().unwrap_or_default();
448 self.scope
449 .operation(
450 Method::GET,
451 "/v1/instagram/highlights/{identifier}",
452 options.query(),
453 options.request_options,
454 )?
455 .send()
456 .await
457 }
458}
459
460#[derive(Clone, Debug)]
464pub struct InstagramLocationResource {
465 scope: Scope,
466}
467
468impl InstagramLocationResource {
469 pub fn posts(&self) -> InstagramLocationPostsResource {
471 InstagramLocationPostsResource {
472 scope: self.scope.clone(),
473 }
474 }
475
476 pub async fn get(
484 &self,
485 options: impl Into<Option<InstagramLocationOptions>>,
486 ) -> Result<InstagramLocationResponse, Error> {
487 let options = options.into().unwrap_or_default();
488 self.scope
489 .operation(
490 Method::GET,
491 "/v1/instagram/locations/{identifier}",
492 options.query(),
493 options.request_options,
494 )?
495 .send()
496 .await
497 }
498}
499
500#[derive(Clone, Debug)]
504pub struct InstagramLocationPostsResource {
505 scope: Scope,
506}
507
508impl InstagramLocationPostsResource {
509 pub async fn list(
517 &self,
518 options: impl Into<Option<InstagramLocationPostsOptions>>,
519 ) -> Result<InstagramLocationPostsPage, Error> {
520 let options = options.into().unwrap_or_default();
521 self.scope
522 .operation(
523 Method::GET,
524 "/v1/instagram/locations/{identifier}/posts",
525 options.query(),
526 options.request_options,
527 )?
528 .send_page()
529 .await
530 }
531
532 pub fn items(
534 &self,
535 options: impl Into<Option<InstagramLocationPostsOptions>>,
536 ) -> Items<InstagramPost> {
537 let options = options.into().unwrap_or_default();
538 Items::new(self.scope.operation(
539 Method::GET,
540 "/v1/instagram/locations/{identifier}/posts",
541 options.query(),
542 options.request_options,
543 ))
544 }
545}
546
547#[derive(Clone, Debug)]
551pub struct InstagramMusicResource {
552 scope: Scope,
553}
554
555impl InstagramMusicResource {
556 pub fn stream(&self) -> InstagramMusicStreamResource {
558 InstagramMusicStreamResource {
559 scope: self.scope.clone(),
560 }
561 }
562
563 pub async fn get(
571 &self,
572 options: impl Into<Option<InstagramMusicOptions>>,
573 ) -> Result<InstagramMusicResponse, Error> {
574 let options = options.into().unwrap_or_default();
575 self.scope
576 .operation(
577 Method::GET,
578 "/v1/instagram/music/{identifier}",
579 options.query(),
580 options.request_options,
581 )?
582 .send()
583 .await
584 }
585}
586
587#[derive(Clone, Debug)]
591pub struct InstagramMusicStreamResource {
592 scope: Scope,
593}
594
595impl InstagramMusicStreamResource {
596 pub async fn list(
604 &self,
605 options: impl Into<Option<InstagramMusicStreamOptions>>,
606 ) -> Result<InstagramMusicStreamPage, Error> {
607 let options = options.into().unwrap_or_default();
608 self.scope
609 .operation(
610 Method::GET,
611 "/v1/instagram/music/{identifier}/stream",
612 options.query(),
613 options.request_options,
614 )?
615 .send_page()
616 .await
617 }
618
619 pub fn items(
621 &self,
622 options: impl Into<Option<InstagramMusicStreamOptions>>,
623 ) -> Items<InstagramMusicStream> {
624 let options = options.into().unwrap_or_default();
625 Items::new(self.scope.operation(
626 Method::GET,
627 "/v1/instagram/music/{identifier}/stream",
628 options.query(),
629 options.request_options,
630 ))
631 }
632}
633
634#[derive(Clone, Debug)]
638pub struct InstagramPostResource {
639 scope: Scope,
640}
641
642impl InstagramPostResource {
643 pub fn clip_metadata(&self) -> InstagramPostClipMetadataResource {
645 InstagramPostClipMetadataResource {
646 scope: self.scope.clone(),
647 }
648 }
649
650 pub fn comment(&self, reference: impl Into<ResourceReference>) -> InstagramPostCommentResource {
656 InstagramPostCommentResource {
657 scope: self.scope.select(
658 "comment_id",
659 "instagram",
660 "comment",
661 Reference::from(reference.into()),
662 ),
663 }
664 }
665
666 pub fn comment_metadata(&self) -> InstagramPostCommentMetadataResource {
668 InstagramPostCommentMetadataResource {
669 scope: self.scope.clone(),
670 }
671 }
672
673 pub fn comment_moderation(&self) -> InstagramPostCommentModerationResource {
675 InstagramPostCommentModerationResource {
676 scope: self.scope.clone(),
677 }
678 }
679
680 pub fn comments(&self) -> InstagramPostCommentsResource {
682 InstagramPostCommentsResource {
683 scope: self.scope.clone(),
684 }
685 }
686
687 pub fn insights(&self) -> InstagramPostInsightsResource {
689 InstagramPostInsightsResource {
690 scope: self.scope.clone(),
691 }
692 }
693
694 pub fn likers(&self) -> InstagramPostLikersResource {
696 InstagramPostLikersResource {
697 scope: self.scope.clone(),
698 }
699 }
700
701 pub fn oembed(&self) -> InstagramPostOEmbedResource {
703 InstagramPostOEmbedResource {
704 scope: self.scope.clone(),
705 }
706 }
707
708 pub fn tagged_users(&self) -> InstagramPostTaggedUsersResource {
710 InstagramPostTaggedUsersResource {
711 scope: self.scope.clone(),
712 }
713 }
714
715 pub fn template(&self) -> InstagramPostTemplateResource {
717 InstagramPostTemplateResource {
718 scope: self.scope.clone(),
719 }
720 }
721
722 pub async fn get(
730 &self,
731 options: impl Into<Option<InstagramPostOptions>>,
732 ) -> Result<InstagramPostResponse, Error> {
733 let options = options.into().unwrap_or_default();
734 self.scope
735 .operation(
736 Method::GET,
737 "/v1/instagram/posts/{identifier}",
738 options.query(),
739 options.request_options,
740 )?
741 .send()
742 .await
743 }
744}
745
746#[derive(Clone, Debug)]
750pub struct InstagramPostClipMetadataResource {
751 scope: Scope,
752}
753
754impl InstagramPostClipMetadataResource {
755 pub async fn get(
763 &self,
764 options: impl Into<Option<InstagramPostClipMetadataOptions>>,
765 ) -> Result<InstagramPostClipMetadataResponse, Error> {
766 let options = options.into().unwrap_or_default();
767 self.scope
768 .operation(
769 Method::GET,
770 "/v1/instagram/posts/{identifier}/clip-metadata",
771 options.query(),
772 options.request_options,
773 )?
774 .send()
775 .await
776 }
777}
778
779#[derive(Clone, Debug)]
783pub struct InstagramPostCommentResource {
784 scope: Scope,
785}
786
787impl InstagramPostCommentResource {
788 pub fn replies(&self) -> InstagramPostCommentRepliesResource {
790 InstagramPostCommentRepliesResource {
791 scope: self.scope.clone(),
792 }
793 }
794}
795
796#[derive(Clone, Debug)]
800pub struct InstagramPostCommentRepliesResource {
801 scope: Scope,
802}
803
804impl InstagramPostCommentRepliesResource {
805 pub async fn list(
814 &self,
815 options: impl Into<Option<InstagramPostCommentRepliesOptions>>,
816 ) -> Result<InstagramPostCommentRepliesPage, Error> {
817 let options = options.into().unwrap_or_default();
818 self.scope
819 .operation(
820 Method::GET,
821 "/v1/instagram/posts/{identifier}/comments/{comment_id}/replies",
822 options.query(),
823 options.request_options,
824 )?
825 .send_page()
826 .await
827 }
828
829 pub fn items(
831 &self,
832 options: impl Into<Option<InstagramPostCommentRepliesOptions>>,
833 ) -> Items<InstagramComment> {
834 let options = options.into().unwrap_or_default();
835 Items::new(self.scope.operation(
836 Method::GET,
837 "/v1/instagram/posts/{identifier}/comments/{comment_id}/replies",
838 options.query(),
839 options.request_options,
840 ))
841 }
842}
843
844#[derive(Clone, Debug)]
848pub struct InstagramPostCommentMetadataResource {
849 scope: Scope,
850}
851
852impl InstagramPostCommentMetadataResource {
853 pub async fn get(
861 &self,
862 options: impl Into<Option<InstagramPostCommentMetadataOptions>>,
863 ) -> Result<InstagramPostCommentMetadataResponse, Error> {
864 let options = options.into().unwrap_or_default();
865 self.scope
866 .operation(
867 Method::GET,
868 "/v1/instagram/posts/{identifier}/comment-metadata",
869 options.query(),
870 options.request_options,
871 )?
872 .send()
873 .await
874 }
875}
876
877#[derive(Clone, Debug)]
881pub struct InstagramPostCommentModerationResource {
882 scope: Scope,
883}
884
885impl InstagramPostCommentModerationResource {
886 pub async fn get(
894 &self,
895 options: InstagramPostCommentModerationOptions,
896 ) -> Result<InstagramPostCommentModerationResponse, Error> {
897 self.scope
898 .operation(
899 Method::GET,
900 "/v1/instagram/posts/{identifier}/comment-moderation",
901 options.query(),
902 options.request_options,
903 )?
904 .send()
905 .await
906 }
907}
908
909#[derive(Clone, Debug)]
913pub struct InstagramPostCommentsResource {
914 scope: Scope,
915}
916
917impl InstagramPostCommentsResource {
918 pub async fn list(
927 &self,
928 options: impl Into<Option<InstagramPostCommentsOptions>>,
929 ) -> Result<InstagramPostCommentsPage, Error> {
930 let options = options.into().unwrap_or_default();
931 self.scope
932 .operation(
933 Method::GET,
934 "/v1/instagram/posts/{identifier}/comments",
935 options.query(),
936 options.request_options,
937 )?
938 .send_page()
939 .await
940 }
941
942 pub fn items(
944 &self,
945 options: impl Into<Option<InstagramPostCommentsOptions>>,
946 ) -> Items<InstagramComment> {
947 let options = options.into().unwrap_or_default();
948 Items::new(self.scope.operation(
949 Method::GET,
950 "/v1/instagram/posts/{identifier}/comments",
951 options.query(),
952 options.request_options,
953 ))
954 }
955}
956
957#[derive(Clone, Debug)]
961pub struct InstagramPostInsightsResource {
962 scope: Scope,
963}
964
965impl InstagramPostInsightsResource {
966 pub async fn get(
974 &self,
975 options: impl Into<Option<InstagramPostInsightsOptions>>,
976 ) -> Result<InstagramPostInsightsResponse, Error> {
977 let options = options.into().unwrap_or_default();
978 self.scope
979 .operation(
980 Method::GET,
981 "/v1/instagram/posts/{identifier}/insights",
982 options.query(),
983 options.request_options,
984 )?
985 .send()
986 .await
987 }
988}
989
990#[derive(Clone, Debug)]
994pub struct InstagramPostLikersResource {
995 scope: Scope,
996}
997
998impl InstagramPostLikersResource {
999 pub async fn list(
1007 &self,
1008 options: impl Into<Option<InstagramPostLikersOptions>>,
1009 ) -> Result<InstagramPostLikersPage, Error> {
1010 let options = options.into().unwrap_or_default();
1011 self.scope
1012 .operation(
1013 Method::GET,
1014 "/v1/instagram/posts/{identifier}/likers",
1015 options.query(),
1016 options.request_options,
1017 )?
1018 .send_page()
1019 .await
1020 }
1021
1022 pub fn items(
1024 &self,
1025 options: impl Into<Option<InstagramPostLikersOptions>>,
1026 ) -> Items<InstagramProfile> {
1027 let options = options.into().unwrap_or_default();
1028 Items::new(self.scope.operation(
1029 Method::GET,
1030 "/v1/instagram/posts/{identifier}/likers",
1031 options.query(),
1032 options.request_options,
1033 ))
1034 }
1035}
1036
1037#[derive(Clone, Debug)]
1041pub struct InstagramPostOEmbedResource {
1042 scope: Scope,
1043}
1044
1045impl InstagramPostOEmbedResource {
1046 pub async fn get(
1054 &self,
1055 options: impl Into<Option<InstagramPostOEmbedOptions>>,
1056 ) -> Result<InstagramPostOEmbedResponse, Error> {
1057 let options = options.into().unwrap_or_default();
1058 self.scope
1059 .operation(
1060 Method::GET,
1061 "/v1/instagram/posts/{identifier}/oembed",
1062 options.query(),
1063 options.request_options,
1064 )?
1065 .send()
1066 .await
1067 }
1068}
1069
1070#[derive(Clone, Debug)]
1074pub struct InstagramPostTaggedUsersResource {
1075 scope: Scope,
1076}
1077
1078impl InstagramPostTaggedUsersResource {
1079 pub async fn list(
1087 &self,
1088 options: impl Into<Option<InstagramPostTaggedUsersOptions>>,
1089 ) -> Result<InstagramPostTaggedUsersPage, Error> {
1090 let options = options.into().unwrap_or_default();
1091 self.scope
1092 .operation(
1093 Method::GET,
1094 "/v1/instagram/posts/{identifier}/tagged-users",
1095 options.query(),
1096 options.request_options,
1097 )?
1098 .send_page()
1099 .await
1100 }
1101
1102 pub fn items(
1104 &self,
1105 options: impl Into<Option<InstagramPostTaggedUsersOptions>>,
1106 ) -> Items<InstagramUserTag> {
1107 let options = options.into().unwrap_or_default();
1108 Items::new(self.scope.operation(
1109 Method::GET,
1110 "/v1/instagram/posts/{identifier}/tagged-users",
1111 options.query(),
1112 options.request_options,
1113 ))
1114 }
1115}
1116
1117#[derive(Clone, Debug)]
1121pub struct InstagramPostTemplateResource {
1122 scope: Scope,
1123}
1124
1125impl InstagramPostTemplateResource {
1126 pub async fn get(
1134 &self,
1135 options: impl Into<Option<InstagramPostTemplateOptions>>,
1136 ) -> Result<InstagramPostTemplateResponse, Error> {
1137 let options = options.into().unwrap_or_default();
1138 self.scope
1139 .operation(
1140 Method::GET,
1141 "/v1/instagram/posts/{identifier}/template",
1142 options.query(),
1143 options.request_options,
1144 )?
1145 .send()
1146 .await
1147 }
1148}
1149
1150#[derive(Clone, Debug)]
1154pub struct InstagramProfileResource {
1155 scope: Scope,
1156}
1157
1158impl InstagramProfileResource {
1159 pub fn about(&self) -> InstagramProfileAboutResource {
1161 InstagramProfileAboutResource {
1162 scope: self.scope.clone(),
1163 }
1164 }
1165
1166 pub fn business_recommendations(&self) -> InstagramProfileBusinessRecommendationsResource {
1168 InstagramProfileBusinessRecommendationsResource {
1169 scope: self.scope.clone(),
1170 }
1171 }
1172
1173 pub fn followers(&self) -> InstagramProfileFollowersResource {
1175 InstagramProfileFollowersResource {
1176 scope: self.scope.clone(),
1177 }
1178 }
1179
1180 pub fn following(&self) -> InstagramProfileFollowingResource {
1182 InstagramProfileFollowingResource {
1183 scope: self.scope.clone(),
1184 }
1185 }
1186
1187 pub fn highlights(&self) -> InstagramProfileHighlightsResource {
1189 InstagramProfileHighlightsResource {
1190 scope: self.scope.clone(),
1191 }
1192 }
1193
1194 pub fn pinned_posts(&self) -> InstagramProfilePinnedPostsResource {
1196 InstagramProfilePinnedPostsResource {
1197 scope: self.scope.clone(),
1198 }
1199 }
1200
1201 pub fn posts(&self) -> InstagramProfilePostsResource {
1203 InstagramProfilePostsResource {
1204 scope: self.scope.clone(),
1205 }
1206 }
1207
1208 pub fn reels(&self) -> InstagramProfileReelsResource {
1210 InstagramProfileReelsResource {
1211 scope: self.scope.clone(),
1212 }
1213 }
1214
1215 pub fn reposts(&self) -> InstagramProfileRepostsResource {
1217 InstagramProfileRepostsResource {
1218 scope: self.scope.clone(),
1219 }
1220 }
1221
1222 pub fn stories(&self) -> InstagramProfileStoriesResource {
1224 InstagramProfileStoriesResource {
1225 scope: self.scope.clone(),
1226 }
1227 }
1228
1229 pub fn suggested(&self) -> InstagramProfileSuggestedResource {
1231 InstagramProfileSuggestedResource {
1232 scope: self.scope.clone(),
1233 }
1234 }
1235
1236 pub fn tagged_posts(&self) -> InstagramProfileTaggedPostsResource {
1238 InstagramProfileTaggedPostsResource {
1239 scope: self.scope.clone(),
1240 }
1241 }
1242
1243 pub fn videos(&self) -> InstagramProfileVideosResource {
1245 InstagramProfileVideosResource {
1246 scope: self.scope.clone(),
1247 }
1248 }
1249
1250 pub async fn get(
1258 &self,
1259 options: impl Into<Option<InstagramProfileOptions>>,
1260 ) -> Result<InstagramProfileResponse, Error> {
1261 let options = options.into().unwrap_or_default();
1262 self.scope
1263 .operation(
1264 Method::GET,
1265 "/v1/instagram/profiles/{identifier}",
1266 options.query(),
1267 options.request_options,
1268 )?
1269 .send()
1270 .await
1271 }
1272}
1273
1274#[derive(Clone, Debug)]
1278pub struct InstagramProfileAboutResource {
1279 scope: Scope,
1280}
1281
1282impl InstagramProfileAboutResource {
1283 pub async fn get(
1291 &self,
1292 options: impl Into<Option<InstagramProfileAboutOptions>>,
1293 ) -> Result<InstagramProfileAboutResponse, Error> {
1294 let options = options.into().unwrap_or_default();
1295 self.scope
1296 .operation(
1297 Method::GET,
1298 "/v1/instagram/profiles/{identifier}/about",
1299 options.query(),
1300 options.request_options,
1301 )?
1302 .send()
1303 .await
1304 }
1305}
1306
1307#[derive(Clone, Debug)]
1311pub struct InstagramProfileBusinessRecommendationsResource {
1312 scope: Scope,
1313}
1314
1315impl InstagramProfileBusinessRecommendationsResource {
1316 pub async fn list(
1324 &self,
1325 options: impl Into<Option<InstagramProfileBusinessRecommendationsOptions>>,
1326 ) -> Result<InstagramProfileBusinessRecommendationsPage, Error> {
1327 let options = options.into().unwrap_or_default();
1328 self.scope
1329 .operation(
1330 Method::GET,
1331 "/v1/instagram/profiles/{identifier}/business-recommendations",
1332 options.query(),
1333 options.request_options,
1334 )?
1335 .send_page()
1336 .await
1337 }
1338
1339 pub fn items(
1341 &self,
1342 options: impl Into<Option<InstagramProfileBusinessRecommendationsOptions>>,
1343 ) -> Items<InstagramProfileSummary> {
1344 let options = options.into().unwrap_or_default();
1345 Items::new(self.scope.operation(
1346 Method::GET,
1347 "/v1/instagram/profiles/{identifier}/business-recommendations",
1348 options.query(),
1349 options.request_options,
1350 ))
1351 }
1352}
1353
1354#[derive(Clone, Debug)]
1358pub struct InstagramProfileFollowersResource {
1359 scope: Scope,
1360}
1361
1362impl InstagramProfileFollowersResource {
1363 pub async fn list(
1371 &self,
1372 options: impl Into<Option<InstagramProfileFollowersOptions>>,
1373 ) -> Result<InstagramProfileFollowersPage, Error> {
1374 let options = options.into().unwrap_or_default();
1375 self.scope
1376 .operation(
1377 Method::GET,
1378 "/v1/instagram/profiles/{identifier}/followers",
1379 options.query(),
1380 options.request_options,
1381 )?
1382 .send_page()
1383 .await
1384 }
1385
1386 pub fn items(
1388 &self,
1389 options: impl Into<Option<InstagramProfileFollowersOptions>>,
1390 ) -> Items<InstagramProfile> {
1391 let options = options.into().unwrap_or_default();
1392 Items::new(self.scope.operation(
1393 Method::GET,
1394 "/v1/instagram/profiles/{identifier}/followers",
1395 options.query(),
1396 options.request_options,
1397 ))
1398 }
1399
1400 pub async fn search(
1408 &self,
1409 options: InstagramProfileFollowersSearchOptions,
1410 ) -> Result<InstagramProfileFollowersSearchPage, Error> {
1411 self.scope
1412 .operation(
1413 Method::GET,
1414 "/v1/instagram/profiles/{identifier}/followers/search",
1415 options.query(),
1416 options.request_options,
1417 )?
1418 .send_page()
1419 .await
1420 }
1421
1422 pub fn search_items(
1424 &self,
1425 options: InstagramProfileFollowersSearchOptions,
1426 ) -> Items<InstagramProfile> {
1427 Items::new(self.scope.operation(
1428 Method::GET,
1429 "/v1/instagram/profiles/{identifier}/followers/search",
1430 options.query(),
1431 options.request_options,
1432 ))
1433 }
1434}
1435
1436#[derive(Clone, Debug)]
1440pub struct InstagramProfileFollowingResource {
1441 scope: Scope,
1442}
1443
1444impl InstagramProfileFollowingResource {
1445 pub async fn list(
1453 &self,
1454 options: impl Into<Option<InstagramProfileFollowingOptions>>,
1455 ) -> Result<InstagramProfileFollowingPage, Error> {
1456 let options = options.into().unwrap_or_default();
1457 self.scope
1458 .operation(
1459 Method::GET,
1460 "/v1/instagram/profiles/{identifier}/following",
1461 options.query(),
1462 options.request_options,
1463 )?
1464 .send_page()
1465 .await
1466 }
1467
1468 pub fn items(
1470 &self,
1471 options: impl Into<Option<InstagramProfileFollowingOptions>>,
1472 ) -> Items<InstagramProfile> {
1473 let options = options.into().unwrap_or_default();
1474 Items::new(self.scope.operation(
1475 Method::GET,
1476 "/v1/instagram/profiles/{identifier}/following",
1477 options.query(),
1478 options.request_options,
1479 ))
1480 }
1481
1482 pub async fn search(
1490 &self,
1491 options: InstagramProfileFollowingSearchOptions,
1492 ) -> Result<InstagramProfileFollowingSearchPage, Error> {
1493 self.scope
1494 .operation(
1495 Method::GET,
1496 "/v1/instagram/profiles/{identifier}/following/search",
1497 options.query(),
1498 options.request_options,
1499 )?
1500 .send_page()
1501 .await
1502 }
1503
1504 pub fn search_items(
1506 &self,
1507 options: InstagramProfileFollowingSearchOptions,
1508 ) -> Items<InstagramProfile> {
1509 Items::new(self.scope.operation(
1510 Method::GET,
1511 "/v1/instagram/profiles/{identifier}/following/search",
1512 options.query(),
1513 options.request_options,
1514 ))
1515 }
1516}
1517
1518#[derive(Clone, Debug)]
1522pub struct InstagramProfileHighlightsResource {
1523 scope: Scope,
1524}
1525
1526impl InstagramProfileHighlightsResource {
1527 pub async fn list(
1535 &self,
1536 options: impl Into<Option<InstagramProfileHighlightsOptions>>,
1537 ) -> Result<InstagramProfileHighlightsPage, Error> {
1538 let options = options.into().unwrap_or_default();
1539 self.scope
1540 .operation(
1541 Method::GET,
1542 "/v1/instagram/profiles/{identifier}/highlights",
1543 options.query(),
1544 options.request_options,
1545 )?
1546 .send_page()
1547 .await
1548 }
1549
1550 pub fn items(
1552 &self,
1553 options: impl Into<Option<InstagramProfileHighlightsOptions>>,
1554 ) -> Items<InstagramHighlight> {
1555 let options = options.into().unwrap_or_default();
1556 Items::new(self.scope.operation(
1557 Method::GET,
1558 "/v1/instagram/profiles/{identifier}/highlights",
1559 options.query(),
1560 options.request_options,
1561 ))
1562 }
1563}
1564
1565#[derive(Clone, Debug)]
1569pub struct InstagramProfilePinnedPostsResource {
1570 scope: Scope,
1571}
1572
1573impl InstagramProfilePinnedPostsResource {
1574 pub async fn list(
1582 &self,
1583 options: impl Into<Option<InstagramProfilePinnedPostsOptions>>,
1584 ) -> Result<InstagramProfilePinnedPostsPage, Error> {
1585 let options = options.into().unwrap_or_default();
1586 self.scope
1587 .operation(
1588 Method::GET,
1589 "/v1/instagram/profiles/{identifier}/pinned-posts",
1590 options.query(),
1591 options.request_options,
1592 )?
1593 .send_page()
1594 .await
1595 }
1596
1597 pub fn items(
1599 &self,
1600 options: impl Into<Option<InstagramProfilePinnedPostsOptions>>,
1601 ) -> Items<InstagramPost> {
1602 let options = options.into().unwrap_or_default();
1603 Items::new(self.scope.operation(
1604 Method::GET,
1605 "/v1/instagram/profiles/{identifier}/pinned-posts",
1606 options.query(),
1607 options.request_options,
1608 ))
1609 }
1610}
1611
1612#[derive(Clone, Debug)]
1616pub struct InstagramProfilePostsResource {
1617 scope: Scope,
1618}
1619
1620impl InstagramProfilePostsResource {
1621 pub async fn list(
1629 &self,
1630 options: impl Into<Option<InstagramProfilePostsOptions>>,
1631 ) -> Result<InstagramProfilePostsPage, Error> {
1632 let options = options.into().unwrap_or_default();
1633 self.scope
1634 .operation(
1635 Method::GET,
1636 "/v1/instagram/profiles/{identifier}/posts",
1637 options.query(),
1638 options.request_options,
1639 )?
1640 .send_page()
1641 .await
1642 }
1643
1644 pub fn items(
1646 &self,
1647 options: impl Into<Option<InstagramProfilePostsOptions>>,
1648 ) -> Items<InstagramPost> {
1649 let options = options.into().unwrap_or_default();
1650 Items::new(self.scope.operation(
1651 Method::GET,
1652 "/v1/instagram/profiles/{identifier}/posts",
1653 options.query(),
1654 options.request_options,
1655 ))
1656 }
1657}
1658
1659#[derive(Clone, Debug)]
1663pub struct InstagramProfileReelsResource {
1664 scope: Scope,
1665}
1666
1667impl InstagramProfileReelsResource {
1668 pub async fn list(
1676 &self,
1677 options: impl Into<Option<InstagramProfileReelsOptions>>,
1678 ) -> Result<InstagramProfileReelsPage, Error> {
1679 let options = options.into().unwrap_or_default();
1680 self.scope
1681 .operation(
1682 Method::GET,
1683 "/v1/instagram/profiles/{identifier}/reels",
1684 options.query(),
1685 options.request_options,
1686 )?
1687 .send_page()
1688 .await
1689 }
1690
1691 pub fn items(
1693 &self,
1694 options: impl Into<Option<InstagramProfileReelsOptions>>,
1695 ) -> Items<InstagramPost> {
1696 let options = options.into().unwrap_or_default();
1697 Items::new(self.scope.operation(
1698 Method::GET,
1699 "/v1/instagram/profiles/{identifier}/reels",
1700 options.query(),
1701 options.request_options,
1702 ))
1703 }
1704}
1705
1706#[derive(Clone, Debug)]
1710pub struct InstagramProfileRepostsResource {
1711 scope: Scope,
1712}
1713
1714impl InstagramProfileRepostsResource {
1715 pub async fn list(
1723 &self,
1724 options: impl Into<Option<InstagramProfileRepostsOptions>>,
1725 ) -> Result<InstagramProfileRepostsPage, Error> {
1726 let options = options.into().unwrap_or_default();
1727 self.scope
1728 .operation(
1729 Method::GET,
1730 "/v1/instagram/profiles/{identifier}/reposts",
1731 options.query(),
1732 options.request_options,
1733 )?
1734 .send_page()
1735 .await
1736 }
1737
1738 pub fn items(
1740 &self,
1741 options: impl Into<Option<InstagramProfileRepostsOptions>>,
1742 ) -> Items<InstagramPost> {
1743 let options = options.into().unwrap_or_default();
1744 Items::new(self.scope.operation(
1745 Method::GET,
1746 "/v1/instagram/profiles/{identifier}/reposts",
1747 options.query(),
1748 options.request_options,
1749 ))
1750 }
1751}
1752
1753#[derive(Clone, Debug)]
1757pub struct InstagramProfileStoriesResource {
1758 scope: Scope,
1759}
1760
1761impl InstagramProfileStoriesResource {
1762 pub async fn list(
1770 &self,
1771 options: impl Into<Option<InstagramProfileStoriesOptions>>,
1772 ) -> Result<InstagramProfileStoriesPage, Error> {
1773 let options = options.into().unwrap_or_default();
1774 self.scope
1775 .operation(
1776 Method::GET,
1777 "/v1/instagram/profiles/{identifier}/stories",
1778 options.query(),
1779 options.request_options,
1780 )?
1781 .send_page()
1782 .await
1783 }
1784
1785 pub fn items(
1787 &self,
1788 options: impl Into<Option<InstagramProfileStoriesOptions>>,
1789 ) -> Items<InstagramStory> {
1790 let options = options.into().unwrap_or_default();
1791 Items::new(self.scope.operation(
1792 Method::GET,
1793 "/v1/instagram/profiles/{identifier}/stories",
1794 options.query(),
1795 options.request_options,
1796 ))
1797 }
1798}
1799
1800#[derive(Clone, Debug)]
1804pub struct InstagramProfileSuggestedResource {
1805 scope: Scope,
1806}
1807
1808impl InstagramProfileSuggestedResource {
1809 pub async fn list(
1817 &self,
1818 options: impl Into<Option<InstagramProfileSuggestedOptions>>,
1819 ) -> Result<InstagramProfileSuggestedPage, Error> {
1820 let options = options.into().unwrap_or_default();
1821 self.scope
1822 .operation(
1823 Method::GET,
1824 "/v1/instagram/profiles/{identifier}/suggested",
1825 options.query(),
1826 options.request_options,
1827 )?
1828 .send_page()
1829 .await
1830 }
1831
1832 pub fn items(
1834 &self,
1835 options: impl Into<Option<InstagramProfileSuggestedOptions>>,
1836 ) -> Items<InstagramProfile> {
1837 let options = options.into().unwrap_or_default();
1838 Items::new(self.scope.operation(
1839 Method::GET,
1840 "/v1/instagram/profiles/{identifier}/suggested",
1841 options.query(),
1842 options.request_options,
1843 ))
1844 }
1845}
1846
1847#[derive(Clone, Debug)]
1851pub struct InstagramProfileTaggedPostsResource {
1852 scope: Scope,
1853}
1854
1855impl InstagramProfileTaggedPostsResource {
1856 pub async fn list(
1864 &self,
1865 options: impl Into<Option<InstagramProfileTaggedPostsOptions>>,
1866 ) -> Result<InstagramProfileTaggedPostsPage, Error> {
1867 let options = options.into().unwrap_or_default();
1868 self.scope
1869 .operation(
1870 Method::GET,
1871 "/v1/instagram/profiles/{identifier}/tagged-posts",
1872 options.query(),
1873 options.request_options,
1874 )?
1875 .send_page()
1876 .await
1877 }
1878
1879 pub fn items(
1881 &self,
1882 options: impl Into<Option<InstagramProfileTaggedPostsOptions>>,
1883 ) -> Items<InstagramPost> {
1884 let options = options.into().unwrap_or_default();
1885 Items::new(self.scope.operation(
1886 Method::GET,
1887 "/v1/instagram/profiles/{identifier}/tagged-posts",
1888 options.query(),
1889 options.request_options,
1890 ))
1891 }
1892}
1893
1894#[derive(Clone, Debug)]
1898pub struct InstagramProfileVideosResource {
1899 scope: Scope,
1900}
1901
1902impl InstagramProfileVideosResource {
1903 pub async fn list(
1911 &self,
1912 options: impl Into<Option<InstagramProfileVideosOptions>>,
1913 ) -> Result<InstagramProfileVideosPage, Error> {
1914 let options = options.into().unwrap_or_default();
1915 self.scope
1916 .operation(
1917 Method::GET,
1918 "/v1/instagram/profiles/{identifier}/videos",
1919 options.query(),
1920 options.request_options,
1921 )?
1922 .send_page()
1923 .await
1924 }
1925
1926 pub fn items(
1928 &self,
1929 options: impl Into<Option<InstagramProfileVideosOptions>>,
1930 ) -> Items<InstagramPost> {
1931 let options = options.into().unwrap_or_default();
1932 Items::new(self.scope.operation(
1933 Method::GET,
1934 "/v1/instagram/profiles/{identifier}/videos",
1935 options.query(),
1936 options.request_options,
1937 ))
1938 }
1939}
1940
1941#[derive(Clone, Debug)]
1945pub struct InstagramSearchResource {
1946 scope: Scope,
1947}
1948
1949impl InstagramSearchResource {
1950 pub fn hashtags(&self) -> InstagramSearchHashtagsResource {
1952 InstagramSearchHashtagsResource {
1953 scope: self.scope.clone(),
1954 }
1955 }
1956
1957 pub fn music(&self) -> InstagramSearchMusicResource {
1959 InstagramSearchMusicResource {
1960 scope: self.scope.clone(),
1961 }
1962 }
1963
1964 pub fn places(&self) -> InstagramSearchPlacesResource {
1966 InstagramSearchPlacesResource {
1967 scope: self.scope.clone(),
1968 }
1969 }
1970
1971 pub fn profiles(&self) -> InstagramSearchProfilesResource {
1973 InstagramSearchProfilesResource {
1974 scope: self.scope.clone(),
1975 }
1976 }
1977
1978 pub fn reels(&self) -> InstagramSearchReelsResource {
1980 InstagramSearchReelsResource {
1981 scope: self.scope.clone(),
1982 }
1983 }
1984
1985 pub fn top(&self) -> InstagramSearchTopResource {
1987 InstagramSearchTopResource {
1988 scope: self.scope.clone(),
1989 }
1990 }
1991}
1992
1993#[derive(Clone, Debug)]
1997pub struct InstagramSearchHashtagsResource {
1998 scope: Scope,
1999}
2000
2001impl InstagramSearchHashtagsResource {
2002 pub async fn list(
2010 &self,
2011 options: InstagramSearchHashtagsOptions,
2012 ) -> Result<InstagramSearchHashtagsPage, Error> {
2013 self.scope
2014 .operation(
2015 Method::GET,
2016 "/v1/instagram/search/hashtags",
2017 options.query(),
2018 options.request_options,
2019 )?
2020 .send_page()
2021 .await
2022 }
2023
2024 pub fn items(&self, options: InstagramSearchHashtagsOptions) -> Items<InstagramHashtag> {
2026 Items::new(self.scope.operation(
2027 Method::GET,
2028 "/v1/instagram/search/hashtags",
2029 options.query(),
2030 options.request_options,
2031 ))
2032 }
2033}
2034
2035#[derive(Clone, Debug)]
2039pub struct InstagramSearchMusicResource {
2040 scope: Scope,
2041}
2042
2043impl InstagramSearchMusicResource {
2044 pub async fn list(
2052 &self,
2053 options: InstagramSearchMusicOptions,
2054 ) -> Result<InstagramSearchMusicPage, Error> {
2055 self.scope
2056 .operation(
2057 Method::GET,
2058 "/v1/instagram/search/music",
2059 options.query(),
2060 options.request_options,
2061 )?
2062 .send_page()
2063 .await
2064 }
2065
2066 pub fn items(&self, options: InstagramSearchMusicOptions) -> Items<InstagramMusic> {
2068 Items::new(self.scope.operation(
2069 Method::GET,
2070 "/v1/instagram/search/music",
2071 options.query(),
2072 options.request_options,
2073 ))
2074 }
2075}
2076
2077#[derive(Clone, Debug)]
2081pub struct InstagramSearchPlacesResource {
2082 scope: Scope,
2083}
2084
2085impl InstagramSearchPlacesResource {
2086 pub async fn list(
2094 &self,
2095 options: InstagramSearchPlacesOptions,
2096 ) -> Result<InstagramSearchPlacesPage, Error> {
2097 self.scope
2098 .operation(
2099 Method::GET,
2100 "/v1/instagram/search/places",
2101 options.query(),
2102 options.request_options,
2103 )?
2104 .send_page()
2105 .await
2106 }
2107
2108 pub fn items(&self, options: InstagramSearchPlacesOptions) -> Items<InstagramLocation> {
2110 Items::new(self.scope.operation(
2111 Method::GET,
2112 "/v1/instagram/search/places",
2113 options.query(),
2114 options.request_options,
2115 ))
2116 }
2117}
2118
2119#[derive(Clone, Debug)]
2123pub struct InstagramSearchProfilesResource {
2124 scope: Scope,
2125}
2126
2127impl InstagramSearchProfilesResource {
2128 pub async fn list(
2136 &self,
2137 options: InstagramSearchProfilesOptions,
2138 ) -> Result<InstagramSearchProfilesPage, Error> {
2139 self.scope
2140 .operation(
2141 Method::GET,
2142 "/v1/instagram/search/profiles",
2143 options.query(),
2144 options.request_options,
2145 )?
2146 .send_page()
2147 .await
2148 }
2149
2150 pub fn items(&self, options: InstagramSearchProfilesOptions) -> Items<InstagramProfile> {
2152 Items::new(self.scope.operation(
2153 Method::GET,
2154 "/v1/instagram/search/profiles",
2155 options.query(),
2156 options.request_options,
2157 ))
2158 }
2159}
2160
2161#[derive(Clone, Debug)]
2165pub struct InstagramSearchReelsResource {
2166 scope: Scope,
2167}
2168
2169impl InstagramSearchReelsResource {
2170 pub async fn list(
2178 &self,
2179 options: InstagramSearchReelsOptions,
2180 ) -> Result<InstagramSearchReelsPage, Error> {
2181 self.scope
2182 .operation(
2183 Method::GET,
2184 "/v1/instagram/search/reels",
2185 options.query(),
2186 options.request_options,
2187 )?
2188 .send_page()
2189 .await
2190 }
2191
2192 pub fn items(&self, options: InstagramSearchReelsOptions) -> Items<InstagramPost> {
2194 Items::new(self.scope.operation(
2195 Method::GET,
2196 "/v1/instagram/search/reels",
2197 options.query(),
2198 options.request_options,
2199 ))
2200 }
2201}
2202
2203#[derive(Clone, Debug)]
2207pub struct InstagramSearchTopResource {
2208 scope: Scope,
2209}
2210
2211impl InstagramSearchTopResource {
2212 pub async fn list(
2220 &self,
2221 options: InstagramSearchTopOptions,
2222 ) -> Result<InstagramSearchTopPage, Error> {
2223 self.scope
2224 .operation(
2225 Method::GET,
2226 "/v1/instagram/search/top",
2227 options.query(),
2228 options.request_options,
2229 )?
2230 .send_page()
2231 .await
2232 }
2233
2234 pub fn items(&self, options: InstagramSearchTopOptions) -> Items<InstagramSearchResult> {
2236 Items::new(self.scope.operation(
2237 Method::GET,
2238 "/v1/instagram/search/top",
2239 options.query(),
2240 options.request_options,
2241 ))
2242 }
2243}
2244
2245#[derive(Clone, Debug)]
2249pub struct InstagramStoryResource {
2250 scope: Scope,
2251}
2252
2253impl InstagramStoryResource {
2254 pub async fn get(
2262 &self,
2263 options: impl Into<Option<InstagramStoryOptions>>,
2264 ) -> Result<InstagramStoryResponse, Error> {
2265 let options = options.into().unwrap_or_default();
2266 self.scope
2267 .operation(
2268 Method::GET,
2269 "/v1/instagram/stories/{identifier}",
2270 options.query(),
2271 options.request_options,
2272 )?
2273 .send()
2274 .await
2275 }
2276}
2277
2278#[derive(Clone, Debug)]
2282pub struct RedditResource {
2283 scope: Scope,
2284}
2285
2286impl RedditResource {
2287 pub fn domain(&self, reference: impl Into<ResourceReference>) -> RedditDomainResource {
2293 RedditDomainResource {
2294 scope: self.scope.select(
2295 "identifier",
2296 "reddit",
2297 "domain",
2298 Reference::from(reference.into()),
2299 ),
2300 }
2301 }
2302
2303 pub fn post(&self, reference: impl Into<ResourceReference>) -> RedditPostResource {
2309 RedditPostResource {
2310 scope: self.scope.select(
2311 "identifier",
2312 "reddit",
2313 "post",
2314 Reference::from(reference.into()),
2315 ),
2316 }
2317 }
2318
2319 pub fn profile(&self, reference: impl Into<ProfileReference>) -> RedditProfileResource {
2325 RedditProfileResource {
2326 scope: self.scope.select(
2327 "identifier",
2328 "reddit",
2329 "profile",
2330 Reference::from(reference.into()),
2331 ),
2332 }
2333 }
2334
2335 pub fn search(&self) -> RedditSearchResource {
2337 RedditSearchResource {
2338 scope: self.scope.clone(),
2339 }
2340 }
2341
2342 pub fn subreddit(&self, reference: impl Into<ResourceReference>) -> RedditSubredditResource {
2348 RedditSubredditResource {
2349 scope: self.scope.select(
2350 "identifier",
2351 "reddit",
2352 "subreddit",
2353 Reference::from(reference.into()),
2354 ),
2355 }
2356 }
2357
2358 pub fn subreddits(&self) -> RedditSubredditsResource {
2360 RedditSubredditsResource {
2361 scope: self.scope.clone(),
2362 }
2363 }
2364
2365 pub fn trending(&self) -> RedditTrendingResource {
2367 RedditTrendingResource {
2368 scope: self.scope.clone(),
2369 }
2370 }
2371}
2372
2373#[derive(Clone, Debug)]
2377pub struct RedditDomainResource {
2378 scope: Scope,
2379}
2380
2381impl RedditDomainResource {
2382 pub fn posts(&self) -> RedditDomainPostsResource {
2384 RedditDomainPostsResource {
2385 scope: self.scope.clone(),
2386 }
2387 }
2388}
2389
2390#[derive(Clone, Debug)]
2394pub struct RedditDomainPostsResource {
2395 scope: Scope,
2396}
2397
2398impl RedditDomainPostsResource {
2399 pub async fn list(
2407 &self,
2408 options: impl Into<Option<RedditDomainPostsOptions>>,
2409 ) -> Result<RedditDomainPostsPage, Error> {
2410 let options = options.into().unwrap_or_default();
2411 self.scope
2412 .operation(
2413 Method::GET,
2414 "/v1/reddit/domains/{identifier}/posts",
2415 options.query(),
2416 options.request_options,
2417 )?
2418 .send_page()
2419 .await
2420 }
2421
2422 pub fn items(&self, options: impl Into<Option<RedditDomainPostsOptions>>) -> Items<RedditPost> {
2424 let options = options.into().unwrap_or_default();
2425 Items::new(self.scope.operation(
2426 Method::GET,
2427 "/v1/reddit/domains/{identifier}/posts",
2428 options.query(),
2429 options.request_options,
2430 ))
2431 }
2432}
2433
2434#[derive(Clone, Debug)]
2438pub struct RedditPostResource {
2439 scope: Scope,
2440}
2441
2442impl RedditPostResource {
2443 pub fn comments(&self) -> RedditPostCommentsResource {
2445 RedditPostCommentsResource {
2446 scope: self.scope.clone(),
2447 }
2448 }
2449
2450 pub fn duplicates(&self) -> RedditPostDuplicatesResource {
2452 RedditPostDuplicatesResource {
2453 scope: self.scope.clone(),
2454 }
2455 }
2456
2457 pub async fn get(
2465 &self,
2466 options: impl Into<Option<RedditPostOptions>>,
2467 ) -> Result<RedditPostResponse, Error> {
2468 let options = options.into().unwrap_or_default();
2469 self.scope
2470 .operation(
2471 Method::GET,
2472 "/v1/reddit/posts/{identifier}",
2473 options.query(),
2474 options.request_options,
2475 )?
2476 .send()
2477 .await
2478 }
2479}
2480
2481#[derive(Clone, Debug)]
2485pub struct RedditPostCommentsResource {
2486 scope: Scope,
2487}
2488
2489impl RedditPostCommentsResource {
2490 pub async fn list(
2498 &self,
2499 options: impl Into<Option<RedditPostCommentsOptions>>,
2500 ) -> Result<RedditPostCommentsResponse, Error> {
2501 let options = options.into().unwrap_or_default();
2502 self.scope
2503 .operation(
2504 Method::GET,
2505 "/v1/reddit/posts/{identifier}/comments",
2506 options.query(),
2507 options.request_options,
2508 )?
2509 .send()
2510 .await
2511 }
2512}
2513
2514#[derive(Clone, Debug)]
2518pub struct RedditPostDuplicatesResource {
2519 scope: Scope,
2520}
2521
2522impl RedditPostDuplicatesResource {
2523 pub async fn list(
2531 &self,
2532 options: impl Into<Option<RedditPostDuplicatesOptions>>,
2533 ) -> Result<RedditPostDuplicatesPage, Error> {
2534 let options = options.into().unwrap_or_default();
2535 self.scope
2536 .operation(
2537 Method::GET,
2538 "/v1/reddit/posts/{identifier}/duplicates",
2539 options.query(),
2540 options.request_options,
2541 )?
2542 .send_page()
2543 .await
2544 }
2545
2546 pub fn items(
2548 &self,
2549 options: impl Into<Option<RedditPostDuplicatesOptions>>,
2550 ) -> Items<RedditPost> {
2551 let options = options.into().unwrap_or_default();
2552 Items::new(self.scope.operation(
2553 Method::GET,
2554 "/v1/reddit/posts/{identifier}/duplicates",
2555 options.query(),
2556 options.request_options,
2557 ))
2558 }
2559}
2560
2561#[derive(Clone, Debug)]
2565pub struct RedditProfileResource {
2566 scope: Scope,
2567}
2568
2569impl RedditProfileResource {
2570 pub fn comments(&self) -> RedditProfileCommentsResource {
2572 RedditProfileCommentsResource {
2573 scope: self.scope.clone(),
2574 }
2575 }
2576
2577 pub fn moderated(&self) -> RedditProfileModeratedResource {
2579 RedditProfileModeratedResource {
2580 scope: self.scope.clone(),
2581 }
2582 }
2583
2584 pub fn posts(&self) -> RedditProfilePostsResource {
2586 RedditProfilePostsResource {
2587 scope: self.scope.clone(),
2588 }
2589 }
2590
2591 pub fn trophies(&self) -> RedditProfileTrophiesResource {
2593 RedditProfileTrophiesResource {
2594 scope: self.scope.clone(),
2595 }
2596 }
2597
2598 pub async fn get(
2607 &self,
2608 options: impl Into<Option<RedditProfileOptions>>,
2609 ) -> Result<RedditProfileResponse, Error> {
2610 let options = options.into().unwrap_or_default();
2611 self.scope
2612 .operation(
2613 Method::GET,
2614 "/v1/reddit/profiles/{identifier}",
2615 options.query(),
2616 options.request_options,
2617 )?
2618 .send()
2619 .await
2620 }
2621}
2622
2623#[derive(Clone, Debug)]
2627pub struct RedditProfileCommentsResource {
2628 scope: Scope,
2629}
2630
2631impl RedditProfileCommentsResource {
2632 pub async fn list(
2640 &self,
2641 options: impl Into<Option<RedditProfileCommentsOptions>>,
2642 ) -> Result<RedditProfileCommentsPage, Error> {
2643 let options = options.into().unwrap_or_default();
2644 self.scope
2645 .operation(
2646 Method::GET,
2647 "/v1/reddit/profiles/{identifier}/comments",
2648 options.query(),
2649 options.request_options,
2650 )?
2651 .send_page()
2652 .await
2653 }
2654
2655 pub fn items(
2657 &self,
2658 options: impl Into<Option<RedditProfileCommentsOptions>>,
2659 ) -> Items<RedditComment> {
2660 let options = options.into().unwrap_or_default();
2661 Items::new(self.scope.operation(
2662 Method::GET,
2663 "/v1/reddit/profiles/{identifier}/comments",
2664 options.query(),
2665 options.request_options,
2666 ))
2667 }
2668}
2669
2670#[derive(Clone, Debug)]
2674pub struct RedditProfileModeratedResource {
2675 scope: Scope,
2676}
2677
2678impl RedditProfileModeratedResource {
2679 pub async fn list(
2687 &self,
2688 options: impl Into<Option<RedditProfileModeratedOptions>>,
2689 ) -> Result<RedditProfileModeratedResponse, Error> {
2690 let options = options.into().unwrap_or_default();
2691 self.scope
2692 .operation(
2693 Method::GET,
2694 "/v1/reddit/profiles/{identifier}/moderated",
2695 options.query(),
2696 options.request_options,
2697 )?
2698 .send()
2699 .await
2700 }
2701}
2702
2703#[derive(Clone, Debug)]
2707pub struct RedditProfilePostsResource {
2708 scope: Scope,
2709}
2710
2711impl RedditProfilePostsResource {
2712 pub async fn list(
2720 &self,
2721 options: impl Into<Option<RedditProfilePostsOptions>>,
2722 ) -> Result<RedditProfilePostsPage, Error> {
2723 let options = options.into().unwrap_or_default();
2724 self.scope
2725 .operation(
2726 Method::GET,
2727 "/v1/reddit/profiles/{identifier}/posts",
2728 options.query(),
2729 options.request_options,
2730 )?
2731 .send_page()
2732 .await
2733 }
2734
2735 pub fn items(
2737 &self,
2738 options: impl Into<Option<RedditProfilePostsOptions>>,
2739 ) -> Items<RedditPost> {
2740 let options = options.into().unwrap_or_default();
2741 Items::new(self.scope.operation(
2742 Method::GET,
2743 "/v1/reddit/profiles/{identifier}/posts",
2744 options.query(),
2745 options.request_options,
2746 ))
2747 }
2748}
2749
2750#[derive(Clone, Debug)]
2754pub struct RedditProfileTrophiesResource {
2755 scope: Scope,
2756}
2757
2758impl RedditProfileTrophiesResource {
2759 pub async fn list(
2767 &self,
2768 options: impl Into<Option<RedditProfileTrophiesOptions>>,
2769 ) -> Result<RedditProfileTrophiesResponse, Error> {
2770 let options = options.into().unwrap_or_default();
2771 self.scope
2772 .operation(
2773 Method::GET,
2774 "/v1/reddit/profiles/{identifier}/trophies",
2775 options.query(),
2776 options.request_options,
2777 )?
2778 .send()
2779 .await
2780 }
2781}
2782
2783#[derive(Clone, Debug)]
2787pub struct RedditSearchResource {
2788 scope: Scope,
2789}
2790
2791impl RedditSearchResource {
2792 pub fn posts(&self) -> RedditSearchPostsResource {
2794 RedditSearchPostsResource {
2795 scope: self.scope.clone(),
2796 }
2797 }
2798
2799 pub fn profiles(&self) -> RedditSearchProfilesResource {
2801 RedditSearchProfilesResource {
2802 scope: self.scope.clone(),
2803 }
2804 }
2805
2806 pub fn subreddits(&self) -> RedditSearchSubredditsResource {
2808 RedditSearchSubredditsResource {
2809 scope: self.scope.clone(),
2810 }
2811 }
2812}
2813
2814#[derive(Clone, Debug)]
2818pub struct RedditSearchPostsResource {
2819 scope: Scope,
2820}
2821
2822impl RedditSearchPostsResource {
2823 pub async fn list(
2831 &self,
2832 options: RedditSearchPostsOptions,
2833 ) -> Result<RedditSearchPostsPage, Error> {
2834 self.scope
2835 .operation(
2836 Method::GET,
2837 "/v1/reddit/search/posts",
2838 options.query(),
2839 options.request_options,
2840 )?
2841 .send_page()
2842 .await
2843 }
2844
2845 pub fn items(&self, options: RedditSearchPostsOptions) -> Items<RedditPost> {
2847 Items::new(self.scope.operation(
2848 Method::GET,
2849 "/v1/reddit/search/posts",
2850 options.query(),
2851 options.request_options,
2852 ))
2853 }
2854}
2855
2856#[derive(Clone, Debug)]
2860pub struct RedditSearchProfilesResource {
2861 scope: Scope,
2862}
2863
2864impl RedditSearchProfilesResource {
2865 pub async fn list(
2873 &self,
2874 options: RedditSearchProfilesOptions,
2875 ) -> Result<RedditSearchProfilesPage, Error> {
2876 self.scope
2877 .operation(
2878 Method::GET,
2879 "/v1/reddit/search/profiles",
2880 options.query(),
2881 options.request_options,
2882 )?
2883 .send_page()
2884 .await
2885 }
2886
2887 pub fn items(&self, options: RedditSearchProfilesOptions) -> Items<RedditProfile> {
2889 Items::new(self.scope.operation(
2890 Method::GET,
2891 "/v1/reddit/search/profiles",
2892 options.query(),
2893 options.request_options,
2894 ))
2895 }
2896}
2897
2898#[derive(Clone, Debug)]
2902pub struct RedditSearchSubredditsResource {
2903 scope: Scope,
2904}
2905
2906impl RedditSearchSubredditsResource {
2907 pub async fn list(
2915 &self,
2916 options: RedditSearchSubredditsOptions,
2917 ) -> Result<RedditSearchSubredditsPage, Error> {
2918 self.scope
2919 .operation(
2920 Method::GET,
2921 "/v1/reddit/search/subreddits",
2922 options.query(),
2923 options.request_options,
2924 )?
2925 .send_page()
2926 .await
2927 }
2928
2929 pub fn items(&self, options: RedditSearchSubredditsOptions) -> Items<RedditSubreddit> {
2931 Items::new(self.scope.operation(
2932 Method::GET,
2933 "/v1/reddit/search/subreddits",
2934 options.query(),
2935 options.request_options,
2936 ))
2937 }
2938}
2939
2940#[derive(Clone, Debug)]
2944pub struct RedditSubredditResource {
2945 scope: Scope,
2946}
2947
2948impl RedditSubredditResource {
2949 pub fn posts(&self) -> RedditSubredditPostsResource {
2951 RedditSubredditPostsResource {
2952 scope: self.scope.clone(),
2953 }
2954 }
2955
2956 pub fn rules(&self) -> RedditSubredditRulesResource {
2958 RedditSubredditRulesResource {
2959 scope: self.scope.clone(),
2960 }
2961 }
2962
2963 pub fn wiki_page(
2969 &self,
2970 reference: impl Into<ResourceReference>,
2971 ) -> RedditSubredditWikiPageResource {
2972 RedditSubredditWikiPageResource {
2973 scope: self.scope.select(
2974 "page",
2975 "reddit",
2976 "wikiPage",
2977 Reference::from(reference.into()),
2978 ),
2979 }
2980 }
2981
2982 pub fn wiki_pages(&self) -> RedditSubredditWikiPagesResource {
2984 RedditSubredditWikiPagesResource {
2985 scope: self.scope.clone(),
2986 }
2987 }
2988
2989 pub async fn get(
2997 &self,
2998 options: impl Into<Option<RedditSubredditOptions>>,
2999 ) -> Result<RedditSubredditResponse, Error> {
3000 let options = options.into().unwrap_or_default();
3001 self.scope
3002 .operation(
3003 Method::GET,
3004 "/v1/reddit/subreddits/{identifier}",
3005 options.query(),
3006 options.request_options,
3007 )?
3008 .send()
3009 .await
3010 }
3011}
3012
3013#[derive(Clone, Debug)]
3017pub struct RedditSubredditPostsResource {
3018 scope: Scope,
3019}
3020
3021impl RedditSubredditPostsResource {
3022 pub async fn list(
3030 &self,
3031 options: impl Into<Option<RedditSubredditPostsOptions>>,
3032 ) -> Result<RedditSubredditPostsPage, Error> {
3033 let options = options.into().unwrap_or_default();
3034 self.scope
3035 .operation(
3036 Method::GET,
3037 "/v1/reddit/subreddits/{identifier}/posts",
3038 options.query(),
3039 options.request_options,
3040 )?
3041 .send_page()
3042 .await
3043 }
3044
3045 pub fn items(
3047 &self,
3048 options: impl Into<Option<RedditSubredditPostsOptions>>,
3049 ) -> Items<RedditPost> {
3050 let options = options.into().unwrap_or_default();
3051 Items::new(self.scope.operation(
3052 Method::GET,
3053 "/v1/reddit/subreddits/{identifier}/posts",
3054 options.query(),
3055 options.request_options,
3056 ))
3057 }
3058}
3059
3060#[derive(Clone, Debug)]
3064pub struct RedditSubredditRulesResource {
3065 scope: Scope,
3066}
3067
3068impl RedditSubredditRulesResource {
3069 pub async fn list(
3077 &self,
3078 options: impl Into<Option<RedditSubredditRulesOptions>>,
3079 ) -> Result<RedditSubredditRulesResponse, Error> {
3080 let options = options.into().unwrap_or_default();
3081 self.scope
3082 .operation(
3083 Method::GET,
3084 "/v1/reddit/subreddits/{identifier}/rules",
3085 options.query(),
3086 options.request_options,
3087 )?
3088 .send()
3089 .await
3090 }
3091}
3092
3093#[derive(Clone, Debug)]
3097pub struct RedditSubredditWikiPageResource {
3098 scope: Scope,
3099}
3100
3101impl RedditSubredditWikiPageResource {
3102 pub async fn get(
3110 &self,
3111 options: impl Into<Option<RedditSubredditWikiPageOptions>>,
3112 ) -> Result<RedditSubredditWikiPageResponse, Error> {
3113 let options = options.into().unwrap_or_default();
3114 self.scope
3115 .operation(
3116 Method::GET,
3117 "/v1/reddit/subreddits/{identifier}/wiki-pages/{page}",
3118 options.query(),
3119 options.request_options,
3120 )?
3121 .send()
3122 .await
3123 }
3124}
3125
3126#[derive(Clone, Debug)]
3130pub struct RedditSubredditWikiPagesResource {
3131 scope: Scope,
3132}
3133
3134impl RedditSubredditWikiPagesResource {
3135 pub async fn list(
3143 &self,
3144 options: impl Into<Option<RedditSubredditWikiPagesOptions>>,
3145 ) -> Result<RedditSubredditWikiPagesResponse, Error> {
3146 let options = options.into().unwrap_or_default();
3147 self.scope
3148 .operation(
3149 Method::GET,
3150 "/v1/reddit/subreddits/{identifier}/wiki-pages",
3151 options.query(),
3152 options.request_options,
3153 )?
3154 .send()
3155 .await
3156 }
3157}
3158
3159#[derive(Clone, Debug)]
3163pub struct RedditSubredditsResource {
3164 scope: Scope,
3165}
3166
3167impl RedditSubredditsResource {
3168 #[allow(clippy::new_ret_no_self)]
3170 pub fn new(&self) -> RedditSubredditsNewResource {
3171 RedditSubredditsNewResource {
3172 scope: self.scope.clone(),
3173 }
3174 }
3175
3176 pub fn popular(&self) -> RedditSubredditsPopularResource {
3178 RedditSubredditsPopularResource {
3179 scope: self.scope.clone(),
3180 }
3181 }
3182}
3183
3184#[derive(Clone, Debug)]
3188pub struct RedditSubredditsNewResource {
3189 scope: Scope,
3190}
3191
3192impl RedditSubredditsNewResource {
3193 pub async fn list(
3201 &self,
3202 options: impl Into<Option<RedditSubredditsNewOptions>>,
3203 ) -> Result<RedditSubredditsNewPage, Error> {
3204 let options = options.into().unwrap_or_default();
3205 self.scope
3206 .operation(
3207 Method::GET,
3208 "/v1/reddit/subreddits/new",
3209 options.query(),
3210 options.request_options,
3211 )?
3212 .send_page()
3213 .await
3214 }
3215
3216 pub fn items(
3218 &self,
3219 options: impl Into<Option<RedditSubredditsNewOptions>>,
3220 ) -> Items<RedditSubreddit> {
3221 let options = options.into().unwrap_or_default();
3222 Items::new(self.scope.operation(
3223 Method::GET,
3224 "/v1/reddit/subreddits/new",
3225 options.query(),
3226 options.request_options,
3227 ))
3228 }
3229}
3230
3231#[derive(Clone, Debug)]
3235pub struct RedditSubredditsPopularResource {
3236 scope: Scope,
3237}
3238
3239impl RedditSubredditsPopularResource {
3240 pub async fn list(
3248 &self,
3249 options: impl Into<Option<RedditSubredditsPopularOptions>>,
3250 ) -> Result<RedditSubredditsPopularPage, Error> {
3251 let options = options.into().unwrap_or_default();
3252 self.scope
3253 .operation(
3254 Method::GET,
3255 "/v1/reddit/subreddits/popular",
3256 options.query(),
3257 options.request_options,
3258 )?
3259 .send_page()
3260 .await
3261 }
3262
3263 pub fn items(
3265 &self,
3266 options: impl Into<Option<RedditSubredditsPopularOptions>>,
3267 ) -> Items<RedditSubreddit> {
3268 let options = options.into().unwrap_or_default();
3269 Items::new(self.scope.operation(
3270 Method::GET,
3271 "/v1/reddit/subreddits/popular",
3272 options.query(),
3273 options.request_options,
3274 ))
3275 }
3276}
3277
3278#[derive(Clone, Debug)]
3282pub struct RedditTrendingResource {
3283 scope: Scope,
3284}
3285
3286impl RedditTrendingResource {
3287 pub fn posts(&self) -> RedditTrendingPostsResource {
3289 RedditTrendingPostsResource {
3290 scope: self.scope.clone(),
3291 }
3292 }
3293}
3294
3295#[derive(Clone, Debug)]
3299pub struct RedditTrendingPostsResource {
3300 scope: Scope,
3301}
3302
3303impl RedditTrendingPostsResource {
3304 pub async fn list(
3312 &self,
3313 options: impl Into<Option<RedditTrendingPostsOptions>>,
3314 ) -> Result<RedditTrendingPostsPage, Error> {
3315 let options = options.into().unwrap_or_default();
3316 self.scope
3317 .operation(
3318 Method::GET,
3319 "/v1/reddit/trending/posts",
3320 options.query(),
3321 options.request_options,
3322 )?
3323 .send_page()
3324 .await
3325 }
3326
3327 pub fn items(
3329 &self,
3330 options: impl Into<Option<RedditTrendingPostsOptions>>,
3331 ) -> Items<RedditPost> {
3332 let options = options.into().unwrap_or_default();
3333 Items::new(self.scope.operation(
3334 Method::GET,
3335 "/v1/reddit/trending/posts",
3336 options.query(),
3337 options.request_options,
3338 ))
3339 }
3340}
3341
3342#[derive(Clone, Debug)]
3346pub struct TestDataResource {
3347 scope: Scope,
3348}
3349
3350impl TestDataResource {
3351 pub fn entry(&self, reference: impl Into<ResourceReference>) -> TestDataEntryResource {
3357 TestDataEntryResource {
3358 scope: self.scope.select(
3359 "id",
3360 "testData",
3361 "testDataEntry",
3362 Reference::from(reference.into()),
3363 ),
3364 }
3365 }
3366
3367 pub async fn list(
3374 &self,
3375 options: impl Into<Option<TestDataOptions>>,
3376 ) -> Result<TestDataResponse, Error> {
3377 let options = options.into().unwrap_or_default();
3378 self.scope
3379 .operation(
3380 Method::GET,
3381 "/v1/test-data",
3382 options.query(),
3383 options.request_options,
3384 )?
3385 .send()
3386 .await
3387 }
3388}
3389
3390#[derive(Clone, Debug)]
3394pub struct TestDataEntryResource {
3395 scope: Scope,
3396}
3397
3398impl TestDataEntryResource {
3399 pub async fn get(
3403 &self,
3404 options: impl Into<Option<TestDataEntryOptions>>,
3405 ) -> Result<TestDataEntryResponse, Error> {
3406 let options = options.into().unwrap_or_default();
3407 self.scope
3408 .operation(
3409 Method::GET,
3410 "/v1/test-data/{id}",
3411 options.query(),
3412 options.request_options,
3413 )?
3414 .send()
3415 .await
3416 }
3417}
3418
3419#[derive(Clone, Debug)]
3423pub struct TikTokResource {
3424 scope: Scope,
3425}
3426
3427impl TikTokResource {
3428 pub fn effect(&self, reference: impl Into<ResourceReference>) -> TikTokEffectResource {
3434 TikTokEffectResource {
3435 scope: self.scope.select(
3436 "identifier",
3437 "tiktok",
3438 "effect",
3439 Reference::from(reference.into()),
3440 ),
3441 }
3442 }
3443
3444 pub fn effects(&self) -> TikTokEffectsResource {
3446 TikTokEffectsResource {
3447 scope: self.scope.clone(),
3448 }
3449 }
3450
3451 pub fn hashtag(&self, reference: impl Into<ResourceReference>) -> TikTokHashtagResource {
3457 TikTokHashtagResource {
3458 scope: self.scope.select(
3459 "identifier",
3460 "tiktok",
3461 "hashtag",
3462 Reference::from(reference.into()),
3463 ),
3464 }
3465 }
3466
3467 pub fn location(&self, reference: impl Into<ResourceReference>) -> TikTokLocationResource {
3473 TikTokLocationResource {
3474 scope: self.scope.select(
3475 "identifier",
3476 "tiktok",
3477 "location",
3478 Reference::from(reference.into()),
3479 ),
3480 }
3481 }
3482
3483 pub fn music(&self, reference: impl Into<ResourceReference>) -> TikTokMusicResource {
3489 TikTokMusicResource {
3490 scope: self.scope.select(
3491 "identifier",
3492 "tiktok",
3493 "music",
3494 Reference::from(reference.into()),
3495 ),
3496 }
3497 }
3498
3499 pub fn post(&self, reference: impl Into<ResourceReference>) -> TikTokPostResource {
3505 TikTokPostResource {
3506 scope: self.scope.select(
3507 "identifier",
3508 "tiktok",
3509 "post",
3510 Reference::from(reference.into()),
3511 ),
3512 }
3513 }
3514
3515 pub fn profile(&self, reference: impl Into<ProfileReference>) -> TikTokProfileResource {
3521 TikTokProfileResource {
3522 scope: self.scope.select(
3523 "identifier",
3524 "tiktok",
3525 "profile",
3526 Reference::from(reference.into()),
3527 ),
3528 }
3529 }
3530
3531 pub fn search(&self) -> TikTokSearchResource {
3533 TikTokSearchResource {
3534 scope: self.scope.clone(),
3535 }
3536 }
3537
3538 pub fn trending(&self) -> TikTokTrendingResource {
3540 TikTokTrendingResource {
3541 scope: self.scope.clone(),
3542 }
3543 }
3544}
3545
3546#[derive(Clone, Debug)]
3550pub struct TikTokEffectResource {
3551 scope: Scope,
3552}
3553
3554impl TikTokEffectResource {
3555 pub fn posts(&self) -> TikTokEffectPostsResource {
3557 TikTokEffectPostsResource {
3558 scope: self.scope.clone(),
3559 }
3560 }
3561
3562 pub async fn get(
3570 &self,
3571 options: impl Into<Option<TikTokEffectOptions>>,
3572 ) -> Result<TikTokEffectResponse, Error> {
3573 let options = options.into().unwrap_or_default();
3574 self.scope
3575 .operation(
3576 Method::GET,
3577 "/v1/tiktok/effects/{identifier}",
3578 options.query(),
3579 options.request_options,
3580 )?
3581 .send()
3582 .await
3583 }
3584}
3585
3586#[derive(Clone, Debug)]
3590pub struct TikTokEffectPostsResource {
3591 scope: Scope,
3592}
3593
3594impl TikTokEffectPostsResource {
3595 pub async fn list(
3603 &self,
3604 options: impl Into<Option<TikTokEffectPostsOptions>>,
3605 ) -> Result<TikTokEffectPostsPage, Error> {
3606 let options = options.into().unwrap_or_default();
3607 self.scope
3608 .operation(
3609 Method::GET,
3610 "/v1/tiktok/effects/{identifier}/posts",
3611 options.query(),
3612 options.request_options,
3613 )?
3614 .send_page()
3615 .await
3616 }
3617
3618 pub fn items(&self, options: impl Into<Option<TikTokEffectPostsOptions>>) -> Items<TikTokPost> {
3620 let options = options.into().unwrap_or_default();
3621 Items::new(self.scope.operation(
3622 Method::GET,
3623 "/v1/tiktok/effects/{identifier}/posts",
3624 options.query(),
3625 options.request_options,
3626 ))
3627 }
3628}
3629
3630#[derive(Clone, Debug)]
3634pub struct TikTokEffectsResource {
3635 scope: Scope,
3636}
3637
3638impl TikTokEffectsResource {
3639 pub async fn list(&self, options: TikTokEffectsOptions) -> Result<TikTokEffectsPage, Error> {
3647 self.scope
3648 .operation(
3649 Method::GET,
3650 "/v1/tiktok/effects",
3651 options.query(),
3652 options.request_options,
3653 )?
3654 .send_page()
3655 .await
3656 }
3657
3658 pub fn items(&self, options: TikTokEffectsOptions) -> Items<TikTokEffect> {
3660 Items::new(self.scope.operation(
3661 Method::GET,
3662 "/v1/tiktok/effects",
3663 options.query(),
3664 options.request_options,
3665 ))
3666 }
3667}
3668
3669#[derive(Clone, Debug)]
3673pub struct TikTokHashtagResource {
3674 scope: Scope,
3675}
3676
3677impl TikTokHashtagResource {
3678 pub fn posts(&self) -> TikTokHashtagPostsResource {
3680 TikTokHashtagPostsResource {
3681 scope: self.scope.clone(),
3682 }
3683 }
3684
3685 pub async fn get(
3693 &self,
3694 options: impl Into<Option<TikTokHashtagOptions>>,
3695 ) -> Result<TikTokHashtagResponse, Error> {
3696 let options = options.into().unwrap_or_default();
3697 self.scope
3698 .operation(
3699 Method::GET,
3700 "/v1/tiktok/hashtags/{identifier}",
3701 options.query(),
3702 options.request_options,
3703 )?
3704 .send()
3705 .await
3706 }
3707}
3708
3709#[derive(Clone, Debug)]
3713pub struct TikTokHashtagPostsResource {
3714 scope: Scope,
3715}
3716
3717impl TikTokHashtagPostsResource {
3718 pub async fn list(
3726 &self,
3727 options: impl Into<Option<TikTokHashtagPostsOptions>>,
3728 ) -> Result<TikTokHashtagPostsPage, Error> {
3729 let options = options.into().unwrap_or_default();
3730 self.scope
3731 .operation(
3732 Method::GET,
3733 "/v1/tiktok/hashtags/{identifier}/posts",
3734 options.query(),
3735 options.request_options,
3736 )?
3737 .send_page()
3738 .await
3739 }
3740
3741 pub fn items(
3743 &self,
3744 options: impl Into<Option<TikTokHashtagPostsOptions>>,
3745 ) -> Items<TikTokPost> {
3746 let options = options.into().unwrap_or_default();
3747 Items::new(self.scope.operation(
3748 Method::GET,
3749 "/v1/tiktok/hashtags/{identifier}/posts",
3750 options.query(),
3751 options.request_options,
3752 ))
3753 }
3754}
3755
3756#[derive(Clone, Debug)]
3760pub struct TikTokLocationResource {
3761 scope: Scope,
3762}
3763
3764impl TikTokLocationResource {
3765 pub fn posts(&self) -> TikTokLocationPostsResource {
3767 TikTokLocationPostsResource {
3768 scope: self.scope.clone(),
3769 }
3770 }
3771
3772 pub async fn get(
3780 &self,
3781 options: impl Into<Option<TikTokLocationOptions>>,
3782 ) -> Result<TikTokLocationResponse, Error> {
3783 let options = options.into().unwrap_or_default();
3784 self.scope
3785 .operation(
3786 Method::GET,
3787 "/v1/tiktok/locations/{identifier}",
3788 options.query(),
3789 options.request_options,
3790 )?
3791 .send()
3792 .await
3793 }
3794}
3795
3796#[derive(Clone, Debug)]
3800pub struct TikTokLocationPostsResource {
3801 scope: Scope,
3802}
3803
3804impl TikTokLocationPostsResource {
3805 pub async fn list(
3813 &self,
3814 options: impl Into<Option<TikTokLocationPostsOptions>>,
3815 ) -> Result<TikTokLocationPostsPage, Error> {
3816 let options = options.into().unwrap_or_default();
3817 self.scope
3818 .operation(
3819 Method::GET,
3820 "/v1/tiktok/locations/{identifier}/posts",
3821 options.query(),
3822 options.request_options,
3823 )?
3824 .send_page()
3825 .await
3826 }
3827
3828 pub fn items(
3830 &self,
3831 options: impl Into<Option<TikTokLocationPostsOptions>>,
3832 ) -> Items<TikTokPost> {
3833 let options = options.into().unwrap_or_default();
3834 Items::new(self.scope.operation(
3835 Method::GET,
3836 "/v1/tiktok/locations/{identifier}/posts",
3837 options.query(),
3838 options.request_options,
3839 ))
3840 }
3841}
3842
3843#[derive(Clone, Debug)]
3847pub struct TikTokMusicResource {
3848 scope: Scope,
3849}
3850
3851impl TikTokMusicResource {
3852 pub fn posts(&self) -> TikTokMusicPostsResource {
3854 TikTokMusicPostsResource {
3855 scope: self.scope.clone(),
3856 }
3857 }
3858
3859 pub async fn get(
3867 &self,
3868 options: impl Into<Option<TikTokMusicOptions>>,
3869 ) -> Result<TikTokMusicResponse, Error> {
3870 let options = options.into().unwrap_or_default();
3871 self.scope
3872 .operation(
3873 Method::GET,
3874 "/v1/tiktok/music/{identifier}",
3875 options.query(),
3876 options.request_options,
3877 )?
3878 .send()
3879 .await
3880 }
3881}
3882
3883#[derive(Clone, Debug)]
3887pub struct TikTokMusicPostsResource {
3888 scope: Scope,
3889}
3890
3891impl TikTokMusicPostsResource {
3892 pub async fn list(
3900 &self,
3901 options: impl Into<Option<TikTokMusicPostsOptions>>,
3902 ) -> Result<TikTokMusicPostsPage, Error> {
3903 let options = options.into().unwrap_or_default();
3904 self.scope
3905 .operation(
3906 Method::GET,
3907 "/v1/tiktok/music/{identifier}/posts",
3908 options.query(),
3909 options.request_options,
3910 )?
3911 .send_page()
3912 .await
3913 }
3914
3915 pub fn items(&self, options: impl Into<Option<TikTokMusicPostsOptions>>) -> Items<TikTokPost> {
3917 let options = options.into().unwrap_or_default();
3918 Items::new(self.scope.operation(
3919 Method::GET,
3920 "/v1/tiktok/music/{identifier}/posts",
3921 options.query(),
3922 options.request_options,
3923 ))
3924 }
3925}
3926
3927#[derive(Clone, Debug)]
3931pub struct TikTokPostResource {
3932 scope: Scope,
3933}
3934
3935impl TikTokPostResource {
3936 pub fn comment(&self, reference: impl Into<ResourceReference>) -> TikTokPostCommentResource {
3942 TikTokPostCommentResource {
3943 scope: self.scope.select(
3944 "comment_id",
3945 "tiktok",
3946 "comment",
3947 Reference::from(reference.into()),
3948 ),
3949 }
3950 }
3951
3952 pub fn comments(&self) -> TikTokPostCommentsResource {
3954 TikTokPostCommentsResource {
3955 scope: self.scope.clone(),
3956 }
3957 }
3958
3959 pub async fn get(
3967 &self,
3968 options: impl Into<Option<TikTokPostOptions>>,
3969 ) -> Result<TikTokPostResponse, Error> {
3970 let options = options.into().unwrap_or_default();
3971 self.scope
3972 .operation(
3973 Method::GET,
3974 "/v1/tiktok/posts/{identifier}",
3975 options.query(),
3976 options.request_options,
3977 )?
3978 .send()
3979 .await
3980 }
3981}
3982
3983#[derive(Clone, Debug)]
3987pub struct TikTokPostCommentResource {
3988 scope: Scope,
3989}
3990
3991impl TikTokPostCommentResource {
3992 pub fn replies(&self) -> TikTokPostCommentRepliesResource {
3994 TikTokPostCommentRepliesResource {
3995 scope: self.scope.clone(),
3996 }
3997 }
3998}
3999
4000#[derive(Clone, Debug)]
4004pub struct TikTokPostCommentRepliesResource {
4005 scope: Scope,
4006}
4007
4008impl TikTokPostCommentRepliesResource {
4009 pub async fn list(
4018 &self,
4019 options: impl Into<Option<TikTokPostCommentRepliesOptions>>,
4020 ) -> Result<TikTokPostCommentRepliesPage, Error> {
4021 let options = options.into().unwrap_or_default();
4022 self.scope
4023 .operation(
4024 Method::GET,
4025 "/v1/tiktok/posts/{identifier}/comments/{comment_id}/replies",
4026 options.query(),
4027 options.request_options,
4028 )?
4029 .send_page()
4030 .await
4031 }
4032
4033 pub fn items(
4035 &self,
4036 options: impl Into<Option<TikTokPostCommentRepliesOptions>>,
4037 ) -> Items<TikTokComment> {
4038 let options = options.into().unwrap_or_default();
4039 Items::new(self.scope.operation(
4040 Method::GET,
4041 "/v1/tiktok/posts/{identifier}/comments/{comment_id}/replies",
4042 options.query(),
4043 options.request_options,
4044 ))
4045 }
4046}
4047
4048#[derive(Clone, Debug)]
4052pub struct TikTokPostCommentsResource {
4053 scope: Scope,
4054}
4055
4056impl TikTokPostCommentsResource {
4057 pub async fn list(
4066 &self,
4067 options: impl Into<Option<TikTokPostCommentsOptions>>,
4068 ) -> Result<TikTokPostCommentsPage, Error> {
4069 let options = options.into().unwrap_or_default();
4070 self.scope
4071 .operation(
4072 Method::GET,
4073 "/v1/tiktok/posts/{identifier}/comments",
4074 options.query(),
4075 options.request_options,
4076 )?
4077 .send_page()
4078 .await
4079 }
4080
4081 pub fn items(
4083 &self,
4084 options: impl Into<Option<TikTokPostCommentsOptions>>,
4085 ) -> Items<TikTokComment> {
4086 let options = options.into().unwrap_or_default();
4087 Items::new(self.scope.operation(
4088 Method::GET,
4089 "/v1/tiktok/posts/{identifier}/comments",
4090 options.query(),
4091 options.request_options,
4092 ))
4093 }
4094}
4095
4096#[derive(Clone, Debug)]
4100pub struct TikTokProfileResource {
4101 scope: Scope,
4102}
4103
4104impl TikTokProfileResource {
4105 pub fn followers(&self) -> TikTokProfileFollowersResource {
4107 TikTokProfileFollowersResource {
4108 scope: self.scope.clone(),
4109 }
4110 }
4111
4112 pub fn following(&self) -> TikTokProfileFollowingResource {
4114 TikTokProfileFollowingResource {
4115 scope: self.scope.clone(),
4116 }
4117 }
4118
4119 pub fn liked_posts(&self) -> TikTokProfileLikedPostsResource {
4121 TikTokProfileLikedPostsResource {
4122 scope: self.scope.clone(),
4123 }
4124 }
4125
4126 pub fn playlist(
4132 &self,
4133 reference: impl Into<ResourceReference>,
4134 ) -> TikTokProfilePlaylistResource {
4135 TikTokProfilePlaylistResource {
4136 scope: self.scope.select(
4137 "playlist_id",
4138 "tiktok",
4139 "playlist",
4140 Reference::from(reference.into()),
4141 ),
4142 }
4143 }
4144
4145 pub fn playlists(&self) -> TikTokProfilePlaylistsResource {
4147 TikTokProfilePlaylistsResource {
4148 scope: self.scope.clone(),
4149 }
4150 }
4151
4152 pub fn posts(&self) -> TikTokProfilePostsResource {
4154 TikTokProfilePostsResource {
4155 scope: self.scope.clone(),
4156 }
4157 }
4158
4159 pub async fn get(
4167 &self,
4168 options: impl Into<Option<TikTokProfileOptions>>,
4169 ) -> Result<TikTokProfileResponse, Error> {
4170 let options = options.into().unwrap_or_default();
4171 self.scope
4172 .operation(
4173 Method::GET,
4174 "/v1/tiktok/profiles/{identifier}",
4175 options.query(),
4176 options.request_options,
4177 )?
4178 .send()
4179 .await
4180 }
4181}
4182
4183#[derive(Clone, Debug)]
4187pub struct TikTokProfileFollowersResource {
4188 scope: Scope,
4189}
4190
4191impl TikTokProfileFollowersResource {
4192 pub async fn list(
4200 &self,
4201 options: impl Into<Option<TikTokProfileFollowersOptions>>,
4202 ) -> Result<TikTokProfileFollowersPage, Error> {
4203 let options = options.into().unwrap_or_default();
4204 self.scope
4205 .operation(
4206 Method::GET,
4207 "/v1/tiktok/profiles/{identifier}/followers",
4208 options.query(),
4209 options.request_options,
4210 )?
4211 .send_page()
4212 .await
4213 }
4214
4215 pub fn items(
4217 &self,
4218 options: impl Into<Option<TikTokProfileFollowersOptions>>,
4219 ) -> Items<TikTokProfile> {
4220 let options = options.into().unwrap_or_default();
4221 Items::new(self.scope.operation(
4222 Method::GET,
4223 "/v1/tiktok/profiles/{identifier}/followers",
4224 options.query(),
4225 options.request_options,
4226 ))
4227 }
4228}
4229
4230#[derive(Clone, Debug)]
4234pub struct TikTokProfileFollowingResource {
4235 scope: Scope,
4236}
4237
4238impl TikTokProfileFollowingResource {
4239 pub async fn list(
4247 &self,
4248 options: impl Into<Option<TikTokProfileFollowingOptions>>,
4249 ) -> Result<TikTokProfileFollowingPage, Error> {
4250 let options = options.into().unwrap_or_default();
4251 self.scope
4252 .operation(
4253 Method::GET,
4254 "/v1/tiktok/profiles/{identifier}/following",
4255 options.query(),
4256 options.request_options,
4257 )?
4258 .send_page()
4259 .await
4260 }
4261
4262 pub fn items(
4264 &self,
4265 options: impl Into<Option<TikTokProfileFollowingOptions>>,
4266 ) -> Items<TikTokProfile> {
4267 let options = options.into().unwrap_or_default();
4268 Items::new(self.scope.operation(
4269 Method::GET,
4270 "/v1/tiktok/profiles/{identifier}/following",
4271 options.query(),
4272 options.request_options,
4273 ))
4274 }
4275}
4276
4277#[derive(Clone, Debug)]
4281pub struct TikTokProfileLikedPostsResource {
4282 scope: Scope,
4283}
4284
4285impl TikTokProfileLikedPostsResource {
4286 pub async fn list(
4294 &self,
4295 options: impl Into<Option<TikTokProfileLikedPostsOptions>>,
4296 ) -> Result<TikTokProfileLikedPostsPage, Error> {
4297 let options = options.into().unwrap_or_default();
4298 self.scope
4299 .operation(
4300 Method::GET,
4301 "/v1/tiktok/profiles/{identifier}/liked-posts",
4302 options.query(),
4303 options.request_options,
4304 )?
4305 .send_page()
4306 .await
4307 }
4308
4309 pub fn items(
4311 &self,
4312 options: impl Into<Option<TikTokProfileLikedPostsOptions>>,
4313 ) -> Items<TikTokPost> {
4314 let options = options.into().unwrap_or_default();
4315 Items::new(self.scope.operation(
4316 Method::GET,
4317 "/v1/tiktok/profiles/{identifier}/liked-posts",
4318 options.query(),
4319 options.request_options,
4320 ))
4321 }
4322}
4323
4324#[derive(Clone, Debug)]
4328pub struct TikTokProfilePlaylistResource {
4329 scope: Scope,
4330}
4331
4332impl TikTokProfilePlaylistResource {
4333 pub fn posts(&self) -> TikTokProfilePlaylistPostsResource {
4335 TikTokProfilePlaylistPostsResource {
4336 scope: self.scope.clone(),
4337 }
4338 }
4339
4340 pub async fn get(
4348 &self,
4349 options: impl Into<Option<TikTokProfilePlaylistOptions>>,
4350 ) -> Result<TikTokProfilePlaylistResponse, Error> {
4351 let options = options.into().unwrap_or_default();
4352 self.scope
4353 .operation(
4354 Method::GET,
4355 "/v1/tiktok/profiles/{identifier}/playlists/{playlist_id}",
4356 options.query(),
4357 options.request_options,
4358 )?
4359 .send()
4360 .await
4361 }
4362}
4363
4364#[derive(Clone, Debug)]
4368pub struct TikTokProfilePlaylistPostsResource {
4369 scope: Scope,
4370}
4371
4372impl TikTokProfilePlaylistPostsResource {
4373 pub async fn list(
4381 &self,
4382 options: impl Into<Option<TikTokProfilePlaylistPostsOptions>>,
4383 ) -> Result<TikTokProfilePlaylistPostsPage, Error> {
4384 let options = options.into().unwrap_or_default();
4385 self.scope
4386 .operation(
4387 Method::GET,
4388 "/v1/tiktok/profiles/{identifier}/playlists/{playlist_id}/posts",
4389 options.query(),
4390 options.request_options,
4391 )?
4392 .send_page()
4393 .await
4394 }
4395
4396 pub fn items(
4398 &self,
4399 options: impl Into<Option<TikTokProfilePlaylistPostsOptions>>,
4400 ) -> Items<TikTokPost> {
4401 let options = options.into().unwrap_or_default();
4402 Items::new(self.scope.operation(
4403 Method::GET,
4404 "/v1/tiktok/profiles/{identifier}/playlists/{playlist_id}/posts",
4405 options.query(),
4406 options.request_options,
4407 ))
4408 }
4409}
4410
4411#[derive(Clone, Debug)]
4415pub struct TikTokProfilePlaylistsResource {
4416 scope: Scope,
4417}
4418
4419impl TikTokProfilePlaylistsResource {
4420 pub async fn list(
4428 &self,
4429 options: impl Into<Option<TikTokProfilePlaylistsOptions>>,
4430 ) -> Result<TikTokProfilePlaylistsPage, Error> {
4431 let options = options.into().unwrap_or_default();
4432 self.scope
4433 .operation(
4434 Method::GET,
4435 "/v1/tiktok/profiles/{identifier}/playlists",
4436 options.query(),
4437 options.request_options,
4438 )?
4439 .send_page()
4440 .await
4441 }
4442
4443 pub fn items(
4445 &self,
4446 options: impl Into<Option<TikTokProfilePlaylistsOptions>>,
4447 ) -> Items<TikTokPlaylist> {
4448 let options = options.into().unwrap_or_default();
4449 Items::new(self.scope.operation(
4450 Method::GET,
4451 "/v1/tiktok/profiles/{identifier}/playlists",
4452 options.query(),
4453 options.request_options,
4454 ))
4455 }
4456}
4457
4458#[derive(Clone, Debug)]
4462pub struct TikTokProfilePostsResource {
4463 scope: Scope,
4464}
4465
4466impl TikTokProfilePostsResource {
4467 pub async fn list(
4475 &self,
4476 options: impl Into<Option<TikTokProfilePostsOptions>>,
4477 ) -> Result<TikTokProfilePostsPage, Error> {
4478 let options = options.into().unwrap_or_default();
4479 self.scope
4480 .operation(
4481 Method::GET,
4482 "/v1/tiktok/profiles/{identifier}/posts",
4483 options.query(),
4484 options.request_options,
4485 )?
4486 .send_page()
4487 .await
4488 }
4489
4490 pub fn items(
4492 &self,
4493 options: impl Into<Option<TikTokProfilePostsOptions>>,
4494 ) -> Items<TikTokPost> {
4495 let options = options.into().unwrap_or_default();
4496 Items::new(self.scope.operation(
4497 Method::GET,
4498 "/v1/tiktok/profiles/{identifier}/posts",
4499 options.query(),
4500 options.request_options,
4501 ))
4502 }
4503}
4504
4505#[derive(Clone, Debug)]
4509pub struct TikTokSearchResource {
4510 scope: Scope,
4511}
4512
4513impl TikTokSearchResource {
4514 pub fn hashtags(&self) -> TikTokSearchHashtagsResource {
4516 TikTokSearchHashtagsResource {
4517 scope: self.scope.clone(),
4518 }
4519 }
4520
4521 pub fn locations(&self) -> TikTokSearchLocationsResource {
4523 TikTokSearchLocationsResource {
4524 scope: self.scope.clone(),
4525 }
4526 }
4527
4528 pub fn music(&self) -> TikTokSearchMusicResource {
4530 TikTokSearchMusicResource {
4531 scope: self.scope.clone(),
4532 }
4533 }
4534
4535 pub fn posts(&self) -> TikTokSearchPostsResource {
4537 TikTokSearchPostsResource {
4538 scope: self.scope.clone(),
4539 }
4540 }
4541
4542 pub fn profiles(&self) -> TikTokSearchProfilesResource {
4544 TikTokSearchProfilesResource {
4545 scope: self.scope.clone(),
4546 }
4547 }
4548}
4549
4550#[derive(Clone, Debug)]
4554pub struct TikTokSearchHashtagsResource {
4555 scope: Scope,
4556}
4557
4558impl TikTokSearchHashtagsResource {
4559 pub async fn list(
4567 &self,
4568 options: TikTokSearchHashtagsOptions,
4569 ) -> Result<TikTokSearchHashtagsPage, Error> {
4570 self.scope
4571 .operation(
4572 Method::GET,
4573 "/v1/tiktok/search/hashtags",
4574 options.query(),
4575 options.request_options,
4576 )?
4577 .send_page()
4578 .await
4579 }
4580
4581 pub fn items(&self, options: TikTokSearchHashtagsOptions) -> Items<TikTokHashtag> {
4583 Items::new(self.scope.operation(
4584 Method::GET,
4585 "/v1/tiktok/search/hashtags",
4586 options.query(),
4587 options.request_options,
4588 ))
4589 }
4590}
4591
4592#[derive(Clone, Debug)]
4596pub struct TikTokSearchLocationsResource {
4597 scope: Scope,
4598}
4599
4600impl TikTokSearchLocationsResource {
4601 pub async fn list(
4609 &self,
4610 options: TikTokSearchLocationsOptions,
4611 ) -> Result<TikTokSearchLocationsPage, Error> {
4612 self.scope
4613 .operation(
4614 Method::GET,
4615 "/v1/tiktok/search/locations",
4616 options.query(),
4617 options.request_options,
4618 )?
4619 .send_page()
4620 .await
4621 }
4622
4623 pub fn items(&self, options: TikTokSearchLocationsOptions) -> Items<TikTokLocation> {
4625 Items::new(self.scope.operation(
4626 Method::GET,
4627 "/v1/tiktok/search/locations",
4628 options.query(),
4629 options.request_options,
4630 ))
4631 }
4632}
4633
4634#[derive(Clone, Debug)]
4638pub struct TikTokSearchMusicResource {
4639 scope: Scope,
4640}
4641
4642impl TikTokSearchMusicResource {
4643 pub async fn list(
4651 &self,
4652 options: TikTokSearchMusicOptions,
4653 ) -> Result<TikTokSearchMusicPage, Error> {
4654 self.scope
4655 .operation(
4656 Method::GET,
4657 "/v1/tiktok/search/music",
4658 options.query(),
4659 options.request_options,
4660 )?
4661 .send_page()
4662 .await
4663 }
4664
4665 pub fn items(&self, options: TikTokSearchMusicOptions) -> Items<TikTokMusic> {
4667 Items::new(self.scope.operation(
4668 Method::GET,
4669 "/v1/tiktok/search/music",
4670 options.query(),
4671 options.request_options,
4672 ))
4673 }
4674}
4675
4676#[derive(Clone, Debug)]
4680pub struct TikTokSearchPostsResource {
4681 scope: Scope,
4682}
4683
4684impl TikTokSearchPostsResource {
4685 pub async fn list(
4693 &self,
4694 options: TikTokSearchPostsOptions,
4695 ) -> Result<TikTokSearchPostsPage, Error> {
4696 self.scope
4697 .operation(
4698 Method::GET,
4699 "/v1/tiktok/search/posts",
4700 options.query(),
4701 options.request_options,
4702 )?
4703 .send_page()
4704 .await
4705 }
4706
4707 pub fn items(&self, options: TikTokSearchPostsOptions) -> Items<TikTokPost> {
4709 Items::new(self.scope.operation(
4710 Method::GET,
4711 "/v1/tiktok/search/posts",
4712 options.query(),
4713 options.request_options,
4714 ))
4715 }
4716}
4717
4718#[derive(Clone, Debug)]
4722pub struct TikTokSearchProfilesResource {
4723 scope: Scope,
4724}
4725
4726impl TikTokSearchProfilesResource {
4727 pub async fn list(
4735 &self,
4736 options: TikTokSearchProfilesOptions,
4737 ) -> Result<TikTokSearchProfilesPage, Error> {
4738 self.scope
4739 .operation(
4740 Method::GET,
4741 "/v1/tiktok/search/profiles",
4742 options.query(),
4743 options.request_options,
4744 )?
4745 .send_page()
4746 .await
4747 }
4748
4749 pub fn items(&self, options: TikTokSearchProfilesOptions) -> Items<TikTokProfile> {
4751 Items::new(self.scope.operation(
4752 Method::GET,
4753 "/v1/tiktok/search/profiles",
4754 options.query(),
4755 options.request_options,
4756 ))
4757 }
4758}
4759
4760#[derive(Clone, Debug)]
4764pub struct TikTokTrendingResource {
4765 scope: Scope,
4766}
4767
4768impl TikTokTrendingResource {
4769 pub fn categories(&self) -> TikTokTrendingCategoriesResource {
4771 TikTokTrendingCategoriesResource {
4772 scope: self.scope.clone(),
4773 }
4774 }
4775
4776 pub fn music(&self) -> TikTokTrendingMusicResource {
4778 TikTokTrendingMusicResource {
4779 scope: self.scope.clone(),
4780 }
4781 }
4782
4783 pub fn posts(&self) -> TikTokTrendingPostsResource {
4785 TikTokTrendingPostsResource {
4786 scope: self.scope.clone(),
4787 }
4788 }
4789}
4790
4791#[derive(Clone, Debug)]
4795pub struct TikTokTrendingCategoriesResource {
4796 scope: Scope,
4797}
4798
4799impl TikTokTrendingCategoriesResource {
4800 pub async fn list(
4808 &self,
4809 options: impl Into<Option<TikTokTrendingCategoriesOptions>>,
4810 ) -> Result<TikTokTrendingCategoriesPage, Error> {
4811 let options = options.into().unwrap_or_default();
4812 self.scope
4813 .operation(
4814 Method::GET,
4815 "/v1/tiktok/trending/categories",
4816 options.query(),
4817 options.request_options,
4818 )?
4819 .send_page()
4820 .await
4821 }
4822
4823 pub fn items(
4825 &self,
4826 options: impl Into<Option<TikTokTrendingCategoriesOptions>>,
4827 ) -> Items<TikTokCategory> {
4828 let options = options.into().unwrap_or_default();
4829 Items::new(self.scope.operation(
4830 Method::GET,
4831 "/v1/tiktok/trending/categories",
4832 options.query(),
4833 options.request_options,
4834 ))
4835 }
4836}
4837
4838#[derive(Clone, Debug)]
4842pub struct TikTokTrendingMusicResource {
4843 scope: Scope,
4844}
4845
4846impl TikTokTrendingMusicResource {
4847 pub async fn list(
4855 &self,
4856 options: impl Into<Option<TikTokTrendingMusicOptions>>,
4857 ) -> Result<TikTokTrendingMusicPage, Error> {
4858 let options = options.into().unwrap_or_default();
4859 self.scope
4860 .operation(
4861 Method::GET,
4862 "/v1/tiktok/trending/music",
4863 options.query(),
4864 options.request_options,
4865 )?
4866 .send_page()
4867 .await
4868 }
4869
4870 pub fn items(
4872 &self,
4873 options: impl Into<Option<TikTokTrendingMusicOptions>>,
4874 ) -> Items<TikTokMusic> {
4875 let options = options.into().unwrap_or_default();
4876 Items::new(self.scope.operation(
4877 Method::GET,
4878 "/v1/tiktok/trending/music",
4879 options.query(),
4880 options.request_options,
4881 ))
4882 }
4883}
4884
4885#[derive(Clone, Debug)]
4889pub struct TikTokTrendingPostsResource {
4890 scope: Scope,
4891}
4892
4893impl TikTokTrendingPostsResource {
4894 pub async fn list(
4902 &self,
4903 options: impl Into<Option<TikTokTrendingPostsOptions>>,
4904 ) -> Result<TikTokTrendingPostsPage, Error> {
4905 let options = options.into().unwrap_or_default();
4906 self.scope
4907 .operation(
4908 Method::GET,
4909 "/v1/tiktok/trending/posts",
4910 options.query(),
4911 options.request_options,
4912 )?
4913 .send_page()
4914 .await
4915 }
4916
4917 pub fn items(
4919 &self,
4920 options: impl Into<Option<TikTokTrendingPostsOptions>>,
4921 ) -> Items<TikTokPost> {
4922 let options = options.into().unwrap_or_default();
4923 Items::new(self.scope.operation(
4924 Method::GET,
4925 "/v1/tiktok/trending/posts",
4926 options.query(),
4927 options.request_options,
4928 ))
4929 }
4930}
4931
4932#[derive(Clone, Debug)]
4936pub struct TwitterResource {
4937 scope: Scope,
4938}
4939
4940impl TwitterResource {
4941 pub fn list(&self, reference: impl Into<ResourceReference>) -> TwitterListResource {
4947 TwitterListResource {
4948 scope: self.scope.select(
4949 "identifier",
4950 "twitter",
4951 "list",
4952 Reference::from(reference.into()),
4953 ),
4954 }
4955 }
4956
4957 pub fn post(&self, reference: impl Into<ResourceReference>) -> TwitterPostResource {
4963 TwitterPostResource {
4964 scope: self.scope.select(
4965 "identifier",
4966 "twitter",
4967 "post",
4968 Reference::from(reference.into()),
4969 ),
4970 }
4971 }
4972
4973 pub fn profile(&self, reference: impl Into<ProfileReference>) -> TwitterProfileResource {
4979 TwitterProfileResource {
4980 scope: self.scope.select(
4981 "identifier",
4982 "twitter",
4983 "profile",
4984 Reference::from(reference.into()),
4985 ),
4986 }
4987 }
4988
4989 pub fn search(&self) -> TwitterSearchResource {
4991 TwitterSearchResource {
4992 scope: self.scope.clone(),
4993 }
4994 }
4995}
4996
4997#[derive(Clone, Debug)]
5001pub struct TwitterListResource {
5002 scope: Scope,
5003}
5004
5005impl TwitterListResource {
5006 pub fn posts(&self) -> TwitterListPostsResource {
5008 TwitterListPostsResource {
5009 scope: self.scope.clone(),
5010 }
5011 }
5012}
5013
5014#[derive(Clone, Debug)]
5018pub struct TwitterListPostsResource {
5019 scope: Scope,
5020}
5021
5022impl TwitterListPostsResource {
5023 pub async fn list(
5031 &self,
5032 options: impl Into<Option<TwitterListPostsOptions>>,
5033 ) -> Result<TwitterListPostsPage, Error> {
5034 let options = options.into().unwrap_or_default();
5035 self.scope
5036 .operation(
5037 Method::GET,
5038 "/v1/twitter/lists/{identifier}/posts",
5039 options.query(),
5040 options.request_options,
5041 )?
5042 .send_page()
5043 .await
5044 }
5045
5046 pub fn items(&self, options: impl Into<Option<TwitterListPostsOptions>>) -> Items<TwitterPost> {
5048 let options = options.into().unwrap_or_default();
5049 Items::new(self.scope.operation(
5050 Method::GET,
5051 "/v1/twitter/lists/{identifier}/posts",
5052 options.query(),
5053 options.request_options,
5054 ))
5055 }
5056}
5057
5058#[derive(Clone, Debug)]
5062pub struct TwitterPostResource {
5063 scope: Scope,
5064}
5065
5066impl TwitterPostResource {
5067 pub fn comment(&self, reference: impl Into<ResourceReference>) -> TwitterPostCommentResource {
5073 TwitterPostCommentResource {
5074 scope: self.scope.select(
5075 "comment_id",
5076 "twitter",
5077 "comment",
5078 Reference::from(reference.into()),
5079 ),
5080 }
5081 }
5082
5083 pub fn comments(&self) -> TwitterPostCommentsResource {
5085 TwitterPostCommentsResource {
5086 scope: self.scope.clone(),
5087 }
5088 }
5089
5090 pub fn reposters(&self) -> TwitterPostRepostersResource {
5092 TwitterPostRepostersResource {
5093 scope: self.scope.clone(),
5094 }
5095 }
5096
5097 pub async fn get(
5105 &self,
5106 options: impl Into<Option<TwitterPostOptions>>,
5107 ) -> Result<TwitterPostResponse, Error> {
5108 let options = options.into().unwrap_or_default();
5109 self.scope
5110 .operation(
5111 Method::GET,
5112 "/v1/twitter/posts/{identifier}",
5113 options.query(),
5114 options.request_options,
5115 )?
5116 .send()
5117 .await
5118 }
5119}
5120
5121#[derive(Clone, Debug)]
5125pub struct TwitterPostCommentResource {
5126 scope: Scope,
5127}
5128
5129impl TwitterPostCommentResource {
5130 pub fn replies(&self) -> TwitterPostCommentRepliesResource {
5132 TwitterPostCommentRepliesResource {
5133 scope: self.scope.clone(),
5134 }
5135 }
5136}
5137
5138#[derive(Clone, Debug)]
5142pub struct TwitterPostCommentRepliesResource {
5143 scope: Scope,
5144}
5145
5146impl TwitterPostCommentRepliesResource {
5147 pub async fn list(
5156 &self,
5157 options: impl Into<Option<TwitterPostCommentRepliesOptions>>,
5158 ) -> Result<TwitterPostCommentRepliesPage, Error> {
5159 let options = options.into().unwrap_or_default();
5160 self.scope
5161 .operation(
5162 Method::GET,
5163 "/v1/twitter/posts/{identifier}/comments/{comment_id}/replies",
5164 options.query(),
5165 options.request_options,
5166 )?
5167 .send_page()
5168 .await
5169 }
5170
5171 pub fn items(
5173 &self,
5174 options: impl Into<Option<TwitterPostCommentRepliesOptions>>,
5175 ) -> Items<TwitterPost> {
5176 let options = options.into().unwrap_or_default();
5177 Items::new(self.scope.operation(
5178 Method::GET,
5179 "/v1/twitter/posts/{identifier}/comments/{comment_id}/replies",
5180 options.query(),
5181 options.request_options,
5182 ))
5183 }
5184}
5185
5186#[derive(Clone, Debug)]
5190pub struct TwitterPostCommentsResource {
5191 scope: Scope,
5192}
5193
5194impl TwitterPostCommentsResource {
5195 pub async fn list(
5204 &self,
5205 options: impl Into<Option<TwitterPostCommentsOptions>>,
5206 ) -> Result<TwitterPostCommentsPage, Error> {
5207 let options = options.into().unwrap_or_default();
5208 self.scope
5209 .operation(
5210 Method::GET,
5211 "/v1/twitter/posts/{identifier}/comments",
5212 options.query(),
5213 options.request_options,
5214 )?
5215 .send_page()
5216 .await
5217 }
5218
5219 pub fn items(
5221 &self,
5222 options: impl Into<Option<TwitterPostCommentsOptions>>,
5223 ) -> Items<TwitterPost> {
5224 let options = options.into().unwrap_or_default();
5225 Items::new(self.scope.operation(
5226 Method::GET,
5227 "/v1/twitter/posts/{identifier}/comments",
5228 options.query(),
5229 options.request_options,
5230 ))
5231 }
5232}
5233
5234#[derive(Clone, Debug)]
5238pub struct TwitterPostRepostersResource {
5239 scope: Scope,
5240}
5241
5242impl TwitterPostRepostersResource {
5243 pub async fn list(
5251 &self,
5252 options: impl Into<Option<TwitterPostRepostersOptions>>,
5253 ) -> Result<TwitterPostRepostersPage, Error> {
5254 let options = options.into().unwrap_or_default();
5255 self.scope
5256 .operation(
5257 Method::GET,
5258 "/v1/twitter/posts/{identifier}/reposters",
5259 options.query(),
5260 options.request_options,
5261 )?
5262 .send_page()
5263 .await
5264 }
5265
5266 pub fn items(
5268 &self,
5269 options: impl Into<Option<TwitterPostRepostersOptions>>,
5270 ) -> Items<TwitterProfile> {
5271 let options = options.into().unwrap_or_default();
5272 Items::new(self.scope.operation(
5273 Method::GET,
5274 "/v1/twitter/posts/{identifier}/reposters",
5275 options.query(),
5276 options.request_options,
5277 ))
5278 }
5279}
5280
5281#[derive(Clone, Debug)]
5285pub struct TwitterProfileResource {
5286 scope: Scope,
5287}
5288
5289impl TwitterProfileResource {
5290 pub fn followers(&self) -> TwitterProfileFollowersResource {
5292 TwitterProfileFollowersResource {
5293 scope: self.scope.clone(),
5294 }
5295 }
5296
5297 pub fn following(&self) -> TwitterProfileFollowingResource {
5299 TwitterProfileFollowingResource {
5300 scope: self.scope.clone(),
5301 }
5302 }
5303
5304 pub fn media(&self) -> TwitterProfileMediaResource {
5306 TwitterProfileMediaResource {
5307 scope: self.scope.clone(),
5308 }
5309 }
5310
5311 pub fn posts(&self) -> TwitterProfilePostsResource {
5313 TwitterProfilePostsResource {
5314 scope: self.scope.clone(),
5315 }
5316 }
5317
5318 pub fn replies(&self) -> TwitterProfileRepliesResource {
5320 TwitterProfileRepliesResource {
5321 scope: self.scope.clone(),
5322 }
5323 }
5324
5325 pub async fn get(
5333 &self,
5334 options: impl Into<Option<TwitterProfileOptions>>,
5335 ) -> Result<TwitterProfileResponse, Error> {
5336 let options = options.into().unwrap_or_default();
5337 self.scope
5338 .operation(
5339 Method::GET,
5340 "/v1/twitter/profiles/{identifier}",
5341 options.query(),
5342 options.request_options,
5343 )?
5344 .send()
5345 .await
5346 }
5347}
5348
5349#[derive(Clone, Debug)]
5353pub struct TwitterProfileFollowersResource {
5354 scope: Scope,
5355}
5356
5357impl TwitterProfileFollowersResource {
5358 pub async fn list(
5366 &self,
5367 options: impl Into<Option<TwitterProfileFollowersOptions>>,
5368 ) -> Result<TwitterProfileFollowersPage, Error> {
5369 let options = options.into().unwrap_or_default();
5370 self.scope
5371 .operation(
5372 Method::GET,
5373 "/v1/twitter/profiles/{identifier}/followers",
5374 options.query(),
5375 options.request_options,
5376 )?
5377 .send_page()
5378 .await
5379 }
5380
5381 pub fn items(
5383 &self,
5384 options: impl Into<Option<TwitterProfileFollowersOptions>>,
5385 ) -> Items<TwitterProfile> {
5386 let options = options.into().unwrap_or_default();
5387 Items::new(self.scope.operation(
5388 Method::GET,
5389 "/v1/twitter/profiles/{identifier}/followers",
5390 options.query(),
5391 options.request_options,
5392 ))
5393 }
5394}
5395
5396#[derive(Clone, Debug)]
5400pub struct TwitterProfileFollowingResource {
5401 scope: Scope,
5402}
5403
5404impl TwitterProfileFollowingResource {
5405 pub async fn list(
5413 &self,
5414 options: impl Into<Option<TwitterProfileFollowingOptions>>,
5415 ) -> Result<TwitterProfileFollowingPage, Error> {
5416 let options = options.into().unwrap_or_default();
5417 self.scope
5418 .operation(
5419 Method::GET,
5420 "/v1/twitter/profiles/{identifier}/following",
5421 options.query(),
5422 options.request_options,
5423 )?
5424 .send_page()
5425 .await
5426 }
5427
5428 pub fn items(
5430 &self,
5431 options: impl Into<Option<TwitterProfileFollowingOptions>>,
5432 ) -> Items<TwitterProfile> {
5433 let options = options.into().unwrap_or_default();
5434 Items::new(self.scope.operation(
5435 Method::GET,
5436 "/v1/twitter/profiles/{identifier}/following",
5437 options.query(),
5438 options.request_options,
5439 ))
5440 }
5441}
5442
5443#[derive(Clone, Debug)]
5447pub struct TwitterProfileMediaResource {
5448 scope: Scope,
5449}
5450
5451impl TwitterProfileMediaResource {
5452 pub async fn list(
5460 &self,
5461 options: impl Into<Option<TwitterProfileMediaOptions>>,
5462 ) -> Result<TwitterProfileMediaPage, Error> {
5463 let options = options.into().unwrap_or_default();
5464 self.scope
5465 .operation(
5466 Method::GET,
5467 "/v1/twitter/profiles/{identifier}/media",
5468 options.query(),
5469 options.request_options,
5470 )?
5471 .send_page()
5472 .await
5473 }
5474
5475 pub fn items(
5477 &self,
5478 options: impl Into<Option<TwitterProfileMediaOptions>>,
5479 ) -> Items<TwitterPost> {
5480 let options = options.into().unwrap_or_default();
5481 Items::new(self.scope.operation(
5482 Method::GET,
5483 "/v1/twitter/profiles/{identifier}/media",
5484 options.query(),
5485 options.request_options,
5486 ))
5487 }
5488}
5489
5490#[derive(Clone, Debug)]
5494pub struct TwitterProfilePostsResource {
5495 scope: Scope,
5496}
5497
5498impl TwitterProfilePostsResource {
5499 pub async fn list(
5507 &self,
5508 options: impl Into<Option<TwitterProfilePostsOptions>>,
5509 ) -> Result<TwitterProfilePostsPage, Error> {
5510 let options = options.into().unwrap_or_default();
5511 self.scope
5512 .operation(
5513 Method::GET,
5514 "/v1/twitter/profiles/{identifier}/posts",
5515 options.query(),
5516 options.request_options,
5517 )?
5518 .send_page()
5519 .await
5520 }
5521
5522 pub fn items(
5524 &self,
5525 options: impl Into<Option<TwitterProfilePostsOptions>>,
5526 ) -> Items<TwitterPost> {
5527 let options = options.into().unwrap_or_default();
5528 Items::new(self.scope.operation(
5529 Method::GET,
5530 "/v1/twitter/profiles/{identifier}/posts",
5531 options.query(),
5532 options.request_options,
5533 ))
5534 }
5535}
5536
5537#[derive(Clone, Debug)]
5541pub struct TwitterProfileRepliesResource {
5542 scope: Scope,
5543}
5544
5545impl TwitterProfileRepliesResource {
5546 pub async fn list(
5554 &self,
5555 options: impl Into<Option<TwitterProfileRepliesOptions>>,
5556 ) -> Result<TwitterProfileRepliesPage, Error> {
5557 let options = options.into().unwrap_or_default();
5558 self.scope
5559 .operation(
5560 Method::GET,
5561 "/v1/twitter/profiles/{identifier}/replies",
5562 options.query(),
5563 options.request_options,
5564 )?
5565 .send_page()
5566 .await
5567 }
5568
5569 pub fn items(
5571 &self,
5572 options: impl Into<Option<TwitterProfileRepliesOptions>>,
5573 ) -> Items<TwitterPost> {
5574 let options = options.into().unwrap_or_default();
5575 Items::new(self.scope.operation(
5576 Method::GET,
5577 "/v1/twitter/profiles/{identifier}/replies",
5578 options.query(),
5579 options.request_options,
5580 ))
5581 }
5582}
5583
5584#[derive(Clone, Debug)]
5588pub struct TwitterSearchResource {
5589 scope: Scope,
5590}
5591
5592impl TwitterSearchResource {
5593 pub fn media(&self) -> TwitterSearchMediaResource {
5595 TwitterSearchMediaResource {
5596 scope: self.scope.clone(),
5597 }
5598 }
5599
5600 pub fn posts(&self) -> TwitterSearchPostsResource {
5602 TwitterSearchPostsResource {
5603 scope: self.scope.clone(),
5604 }
5605 }
5606
5607 pub fn suggestions(&self) -> TwitterSearchSuggestionsResource {
5609 TwitterSearchSuggestionsResource {
5610 scope: self.scope.clone(),
5611 }
5612 }
5613
5614 pub fn users(&self) -> TwitterSearchUsersResource {
5616 TwitterSearchUsersResource {
5617 scope: self.scope.clone(),
5618 }
5619 }
5620}
5621
5622#[derive(Clone, Debug)]
5626pub struct TwitterSearchMediaResource {
5627 scope: Scope,
5628}
5629
5630impl TwitterSearchMediaResource {
5631 pub async fn list(
5639 &self,
5640 options: TwitterSearchMediaOptions,
5641 ) -> Result<TwitterSearchMediaPage, Error> {
5642 self.scope
5643 .operation(
5644 Method::GET,
5645 "/v1/twitter/search/media",
5646 options.query(),
5647 options.request_options,
5648 )?
5649 .send_page()
5650 .await
5651 }
5652
5653 pub fn items(&self, options: TwitterSearchMediaOptions) -> Items<TwitterPost> {
5655 Items::new(self.scope.operation(
5656 Method::GET,
5657 "/v1/twitter/search/media",
5658 options.query(),
5659 options.request_options,
5660 ))
5661 }
5662}
5663
5664#[derive(Clone, Debug)]
5668pub struct TwitterSearchPostsResource {
5669 scope: Scope,
5670}
5671
5672impl TwitterSearchPostsResource {
5673 pub async fn list(
5681 &self,
5682 options: TwitterSearchPostsOptions,
5683 ) -> Result<TwitterSearchPostsPage, Error> {
5684 self.scope
5685 .operation(
5686 Method::GET,
5687 "/v1/twitter/search/posts",
5688 options.query(),
5689 options.request_options,
5690 )?
5691 .send_page()
5692 .await
5693 }
5694
5695 pub fn items(&self, options: TwitterSearchPostsOptions) -> Items<TwitterPost> {
5697 Items::new(self.scope.operation(
5698 Method::GET,
5699 "/v1/twitter/search/posts",
5700 options.query(),
5701 options.request_options,
5702 ))
5703 }
5704}
5705
5706#[derive(Clone, Debug)]
5710pub struct TwitterSearchSuggestionsResource {
5711 scope: Scope,
5712}
5713
5714impl TwitterSearchSuggestionsResource {
5715 pub async fn list(
5723 &self,
5724 options: TwitterSearchSuggestionsOptions,
5725 ) -> Result<TwitterSearchSuggestionsPage, Error> {
5726 self.scope
5727 .operation(
5728 Method::GET,
5729 "/v1/twitter/search/suggestions",
5730 options.query(),
5731 options.request_options,
5732 )?
5733 .send_page()
5734 .await
5735 }
5736
5737 pub fn items(&self, options: TwitterSearchSuggestionsOptions) -> Items<TwitterProfile> {
5739 Items::new(self.scope.operation(
5740 Method::GET,
5741 "/v1/twitter/search/suggestions",
5742 options.query(),
5743 options.request_options,
5744 ))
5745 }
5746}
5747
5748#[derive(Clone, Debug)]
5752pub struct TwitterSearchUsersResource {
5753 scope: Scope,
5754}
5755
5756impl TwitterSearchUsersResource {
5757 pub async fn list(
5765 &self,
5766 options: TwitterSearchUsersOptions,
5767 ) -> Result<TwitterSearchUsersPage, Error> {
5768 self.scope
5769 .operation(
5770 Method::GET,
5771 "/v1/twitter/search/users",
5772 options.query(),
5773 options.request_options,
5774 )?
5775 .send_page()
5776 .await
5777 }
5778
5779 pub fn items(&self, options: TwitterSearchUsersOptions) -> Items<TwitterProfile> {
5781 Items::new(self.scope.operation(
5782 Method::GET,
5783 "/v1/twitter/search/users",
5784 options.query(),
5785 options.request_options,
5786 ))
5787 }
5788}
5789
5790#[derive(Clone, Debug)]
5794pub struct YouTubeResource {
5795 scope: Scope,
5796}
5797
5798impl YouTubeResource {
5799 pub fn charts(&self) -> YouTubeChartsResource {
5801 YouTubeChartsResource {
5802 scope: self.scope.clone(),
5803 }
5804 }
5805
5806 pub fn community_post(
5812 &self,
5813 reference: impl Into<ResourceReference>,
5814 ) -> YouTubeCommunityPostResource {
5815 YouTubeCommunityPostResource {
5816 scope: self.scope.select(
5817 "identifier",
5818 "youtube",
5819 "communityPost",
5820 Reference::from(reference.into()),
5821 ),
5822 }
5823 }
5824
5825 pub fn hashtag(&self, reference: impl Into<ResourceReference>) -> YouTubeHashtagResource {
5831 YouTubeHashtagResource {
5832 scope: self.scope.select(
5833 "identifier",
5834 "youtube",
5835 "hashtag",
5836 Reference::from(reference.into()),
5837 ),
5838 }
5839 }
5840
5841 pub fn playlist(&self, reference: impl Into<ResourceReference>) -> YouTubePlaylistResource {
5847 YouTubePlaylistResource {
5848 scope: self.scope.select(
5849 "identifier",
5850 "youtube",
5851 "playlist",
5852 Reference::from(reference.into()),
5853 ),
5854 }
5855 }
5856
5857 pub fn post(&self, reference: impl Into<ResourceReference>) -> YouTubePostResource {
5863 YouTubePostResource {
5864 scope: self.scope.select(
5865 "identifier",
5866 "youtube",
5867 "post",
5868 Reference::from(reference.into()),
5869 ),
5870 }
5871 }
5872
5873 pub fn profile(&self, reference: impl Into<ProfileReference>) -> YouTubeProfileResource {
5879 YouTubeProfileResource {
5880 scope: self.scope.select(
5881 "identifier",
5882 "youtube",
5883 "profile",
5884 Reference::from(reference.into()),
5885 ),
5886 }
5887 }
5888
5889 pub fn search(&self) -> YouTubeSearchResource {
5891 YouTubeSearchResource {
5892 scope: self.scope.clone(),
5893 }
5894 }
5895
5896 pub fn trending(&self) -> YouTubeTrendingResource {
5898 YouTubeTrendingResource {
5899 scope: self.scope.clone(),
5900 }
5901 }
5902}
5903
5904#[derive(Clone, Debug)]
5908pub struct YouTubeChartsResource {
5909 scope: Scope,
5910}
5911
5912impl YouTubeChartsResource {
5913 pub fn artists(&self) -> YouTubeChartsArtistsResource {
5915 YouTubeChartsArtistsResource {
5916 scope: self.scope.clone(),
5917 }
5918 }
5919
5920 pub fn tracks(&self) -> YouTubeChartsTracksResource {
5922 YouTubeChartsTracksResource {
5923 scope: self.scope.clone(),
5924 }
5925 }
5926
5927 pub fn videos(&self) -> YouTubeChartsVideosResource {
5929 YouTubeChartsVideosResource {
5930 scope: self.scope.clone(),
5931 }
5932 }
5933}
5934
5935#[derive(Clone, Debug)]
5939pub struct YouTubeChartsArtistsResource {
5940 scope: Scope,
5941}
5942
5943impl YouTubeChartsArtistsResource {
5944 pub async fn list(
5952 &self,
5953 options: impl Into<Option<YouTubeChartsArtistsOptions>>,
5954 ) -> Result<YouTubeChartsArtistsResponse, Error> {
5955 let options = options.into().unwrap_or_default();
5956 self.scope
5957 .operation(
5958 Method::GET,
5959 "/v1/youtube/charts/artists",
5960 options.query(),
5961 options.request_options,
5962 )?
5963 .send()
5964 .await
5965 }
5966}
5967
5968#[derive(Clone, Debug)]
5972pub struct YouTubeChartsTracksResource {
5973 scope: Scope,
5974}
5975
5976impl YouTubeChartsTracksResource {
5977 pub async fn list(
5985 &self,
5986 options: impl Into<Option<YouTubeChartsTracksOptions>>,
5987 ) -> Result<YouTubeChartsTracksResponse, Error> {
5988 let options = options.into().unwrap_or_default();
5989 self.scope
5990 .operation(
5991 Method::GET,
5992 "/v1/youtube/charts/tracks",
5993 options.query(),
5994 options.request_options,
5995 )?
5996 .send()
5997 .await
5998 }
5999}
6000
6001#[derive(Clone, Debug)]
6005pub struct YouTubeChartsVideosResource {
6006 scope: Scope,
6007}
6008
6009impl YouTubeChartsVideosResource {
6010 pub async fn list(
6018 &self,
6019 options: impl Into<Option<YouTubeChartsVideosOptions>>,
6020 ) -> Result<YouTubeChartsVideosResponse, Error> {
6021 let options = options.into().unwrap_or_default();
6022 self.scope
6023 .operation(
6024 Method::GET,
6025 "/v1/youtube/charts/videos",
6026 options.query(),
6027 options.request_options,
6028 )?
6029 .send()
6030 .await
6031 }
6032}
6033
6034#[derive(Clone, Debug)]
6038pub struct YouTubeCommunityPostResource {
6039 scope: Scope,
6040}
6041
6042impl YouTubeCommunityPostResource {
6043 pub fn comments(&self) -> YouTubeCommunityPostCommentsResource {
6045 YouTubeCommunityPostCommentsResource {
6046 scope: self.scope.clone(),
6047 }
6048 }
6049
6050 pub async fn get(
6058 &self,
6059 options: impl Into<Option<YouTubeCommunityPostOptions>>,
6060 ) -> Result<YouTubeCommunityPostResponse, Error> {
6061 let options = options.into().unwrap_or_default();
6062 self.scope
6063 .operation(
6064 Method::GET,
6065 "/v1/youtube/community-posts/{identifier}",
6066 options.query(),
6067 options.request_options,
6068 )?
6069 .send()
6070 .await
6071 }
6072}
6073
6074#[derive(Clone, Debug)]
6078pub struct YouTubeCommunityPostCommentsResource {
6079 scope: Scope,
6080}
6081
6082impl YouTubeCommunityPostCommentsResource {
6083 pub async fn list(
6091 &self,
6092 options: impl Into<Option<YouTubeCommunityPostCommentsOptions>>,
6093 ) -> Result<YouTubeCommunityPostCommentsPage, Error> {
6094 let options = options.into().unwrap_or_default();
6095 self.scope
6096 .operation(
6097 Method::GET,
6098 "/v1/youtube/community-posts/{identifier}/comments",
6099 options.query(),
6100 options.request_options,
6101 )?
6102 .send_page()
6103 .await
6104 }
6105
6106 pub fn items(
6108 &self,
6109 options: impl Into<Option<YouTubeCommunityPostCommentsOptions>>,
6110 ) -> Items<YouTubeComment> {
6111 let options = options.into().unwrap_or_default();
6112 Items::new(self.scope.operation(
6113 Method::GET,
6114 "/v1/youtube/community-posts/{identifier}/comments",
6115 options.query(),
6116 options.request_options,
6117 ))
6118 }
6119}
6120
6121#[derive(Clone, Debug)]
6125pub struct YouTubeHashtagResource {
6126 scope: Scope,
6127}
6128
6129impl YouTubeHashtagResource {
6130 pub fn posts(&self) -> YouTubeHashtagPostsResource {
6132 YouTubeHashtagPostsResource {
6133 scope: self.scope.clone(),
6134 }
6135 }
6136}
6137
6138#[derive(Clone, Debug)]
6142pub struct YouTubeHashtagPostsResource {
6143 scope: Scope,
6144}
6145
6146impl YouTubeHashtagPostsResource {
6147 pub async fn list(
6155 &self,
6156 options: impl Into<Option<YouTubeHashtagPostsOptions>>,
6157 ) -> Result<YouTubeHashtagPostsPage, Error> {
6158 let options = options.into().unwrap_or_default();
6159 self.scope
6160 .operation(
6161 Method::GET,
6162 "/v1/youtube/hashtags/{identifier}/posts",
6163 options.query(),
6164 options.request_options,
6165 )?
6166 .send_page()
6167 .await
6168 }
6169
6170 pub fn items(
6172 &self,
6173 options: impl Into<Option<YouTubeHashtagPostsOptions>>,
6174 ) -> Items<YouTubePost> {
6175 let options = options.into().unwrap_or_default();
6176 Items::new(self.scope.operation(
6177 Method::GET,
6178 "/v1/youtube/hashtags/{identifier}/posts",
6179 options.query(),
6180 options.request_options,
6181 ))
6182 }
6183}
6184
6185#[derive(Clone, Debug)]
6189pub struct YouTubePlaylistResource {
6190 scope: Scope,
6191}
6192
6193impl YouTubePlaylistResource {
6194 pub fn posts(&self) -> YouTubePlaylistPostsResource {
6196 YouTubePlaylistPostsResource {
6197 scope: self.scope.clone(),
6198 }
6199 }
6200}
6201
6202#[derive(Clone, Debug)]
6206pub struct YouTubePlaylistPostsResource {
6207 scope: Scope,
6208}
6209
6210impl YouTubePlaylistPostsResource {
6211 pub async fn list(
6219 &self,
6220 options: impl Into<Option<YouTubePlaylistPostsOptions>>,
6221 ) -> Result<YouTubePlaylistPostsPage, Error> {
6222 let options = options.into().unwrap_or_default();
6223 self.scope
6224 .operation(
6225 Method::GET,
6226 "/v1/youtube/playlists/{identifier}/posts",
6227 options.query(),
6228 options.request_options,
6229 )?
6230 .send_page()
6231 .await
6232 }
6233
6234 pub fn items(
6236 &self,
6237 options: impl Into<Option<YouTubePlaylistPostsOptions>>,
6238 ) -> Items<YouTubePost> {
6239 let options = options.into().unwrap_or_default();
6240 Items::new(self.scope.operation(
6241 Method::GET,
6242 "/v1/youtube/playlists/{identifier}/posts",
6243 options.query(),
6244 options.request_options,
6245 ))
6246 }
6247}
6248
6249#[derive(Clone, Debug)]
6253pub struct YouTubePostResource {
6254 scope: Scope,
6255}
6256
6257impl YouTubePostResource {
6258 pub fn comment(&self, reference: impl Into<ResourceReference>) -> YouTubePostCommentResource {
6264 YouTubePostCommentResource {
6265 scope: self.scope.select(
6266 "comment_id",
6267 "youtube",
6268 "comment",
6269 Reference::from(reference.into()),
6270 ),
6271 }
6272 }
6273
6274 pub fn comments(&self) -> YouTubePostCommentsResource {
6276 YouTubePostCommentsResource {
6277 scope: self.scope.clone(),
6278 }
6279 }
6280
6281 pub fn files(&self) -> YouTubePostFilesResource {
6283 YouTubePostFilesResource {
6284 scope: self.scope.clone(),
6285 }
6286 }
6287
6288 pub fn frame(&self) -> YouTubePostFrameResource {
6290 YouTubePostFrameResource {
6291 scope: self.scope.clone(),
6292 }
6293 }
6294
6295 pub fn related(&self) -> YouTubePostRelatedResource {
6297 YouTubePostRelatedResource {
6298 scope: self.scope.clone(),
6299 }
6300 }
6301
6302 pub fn sound_posts(&self) -> YouTubePostSoundPostsResource {
6304 YouTubePostSoundPostsResource {
6305 scope: self.scope.clone(),
6306 }
6307 }
6308
6309 pub fn storyboard(&self) -> YouTubePostStoryboardResource {
6311 YouTubePostStoryboardResource {
6312 scope: self.scope.clone(),
6313 }
6314 }
6315
6316 pub fn transcript(&self) -> YouTubePostTranscriptResource {
6318 YouTubePostTranscriptResource {
6319 scope: self.scope.clone(),
6320 }
6321 }
6322
6323 pub async fn get(
6331 &self,
6332 options: impl Into<Option<YouTubePostOptions>>,
6333 ) -> Result<YouTubePostResponse, Error> {
6334 let options = options.into().unwrap_or_default();
6335 self.scope
6336 .operation(
6337 Method::GET,
6338 "/v1/youtube/posts/{identifier}",
6339 options.query(),
6340 options.request_options,
6341 )?
6342 .send()
6343 .await
6344 }
6345}
6346
6347#[derive(Clone, Debug)]
6351pub struct YouTubePostCommentResource {
6352 scope: Scope,
6353}
6354
6355impl YouTubePostCommentResource {
6356 pub fn replies(&self) -> YouTubePostCommentRepliesResource {
6358 YouTubePostCommentRepliesResource {
6359 scope: self.scope.clone(),
6360 }
6361 }
6362}
6363
6364#[derive(Clone, Debug)]
6368pub struct YouTubePostCommentRepliesResource {
6369 scope: Scope,
6370}
6371
6372impl YouTubePostCommentRepliesResource {
6373 pub async fn list(
6381 &self,
6382 options: YouTubePostCommentRepliesOptions,
6383 ) -> Result<YouTubePostCommentRepliesPage, Error> {
6384 self.scope
6385 .operation(
6386 Method::GET,
6387 "/v1/youtube/posts/{identifier}/comments/{comment_id}/replies",
6388 options.query(),
6389 options.request_options,
6390 )?
6391 .send_page()
6392 .await
6393 }
6394
6395 pub fn items(&self, options: YouTubePostCommentRepliesOptions) -> Items<YouTubeComment> {
6397 Items::new(self.scope.operation(
6398 Method::GET,
6399 "/v1/youtube/posts/{identifier}/comments/{comment_id}/replies",
6400 options.query(),
6401 options.request_options,
6402 ))
6403 }
6404}
6405
6406#[derive(Clone, Debug)]
6410pub struct YouTubePostCommentsResource {
6411 scope: Scope,
6412}
6413
6414impl YouTubePostCommentsResource {
6415 pub async fn list(
6423 &self,
6424 options: impl Into<Option<YouTubePostCommentsOptions>>,
6425 ) -> Result<YouTubePostCommentsPage, Error> {
6426 let options = options.into().unwrap_or_default();
6427 self.scope
6428 .operation(
6429 Method::GET,
6430 "/v1/youtube/posts/{identifier}/comments",
6431 options.query(),
6432 options.request_options,
6433 )?
6434 .send_page()
6435 .await
6436 }
6437
6438 pub fn items(
6440 &self,
6441 options: impl Into<Option<YouTubePostCommentsOptions>>,
6442 ) -> Items<YouTubeComment> {
6443 let options = options.into().unwrap_or_default();
6444 Items::new(self.scope.operation(
6445 Method::GET,
6446 "/v1/youtube/posts/{identifier}/comments",
6447 options.query(),
6448 options.request_options,
6449 ))
6450 }
6451}
6452
6453#[derive(Clone, Debug)]
6457pub struct YouTubePostFilesResource {
6458 scope: Scope,
6459}
6460
6461impl YouTubePostFilesResource {
6462 pub async fn get(
6471 &self,
6472 options: impl Into<Option<YouTubePostFilesOptions>>,
6473 ) -> Result<YouTubePostFilesResponse, Error> {
6474 let options = options.into().unwrap_or_default();
6475 self.scope
6476 .operation(
6477 Method::GET,
6478 "/v1/youtube/posts/{identifier}/files",
6479 options.query(),
6480 options.request_options,
6481 )?
6482 .send()
6483 .await
6484 }
6485}
6486
6487#[derive(Clone, Debug)]
6491pub struct YouTubePostFrameResource {
6492 scope: Scope,
6493}
6494
6495impl YouTubePostFrameResource {
6496 pub async fn get(
6504 &self,
6505 options: YouTubePostFrameOptions,
6506 ) -> Result<YouTubePostFrameResponse, Error> {
6507 self.scope
6508 .operation(
6509 Method::GET,
6510 "/v1/youtube/posts/{identifier}/frame",
6511 options.query(),
6512 options.request_options,
6513 )?
6514 .send()
6515 .await
6516 }
6517}
6518
6519#[derive(Clone, Debug)]
6523pub struct YouTubePostRelatedResource {
6524 scope: Scope,
6525}
6526
6527impl YouTubePostRelatedResource {
6528 pub async fn list(
6536 &self,
6537 options: impl Into<Option<YouTubePostRelatedOptions>>,
6538 ) -> Result<YouTubePostRelatedPage, Error> {
6539 let options = options.into().unwrap_or_default();
6540 self.scope
6541 .operation(
6542 Method::GET,
6543 "/v1/youtube/posts/{identifier}/related",
6544 options.query(),
6545 options.request_options,
6546 )?
6547 .send_page()
6548 .await
6549 }
6550
6551 pub fn items(
6553 &self,
6554 options: impl Into<Option<YouTubePostRelatedOptions>>,
6555 ) -> Items<YouTubePost> {
6556 let options = options.into().unwrap_or_default();
6557 Items::new(self.scope.operation(
6558 Method::GET,
6559 "/v1/youtube/posts/{identifier}/related",
6560 options.query(),
6561 options.request_options,
6562 ))
6563 }
6564}
6565
6566#[derive(Clone, Debug)]
6570pub struct YouTubePostSoundPostsResource {
6571 scope: Scope,
6572}
6573
6574impl YouTubePostSoundPostsResource {
6575 pub async fn list(
6583 &self,
6584 options: impl Into<Option<YouTubePostSoundPostsOptions>>,
6585 ) -> Result<YouTubePostSoundPostsPage, Error> {
6586 let options = options.into().unwrap_or_default();
6587 self.scope
6588 .operation(
6589 Method::GET,
6590 "/v1/youtube/posts/{identifier}/sound-posts",
6591 options.query(),
6592 options.request_options,
6593 )?
6594 .send_page()
6595 .await
6596 }
6597
6598 pub fn items(
6600 &self,
6601 options: impl Into<Option<YouTubePostSoundPostsOptions>>,
6602 ) -> Items<YouTubePost> {
6603 let options = options.into().unwrap_or_default();
6604 Items::new(self.scope.operation(
6605 Method::GET,
6606 "/v1/youtube/posts/{identifier}/sound-posts",
6607 options.query(),
6608 options.request_options,
6609 ))
6610 }
6611}
6612
6613#[derive(Clone, Debug)]
6617pub struct YouTubePostStoryboardResource {
6618 scope: Scope,
6619}
6620
6621impl YouTubePostStoryboardResource {
6622 pub async fn get(
6631 &self,
6632 options: impl Into<Option<YouTubePostStoryboardOptions>>,
6633 ) -> Result<YouTubePostStoryboardResponse, Error> {
6634 let options = options.into().unwrap_or_default();
6635 self.scope
6636 .operation(
6637 Method::GET,
6638 "/v1/youtube/posts/{identifier}/storyboard",
6639 options.query(),
6640 options.request_options,
6641 )?
6642 .send()
6643 .await
6644 }
6645}
6646
6647#[derive(Clone, Debug)]
6651pub struct YouTubePostTranscriptResource {
6652 scope: Scope,
6653}
6654
6655impl YouTubePostTranscriptResource {
6656 pub async fn get(
6664 &self,
6665 options: impl Into<Option<YouTubePostTranscriptOptions>>,
6666 ) -> Result<YouTubePostTranscriptResponse, Error> {
6667 let options = options.into().unwrap_or_default();
6668 self.scope
6669 .operation(
6670 Method::GET,
6671 "/v1/youtube/posts/{identifier}/transcript",
6672 options.query(),
6673 options.request_options,
6674 )?
6675 .send()
6676 .await
6677 }
6678}
6679
6680#[derive(Clone, Debug)]
6684pub struct YouTubeProfileResource {
6685 scope: Scope,
6686}
6687
6688impl YouTubeProfileResource {
6689 pub fn community_posts(&self) -> YouTubeProfileCommunityPostsResource {
6691 YouTubeProfileCommunityPostsResource {
6692 scope: self.scope.clone(),
6693 }
6694 }
6695
6696 pub fn livestreams(&self) -> YouTubeProfileLivestreamsResource {
6698 YouTubeProfileLivestreamsResource {
6699 scope: self.scope.clone(),
6700 }
6701 }
6702
6703 pub fn playlists(&self) -> YouTubeProfilePlaylistsResource {
6705 YouTubeProfilePlaylistsResource {
6706 scope: self.scope.clone(),
6707 }
6708 }
6709
6710 pub fn products(&self) -> YouTubeProfileProductsResource {
6712 YouTubeProfileProductsResource {
6713 scope: self.scope.clone(),
6714 }
6715 }
6716
6717 pub fn search(&self) -> YouTubeProfileSearchResource {
6719 YouTubeProfileSearchResource {
6720 scope: self.scope.clone(),
6721 }
6722 }
6723
6724 pub fn shorts(&self) -> YouTubeProfileShortsResource {
6726 YouTubeProfileShortsResource {
6727 scope: self.scope.clone(),
6728 }
6729 }
6730
6731 pub fn videos(&self) -> YouTubeProfileVideosResource {
6733 YouTubeProfileVideosResource {
6734 scope: self.scope.clone(),
6735 }
6736 }
6737
6738 pub async fn get(
6746 &self,
6747 options: impl Into<Option<YouTubeProfileOptions>>,
6748 ) -> Result<YouTubeProfileResponse, Error> {
6749 let options = options.into().unwrap_or_default();
6750 self.scope
6751 .operation(
6752 Method::GET,
6753 "/v1/youtube/profiles/{identifier}",
6754 options.query(),
6755 options.request_options,
6756 )?
6757 .send()
6758 .await
6759 }
6760}
6761
6762#[derive(Clone, Debug)]
6766pub struct YouTubeProfileCommunityPostsResource {
6767 scope: Scope,
6768}
6769
6770impl YouTubeProfileCommunityPostsResource {
6771 pub async fn list(
6779 &self,
6780 options: impl Into<Option<YouTubeProfileCommunityPostsOptions>>,
6781 ) -> Result<YouTubeProfileCommunityPostsPage, Error> {
6782 let options = options.into().unwrap_or_default();
6783 self.scope
6784 .operation(
6785 Method::GET,
6786 "/v1/youtube/profiles/{identifier}/community-posts",
6787 options.query(),
6788 options.request_options,
6789 )?
6790 .send_page()
6791 .await
6792 }
6793
6794 pub fn items(
6796 &self,
6797 options: impl Into<Option<YouTubeProfileCommunityPostsOptions>>,
6798 ) -> Items<YouTubeCommunityPost> {
6799 let options = options.into().unwrap_or_default();
6800 Items::new(self.scope.operation(
6801 Method::GET,
6802 "/v1/youtube/profiles/{identifier}/community-posts",
6803 options.query(),
6804 options.request_options,
6805 ))
6806 }
6807}
6808
6809#[derive(Clone, Debug)]
6813pub struct YouTubeProfileLivestreamsResource {
6814 scope: Scope,
6815}
6816
6817impl YouTubeProfileLivestreamsResource {
6818 pub async fn list(
6826 &self,
6827 options: impl Into<Option<YouTubeProfileLivestreamsOptions>>,
6828 ) -> Result<YouTubeProfileLivestreamsPage, Error> {
6829 let options = options.into().unwrap_or_default();
6830 self.scope
6831 .operation(
6832 Method::GET,
6833 "/v1/youtube/profiles/{identifier}/livestreams",
6834 options.query(),
6835 options.request_options,
6836 )?
6837 .send_page()
6838 .await
6839 }
6840
6841 pub fn items(
6843 &self,
6844 options: impl Into<Option<YouTubeProfileLivestreamsOptions>>,
6845 ) -> Items<YouTubePost> {
6846 let options = options.into().unwrap_or_default();
6847 Items::new(self.scope.operation(
6848 Method::GET,
6849 "/v1/youtube/profiles/{identifier}/livestreams",
6850 options.query(),
6851 options.request_options,
6852 ))
6853 }
6854}
6855
6856#[derive(Clone, Debug)]
6860pub struct YouTubeProfilePlaylistsResource {
6861 scope: Scope,
6862}
6863
6864impl YouTubeProfilePlaylistsResource {
6865 pub async fn list(
6873 &self,
6874 options: impl Into<Option<YouTubeProfilePlaylistsOptions>>,
6875 ) -> Result<YouTubeProfilePlaylistsPage, Error> {
6876 let options = options.into().unwrap_or_default();
6877 self.scope
6878 .operation(
6879 Method::GET,
6880 "/v1/youtube/profiles/{identifier}/playlists",
6881 options.query(),
6882 options.request_options,
6883 )?
6884 .send_page()
6885 .await
6886 }
6887
6888 pub fn items(
6890 &self,
6891 options: impl Into<Option<YouTubeProfilePlaylistsOptions>>,
6892 ) -> Items<YouTubePlaylist> {
6893 let options = options.into().unwrap_or_default();
6894 Items::new(self.scope.operation(
6895 Method::GET,
6896 "/v1/youtube/profiles/{identifier}/playlists",
6897 options.query(),
6898 options.request_options,
6899 ))
6900 }
6901}
6902
6903#[derive(Clone, Debug)]
6907pub struct YouTubeProfileProductsResource {
6908 scope: Scope,
6909}
6910
6911impl YouTubeProfileProductsResource {
6912 pub async fn list(
6920 &self,
6921 options: impl Into<Option<YouTubeProfileProductsOptions>>,
6922 ) -> Result<YouTubeProfileProductsPage, Error> {
6923 let options = options.into().unwrap_or_default();
6924 self.scope
6925 .operation(
6926 Method::GET,
6927 "/v1/youtube/profiles/{identifier}/products",
6928 options.query(),
6929 options.request_options,
6930 )?
6931 .send_page()
6932 .await
6933 }
6934
6935 pub fn items(
6937 &self,
6938 options: impl Into<Option<YouTubeProfileProductsOptions>>,
6939 ) -> Items<YouTubeProduct> {
6940 let options = options.into().unwrap_or_default();
6941 Items::new(self.scope.operation(
6942 Method::GET,
6943 "/v1/youtube/profiles/{identifier}/products",
6944 options.query(),
6945 options.request_options,
6946 ))
6947 }
6948}
6949
6950#[derive(Clone, Debug)]
6954pub struct YouTubeProfileSearchResource {
6955 scope: Scope,
6956}
6957
6958impl YouTubeProfileSearchResource {
6959 pub async fn list(
6967 &self,
6968 options: YouTubeProfileSearchOptions,
6969 ) -> Result<YouTubeProfileSearchPage, Error> {
6970 self.scope
6971 .operation(
6972 Method::GET,
6973 "/v1/youtube/profiles/{identifier}/search",
6974 options.query(),
6975 options.request_options,
6976 )?
6977 .send_page()
6978 .await
6979 }
6980
6981 pub fn items(&self, options: YouTubeProfileSearchOptions) -> Items<YouTubePost> {
6983 Items::new(self.scope.operation(
6984 Method::GET,
6985 "/v1/youtube/profiles/{identifier}/search",
6986 options.query(),
6987 options.request_options,
6988 ))
6989 }
6990}
6991
6992#[derive(Clone, Debug)]
6996pub struct YouTubeProfileShortsResource {
6997 scope: Scope,
6998}
6999
7000impl YouTubeProfileShortsResource {
7001 pub async fn list(
7009 &self,
7010 options: impl Into<Option<YouTubeProfileShortsOptions>>,
7011 ) -> Result<YouTubeProfileShortsPage, Error> {
7012 let options = options.into().unwrap_or_default();
7013 self.scope
7014 .operation(
7015 Method::GET,
7016 "/v1/youtube/profiles/{identifier}/shorts",
7017 options.query(),
7018 options.request_options,
7019 )?
7020 .send_page()
7021 .await
7022 }
7023
7024 pub fn items(
7026 &self,
7027 options: impl Into<Option<YouTubeProfileShortsOptions>>,
7028 ) -> Items<YouTubePost> {
7029 let options = options.into().unwrap_or_default();
7030 Items::new(self.scope.operation(
7031 Method::GET,
7032 "/v1/youtube/profiles/{identifier}/shorts",
7033 options.query(),
7034 options.request_options,
7035 ))
7036 }
7037}
7038
7039#[derive(Clone, Debug)]
7043pub struct YouTubeProfileVideosResource {
7044 scope: Scope,
7045}
7046
7047impl YouTubeProfileVideosResource {
7048 pub async fn list(
7056 &self,
7057 options: impl Into<Option<YouTubeProfileVideosOptions>>,
7058 ) -> Result<YouTubeProfileVideosPage, Error> {
7059 let options = options.into().unwrap_or_default();
7060 self.scope
7061 .operation(
7062 Method::GET,
7063 "/v1/youtube/profiles/{identifier}/videos",
7064 options.query(),
7065 options.request_options,
7066 )?
7067 .send_page()
7068 .await
7069 }
7070
7071 pub fn items(
7073 &self,
7074 options: impl Into<Option<YouTubeProfileVideosOptions>>,
7075 ) -> Items<YouTubePost> {
7076 let options = options.into().unwrap_or_default();
7077 Items::new(self.scope.operation(
7078 Method::GET,
7079 "/v1/youtube/profiles/{identifier}/videos",
7080 options.query(),
7081 options.request_options,
7082 ))
7083 }
7084}
7085
7086#[derive(Clone, Debug)]
7090pub struct YouTubeSearchResource {
7091 scope: Scope,
7092}
7093
7094impl YouTubeSearchResource {
7095 pub fn playlists(&self) -> YouTubeSearchPlaylistsResource {
7097 YouTubeSearchPlaylistsResource {
7098 scope: self.scope.clone(),
7099 }
7100 }
7101
7102 pub fn posts(&self) -> YouTubeSearchPostsResource {
7104 YouTubeSearchPostsResource {
7105 scope: self.scope.clone(),
7106 }
7107 }
7108
7109 pub fn profiles(&self) -> YouTubeSearchProfilesResource {
7111 YouTubeSearchProfilesResource {
7112 scope: self.scope.clone(),
7113 }
7114 }
7115
7116 pub fn suggestions(&self) -> YouTubeSearchSuggestionsResource {
7118 YouTubeSearchSuggestionsResource {
7119 scope: self.scope.clone(),
7120 }
7121 }
7122}
7123
7124#[derive(Clone, Debug)]
7128pub struct YouTubeSearchPlaylistsResource {
7129 scope: Scope,
7130}
7131
7132impl YouTubeSearchPlaylistsResource {
7133 pub async fn list(
7141 &self,
7142 options: YouTubeSearchPlaylistsOptions,
7143 ) -> Result<YouTubeSearchPlaylistsPage, Error> {
7144 self.scope
7145 .operation(
7146 Method::GET,
7147 "/v1/youtube/search/playlists",
7148 options.query(),
7149 options.request_options,
7150 )?
7151 .send_page()
7152 .await
7153 }
7154
7155 pub fn items(&self, options: YouTubeSearchPlaylistsOptions) -> Items<YouTubePlaylist> {
7157 Items::new(self.scope.operation(
7158 Method::GET,
7159 "/v1/youtube/search/playlists",
7160 options.query(),
7161 options.request_options,
7162 ))
7163 }
7164}
7165
7166#[derive(Clone, Debug)]
7170pub struct YouTubeSearchPostsResource {
7171 scope: Scope,
7172}
7173
7174impl YouTubeSearchPostsResource {
7175 pub async fn list(
7183 &self,
7184 options: YouTubeSearchPostsOptions,
7185 ) -> Result<YouTubeSearchPostsPage, Error> {
7186 self.scope
7187 .operation(
7188 Method::GET,
7189 "/v1/youtube/search/posts",
7190 options.query(),
7191 options.request_options,
7192 )?
7193 .send_page()
7194 .await
7195 }
7196
7197 pub fn items(&self, options: YouTubeSearchPostsOptions) -> Items<YouTubePost> {
7199 Items::new(self.scope.operation(
7200 Method::GET,
7201 "/v1/youtube/search/posts",
7202 options.query(),
7203 options.request_options,
7204 ))
7205 }
7206}
7207
7208#[derive(Clone, Debug)]
7212pub struct YouTubeSearchProfilesResource {
7213 scope: Scope,
7214}
7215
7216impl YouTubeSearchProfilesResource {
7217 pub async fn list(
7225 &self,
7226 options: YouTubeSearchProfilesOptions,
7227 ) -> Result<YouTubeSearchProfilesPage, Error> {
7228 self.scope
7229 .operation(
7230 Method::GET,
7231 "/v1/youtube/search/profiles",
7232 options.query(),
7233 options.request_options,
7234 )?
7235 .send_page()
7236 .await
7237 }
7238
7239 pub fn items(&self, options: YouTubeSearchProfilesOptions) -> Items<YouTubeProfile> {
7241 Items::new(self.scope.operation(
7242 Method::GET,
7243 "/v1/youtube/search/profiles",
7244 options.query(),
7245 options.request_options,
7246 ))
7247 }
7248}
7249
7250#[derive(Clone, Debug)]
7254pub struct YouTubeSearchSuggestionsResource {
7255 scope: Scope,
7256}
7257
7258impl YouTubeSearchSuggestionsResource {
7259 pub async fn list(
7267 &self,
7268 options: YouTubeSearchSuggestionsOptions,
7269 ) -> Result<YouTubeSearchSuggestionsResponse, Error> {
7270 self.scope
7271 .operation(
7272 Method::GET,
7273 "/v1/youtube/search/suggestions",
7274 options.query(),
7275 options.request_options,
7276 )?
7277 .send()
7278 .await
7279 }
7280}
7281
7282#[derive(Clone, Debug)]
7286pub struct YouTubeTrendingResource {
7287 scope: Scope,
7288}
7289
7290impl YouTubeTrendingResource {
7291 pub fn posts(&self) -> YouTubeTrendingPostsResource {
7293 YouTubeTrendingPostsResource {
7294 scope: self.scope.clone(),
7295 }
7296 }
7297}
7298
7299#[derive(Clone, Debug)]
7303pub struct YouTubeTrendingPostsResource {
7304 scope: Scope,
7305}
7306
7307impl YouTubeTrendingPostsResource {
7308 pub async fn list(
7316 &self,
7317 options: impl Into<Option<YouTubeTrendingPostsOptions>>,
7318 ) -> Result<YouTubeTrendingPostsResponse, Error> {
7319 let options = options.into().unwrap_or_default();
7320 self.scope
7321 .operation(
7322 Method::GET,
7323 "/v1/youtube/trending/posts",
7324 options.query(),
7325 options.request_options,
7326 )?
7327 .send()
7328 .await
7329 }
7330}
7331
7332#[derive(Clone, Debug, PartialEq)]
7335#[non_exhaustive]
7336pub enum FetchResource {
7337 InstagramProfile(Box<InstagramProfile>),
7339 InstagramPost(Box<InstagramPost>),
7341 InstagramStory(Box<InstagramStory>),
7343 InstagramHighlight(Box<InstagramHighlight>),
7345 TikTokProfile(Box<TikTokProfile>),
7347 TikTokPost(Box<TikTokPost>),
7349 TwitterProfile(Box<TwitterProfile>),
7351 TwitterPost(Box<TwitterPost>),
7353 RedditProfile(Box<RedditProfile>),
7355 RedditPost(Box<RedditPost>),
7357 RedditSubreddit(Box<RedditSubreddit>),
7359 YouTubeProfile(Box<YouTubeProfile>),
7361 YouTubePost(Box<YouTubePost>),
7363}
7364
7365impl FetchResource {
7366 pub(crate) fn decode(
7367 platform: &str,
7368 resource: &str,
7369 data: serde_json::Value,
7370 ) -> Result<Option<Self>, serde_json::Error> {
7371 match (platform, resource) {
7372 ("instagram", "profile") => serde_json::from_value(data)
7373 .map(|value| Some(Self::InstagramProfile(Box::new(value)))),
7374 ("instagram", "post") => {
7375 serde_json::from_value(data).map(|value| Some(Self::InstagramPost(Box::new(value))))
7376 }
7377 ("instagram", "story") => serde_json::from_value(data)
7378 .map(|value| Some(Self::InstagramStory(Box::new(value)))),
7379 ("instagram", "highlight") => serde_json::from_value(data)
7380 .map(|value| Some(Self::InstagramHighlight(Box::new(value)))),
7381 ("tiktok", "profile") => {
7382 serde_json::from_value(data).map(|value| Some(Self::TikTokProfile(Box::new(value))))
7383 }
7384 ("tiktok", "post") => {
7385 serde_json::from_value(data).map(|value| Some(Self::TikTokPost(Box::new(value))))
7386 }
7387 ("twitter", "profile") => serde_json::from_value(data)
7388 .map(|value| Some(Self::TwitterProfile(Box::new(value)))),
7389 ("twitter", "post") => {
7390 serde_json::from_value(data).map(|value| Some(Self::TwitterPost(Box::new(value))))
7391 }
7392 ("reddit", "profile") => {
7393 serde_json::from_value(data).map(|value| Some(Self::RedditProfile(Box::new(value))))
7394 }
7395 ("reddit", "post") => {
7396 serde_json::from_value(data).map(|value| Some(Self::RedditPost(Box::new(value))))
7397 }
7398 ("reddit", "subreddit") => serde_json::from_value(data)
7399 .map(|value| Some(Self::RedditSubreddit(Box::new(value)))),
7400 ("youtube", "profile") => serde_json::from_value(data)
7401 .map(|value| Some(Self::YouTubeProfile(Box::new(value)))),
7402 ("youtube", "post") => {
7403 serde_json::from_value(data).map(|value| Some(Self::YouTubePost(Box::new(value))))
7404 }
7405 _ => Ok(None),
7406 }
7407 }
7408}
7409
7410pub type FetchResponse = Response<FetchResource>;
7412
7413#[derive(Clone, Debug, PartialEq)]
7415#[non_exhaustive]
7416pub struct InstagramCommentLikersOptions {
7417 pub media_id: String,
7419 pub freshness: Option<crate::options::Freshness>,
7421 pub cursor: Option<String>,
7423 pub request_options: RequestOptions,
7425}
7426
7427impl InstagramCommentLikersOptions {
7428 pub fn new(media_id: impl Into<String>) -> Self {
7430 Self {
7431 media_id: media_id.into(),
7432 freshness: None,
7433 cursor: None,
7434 request_options: RequestOptions::default(),
7435 }
7436 }
7437
7438 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
7440 self.freshness = Some(value);
7441 self
7442 }
7443
7444 pub fn cursor(mut self, value: impl Into<String>) -> Self {
7446 self.cursor = Some(value.into());
7447 self
7448 }
7449
7450 pub fn max_retries(mut self, value: u32) -> Self {
7452 self.request_options.max_retries = Some(value);
7453 self
7454 }
7455
7456 pub fn timeout(mut self, value: Duration) -> Self {
7458 self.request_options.timeout = Some(value);
7459 self
7460 }
7461
7462 pub(crate) fn query(&self) -> Result<Query, Error> {
7463 let mut query = Query::default();
7464 query.require("media_id", &self.media_id)?;
7465 query.push("freshness", &self.freshness);
7466 query.push("cursor", &self.cursor);
7467 Ok(query)
7468 }
7469}
7470
7471pub type InstagramCommentLikersPage = Page<InstagramProfileSummary>;
7473
7474#[derive(Clone, Debug, Default, PartialEq)]
7476#[non_exhaustive]
7477pub struct InstagramHashtagOptions {
7478 pub freshness: Option<crate::options::Freshness>,
7480 pub request_options: RequestOptions,
7482}
7483
7484impl InstagramHashtagOptions {
7485 pub fn new() -> Self {
7487 Self::default()
7488 }
7489
7490 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
7492 self.freshness = Some(value);
7493 self
7494 }
7495
7496 pub fn max_retries(mut self, value: u32) -> Self {
7498 self.request_options.max_retries = Some(value);
7499 self
7500 }
7501
7502 pub fn timeout(mut self, value: Duration) -> Self {
7504 self.request_options.timeout = Some(value);
7505 self
7506 }
7507
7508 pub(crate) fn query(&self) -> Result<Query, Error> {
7509 let mut query = Query::default();
7510 query.push("freshness", &self.freshness);
7511 Ok(query)
7512 }
7513}
7514
7515pub type InstagramHashtagResponse = Response<InstagramHashtag>;
7517
7518#[derive(Clone, Debug, Default, PartialEq)]
7520#[non_exhaustive]
7521pub struct InstagramHashtagPostsOptions {
7522 pub sort: Option<String>,
7525 pub freshness: Option<crate::options::Freshness>,
7527 pub cursor: Option<String>,
7529 pub request_options: RequestOptions,
7531}
7532
7533impl InstagramHashtagPostsOptions {
7534 pub fn new() -> Self {
7536 Self::default()
7537 }
7538
7539 pub fn sort(mut self, value: impl Into<String>) -> Self {
7542 self.sort = Some(value.into());
7543 self
7544 }
7545
7546 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
7548 self.freshness = Some(value);
7549 self
7550 }
7551
7552 pub fn cursor(mut self, value: impl Into<String>) -> Self {
7554 self.cursor = Some(value.into());
7555 self
7556 }
7557
7558 pub fn max_retries(mut self, value: u32) -> Self {
7560 self.request_options.max_retries = Some(value);
7561 self
7562 }
7563
7564 pub fn timeout(mut self, value: Duration) -> Self {
7566 self.request_options.timeout = Some(value);
7567 self
7568 }
7569
7570 pub(crate) fn query(&self) -> Result<Query, Error> {
7571 let mut query = Query::default();
7572 query.push("sort", &self.sort);
7573 query.push("freshness", &self.freshness);
7574 query.push("cursor", &self.cursor);
7575 Ok(query)
7576 }
7577}
7578
7579pub type InstagramHashtagPostsPage = Page<InstagramPost>;
7581
7582#[derive(Clone, Debug, Default, PartialEq)]
7584#[non_exhaustive]
7585pub struct InstagramHashtagReelsOptions {
7586 pub freshness: Option<crate::options::Freshness>,
7588 pub cursor: Option<String>,
7590 pub request_options: RequestOptions,
7592}
7593
7594impl InstagramHashtagReelsOptions {
7595 pub fn new() -> Self {
7597 Self::default()
7598 }
7599
7600 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
7602 self.freshness = Some(value);
7603 self
7604 }
7605
7606 pub fn cursor(mut self, value: impl Into<String>) -> Self {
7608 self.cursor = Some(value.into());
7609 self
7610 }
7611
7612 pub fn max_retries(mut self, value: u32) -> Self {
7614 self.request_options.max_retries = Some(value);
7615 self
7616 }
7617
7618 pub fn timeout(mut self, value: Duration) -> Self {
7620 self.request_options.timeout = Some(value);
7621 self
7622 }
7623
7624 pub(crate) fn query(&self) -> Result<Query, Error> {
7625 let mut query = Query::default();
7626 query.push("freshness", &self.freshness);
7627 query.push("cursor", &self.cursor);
7628 Ok(query)
7629 }
7630}
7631
7632pub type InstagramHashtagReelsPage = Page<InstagramPost>;
7634
7635#[derive(Clone, Debug, Default, PartialEq)]
7637#[non_exhaustive]
7638pub struct InstagramHighlightOptions {
7639 pub freshness: Option<crate::options::Freshness>,
7641 pub request_options: RequestOptions,
7643}
7644
7645impl InstagramHighlightOptions {
7646 pub fn new() -> Self {
7648 Self::default()
7649 }
7650
7651 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
7653 self.freshness = Some(value);
7654 self
7655 }
7656
7657 pub fn max_retries(mut self, value: u32) -> Self {
7659 self.request_options.max_retries = Some(value);
7660 self
7661 }
7662
7663 pub fn timeout(mut self, value: Duration) -> Self {
7665 self.request_options.timeout = Some(value);
7666 self
7667 }
7668
7669 pub(crate) fn query(&self) -> Result<Query, Error> {
7670 let mut query = Query::default();
7671 query.push("freshness", &self.freshness);
7672 Ok(query)
7673 }
7674}
7675
7676pub type InstagramHighlightResponse = Response<InstagramHighlight>;
7678
7679#[derive(Clone, Debug, Default, PartialEq)]
7681#[non_exhaustive]
7682pub struct InstagramLocationOptions {
7683 pub freshness: Option<crate::options::Freshness>,
7685 pub request_options: RequestOptions,
7687}
7688
7689impl InstagramLocationOptions {
7690 pub fn new() -> Self {
7692 Self::default()
7693 }
7694
7695 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
7697 self.freshness = Some(value);
7698 self
7699 }
7700
7701 pub fn max_retries(mut self, value: u32) -> Self {
7703 self.request_options.max_retries = Some(value);
7704 self
7705 }
7706
7707 pub fn timeout(mut self, value: Duration) -> Self {
7709 self.request_options.timeout = Some(value);
7710 self
7711 }
7712
7713 pub(crate) fn query(&self) -> Result<Query, Error> {
7714 let mut query = Query::default();
7715 query.push("freshness", &self.freshness);
7716 Ok(query)
7717 }
7718}
7719
7720pub type InstagramLocationResponse = Response<InstagramLocation>;
7722
7723#[derive(Clone, Debug, Default, PartialEq)]
7725#[non_exhaustive]
7726pub struct InstagramLocationPostsOptions {
7727 pub sort: Option<String>,
7730 pub freshness: Option<crate::options::Freshness>,
7732 pub cursor: Option<String>,
7734 pub request_options: RequestOptions,
7736}
7737
7738impl InstagramLocationPostsOptions {
7739 pub fn new() -> Self {
7741 Self::default()
7742 }
7743
7744 pub fn sort(mut self, value: impl Into<String>) -> Self {
7747 self.sort = Some(value.into());
7748 self
7749 }
7750
7751 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
7753 self.freshness = Some(value);
7754 self
7755 }
7756
7757 pub fn cursor(mut self, value: impl Into<String>) -> Self {
7759 self.cursor = Some(value.into());
7760 self
7761 }
7762
7763 pub fn max_retries(mut self, value: u32) -> Self {
7765 self.request_options.max_retries = Some(value);
7766 self
7767 }
7768
7769 pub fn timeout(mut self, value: Duration) -> Self {
7771 self.request_options.timeout = Some(value);
7772 self
7773 }
7774
7775 pub(crate) fn query(&self) -> Result<Query, Error> {
7776 let mut query = Query::default();
7777 query.push("sort", &self.sort);
7778 query.push("freshness", &self.freshness);
7779 query.push("cursor", &self.cursor);
7780 Ok(query)
7781 }
7782}
7783
7784pub type InstagramLocationPostsPage = Page<InstagramPost>;
7786
7787#[derive(Clone, Debug, Default, PartialEq)]
7789#[non_exhaustive]
7790pub struct InstagramMusicOptions {
7791 pub freshness: Option<crate::options::Freshness>,
7793 pub request_options: RequestOptions,
7795}
7796
7797impl InstagramMusicOptions {
7798 pub fn new() -> Self {
7800 Self::default()
7801 }
7802
7803 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
7805 self.freshness = Some(value);
7806 self
7807 }
7808
7809 pub fn max_retries(mut self, value: u32) -> Self {
7811 self.request_options.max_retries = Some(value);
7812 self
7813 }
7814
7815 pub fn timeout(mut self, value: Duration) -> Self {
7817 self.request_options.timeout = Some(value);
7818 self
7819 }
7820
7821 pub(crate) fn query(&self) -> Result<Query, Error> {
7822 let mut query = Query::default();
7823 query.push("freshness", &self.freshness);
7824 Ok(query)
7825 }
7826}
7827
7828pub type InstagramMusicResponse = Response<InstagramMusic>;
7830
7831#[derive(Clone, Debug, Default, PartialEq)]
7833#[non_exhaustive]
7834pub struct InstagramMusicStreamOptions {
7835 pub freshness: Option<crate::options::Freshness>,
7837 pub cursor: Option<String>,
7839 pub request_options: RequestOptions,
7841}
7842
7843impl InstagramMusicStreamOptions {
7844 pub fn new() -> Self {
7846 Self::default()
7847 }
7848
7849 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
7851 self.freshness = Some(value);
7852 self
7853 }
7854
7855 pub fn cursor(mut self, value: impl Into<String>) -> Self {
7857 self.cursor = Some(value.into());
7858 self
7859 }
7860
7861 pub fn max_retries(mut self, value: u32) -> Self {
7863 self.request_options.max_retries = Some(value);
7864 self
7865 }
7866
7867 pub fn timeout(mut self, value: Duration) -> Self {
7869 self.request_options.timeout = Some(value);
7870 self
7871 }
7872
7873 pub(crate) fn query(&self) -> Result<Query, Error> {
7874 let mut query = Query::default();
7875 query.push("freshness", &self.freshness);
7876 query.push("cursor", &self.cursor);
7877 Ok(query)
7878 }
7879}
7880
7881pub type InstagramMusicStreamPage = Page<InstagramMusicStream>;
7883
7884#[derive(Clone, Debug, Default, PartialEq)]
7886#[non_exhaustive]
7887pub struct InstagramPostOptions {
7888 pub freshness: Option<crate::options::Freshness>,
7890 pub request_options: RequestOptions,
7892}
7893
7894impl InstagramPostOptions {
7895 pub fn new() -> Self {
7897 Self::default()
7898 }
7899
7900 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
7902 self.freshness = Some(value);
7903 self
7904 }
7905
7906 pub fn max_retries(mut self, value: u32) -> Self {
7908 self.request_options.max_retries = Some(value);
7909 self
7910 }
7911
7912 pub fn timeout(mut self, value: Duration) -> Self {
7914 self.request_options.timeout = Some(value);
7915 self
7916 }
7917
7918 pub(crate) fn query(&self) -> Result<Query, Error> {
7919 let mut query = Query::default();
7920 query.push("freshness", &self.freshness);
7921 Ok(query)
7922 }
7923}
7924
7925pub type InstagramPostResponse = Response<InstagramPost>;
7927
7928#[derive(Clone, Debug, Default, PartialEq)]
7930#[non_exhaustive]
7931pub struct InstagramPostClipMetadataOptions {
7932 pub freshness: Option<crate::options::Freshness>,
7934 pub request_options: RequestOptions,
7936}
7937
7938impl InstagramPostClipMetadataOptions {
7939 pub fn new() -> Self {
7941 Self::default()
7942 }
7943
7944 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
7946 self.freshness = Some(value);
7947 self
7948 }
7949
7950 pub fn max_retries(mut self, value: u32) -> Self {
7952 self.request_options.max_retries = Some(value);
7953 self
7954 }
7955
7956 pub fn timeout(mut self, value: Duration) -> Self {
7958 self.request_options.timeout = Some(value);
7959 self
7960 }
7961
7962 pub(crate) fn query(&self) -> Result<Query, Error> {
7963 let mut query = Query::default();
7964 query.push("freshness", &self.freshness);
7965 Ok(query)
7966 }
7967}
7968
7969pub type InstagramPostClipMetadataResponse = Response<InstagramClipMetadata>;
7971
7972#[derive(Clone, Debug, Default, PartialEq)]
7974#[non_exhaustive]
7975pub struct InstagramPostCommentRepliesOptions {
7976 pub freshness: Option<crate::options::Freshness>,
7978 pub cursor: Option<String>,
7980 pub request_options: RequestOptions,
7982}
7983
7984impl InstagramPostCommentRepliesOptions {
7985 pub fn new() -> Self {
7987 Self::default()
7988 }
7989
7990 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
7992 self.freshness = Some(value);
7993 self
7994 }
7995
7996 pub fn cursor(mut self, value: impl Into<String>) -> Self {
7998 self.cursor = Some(value.into());
7999 self
8000 }
8001
8002 pub fn max_retries(mut self, value: u32) -> Self {
8004 self.request_options.max_retries = Some(value);
8005 self
8006 }
8007
8008 pub fn timeout(mut self, value: Duration) -> Self {
8010 self.request_options.timeout = Some(value);
8011 self
8012 }
8013
8014 pub(crate) fn query(&self) -> Result<Query, Error> {
8015 let mut query = Query::default();
8016 query.push("freshness", &self.freshness);
8017 query.push("cursor", &self.cursor);
8018 Ok(query)
8019 }
8020}
8021
8022pub type InstagramPostCommentRepliesPage = Page<InstagramComment>;
8024
8025#[derive(Clone, Debug, Default, PartialEq)]
8027#[non_exhaustive]
8028pub struct InstagramPostCommentMetadataOptions {
8029 pub freshness: Option<crate::options::Freshness>,
8031 pub request_options: RequestOptions,
8033}
8034
8035impl InstagramPostCommentMetadataOptions {
8036 pub fn new() -> Self {
8038 Self::default()
8039 }
8040
8041 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8043 self.freshness = Some(value);
8044 self
8045 }
8046
8047 pub fn max_retries(mut self, value: u32) -> Self {
8049 self.request_options.max_retries = Some(value);
8050 self
8051 }
8052
8053 pub fn timeout(mut self, value: Duration) -> Self {
8055 self.request_options.timeout = Some(value);
8056 self
8057 }
8058
8059 pub(crate) fn query(&self) -> Result<Query, Error> {
8060 let mut query = Query::default();
8061 query.push("freshness", &self.freshness);
8062 Ok(query)
8063 }
8064}
8065
8066pub type InstagramPostCommentMetadataResponse = Response<InstagramCommentMetadata>;
8068
8069#[derive(Clone, Debug, PartialEq)]
8071#[non_exhaustive]
8072pub struct InstagramPostCommentModerationOptions {
8073 pub comment: String,
8075 pub freshness: Option<crate::options::Freshness>,
8077 pub request_options: RequestOptions,
8079}
8080
8081impl InstagramPostCommentModerationOptions {
8082 pub fn new(comment: impl Into<String>) -> Self {
8084 Self {
8085 comment: comment.into(),
8086 freshness: None,
8087 request_options: RequestOptions::default(),
8088 }
8089 }
8090
8091 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8093 self.freshness = Some(value);
8094 self
8095 }
8096
8097 pub fn max_retries(mut self, value: u32) -> Self {
8099 self.request_options.max_retries = Some(value);
8100 self
8101 }
8102
8103 pub fn timeout(mut self, value: Duration) -> Self {
8105 self.request_options.timeout = Some(value);
8106 self
8107 }
8108
8109 pub(crate) fn query(&self) -> Result<Query, Error> {
8110 let mut query = Query::default();
8111 query.require("comment", &self.comment)?;
8112 query.push("freshness", &self.freshness);
8113 Ok(query)
8114 }
8115}
8116
8117pub type InstagramPostCommentModerationResponse = Response<InstagramCommentModeration>;
8119
8120#[derive(Clone, Debug, Default, PartialEq)]
8122#[non_exhaustive]
8123pub struct InstagramPostCommentsOptions {
8124 pub freshness: Option<crate::options::Freshness>,
8126 pub cursor: Option<String>,
8128 pub request_options: RequestOptions,
8130}
8131
8132impl InstagramPostCommentsOptions {
8133 pub fn new() -> Self {
8135 Self::default()
8136 }
8137
8138 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8140 self.freshness = Some(value);
8141 self
8142 }
8143
8144 pub fn cursor(mut self, value: impl Into<String>) -> Self {
8146 self.cursor = Some(value.into());
8147 self
8148 }
8149
8150 pub fn max_retries(mut self, value: u32) -> Self {
8152 self.request_options.max_retries = Some(value);
8153 self
8154 }
8155
8156 pub fn timeout(mut self, value: Duration) -> Self {
8158 self.request_options.timeout = Some(value);
8159 self
8160 }
8161
8162 pub(crate) fn query(&self) -> Result<Query, Error> {
8163 let mut query = Query::default();
8164 query.push("freshness", &self.freshness);
8165 query.push("cursor", &self.cursor);
8166 Ok(query)
8167 }
8168}
8169
8170pub type InstagramPostCommentsPage = Page<InstagramComment>;
8172
8173#[derive(Clone, Debug, Default, PartialEq)]
8175#[non_exhaustive]
8176pub struct InstagramPostInsightsOptions {
8177 pub freshness: Option<crate::options::Freshness>,
8179 pub request_options: RequestOptions,
8181}
8182
8183impl InstagramPostInsightsOptions {
8184 pub fn new() -> Self {
8186 Self::default()
8187 }
8188
8189 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8191 self.freshness = Some(value);
8192 self
8193 }
8194
8195 pub fn max_retries(mut self, value: u32) -> Self {
8197 self.request_options.max_retries = Some(value);
8198 self
8199 }
8200
8201 pub fn timeout(mut self, value: Duration) -> Self {
8203 self.request_options.timeout = Some(value);
8204 self
8205 }
8206
8207 pub(crate) fn query(&self) -> Result<Query, Error> {
8208 let mut query = Query::default();
8209 query.push("freshness", &self.freshness);
8210 Ok(query)
8211 }
8212}
8213
8214pub type InstagramPostInsightsResponse = Response<InstagramPostInsight>;
8216
8217#[derive(Clone, Debug, Default, PartialEq)]
8219#[non_exhaustive]
8220pub struct InstagramPostLikersOptions {
8221 pub freshness: Option<crate::options::Freshness>,
8223 pub cursor: Option<String>,
8225 pub request_options: RequestOptions,
8227}
8228
8229impl InstagramPostLikersOptions {
8230 pub fn new() -> Self {
8232 Self::default()
8233 }
8234
8235 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8237 self.freshness = Some(value);
8238 self
8239 }
8240
8241 pub fn cursor(mut self, value: impl Into<String>) -> Self {
8243 self.cursor = Some(value.into());
8244 self
8245 }
8246
8247 pub fn max_retries(mut self, value: u32) -> Self {
8249 self.request_options.max_retries = Some(value);
8250 self
8251 }
8252
8253 pub fn timeout(mut self, value: Duration) -> Self {
8255 self.request_options.timeout = Some(value);
8256 self
8257 }
8258
8259 pub(crate) fn query(&self) -> Result<Query, Error> {
8260 let mut query = Query::default();
8261 query.push("freshness", &self.freshness);
8262 query.push("cursor", &self.cursor);
8263 Ok(query)
8264 }
8265}
8266
8267pub type InstagramPostLikersPage = Page<InstagramProfile>;
8269
8270#[derive(Clone, Debug, Default, PartialEq)]
8272#[non_exhaustive]
8273pub struct InstagramPostOEmbedOptions {
8274 pub freshness: Option<crate::options::Freshness>,
8276 pub request_options: RequestOptions,
8278}
8279
8280impl InstagramPostOEmbedOptions {
8281 pub fn new() -> Self {
8283 Self::default()
8284 }
8285
8286 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8288 self.freshness = Some(value);
8289 self
8290 }
8291
8292 pub fn max_retries(mut self, value: u32) -> Self {
8294 self.request_options.max_retries = Some(value);
8295 self
8296 }
8297
8298 pub fn timeout(mut self, value: Duration) -> Self {
8300 self.request_options.timeout = Some(value);
8301 self
8302 }
8303
8304 pub(crate) fn query(&self) -> Result<Query, Error> {
8305 let mut query = Query::default();
8306 query.push("freshness", &self.freshness);
8307 Ok(query)
8308 }
8309}
8310
8311pub type InstagramPostOEmbedResponse = Response<InstagramOEmbed>;
8313
8314#[derive(Clone, Debug, Default, PartialEq)]
8316#[non_exhaustive]
8317pub struct InstagramPostTaggedUsersOptions {
8318 pub freshness: Option<crate::options::Freshness>,
8320 pub cursor: Option<String>,
8322 pub request_options: RequestOptions,
8324}
8325
8326impl InstagramPostTaggedUsersOptions {
8327 pub fn new() -> Self {
8329 Self::default()
8330 }
8331
8332 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8334 self.freshness = Some(value);
8335 self
8336 }
8337
8338 pub fn cursor(mut self, value: impl Into<String>) -> Self {
8340 self.cursor = Some(value.into());
8341 self
8342 }
8343
8344 pub fn max_retries(mut self, value: u32) -> Self {
8346 self.request_options.max_retries = Some(value);
8347 self
8348 }
8349
8350 pub fn timeout(mut self, value: Duration) -> Self {
8352 self.request_options.timeout = Some(value);
8353 self
8354 }
8355
8356 pub(crate) fn query(&self) -> Result<Query, Error> {
8357 let mut query = Query::default();
8358 query.push("freshness", &self.freshness);
8359 query.push("cursor", &self.cursor);
8360 Ok(query)
8361 }
8362}
8363
8364pub type InstagramPostTaggedUsersPage = Page<InstagramUserTag>;
8366
8367#[derive(Clone, Debug, Default, PartialEq)]
8369#[non_exhaustive]
8370pub struct InstagramPostTemplateOptions {
8371 pub freshness: Option<crate::options::Freshness>,
8373 pub request_options: RequestOptions,
8375}
8376
8377impl InstagramPostTemplateOptions {
8378 pub fn new() -> Self {
8380 Self::default()
8381 }
8382
8383 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8385 self.freshness = Some(value);
8386 self
8387 }
8388
8389 pub fn max_retries(mut self, value: u32) -> Self {
8391 self.request_options.max_retries = Some(value);
8392 self
8393 }
8394
8395 pub fn timeout(mut self, value: Duration) -> Self {
8397 self.request_options.timeout = Some(value);
8398 self
8399 }
8400
8401 pub(crate) fn query(&self) -> Result<Query, Error> {
8402 let mut query = Query::default();
8403 query.push("freshness", &self.freshness);
8404 Ok(query)
8405 }
8406}
8407
8408pub type InstagramPostTemplateResponse = Response<InstagramTemplate>;
8410
8411#[derive(Clone, Debug, Default, PartialEq)]
8413#[non_exhaustive]
8414pub struct InstagramProfileOptions {
8415 pub freshness: Option<crate::options::Freshness>,
8417 pub request_options: RequestOptions,
8419}
8420
8421impl InstagramProfileOptions {
8422 pub fn new() -> Self {
8424 Self::default()
8425 }
8426
8427 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8429 self.freshness = Some(value);
8430 self
8431 }
8432
8433 pub fn max_retries(mut self, value: u32) -> Self {
8435 self.request_options.max_retries = Some(value);
8436 self
8437 }
8438
8439 pub fn timeout(mut self, value: Duration) -> Self {
8441 self.request_options.timeout = Some(value);
8442 self
8443 }
8444
8445 pub(crate) fn query(&self) -> Result<Query, Error> {
8446 let mut query = Query::default();
8447 query.push("freshness", &self.freshness);
8448 Ok(query)
8449 }
8450}
8451
8452pub type InstagramProfileResponse = Response<InstagramProfile>;
8454
8455#[derive(Clone, Debug, Default, PartialEq)]
8457#[non_exhaustive]
8458pub struct InstagramProfileAboutOptions {
8459 pub freshness: Option<crate::options::Freshness>,
8461 pub request_options: RequestOptions,
8463}
8464
8465impl InstagramProfileAboutOptions {
8466 pub fn new() -> Self {
8468 Self::default()
8469 }
8470
8471 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8473 self.freshness = Some(value);
8474 self
8475 }
8476
8477 pub fn max_retries(mut self, value: u32) -> Self {
8479 self.request_options.max_retries = Some(value);
8480 self
8481 }
8482
8483 pub fn timeout(mut self, value: Duration) -> Self {
8485 self.request_options.timeout = Some(value);
8486 self
8487 }
8488
8489 pub(crate) fn query(&self) -> Result<Query, Error> {
8490 let mut query = Query::default();
8491 query.push("freshness", &self.freshness);
8492 Ok(query)
8493 }
8494}
8495
8496pub type InstagramProfileAboutResponse = Response<InstagramProfileAbout>;
8498
8499#[derive(Clone, Debug, Default, PartialEq)]
8501#[non_exhaustive]
8502pub struct InstagramProfileBusinessRecommendationsOptions {
8503 pub freshness: Option<crate::options::Freshness>,
8505 pub cursor: Option<String>,
8507 pub request_options: RequestOptions,
8509}
8510
8511impl InstagramProfileBusinessRecommendationsOptions {
8512 pub fn new() -> Self {
8514 Self::default()
8515 }
8516
8517 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8519 self.freshness = Some(value);
8520 self
8521 }
8522
8523 pub fn cursor(mut self, value: impl Into<String>) -> Self {
8525 self.cursor = Some(value.into());
8526 self
8527 }
8528
8529 pub fn max_retries(mut self, value: u32) -> Self {
8531 self.request_options.max_retries = Some(value);
8532 self
8533 }
8534
8535 pub fn timeout(mut self, value: Duration) -> Self {
8537 self.request_options.timeout = Some(value);
8538 self
8539 }
8540
8541 pub(crate) fn query(&self) -> Result<Query, Error> {
8542 let mut query = Query::default();
8543 query.push("freshness", &self.freshness);
8544 query.push("cursor", &self.cursor);
8545 Ok(query)
8546 }
8547}
8548
8549pub type InstagramProfileBusinessRecommendationsPage = Page<InstagramProfileSummary>;
8551
8552#[derive(Clone, Debug, Default, PartialEq)]
8554#[non_exhaustive]
8555pub struct InstagramProfileFollowersOptions {
8556 pub freshness: Option<crate::options::Freshness>,
8558 pub cursor: Option<String>,
8560 pub request_options: RequestOptions,
8562}
8563
8564impl InstagramProfileFollowersOptions {
8565 pub fn new() -> Self {
8567 Self::default()
8568 }
8569
8570 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8572 self.freshness = Some(value);
8573 self
8574 }
8575
8576 pub fn cursor(mut self, value: impl Into<String>) -> Self {
8578 self.cursor = Some(value.into());
8579 self
8580 }
8581
8582 pub fn max_retries(mut self, value: u32) -> Self {
8584 self.request_options.max_retries = Some(value);
8585 self
8586 }
8587
8588 pub fn timeout(mut self, value: Duration) -> Self {
8590 self.request_options.timeout = Some(value);
8591 self
8592 }
8593
8594 pub(crate) fn query(&self) -> Result<Query, Error> {
8595 let mut query = Query::default();
8596 query.push("freshness", &self.freshness);
8597 query.push("cursor", &self.cursor);
8598 Ok(query)
8599 }
8600}
8601
8602pub type InstagramProfileFollowersPage = Page<InstagramProfile>;
8604
8605#[derive(Clone, Debug, PartialEq)]
8607#[non_exhaustive]
8608pub struct InstagramProfileFollowersSearchOptions {
8609 pub q: String,
8611 pub freshness: Option<crate::options::Freshness>,
8613 pub cursor: Option<String>,
8615 pub request_options: RequestOptions,
8617}
8618
8619impl InstagramProfileFollowersSearchOptions {
8620 pub fn new(q: impl Into<String>) -> Self {
8622 Self {
8623 q: q.into(),
8624 freshness: None,
8625 cursor: None,
8626 request_options: RequestOptions::default(),
8627 }
8628 }
8629
8630 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8632 self.freshness = Some(value);
8633 self
8634 }
8635
8636 pub fn cursor(mut self, value: impl Into<String>) -> Self {
8638 self.cursor = Some(value.into());
8639 self
8640 }
8641
8642 pub fn max_retries(mut self, value: u32) -> Self {
8644 self.request_options.max_retries = Some(value);
8645 self
8646 }
8647
8648 pub fn timeout(mut self, value: Duration) -> Self {
8650 self.request_options.timeout = Some(value);
8651 self
8652 }
8653
8654 pub(crate) fn query(&self) -> Result<Query, Error> {
8655 let mut query = Query::default();
8656 query.require("q", &self.q)?;
8657 query.push("freshness", &self.freshness);
8658 query.push("cursor", &self.cursor);
8659 Ok(query)
8660 }
8661}
8662
8663pub type InstagramProfileFollowersSearchPage = Page<InstagramProfile>;
8665
8666#[derive(Clone, Debug, Default, PartialEq)]
8668#[non_exhaustive]
8669pub struct InstagramProfileFollowingOptions {
8670 pub freshness: Option<crate::options::Freshness>,
8672 pub cursor: Option<String>,
8674 pub request_options: RequestOptions,
8676}
8677
8678impl InstagramProfileFollowingOptions {
8679 pub fn new() -> Self {
8681 Self::default()
8682 }
8683
8684 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8686 self.freshness = Some(value);
8687 self
8688 }
8689
8690 pub fn cursor(mut self, value: impl Into<String>) -> Self {
8692 self.cursor = Some(value.into());
8693 self
8694 }
8695
8696 pub fn max_retries(mut self, value: u32) -> Self {
8698 self.request_options.max_retries = Some(value);
8699 self
8700 }
8701
8702 pub fn timeout(mut self, value: Duration) -> Self {
8704 self.request_options.timeout = Some(value);
8705 self
8706 }
8707
8708 pub(crate) fn query(&self) -> Result<Query, Error> {
8709 let mut query = Query::default();
8710 query.push("freshness", &self.freshness);
8711 query.push("cursor", &self.cursor);
8712 Ok(query)
8713 }
8714}
8715
8716pub type InstagramProfileFollowingPage = Page<InstagramProfile>;
8718
8719#[derive(Clone, Debug, PartialEq)]
8721#[non_exhaustive]
8722pub struct InstagramProfileFollowingSearchOptions {
8723 pub q: String,
8725 pub freshness: Option<crate::options::Freshness>,
8727 pub cursor: Option<String>,
8729 pub request_options: RequestOptions,
8731}
8732
8733impl InstagramProfileFollowingSearchOptions {
8734 pub fn new(q: impl Into<String>) -> Self {
8736 Self {
8737 q: q.into(),
8738 freshness: None,
8739 cursor: None,
8740 request_options: RequestOptions::default(),
8741 }
8742 }
8743
8744 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8746 self.freshness = Some(value);
8747 self
8748 }
8749
8750 pub fn cursor(mut self, value: impl Into<String>) -> Self {
8752 self.cursor = Some(value.into());
8753 self
8754 }
8755
8756 pub fn max_retries(mut self, value: u32) -> Self {
8758 self.request_options.max_retries = Some(value);
8759 self
8760 }
8761
8762 pub fn timeout(mut self, value: Duration) -> Self {
8764 self.request_options.timeout = Some(value);
8765 self
8766 }
8767
8768 pub(crate) fn query(&self) -> Result<Query, Error> {
8769 let mut query = Query::default();
8770 query.require("q", &self.q)?;
8771 query.push("freshness", &self.freshness);
8772 query.push("cursor", &self.cursor);
8773 Ok(query)
8774 }
8775}
8776
8777pub type InstagramProfileFollowingSearchPage = Page<InstagramProfile>;
8779
8780#[derive(Clone, Debug, Default, PartialEq)]
8782#[non_exhaustive]
8783pub struct InstagramProfileHighlightsOptions {
8784 pub freshness: Option<crate::options::Freshness>,
8786 pub cursor: Option<String>,
8788 pub request_options: RequestOptions,
8790}
8791
8792impl InstagramProfileHighlightsOptions {
8793 pub fn new() -> Self {
8795 Self::default()
8796 }
8797
8798 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8800 self.freshness = Some(value);
8801 self
8802 }
8803
8804 pub fn cursor(mut self, value: impl Into<String>) -> Self {
8806 self.cursor = Some(value.into());
8807 self
8808 }
8809
8810 pub fn max_retries(mut self, value: u32) -> Self {
8812 self.request_options.max_retries = Some(value);
8813 self
8814 }
8815
8816 pub fn timeout(mut self, value: Duration) -> Self {
8818 self.request_options.timeout = Some(value);
8819 self
8820 }
8821
8822 pub(crate) fn query(&self) -> Result<Query, Error> {
8823 let mut query = Query::default();
8824 query.push("freshness", &self.freshness);
8825 query.push("cursor", &self.cursor);
8826 Ok(query)
8827 }
8828}
8829
8830pub type InstagramProfileHighlightsPage = Page<InstagramHighlight>;
8832
8833#[derive(Clone, Debug, Default, PartialEq)]
8835#[non_exhaustive]
8836pub struct InstagramProfilePinnedPostsOptions {
8837 pub freshness: Option<crate::options::Freshness>,
8839 pub cursor: Option<String>,
8841 pub request_options: RequestOptions,
8843}
8844
8845impl InstagramProfilePinnedPostsOptions {
8846 pub fn new() -> Self {
8848 Self::default()
8849 }
8850
8851 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8853 self.freshness = Some(value);
8854 self
8855 }
8856
8857 pub fn cursor(mut self, value: impl Into<String>) -> Self {
8859 self.cursor = Some(value.into());
8860 self
8861 }
8862
8863 pub fn max_retries(mut self, value: u32) -> Self {
8865 self.request_options.max_retries = Some(value);
8866 self
8867 }
8868
8869 pub fn timeout(mut self, value: Duration) -> Self {
8871 self.request_options.timeout = Some(value);
8872 self
8873 }
8874
8875 pub(crate) fn query(&self) -> Result<Query, Error> {
8876 let mut query = Query::default();
8877 query.push("freshness", &self.freshness);
8878 query.push("cursor", &self.cursor);
8879 Ok(query)
8880 }
8881}
8882
8883pub type InstagramProfilePinnedPostsPage = Page<InstagramPost>;
8885
8886#[derive(Clone, Debug, Default, PartialEq)]
8888#[non_exhaustive]
8889pub struct InstagramProfilePostsOptions {
8890 pub freshness: Option<crate::options::Freshness>,
8892 pub cursor: Option<String>,
8894 pub since: Option<chrono::DateTime<chrono::Utc>>,
8896 pub request_options: RequestOptions,
8898}
8899
8900impl InstagramProfilePostsOptions {
8901 pub fn new() -> Self {
8903 Self::default()
8904 }
8905
8906 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8908 self.freshness = Some(value);
8909 self
8910 }
8911
8912 pub fn cursor(mut self, value: impl Into<String>) -> Self {
8914 self.cursor = Some(value.into());
8915 self
8916 }
8917
8918 pub fn since(mut self, value: chrono::DateTime<chrono::Utc>) -> Self {
8920 self.since = Some(value);
8921 self
8922 }
8923
8924 pub fn max_retries(mut self, value: u32) -> Self {
8926 self.request_options.max_retries = Some(value);
8927 self
8928 }
8929
8930 pub fn timeout(mut self, value: Duration) -> Self {
8932 self.request_options.timeout = Some(value);
8933 self
8934 }
8935
8936 pub(crate) fn query(&self) -> Result<Query, Error> {
8937 let mut query = Query::default();
8938 query.push("freshness", &self.freshness);
8939 query.push("cursor", &self.cursor);
8940 query.push("since", &self.since);
8941 Ok(query)
8942 }
8943}
8944
8945pub type InstagramProfilePostsPage = Page<InstagramPost>;
8947
8948#[derive(Clone, Debug, Default, PartialEq)]
8950#[non_exhaustive]
8951pub struct InstagramProfileReelsOptions {
8952 pub freshness: Option<crate::options::Freshness>,
8954 pub cursor: Option<String>,
8956 pub request_options: RequestOptions,
8958}
8959
8960impl InstagramProfileReelsOptions {
8961 pub fn new() -> Self {
8963 Self::default()
8964 }
8965
8966 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
8968 self.freshness = Some(value);
8969 self
8970 }
8971
8972 pub fn cursor(mut self, value: impl Into<String>) -> Self {
8974 self.cursor = Some(value.into());
8975 self
8976 }
8977
8978 pub fn max_retries(mut self, value: u32) -> Self {
8980 self.request_options.max_retries = Some(value);
8981 self
8982 }
8983
8984 pub fn timeout(mut self, value: Duration) -> Self {
8986 self.request_options.timeout = Some(value);
8987 self
8988 }
8989
8990 pub(crate) fn query(&self) -> Result<Query, Error> {
8991 let mut query = Query::default();
8992 query.push("freshness", &self.freshness);
8993 query.push("cursor", &self.cursor);
8994 Ok(query)
8995 }
8996}
8997
8998pub type InstagramProfileReelsPage = Page<InstagramPost>;
9000
9001#[derive(Clone, Debug, Default, PartialEq)]
9003#[non_exhaustive]
9004pub struct InstagramProfileRepostsOptions {
9005 pub freshness: Option<crate::options::Freshness>,
9007 pub cursor: Option<String>,
9009 pub request_options: RequestOptions,
9011}
9012
9013impl InstagramProfileRepostsOptions {
9014 pub fn new() -> Self {
9016 Self::default()
9017 }
9018
9019 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9021 self.freshness = Some(value);
9022 self
9023 }
9024
9025 pub fn cursor(mut self, value: impl Into<String>) -> Self {
9027 self.cursor = Some(value.into());
9028 self
9029 }
9030
9031 pub fn max_retries(mut self, value: u32) -> Self {
9033 self.request_options.max_retries = Some(value);
9034 self
9035 }
9036
9037 pub fn timeout(mut self, value: Duration) -> Self {
9039 self.request_options.timeout = Some(value);
9040 self
9041 }
9042
9043 pub(crate) fn query(&self) -> Result<Query, Error> {
9044 let mut query = Query::default();
9045 query.push("freshness", &self.freshness);
9046 query.push("cursor", &self.cursor);
9047 Ok(query)
9048 }
9049}
9050
9051pub type InstagramProfileRepostsPage = Page<InstagramPost>;
9053
9054#[derive(Clone, Debug, Default, PartialEq)]
9056#[non_exhaustive]
9057pub struct InstagramProfileStoriesOptions {
9058 pub freshness: Option<crate::options::Freshness>,
9060 pub cursor: Option<String>,
9062 pub request_options: RequestOptions,
9064}
9065
9066impl InstagramProfileStoriesOptions {
9067 pub fn new() -> Self {
9069 Self::default()
9070 }
9071
9072 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9074 self.freshness = Some(value);
9075 self
9076 }
9077
9078 pub fn cursor(mut self, value: impl Into<String>) -> Self {
9080 self.cursor = Some(value.into());
9081 self
9082 }
9083
9084 pub fn max_retries(mut self, value: u32) -> Self {
9086 self.request_options.max_retries = Some(value);
9087 self
9088 }
9089
9090 pub fn timeout(mut self, value: Duration) -> Self {
9092 self.request_options.timeout = Some(value);
9093 self
9094 }
9095
9096 pub(crate) fn query(&self) -> Result<Query, Error> {
9097 let mut query = Query::default();
9098 query.push("freshness", &self.freshness);
9099 query.push("cursor", &self.cursor);
9100 Ok(query)
9101 }
9102}
9103
9104pub type InstagramProfileStoriesPage = Page<InstagramStory>;
9106
9107#[derive(Clone, Debug, Default, PartialEq)]
9109#[non_exhaustive]
9110pub struct InstagramProfileSuggestedOptions {
9111 pub freshness: Option<crate::options::Freshness>,
9113 pub cursor: Option<String>,
9115 pub request_options: RequestOptions,
9117}
9118
9119impl InstagramProfileSuggestedOptions {
9120 pub fn new() -> Self {
9122 Self::default()
9123 }
9124
9125 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9127 self.freshness = Some(value);
9128 self
9129 }
9130
9131 pub fn cursor(mut self, value: impl Into<String>) -> Self {
9133 self.cursor = Some(value.into());
9134 self
9135 }
9136
9137 pub fn max_retries(mut self, value: u32) -> Self {
9139 self.request_options.max_retries = Some(value);
9140 self
9141 }
9142
9143 pub fn timeout(mut self, value: Duration) -> Self {
9145 self.request_options.timeout = Some(value);
9146 self
9147 }
9148
9149 pub(crate) fn query(&self) -> Result<Query, Error> {
9150 let mut query = Query::default();
9151 query.push("freshness", &self.freshness);
9152 query.push("cursor", &self.cursor);
9153 Ok(query)
9154 }
9155}
9156
9157pub type InstagramProfileSuggestedPage = Page<InstagramProfile>;
9159
9160#[derive(Clone, Debug, Default, PartialEq)]
9162#[non_exhaustive]
9163pub struct InstagramProfileTaggedPostsOptions {
9164 pub freshness: Option<crate::options::Freshness>,
9166 pub cursor: Option<String>,
9168 pub request_options: RequestOptions,
9170}
9171
9172impl InstagramProfileTaggedPostsOptions {
9173 pub fn new() -> Self {
9175 Self::default()
9176 }
9177
9178 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9180 self.freshness = Some(value);
9181 self
9182 }
9183
9184 pub fn cursor(mut self, value: impl Into<String>) -> Self {
9186 self.cursor = Some(value.into());
9187 self
9188 }
9189
9190 pub fn max_retries(mut self, value: u32) -> Self {
9192 self.request_options.max_retries = Some(value);
9193 self
9194 }
9195
9196 pub fn timeout(mut self, value: Duration) -> Self {
9198 self.request_options.timeout = Some(value);
9199 self
9200 }
9201
9202 pub(crate) fn query(&self) -> Result<Query, Error> {
9203 let mut query = Query::default();
9204 query.push("freshness", &self.freshness);
9205 query.push("cursor", &self.cursor);
9206 Ok(query)
9207 }
9208}
9209
9210pub type InstagramProfileTaggedPostsPage = Page<InstagramPost>;
9212
9213#[derive(Clone, Debug, Default, PartialEq)]
9215#[non_exhaustive]
9216pub struct InstagramProfileVideosOptions {
9217 pub freshness: Option<crate::options::Freshness>,
9219 pub cursor: Option<String>,
9221 pub request_options: RequestOptions,
9223}
9224
9225impl InstagramProfileVideosOptions {
9226 pub fn new() -> Self {
9228 Self::default()
9229 }
9230
9231 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9233 self.freshness = Some(value);
9234 self
9235 }
9236
9237 pub fn cursor(mut self, value: impl Into<String>) -> Self {
9239 self.cursor = Some(value.into());
9240 self
9241 }
9242
9243 pub fn max_retries(mut self, value: u32) -> Self {
9245 self.request_options.max_retries = Some(value);
9246 self
9247 }
9248
9249 pub fn timeout(mut self, value: Duration) -> Self {
9251 self.request_options.timeout = Some(value);
9252 self
9253 }
9254
9255 pub(crate) fn query(&self) -> Result<Query, Error> {
9256 let mut query = Query::default();
9257 query.push("freshness", &self.freshness);
9258 query.push("cursor", &self.cursor);
9259 Ok(query)
9260 }
9261}
9262
9263pub type InstagramProfileVideosPage = Page<InstagramPost>;
9265
9266#[derive(Clone, Debug, PartialEq)]
9268#[non_exhaustive]
9269pub struct InstagramSearchHashtagsOptions {
9270 pub q: String,
9272 pub freshness: Option<crate::options::Freshness>,
9274 pub cursor: Option<String>,
9276 pub request_options: RequestOptions,
9278}
9279
9280impl InstagramSearchHashtagsOptions {
9281 pub fn new(q: impl Into<String>) -> Self {
9283 Self {
9284 q: q.into(),
9285 freshness: None,
9286 cursor: None,
9287 request_options: RequestOptions::default(),
9288 }
9289 }
9290
9291 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9293 self.freshness = Some(value);
9294 self
9295 }
9296
9297 pub fn cursor(mut self, value: impl Into<String>) -> Self {
9299 self.cursor = Some(value.into());
9300 self
9301 }
9302
9303 pub fn max_retries(mut self, value: u32) -> Self {
9305 self.request_options.max_retries = Some(value);
9306 self
9307 }
9308
9309 pub fn timeout(mut self, value: Duration) -> Self {
9311 self.request_options.timeout = Some(value);
9312 self
9313 }
9314
9315 pub(crate) fn query(&self) -> Result<Query, Error> {
9316 let mut query = Query::default();
9317 query.require("q", &self.q)?;
9318 query.push("freshness", &self.freshness);
9319 query.push("cursor", &self.cursor);
9320 Ok(query)
9321 }
9322}
9323
9324pub type InstagramSearchHashtagsPage = Page<InstagramHashtag>;
9326
9327#[derive(Clone, Debug, PartialEq)]
9329#[non_exhaustive]
9330pub struct InstagramSearchMusicOptions {
9331 pub q: String,
9333 pub freshness: Option<crate::options::Freshness>,
9335 pub cursor: Option<String>,
9337 pub request_options: RequestOptions,
9339}
9340
9341impl InstagramSearchMusicOptions {
9342 pub fn new(q: impl Into<String>) -> Self {
9344 Self {
9345 q: q.into(),
9346 freshness: None,
9347 cursor: None,
9348 request_options: RequestOptions::default(),
9349 }
9350 }
9351
9352 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9354 self.freshness = Some(value);
9355 self
9356 }
9357
9358 pub fn cursor(mut self, value: impl Into<String>) -> Self {
9360 self.cursor = Some(value.into());
9361 self
9362 }
9363
9364 pub fn max_retries(mut self, value: u32) -> Self {
9366 self.request_options.max_retries = Some(value);
9367 self
9368 }
9369
9370 pub fn timeout(mut self, value: Duration) -> Self {
9372 self.request_options.timeout = Some(value);
9373 self
9374 }
9375
9376 pub(crate) fn query(&self) -> Result<Query, Error> {
9377 let mut query = Query::default();
9378 query.require("q", &self.q)?;
9379 query.push("freshness", &self.freshness);
9380 query.push("cursor", &self.cursor);
9381 Ok(query)
9382 }
9383}
9384
9385pub type InstagramSearchMusicPage = Page<InstagramMusic>;
9387
9388#[derive(Clone, Debug, PartialEq)]
9390#[non_exhaustive]
9391pub struct InstagramSearchPlacesOptions {
9392 pub q: String,
9394 pub freshness: Option<crate::options::Freshness>,
9396 pub cursor: Option<String>,
9398 pub request_options: RequestOptions,
9400}
9401
9402impl InstagramSearchPlacesOptions {
9403 pub fn new(q: impl Into<String>) -> Self {
9405 Self {
9406 q: q.into(),
9407 freshness: None,
9408 cursor: None,
9409 request_options: RequestOptions::default(),
9410 }
9411 }
9412
9413 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9415 self.freshness = Some(value);
9416 self
9417 }
9418
9419 pub fn cursor(mut self, value: impl Into<String>) -> Self {
9421 self.cursor = Some(value.into());
9422 self
9423 }
9424
9425 pub fn max_retries(mut self, value: u32) -> Self {
9427 self.request_options.max_retries = Some(value);
9428 self
9429 }
9430
9431 pub fn timeout(mut self, value: Duration) -> Self {
9433 self.request_options.timeout = Some(value);
9434 self
9435 }
9436
9437 pub(crate) fn query(&self) -> Result<Query, Error> {
9438 let mut query = Query::default();
9439 query.require("q", &self.q)?;
9440 query.push("freshness", &self.freshness);
9441 query.push("cursor", &self.cursor);
9442 Ok(query)
9443 }
9444}
9445
9446pub type InstagramSearchPlacesPage = Page<InstagramLocation>;
9448
9449#[derive(Clone, Debug, PartialEq)]
9451#[non_exhaustive]
9452pub struct InstagramSearchProfilesOptions {
9453 pub q: String,
9455 pub freshness: Option<crate::options::Freshness>,
9457 pub cursor: Option<String>,
9459 pub request_options: RequestOptions,
9461}
9462
9463impl InstagramSearchProfilesOptions {
9464 pub fn new(q: impl Into<String>) -> Self {
9466 Self {
9467 q: q.into(),
9468 freshness: None,
9469 cursor: None,
9470 request_options: RequestOptions::default(),
9471 }
9472 }
9473
9474 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9476 self.freshness = Some(value);
9477 self
9478 }
9479
9480 pub fn cursor(mut self, value: impl Into<String>) -> Self {
9482 self.cursor = Some(value.into());
9483 self
9484 }
9485
9486 pub fn max_retries(mut self, value: u32) -> Self {
9488 self.request_options.max_retries = Some(value);
9489 self
9490 }
9491
9492 pub fn timeout(mut self, value: Duration) -> Self {
9494 self.request_options.timeout = Some(value);
9495 self
9496 }
9497
9498 pub(crate) fn query(&self) -> Result<Query, Error> {
9499 let mut query = Query::default();
9500 query.require("q", &self.q)?;
9501 query.push("freshness", &self.freshness);
9502 query.push("cursor", &self.cursor);
9503 Ok(query)
9504 }
9505}
9506
9507pub type InstagramSearchProfilesPage = Page<InstagramProfile>;
9509
9510#[derive(Clone, Debug, PartialEq)]
9512#[non_exhaustive]
9513pub struct InstagramSearchReelsOptions {
9514 pub q: String,
9516 pub freshness: Option<crate::options::Freshness>,
9518 pub cursor: Option<String>,
9520 pub request_options: RequestOptions,
9522}
9523
9524impl InstagramSearchReelsOptions {
9525 pub fn new(q: impl Into<String>) -> Self {
9527 Self {
9528 q: q.into(),
9529 freshness: None,
9530 cursor: None,
9531 request_options: RequestOptions::default(),
9532 }
9533 }
9534
9535 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9537 self.freshness = Some(value);
9538 self
9539 }
9540
9541 pub fn cursor(mut self, value: impl Into<String>) -> Self {
9543 self.cursor = Some(value.into());
9544 self
9545 }
9546
9547 pub fn max_retries(mut self, value: u32) -> Self {
9549 self.request_options.max_retries = Some(value);
9550 self
9551 }
9552
9553 pub fn timeout(mut self, value: Duration) -> Self {
9555 self.request_options.timeout = Some(value);
9556 self
9557 }
9558
9559 pub(crate) fn query(&self) -> Result<Query, Error> {
9560 let mut query = Query::default();
9561 query.require("q", &self.q)?;
9562 query.push("freshness", &self.freshness);
9563 query.push("cursor", &self.cursor);
9564 Ok(query)
9565 }
9566}
9567
9568pub type InstagramSearchReelsPage = Page<InstagramPost>;
9570
9571#[derive(Clone, Debug, PartialEq)]
9573#[non_exhaustive]
9574pub struct InstagramSearchTopOptions {
9575 pub q: String,
9577 pub freshness: Option<crate::options::Freshness>,
9579 pub cursor: Option<String>,
9581 pub request_options: RequestOptions,
9583}
9584
9585impl InstagramSearchTopOptions {
9586 pub fn new(q: impl Into<String>) -> Self {
9588 Self {
9589 q: q.into(),
9590 freshness: None,
9591 cursor: None,
9592 request_options: RequestOptions::default(),
9593 }
9594 }
9595
9596 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9598 self.freshness = Some(value);
9599 self
9600 }
9601
9602 pub fn cursor(mut self, value: impl Into<String>) -> Self {
9604 self.cursor = Some(value.into());
9605 self
9606 }
9607
9608 pub fn max_retries(mut self, value: u32) -> Self {
9610 self.request_options.max_retries = Some(value);
9611 self
9612 }
9613
9614 pub fn timeout(mut self, value: Duration) -> Self {
9616 self.request_options.timeout = Some(value);
9617 self
9618 }
9619
9620 pub(crate) fn query(&self) -> Result<Query, Error> {
9621 let mut query = Query::default();
9622 query.require("q", &self.q)?;
9623 query.push("freshness", &self.freshness);
9624 query.push("cursor", &self.cursor);
9625 Ok(query)
9626 }
9627}
9628
9629pub type InstagramSearchTopPage = Page<InstagramSearchResult>;
9631
9632#[derive(Clone, Debug, Default, PartialEq)]
9634#[non_exhaustive]
9635pub struct InstagramStoryOptions {
9636 pub freshness: Option<crate::options::Freshness>,
9638 pub request_options: RequestOptions,
9640}
9641
9642impl InstagramStoryOptions {
9643 pub fn new() -> Self {
9645 Self::default()
9646 }
9647
9648 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9650 self.freshness = Some(value);
9651 self
9652 }
9653
9654 pub fn max_retries(mut self, value: u32) -> Self {
9656 self.request_options.max_retries = Some(value);
9657 self
9658 }
9659
9660 pub fn timeout(mut self, value: Duration) -> Self {
9662 self.request_options.timeout = Some(value);
9663 self
9664 }
9665
9666 pub(crate) fn query(&self) -> Result<Query, Error> {
9667 let mut query = Query::default();
9668 query.push("freshness", &self.freshness);
9669 Ok(query)
9670 }
9671}
9672
9673pub type InstagramStoryResponse = Response<InstagramStory>;
9675
9676#[derive(Clone, Debug, Default, PartialEq)]
9678#[non_exhaustive]
9679pub struct RedditDomainPostsOptions {
9680 pub sort: Option<String>,
9683 pub t: Option<String>,
9686 pub limit: Option<i64>,
9688 pub freshness: Option<crate::options::Freshness>,
9690 pub cursor: Option<String>,
9692 pub request_options: RequestOptions,
9694}
9695
9696impl RedditDomainPostsOptions {
9697 pub fn new() -> Self {
9699 Self::default()
9700 }
9701
9702 pub fn sort(mut self, value: impl Into<String>) -> Self {
9705 self.sort = Some(value.into());
9706 self
9707 }
9708
9709 pub fn t(mut self, value: impl Into<String>) -> Self {
9712 self.t = Some(value.into());
9713 self
9714 }
9715
9716 pub fn limit(mut self, value: i64) -> Self {
9718 self.limit = Some(value);
9719 self
9720 }
9721
9722 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9724 self.freshness = Some(value);
9725 self
9726 }
9727
9728 pub fn cursor(mut self, value: impl Into<String>) -> Self {
9730 self.cursor = Some(value.into());
9731 self
9732 }
9733
9734 pub fn max_retries(mut self, value: u32) -> Self {
9736 self.request_options.max_retries = Some(value);
9737 self
9738 }
9739
9740 pub fn timeout(mut self, value: Duration) -> Self {
9742 self.request_options.timeout = Some(value);
9743 self
9744 }
9745
9746 pub(crate) fn query(&self) -> Result<Query, Error> {
9747 let mut query = Query::default();
9748 query.push("sort", &self.sort);
9749 query.push("t", &self.t);
9750 query.push("limit", &self.limit);
9751 query.push("freshness", &self.freshness);
9752 query.push("cursor", &self.cursor);
9753 Ok(query)
9754 }
9755}
9756
9757pub type RedditDomainPostsPage = Page<RedditPost>;
9759
9760#[derive(Clone, Debug, Default, PartialEq)]
9762#[non_exhaustive]
9763pub struct RedditPostOptions {
9764 pub freshness: Option<crate::options::Freshness>,
9766 pub request_options: RequestOptions,
9768}
9769
9770impl RedditPostOptions {
9771 pub fn new() -> Self {
9773 Self::default()
9774 }
9775
9776 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9778 self.freshness = Some(value);
9779 self
9780 }
9781
9782 pub fn max_retries(mut self, value: u32) -> Self {
9784 self.request_options.max_retries = Some(value);
9785 self
9786 }
9787
9788 pub fn timeout(mut self, value: Duration) -> Self {
9790 self.request_options.timeout = Some(value);
9791 self
9792 }
9793
9794 pub(crate) fn query(&self) -> Result<Query, Error> {
9795 let mut query = Query::default();
9796 query.push("freshness", &self.freshness);
9797 Ok(query)
9798 }
9799}
9800
9801pub type RedditPostResponse = Response<RedditPost>;
9803
9804#[derive(Clone, Debug, Default, PartialEq)]
9806#[non_exhaustive]
9807pub struct RedditPostCommentsOptions {
9808 pub sort: Option<String>,
9811 pub limit: Option<i64>,
9813 pub depth: Option<i64>,
9815 pub freshness: Option<crate::options::Freshness>,
9817 pub request_options: RequestOptions,
9819}
9820
9821impl RedditPostCommentsOptions {
9822 pub fn new() -> Self {
9824 Self::default()
9825 }
9826
9827 pub fn sort(mut self, value: impl Into<String>) -> Self {
9830 self.sort = Some(value.into());
9831 self
9832 }
9833
9834 pub fn limit(mut self, value: i64) -> Self {
9836 self.limit = Some(value);
9837 self
9838 }
9839
9840 pub fn depth(mut self, value: i64) -> Self {
9842 self.depth = Some(value);
9843 self
9844 }
9845
9846 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9848 self.freshness = Some(value);
9849 self
9850 }
9851
9852 pub fn max_retries(mut self, value: u32) -> Self {
9854 self.request_options.max_retries = Some(value);
9855 self
9856 }
9857
9858 pub fn timeout(mut self, value: Duration) -> Self {
9860 self.request_options.timeout = Some(value);
9861 self
9862 }
9863
9864 pub(crate) fn query(&self) -> Result<Query, Error> {
9865 let mut query = Query::default();
9866 query.push("sort", &self.sort);
9867 query.push("limit", &self.limit);
9868 query.push("depth", &self.depth);
9869 query.push("freshness", &self.freshness);
9870 Ok(query)
9871 }
9872}
9873
9874pub type RedditPostCommentsResponse = Response<Vec<RedditComment>>;
9876
9877#[derive(Clone, Debug, Default, PartialEq)]
9879#[non_exhaustive]
9880pub struct RedditPostDuplicatesOptions {
9881 pub limit: Option<i64>,
9883 pub freshness: Option<crate::options::Freshness>,
9885 pub cursor: Option<String>,
9887 pub request_options: RequestOptions,
9889}
9890
9891impl RedditPostDuplicatesOptions {
9892 pub fn new() -> Self {
9894 Self::default()
9895 }
9896
9897 pub fn limit(mut self, value: i64) -> Self {
9899 self.limit = Some(value);
9900 self
9901 }
9902
9903 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9905 self.freshness = Some(value);
9906 self
9907 }
9908
9909 pub fn cursor(mut self, value: impl Into<String>) -> Self {
9911 self.cursor = Some(value.into());
9912 self
9913 }
9914
9915 pub fn max_retries(mut self, value: u32) -> Self {
9917 self.request_options.max_retries = Some(value);
9918 self
9919 }
9920
9921 pub fn timeout(mut self, value: Duration) -> Self {
9923 self.request_options.timeout = Some(value);
9924 self
9925 }
9926
9927 pub(crate) fn query(&self) -> Result<Query, Error> {
9928 let mut query = Query::default();
9929 query.push("limit", &self.limit);
9930 query.push("freshness", &self.freshness);
9931 query.push("cursor", &self.cursor);
9932 Ok(query)
9933 }
9934}
9935
9936pub type RedditPostDuplicatesPage = Page<RedditPost>;
9938
9939#[derive(Clone, Debug, Default, PartialEq)]
9941#[non_exhaustive]
9942pub struct RedditProfileOptions {
9943 pub freshness: Option<crate::options::Freshness>,
9945 pub request_options: RequestOptions,
9947}
9948
9949impl RedditProfileOptions {
9950 pub fn new() -> Self {
9952 Self::default()
9953 }
9954
9955 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
9957 self.freshness = Some(value);
9958 self
9959 }
9960
9961 pub fn max_retries(mut self, value: u32) -> Self {
9963 self.request_options.max_retries = Some(value);
9964 self
9965 }
9966
9967 pub fn timeout(mut self, value: Duration) -> Self {
9969 self.request_options.timeout = Some(value);
9970 self
9971 }
9972
9973 pub(crate) fn query(&self) -> Result<Query, Error> {
9974 let mut query = Query::default();
9975 query.push("freshness", &self.freshness);
9976 Ok(query)
9977 }
9978}
9979
9980pub type RedditProfileResponse = Response<RedditProfile>;
9982
9983#[derive(Clone, Debug, Default, PartialEq)]
9985#[non_exhaustive]
9986pub struct RedditProfileCommentsOptions {
9987 pub sort: Option<String>,
9990 pub t: Option<String>,
9993 pub limit: Option<i64>,
9995 pub freshness: Option<crate::options::Freshness>,
9997 pub cursor: Option<String>,
9999 pub request_options: RequestOptions,
10001}
10002
10003impl RedditProfileCommentsOptions {
10004 pub fn new() -> Self {
10006 Self::default()
10007 }
10008
10009 pub fn sort(mut self, value: impl Into<String>) -> Self {
10012 self.sort = Some(value.into());
10013 self
10014 }
10015
10016 pub fn t(mut self, value: impl Into<String>) -> Self {
10019 self.t = Some(value.into());
10020 self
10021 }
10022
10023 pub fn limit(mut self, value: i64) -> Self {
10025 self.limit = Some(value);
10026 self
10027 }
10028
10029 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
10031 self.freshness = Some(value);
10032 self
10033 }
10034
10035 pub fn cursor(mut self, value: impl Into<String>) -> Self {
10037 self.cursor = Some(value.into());
10038 self
10039 }
10040
10041 pub fn max_retries(mut self, value: u32) -> Self {
10043 self.request_options.max_retries = Some(value);
10044 self
10045 }
10046
10047 pub fn timeout(mut self, value: Duration) -> Self {
10049 self.request_options.timeout = Some(value);
10050 self
10051 }
10052
10053 pub(crate) fn query(&self) -> Result<Query, Error> {
10054 let mut query = Query::default();
10055 query.push("sort", &self.sort);
10056 query.push("t", &self.t);
10057 query.push("limit", &self.limit);
10058 query.push("freshness", &self.freshness);
10059 query.push("cursor", &self.cursor);
10060 Ok(query)
10061 }
10062}
10063
10064pub type RedditProfileCommentsPage = Page<RedditComment>;
10066
10067#[derive(Clone, Debug, Default, PartialEq)]
10069#[non_exhaustive]
10070pub struct RedditProfileModeratedOptions {
10071 pub freshness: Option<crate::options::Freshness>,
10073 pub request_options: RequestOptions,
10075}
10076
10077impl RedditProfileModeratedOptions {
10078 pub fn new() -> Self {
10080 Self::default()
10081 }
10082
10083 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
10085 self.freshness = Some(value);
10086 self
10087 }
10088
10089 pub fn max_retries(mut self, value: u32) -> Self {
10091 self.request_options.max_retries = Some(value);
10092 self
10093 }
10094
10095 pub fn timeout(mut self, value: Duration) -> Self {
10097 self.request_options.timeout = Some(value);
10098 self
10099 }
10100
10101 pub(crate) fn query(&self) -> Result<Query, Error> {
10102 let mut query = Query::default();
10103 query.push("freshness", &self.freshness);
10104 Ok(query)
10105 }
10106}
10107
10108pub type RedditProfileModeratedResponse = Response<Vec<RedditSubreddit>>;
10110
10111#[derive(Clone, Debug, Default, PartialEq)]
10113#[non_exhaustive]
10114pub struct RedditProfilePostsOptions {
10115 pub sort: Option<String>,
10118 pub t: Option<String>,
10121 pub limit: Option<i64>,
10123 pub freshness: Option<crate::options::Freshness>,
10125 pub cursor: Option<String>,
10127 pub request_options: RequestOptions,
10129}
10130
10131impl RedditProfilePostsOptions {
10132 pub fn new() -> Self {
10134 Self::default()
10135 }
10136
10137 pub fn sort(mut self, value: impl Into<String>) -> Self {
10140 self.sort = Some(value.into());
10141 self
10142 }
10143
10144 pub fn t(mut self, value: impl Into<String>) -> Self {
10147 self.t = Some(value.into());
10148 self
10149 }
10150
10151 pub fn limit(mut self, value: i64) -> Self {
10153 self.limit = Some(value);
10154 self
10155 }
10156
10157 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
10159 self.freshness = Some(value);
10160 self
10161 }
10162
10163 pub fn cursor(mut self, value: impl Into<String>) -> Self {
10165 self.cursor = Some(value.into());
10166 self
10167 }
10168
10169 pub fn max_retries(mut self, value: u32) -> Self {
10171 self.request_options.max_retries = Some(value);
10172 self
10173 }
10174
10175 pub fn timeout(mut self, value: Duration) -> Self {
10177 self.request_options.timeout = Some(value);
10178 self
10179 }
10180
10181 pub(crate) fn query(&self) -> Result<Query, Error> {
10182 let mut query = Query::default();
10183 query.push("sort", &self.sort);
10184 query.push("t", &self.t);
10185 query.push("limit", &self.limit);
10186 query.push("freshness", &self.freshness);
10187 query.push("cursor", &self.cursor);
10188 Ok(query)
10189 }
10190}
10191
10192pub type RedditProfilePostsPage = Page<RedditPost>;
10194
10195#[derive(Clone, Debug, Default, PartialEq)]
10197#[non_exhaustive]
10198pub struct RedditProfileTrophiesOptions {
10199 pub freshness: Option<crate::options::Freshness>,
10201 pub request_options: RequestOptions,
10203}
10204
10205impl RedditProfileTrophiesOptions {
10206 pub fn new() -> Self {
10208 Self::default()
10209 }
10210
10211 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
10213 self.freshness = Some(value);
10214 self
10215 }
10216
10217 pub fn max_retries(mut self, value: u32) -> Self {
10219 self.request_options.max_retries = Some(value);
10220 self
10221 }
10222
10223 pub fn timeout(mut self, value: Duration) -> Self {
10225 self.request_options.timeout = Some(value);
10226 self
10227 }
10228
10229 pub(crate) fn query(&self) -> Result<Query, Error> {
10230 let mut query = Query::default();
10231 query.push("freshness", &self.freshness);
10232 Ok(query)
10233 }
10234}
10235
10236pub type RedditProfileTrophiesResponse = Response<Vec<RedditTrophy>>;
10238
10239#[derive(Clone, Debug, PartialEq)]
10241#[non_exhaustive]
10242pub struct RedditSearchPostsOptions {
10243 pub q: String,
10245 pub sort: Option<String>,
10248 pub subreddit: Option<String>,
10250 pub t: Option<String>,
10253 pub limit: Option<i64>,
10255 pub freshness: Option<crate::options::Freshness>,
10257 pub cursor: Option<String>,
10259 pub request_options: RequestOptions,
10261}
10262
10263impl RedditSearchPostsOptions {
10264 pub fn new(q: impl Into<String>) -> Self {
10266 Self {
10267 q: q.into(),
10268 sort: None,
10269 subreddit: None,
10270 t: None,
10271 limit: None,
10272 freshness: None,
10273 cursor: None,
10274 request_options: RequestOptions::default(),
10275 }
10276 }
10277
10278 pub fn sort(mut self, value: impl Into<String>) -> Self {
10281 self.sort = Some(value.into());
10282 self
10283 }
10284
10285 pub fn subreddit(mut self, value: impl Into<String>) -> Self {
10287 self.subreddit = Some(value.into());
10288 self
10289 }
10290
10291 pub fn t(mut self, value: impl Into<String>) -> Self {
10294 self.t = Some(value.into());
10295 self
10296 }
10297
10298 pub fn limit(mut self, value: i64) -> Self {
10300 self.limit = Some(value);
10301 self
10302 }
10303
10304 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
10306 self.freshness = Some(value);
10307 self
10308 }
10309
10310 pub fn cursor(mut self, value: impl Into<String>) -> Self {
10312 self.cursor = Some(value.into());
10313 self
10314 }
10315
10316 pub fn max_retries(mut self, value: u32) -> Self {
10318 self.request_options.max_retries = Some(value);
10319 self
10320 }
10321
10322 pub fn timeout(mut self, value: Duration) -> Self {
10324 self.request_options.timeout = Some(value);
10325 self
10326 }
10327
10328 pub(crate) fn query(&self) -> Result<Query, Error> {
10329 let mut query = Query::default();
10330 query.require("q", &self.q)?;
10331 query.push("sort", &self.sort);
10332 query.push("subreddit", &self.subreddit);
10333 query.push("t", &self.t);
10334 query.push("limit", &self.limit);
10335 query.push("freshness", &self.freshness);
10336 query.push("cursor", &self.cursor);
10337 Ok(query)
10338 }
10339}
10340
10341pub type RedditSearchPostsPage = Page<RedditPost>;
10343
10344#[derive(Clone, Debug, PartialEq)]
10346#[non_exhaustive]
10347pub struct RedditSearchProfilesOptions {
10348 pub q: String,
10350 pub limit: Option<i64>,
10352 pub freshness: Option<crate::options::Freshness>,
10354 pub cursor: Option<String>,
10356 pub request_options: RequestOptions,
10358}
10359
10360impl RedditSearchProfilesOptions {
10361 pub fn new(q: impl Into<String>) -> Self {
10363 Self {
10364 q: q.into(),
10365 limit: None,
10366 freshness: None,
10367 cursor: None,
10368 request_options: RequestOptions::default(),
10369 }
10370 }
10371
10372 pub fn limit(mut self, value: i64) -> Self {
10374 self.limit = Some(value);
10375 self
10376 }
10377
10378 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
10380 self.freshness = Some(value);
10381 self
10382 }
10383
10384 pub fn cursor(mut self, value: impl Into<String>) -> Self {
10386 self.cursor = Some(value.into());
10387 self
10388 }
10389
10390 pub fn max_retries(mut self, value: u32) -> Self {
10392 self.request_options.max_retries = Some(value);
10393 self
10394 }
10395
10396 pub fn timeout(mut self, value: Duration) -> Self {
10398 self.request_options.timeout = Some(value);
10399 self
10400 }
10401
10402 pub(crate) fn query(&self) -> Result<Query, Error> {
10403 let mut query = Query::default();
10404 query.require("q", &self.q)?;
10405 query.push("limit", &self.limit);
10406 query.push("freshness", &self.freshness);
10407 query.push("cursor", &self.cursor);
10408 Ok(query)
10409 }
10410}
10411
10412pub type RedditSearchProfilesPage = Page<RedditProfile>;
10414
10415#[derive(Clone, Debug, PartialEq)]
10417#[non_exhaustive]
10418pub struct RedditSearchSubredditsOptions {
10419 pub q: String,
10421 pub limit: Option<i64>,
10423 pub freshness: Option<crate::options::Freshness>,
10425 pub cursor: Option<String>,
10427 pub request_options: RequestOptions,
10429}
10430
10431impl RedditSearchSubredditsOptions {
10432 pub fn new(q: impl Into<String>) -> Self {
10434 Self {
10435 q: q.into(),
10436 limit: None,
10437 freshness: None,
10438 cursor: None,
10439 request_options: RequestOptions::default(),
10440 }
10441 }
10442
10443 pub fn limit(mut self, value: i64) -> Self {
10445 self.limit = Some(value);
10446 self
10447 }
10448
10449 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
10451 self.freshness = Some(value);
10452 self
10453 }
10454
10455 pub fn cursor(mut self, value: impl Into<String>) -> Self {
10457 self.cursor = Some(value.into());
10458 self
10459 }
10460
10461 pub fn max_retries(mut self, value: u32) -> Self {
10463 self.request_options.max_retries = Some(value);
10464 self
10465 }
10466
10467 pub fn timeout(mut self, value: Duration) -> Self {
10469 self.request_options.timeout = Some(value);
10470 self
10471 }
10472
10473 pub(crate) fn query(&self) -> Result<Query, Error> {
10474 let mut query = Query::default();
10475 query.require("q", &self.q)?;
10476 query.push("limit", &self.limit);
10477 query.push("freshness", &self.freshness);
10478 query.push("cursor", &self.cursor);
10479 Ok(query)
10480 }
10481}
10482
10483pub type RedditSearchSubredditsPage = Page<RedditSubreddit>;
10485
10486#[derive(Clone, Debug, Default, PartialEq)]
10488#[non_exhaustive]
10489pub struct RedditSubredditOptions {
10490 pub freshness: Option<crate::options::Freshness>,
10492 pub request_options: RequestOptions,
10494}
10495
10496impl RedditSubredditOptions {
10497 pub fn new() -> Self {
10499 Self::default()
10500 }
10501
10502 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
10504 self.freshness = Some(value);
10505 self
10506 }
10507
10508 pub fn max_retries(mut self, value: u32) -> Self {
10510 self.request_options.max_retries = Some(value);
10511 self
10512 }
10513
10514 pub fn timeout(mut self, value: Duration) -> Self {
10516 self.request_options.timeout = Some(value);
10517 self
10518 }
10519
10520 pub(crate) fn query(&self) -> Result<Query, Error> {
10521 let mut query = Query::default();
10522 query.push("freshness", &self.freshness);
10523 Ok(query)
10524 }
10525}
10526
10527pub type RedditSubredditResponse = Response<RedditSubreddit>;
10529
10530#[derive(Clone, Debug, Default, PartialEq)]
10532#[non_exhaustive]
10533pub struct RedditSubredditPostsOptions {
10534 pub sort: Option<String>,
10537 pub t: Option<String>,
10540 pub limit: Option<i64>,
10542 pub freshness: Option<crate::options::Freshness>,
10544 pub cursor: Option<String>,
10546 pub request_options: RequestOptions,
10548}
10549
10550impl RedditSubredditPostsOptions {
10551 pub fn new() -> Self {
10553 Self::default()
10554 }
10555
10556 pub fn sort(mut self, value: impl Into<String>) -> Self {
10559 self.sort = Some(value.into());
10560 self
10561 }
10562
10563 pub fn t(mut self, value: impl Into<String>) -> Self {
10566 self.t = Some(value.into());
10567 self
10568 }
10569
10570 pub fn limit(mut self, value: i64) -> Self {
10572 self.limit = Some(value);
10573 self
10574 }
10575
10576 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
10578 self.freshness = Some(value);
10579 self
10580 }
10581
10582 pub fn cursor(mut self, value: impl Into<String>) -> Self {
10584 self.cursor = Some(value.into());
10585 self
10586 }
10587
10588 pub fn max_retries(mut self, value: u32) -> Self {
10590 self.request_options.max_retries = Some(value);
10591 self
10592 }
10593
10594 pub fn timeout(mut self, value: Duration) -> Self {
10596 self.request_options.timeout = Some(value);
10597 self
10598 }
10599
10600 pub(crate) fn query(&self) -> Result<Query, Error> {
10601 let mut query = Query::default();
10602 query.push("sort", &self.sort);
10603 query.push("t", &self.t);
10604 query.push("limit", &self.limit);
10605 query.push("freshness", &self.freshness);
10606 query.push("cursor", &self.cursor);
10607 Ok(query)
10608 }
10609}
10610
10611pub type RedditSubredditPostsPage = Page<RedditPost>;
10613
10614#[derive(Clone, Debug, Default, PartialEq)]
10616#[non_exhaustive]
10617pub struct RedditSubredditRulesOptions {
10618 pub freshness: Option<crate::options::Freshness>,
10620 pub request_options: RequestOptions,
10622}
10623
10624impl RedditSubredditRulesOptions {
10625 pub fn new() -> Self {
10627 Self::default()
10628 }
10629
10630 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
10632 self.freshness = Some(value);
10633 self
10634 }
10635
10636 pub fn max_retries(mut self, value: u32) -> Self {
10638 self.request_options.max_retries = Some(value);
10639 self
10640 }
10641
10642 pub fn timeout(mut self, value: Duration) -> Self {
10644 self.request_options.timeout = Some(value);
10645 self
10646 }
10647
10648 pub(crate) fn query(&self) -> Result<Query, Error> {
10649 let mut query = Query::default();
10650 query.push("freshness", &self.freshness);
10651 Ok(query)
10652 }
10653}
10654
10655pub type RedditSubredditRulesResponse = Response<Vec<RedditRule>>;
10657
10658#[derive(Clone, Debug, Default, PartialEq)]
10660#[non_exhaustive]
10661pub struct RedditSubredditWikiPageOptions {
10662 pub freshness: Option<crate::options::Freshness>,
10664 pub request_options: RequestOptions,
10666}
10667
10668impl RedditSubredditWikiPageOptions {
10669 pub fn new() -> Self {
10671 Self::default()
10672 }
10673
10674 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
10676 self.freshness = Some(value);
10677 self
10678 }
10679
10680 pub fn max_retries(mut self, value: u32) -> Self {
10682 self.request_options.max_retries = Some(value);
10683 self
10684 }
10685
10686 pub fn timeout(mut self, value: Duration) -> Self {
10688 self.request_options.timeout = Some(value);
10689 self
10690 }
10691
10692 pub(crate) fn query(&self) -> Result<Query, Error> {
10693 let mut query = Query::default();
10694 query.push("freshness", &self.freshness);
10695 Ok(query)
10696 }
10697}
10698
10699pub type RedditSubredditWikiPageResponse = Response<RedditWikiPage>;
10701
10702#[derive(Clone, Debug, Default, PartialEq)]
10704#[non_exhaustive]
10705pub struct RedditSubredditWikiPagesOptions {
10706 pub freshness: Option<crate::options::Freshness>,
10708 pub request_options: RequestOptions,
10710}
10711
10712impl RedditSubredditWikiPagesOptions {
10713 pub fn new() -> Self {
10715 Self::default()
10716 }
10717
10718 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
10720 self.freshness = Some(value);
10721 self
10722 }
10723
10724 pub fn max_retries(mut self, value: u32) -> Self {
10726 self.request_options.max_retries = Some(value);
10727 self
10728 }
10729
10730 pub fn timeout(mut self, value: Duration) -> Self {
10732 self.request_options.timeout = Some(value);
10733 self
10734 }
10735
10736 pub(crate) fn query(&self) -> Result<Query, Error> {
10737 let mut query = Query::default();
10738 query.push("freshness", &self.freshness);
10739 Ok(query)
10740 }
10741}
10742
10743pub type RedditSubredditWikiPagesResponse = Response<Vec<RedditWikiPage>>;
10745
10746#[derive(Clone, Debug, Default, PartialEq)]
10748#[non_exhaustive]
10749pub struct RedditSubredditsNewOptions {
10750 pub limit: Option<i64>,
10752 pub freshness: Option<crate::options::Freshness>,
10754 pub cursor: Option<String>,
10756 pub request_options: RequestOptions,
10758}
10759
10760impl RedditSubredditsNewOptions {
10761 pub fn new() -> Self {
10763 Self::default()
10764 }
10765
10766 pub fn limit(mut self, value: i64) -> Self {
10768 self.limit = Some(value);
10769 self
10770 }
10771
10772 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
10774 self.freshness = Some(value);
10775 self
10776 }
10777
10778 pub fn cursor(mut self, value: impl Into<String>) -> Self {
10780 self.cursor = Some(value.into());
10781 self
10782 }
10783
10784 pub fn max_retries(mut self, value: u32) -> Self {
10786 self.request_options.max_retries = Some(value);
10787 self
10788 }
10789
10790 pub fn timeout(mut self, value: Duration) -> Self {
10792 self.request_options.timeout = Some(value);
10793 self
10794 }
10795
10796 pub(crate) fn query(&self) -> Result<Query, Error> {
10797 let mut query = Query::default();
10798 query.push("limit", &self.limit);
10799 query.push("freshness", &self.freshness);
10800 query.push("cursor", &self.cursor);
10801 Ok(query)
10802 }
10803}
10804
10805pub type RedditSubredditsNewPage = Page<RedditSubreddit>;
10807
10808#[derive(Clone, Debug, Default, PartialEq)]
10810#[non_exhaustive]
10811pub struct RedditSubredditsPopularOptions {
10812 pub limit: Option<i64>,
10814 pub freshness: Option<crate::options::Freshness>,
10816 pub cursor: Option<String>,
10818 pub request_options: RequestOptions,
10820}
10821
10822impl RedditSubredditsPopularOptions {
10823 pub fn new() -> Self {
10825 Self::default()
10826 }
10827
10828 pub fn limit(mut self, value: i64) -> Self {
10830 self.limit = Some(value);
10831 self
10832 }
10833
10834 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
10836 self.freshness = Some(value);
10837 self
10838 }
10839
10840 pub fn cursor(mut self, value: impl Into<String>) -> Self {
10842 self.cursor = Some(value.into());
10843 self
10844 }
10845
10846 pub fn max_retries(mut self, value: u32) -> Self {
10848 self.request_options.max_retries = Some(value);
10849 self
10850 }
10851
10852 pub fn timeout(mut self, value: Duration) -> Self {
10854 self.request_options.timeout = Some(value);
10855 self
10856 }
10857
10858 pub(crate) fn query(&self) -> Result<Query, Error> {
10859 let mut query = Query::default();
10860 query.push("limit", &self.limit);
10861 query.push("freshness", &self.freshness);
10862 query.push("cursor", &self.cursor);
10863 Ok(query)
10864 }
10865}
10866
10867pub type RedditSubredditsPopularPage = Page<RedditSubreddit>;
10869
10870#[derive(Clone, Debug, Default, PartialEq)]
10872#[non_exhaustive]
10873pub struct RedditTrendingPostsOptions {
10874 pub sort: Option<String>,
10877 pub t: Option<String>,
10880 pub limit: Option<i64>,
10882 pub freshness: Option<crate::options::Freshness>,
10884 pub cursor: Option<String>,
10886 pub request_options: RequestOptions,
10888}
10889
10890impl RedditTrendingPostsOptions {
10891 pub fn new() -> Self {
10893 Self::default()
10894 }
10895
10896 pub fn sort(mut self, value: impl Into<String>) -> Self {
10899 self.sort = Some(value.into());
10900 self
10901 }
10902
10903 pub fn t(mut self, value: impl Into<String>) -> Self {
10906 self.t = Some(value.into());
10907 self
10908 }
10909
10910 pub fn limit(mut self, value: i64) -> Self {
10912 self.limit = Some(value);
10913 self
10914 }
10915
10916 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
10918 self.freshness = Some(value);
10919 self
10920 }
10921
10922 pub fn cursor(mut self, value: impl Into<String>) -> Self {
10924 self.cursor = Some(value.into());
10925 self
10926 }
10927
10928 pub fn max_retries(mut self, value: u32) -> Self {
10930 self.request_options.max_retries = Some(value);
10931 self
10932 }
10933
10934 pub fn timeout(mut self, value: Duration) -> Self {
10936 self.request_options.timeout = Some(value);
10937 self
10938 }
10939
10940 pub(crate) fn query(&self) -> Result<Query, Error> {
10941 let mut query = Query::default();
10942 query.push("sort", &self.sort);
10943 query.push("t", &self.t);
10944 query.push("limit", &self.limit);
10945 query.push("freshness", &self.freshness);
10946 query.push("cursor", &self.cursor);
10947 Ok(query)
10948 }
10949}
10950
10951pub type RedditTrendingPostsPage = Page<RedditPost>;
10953
10954#[derive(Clone, Debug, Default, PartialEq)]
10956#[non_exhaustive]
10957pub struct TestDataOptions {
10958 pub platform: Option<crate::options::Platform>,
10960 pub resource: Option<String>,
10965 pub operation: Option<String>,
10967 pub traits: Option<String>,
10969 pub status: Option<i64>,
10971 pub error_code: Option<String>,
10973 pub search: Option<String>,
10975 pub limit: Option<i64>,
10977 pub request_options: RequestOptions,
10979}
10980
10981impl TestDataOptions {
10982 pub fn new() -> Self {
10984 Self::default()
10985 }
10986
10987 pub fn platform(mut self, value: crate::options::Platform) -> Self {
10989 self.platform = Some(value);
10990 self
10991 }
10992
10993 pub fn resource(mut self, value: impl Into<String>) -> Self {
10998 self.resource = Some(value.into());
10999 self
11000 }
11001
11002 pub fn operation(mut self, value: impl Into<String>) -> Self {
11004 self.operation = Some(value.into());
11005 self
11006 }
11007
11008 pub fn traits(mut self, value: impl Into<String>) -> Self {
11010 self.traits = Some(value.into());
11011 self
11012 }
11013
11014 pub fn status(mut self, value: i64) -> Self {
11016 self.status = Some(value);
11017 self
11018 }
11019
11020 pub fn error_code(mut self, value: impl Into<String>) -> Self {
11022 self.error_code = Some(value.into());
11023 self
11024 }
11025
11026 pub fn search(mut self, value: impl Into<String>) -> Self {
11028 self.search = Some(value.into());
11029 self
11030 }
11031
11032 pub fn limit(mut self, value: i64) -> Self {
11034 self.limit = Some(value);
11035 self
11036 }
11037
11038 pub fn max_retries(mut self, value: u32) -> Self {
11040 self.request_options.max_retries = Some(value);
11041 self
11042 }
11043
11044 pub fn timeout(mut self, value: Duration) -> Self {
11046 self.request_options.timeout = Some(value);
11047 self
11048 }
11049
11050 pub(crate) fn query(&self) -> Result<Query, Error> {
11051 let mut query = Query::default();
11052 query.push("platform", &self.platform);
11053 query.push("resource", &self.resource);
11054 query.push("operation", &self.operation);
11055 query.push("traits", &self.traits);
11056 query.push("status", &self.status);
11057 query.push("errorCode", &self.error_code);
11058 query.push("search", &self.search);
11059 query.push("limit", &self.limit);
11060 Ok(query)
11061 }
11062}
11063
11064pub type TestDataResponse = Response<TestDataCatalog>;
11066
11067#[derive(Clone, Debug, Default, PartialEq)]
11069#[non_exhaustive]
11070pub struct TestDataEntryOptions {
11071 pub request_options: RequestOptions,
11073}
11074
11075impl TestDataEntryOptions {
11076 pub fn new() -> Self {
11078 Self::default()
11079 }
11080
11081 pub fn max_retries(mut self, value: u32) -> Self {
11083 self.request_options.max_retries = Some(value);
11084 self
11085 }
11086
11087 pub fn timeout(mut self, value: Duration) -> Self {
11089 self.request_options.timeout = Some(value);
11090 self
11091 }
11092
11093 pub(crate) fn query(&self) -> Result<Query, Error> {
11094 Ok(Query::default())
11095 }
11096}
11097
11098pub type TestDataEntryResponse = Response<TestDataEntry>;
11100
11101#[derive(Clone, Debug, Default, PartialEq)]
11103#[non_exhaustive]
11104pub struct TikTokEffectOptions {
11105 pub freshness: Option<crate::options::Freshness>,
11107 pub request_options: RequestOptions,
11109}
11110
11111impl TikTokEffectOptions {
11112 pub fn new() -> Self {
11114 Self::default()
11115 }
11116
11117 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11119 self.freshness = Some(value);
11120 self
11121 }
11122
11123 pub fn max_retries(mut self, value: u32) -> Self {
11125 self.request_options.max_retries = Some(value);
11126 self
11127 }
11128
11129 pub fn timeout(mut self, value: Duration) -> Self {
11131 self.request_options.timeout = Some(value);
11132 self
11133 }
11134
11135 pub(crate) fn query(&self) -> Result<Query, Error> {
11136 let mut query = Query::default();
11137 query.push("freshness", &self.freshness);
11138 Ok(query)
11139 }
11140}
11141
11142pub type TikTokEffectResponse = Response<TikTokEffect>;
11144
11145#[derive(Clone, Debug, Default, PartialEq)]
11147#[non_exhaustive]
11148pub struct TikTokEffectPostsOptions {
11149 pub freshness: Option<crate::options::Freshness>,
11151 pub cursor: Option<String>,
11153 pub request_options: RequestOptions,
11155}
11156
11157impl TikTokEffectPostsOptions {
11158 pub fn new() -> Self {
11160 Self::default()
11161 }
11162
11163 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11165 self.freshness = Some(value);
11166 self
11167 }
11168
11169 pub fn cursor(mut self, value: impl Into<String>) -> Self {
11171 self.cursor = Some(value.into());
11172 self
11173 }
11174
11175 pub fn max_retries(mut self, value: u32) -> Self {
11177 self.request_options.max_retries = Some(value);
11178 self
11179 }
11180
11181 pub fn timeout(mut self, value: Duration) -> Self {
11183 self.request_options.timeout = Some(value);
11184 self
11185 }
11186
11187 pub(crate) fn query(&self) -> Result<Query, Error> {
11188 let mut query = Query::default();
11189 query.push("freshness", &self.freshness);
11190 query.push("cursor", &self.cursor);
11191 Ok(query)
11192 }
11193}
11194
11195pub type TikTokEffectPostsPage = Page<TikTokPost>;
11197
11198#[derive(Clone, Debug, PartialEq)]
11200#[non_exhaustive]
11201pub struct TikTokEffectsOptions {
11202 pub ids: String,
11204 pub freshness: Option<crate::options::Freshness>,
11206 pub cursor: Option<String>,
11208 pub request_options: RequestOptions,
11210}
11211
11212impl TikTokEffectsOptions {
11213 pub fn new(ids: impl Into<String>) -> Self {
11215 Self {
11216 ids: ids.into(),
11217 freshness: None,
11218 cursor: None,
11219 request_options: RequestOptions::default(),
11220 }
11221 }
11222
11223 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11225 self.freshness = Some(value);
11226 self
11227 }
11228
11229 pub fn cursor(mut self, value: impl Into<String>) -> Self {
11231 self.cursor = Some(value.into());
11232 self
11233 }
11234
11235 pub fn max_retries(mut self, value: u32) -> Self {
11237 self.request_options.max_retries = Some(value);
11238 self
11239 }
11240
11241 pub fn timeout(mut self, value: Duration) -> Self {
11243 self.request_options.timeout = Some(value);
11244 self
11245 }
11246
11247 pub(crate) fn query(&self) -> Result<Query, Error> {
11248 let mut query = Query::default();
11249 query.require("ids", &self.ids)?;
11250 query.push("freshness", &self.freshness);
11251 query.push("cursor", &self.cursor);
11252 Ok(query)
11253 }
11254}
11255
11256pub type TikTokEffectsPage = Page<TikTokEffect>;
11258
11259#[derive(Clone, Debug, Default, PartialEq)]
11261#[non_exhaustive]
11262pub struct TikTokHashtagOptions {
11263 pub freshness: Option<crate::options::Freshness>,
11265 pub request_options: RequestOptions,
11267}
11268
11269impl TikTokHashtagOptions {
11270 pub fn new() -> Self {
11272 Self::default()
11273 }
11274
11275 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11277 self.freshness = Some(value);
11278 self
11279 }
11280
11281 pub fn max_retries(mut self, value: u32) -> Self {
11283 self.request_options.max_retries = Some(value);
11284 self
11285 }
11286
11287 pub fn timeout(mut self, value: Duration) -> Self {
11289 self.request_options.timeout = Some(value);
11290 self
11291 }
11292
11293 pub(crate) fn query(&self) -> Result<Query, Error> {
11294 let mut query = Query::default();
11295 query.push("freshness", &self.freshness);
11296 Ok(query)
11297 }
11298}
11299
11300pub type TikTokHashtagResponse = Response<TikTokHashtag>;
11302
11303#[derive(Clone, Debug, Default, PartialEq)]
11305#[non_exhaustive]
11306pub struct TikTokHashtagPostsOptions {
11307 pub freshness: Option<crate::options::Freshness>,
11309 pub cursor: Option<String>,
11311 pub request_options: RequestOptions,
11313}
11314
11315impl TikTokHashtagPostsOptions {
11316 pub fn new() -> Self {
11318 Self::default()
11319 }
11320
11321 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11323 self.freshness = Some(value);
11324 self
11325 }
11326
11327 pub fn cursor(mut self, value: impl Into<String>) -> Self {
11329 self.cursor = Some(value.into());
11330 self
11331 }
11332
11333 pub fn max_retries(mut self, value: u32) -> Self {
11335 self.request_options.max_retries = Some(value);
11336 self
11337 }
11338
11339 pub fn timeout(mut self, value: Duration) -> Self {
11341 self.request_options.timeout = Some(value);
11342 self
11343 }
11344
11345 pub(crate) fn query(&self) -> Result<Query, Error> {
11346 let mut query = Query::default();
11347 query.push("freshness", &self.freshness);
11348 query.push("cursor", &self.cursor);
11349 Ok(query)
11350 }
11351}
11352
11353pub type TikTokHashtagPostsPage = Page<TikTokPost>;
11355
11356#[derive(Clone, Debug, Default, PartialEq)]
11358#[non_exhaustive]
11359pub struct TikTokLocationOptions {
11360 pub freshness: Option<crate::options::Freshness>,
11362 pub request_options: RequestOptions,
11364}
11365
11366impl TikTokLocationOptions {
11367 pub fn new() -> Self {
11369 Self::default()
11370 }
11371
11372 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11374 self.freshness = Some(value);
11375 self
11376 }
11377
11378 pub fn max_retries(mut self, value: u32) -> Self {
11380 self.request_options.max_retries = Some(value);
11381 self
11382 }
11383
11384 pub fn timeout(mut self, value: Duration) -> Self {
11386 self.request_options.timeout = Some(value);
11387 self
11388 }
11389
11390 pub(crate) fn query(&self) -> Result<Query, Error> {
11391 let mut query = Query::default();
11392 query.push("freshness", &self.freshness);
11393 Ok(query)
11394 }
11395}
11396
11397pub type TikTokLocationResponse = Response<TikTokLocation>;
11399
11400#[derive(Clone, Debug, Default, PartialEq)]
11402#[non_exhaustive]
11403pub struct TikTokLocationPostsOptions {
11404 pub freshness: Option<crate::options::Freshness>,
11406 pub cursor: Option<String>,
11408 pub request_options: RequestOptions,
11410}
11411
11412impl TikTokLocationPostsOptions {
11413 pub fn new() -> Self {
11415 Self::default()
11416 }
11417
11418 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11420 self.freshness = Some(value);
11421 self
11422 }
11423
11424 pub fn cursor(mut self, value: impl Into<String>) -> Self {
11426 self.cursor = Some(value.into());
11427 self
11428 }
11429
11430 pub fn max_retries(mut self, value: u32) -> Self {
11432 self.request_options.max_retries = Some(value);
11433 self
11434 }
11435
11436 pub fn timeout(mut self, value: Duration) -> Self {
11438 self.request_options.timeout = Some(value);
11439 self
11440 }
11441
11442 pub(crate) fn query(&self) -> Result<Query, Error> {
11443 let mut query = Query::default();
11444 query.push("freshness", &self.freshness);
11445 query.push("cursor", &self.cursor);
11446 Ok(query)
11447 }
11448}
11449
11450pub type TikTokLocationPostsPage = Page<TikTokPost>;
11452
11453#[derive(Clone, Debug, Default, PartialEq)]
11455#[non_exhaustive]
11456pub struct TikTokMusicOptions {
11457 pub freshness: Option<crate::options::Freshness>,
11459 pub request_options: RequestOptions,
11461}
11462
11463impl TikTokMusicOptions {
11464 pub fn new() -> Self {
11466 Self::default()
11467 }
11468
11469 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11471 self.freshness = Some(value);
11472 self
11473 }
11474
11475 pub fn max_retries(mut self, value: u32) -> Self {
11477 self.request_options.max_retries = Some(value);
11478 self
11479 }
11480
11481 pub fn timeout(mut self, value: Duration) -> Self {
11483 self.request_options.timeout = Some(value);
11484 self
11485 }
11486
11487 pub(crate) fn query(&self) -> Result<Query, Error> {
11488 let mut query = Query::default();
11489 query.push("freshness", &self.freshness);
11490 Ok(query)
11491 }
11492}
11493
11494pub type TikTokMusicResponse = Response<TikTokMusic>;
11496
11497#[derive(Clone, Debug, Default, PartialEq)]
11499#[non_exhaustive]
11500pub struct TikTokMusicPostsOptions {
11501 pub freshness: Option<crate::options::Freshness>,
11503 pub cursor: Option<String>,
11505 pub request_options: RequestOptions,
11507}
11508
11509impl TikTokMusicPostsOptions {
11510 pub fn new() -> Self {
11512 Self::default()
11513 }
11514
11515 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11517 self.freshness = Some(value);
11518 self
11519 }
11520
11521 pub fn cursor(mut self, value: impl Into<String>) -> Self {
11523 self.cursor = Some(value.into());
11524 self
11525 }
11526
11527 pub fn max_retries(mut self, value: u32) -> Self {
11529 self.request_options.max_retries = Some(value);
11530 self
11531 }
11532
11533 pub fn timeout(mut self, value: Duration) -> Self {
11535 self.request_options.timeout = Some(value);
11536 self
11537 }
11538
11539 pub(crate) fn query(&self) -> Result<Query, Error> {
11540 let mut query = Query::default();
11541 query.push("freshness", &self.freshness);
11542 query.push("cursor", &self.cursor);
11543 Ok(query)
11544 }
11545}
11546
11547pub type TikTokMusicPostsPage = Page<TikTokPost>;
11549
11550#[derive(Clone, Debug, Default, PartialEq)]
11552#[non_exhaustive]
11553pub struct TikTokPostOptions {
11554 pub freshness: Option<crate::options::Freshness>,
11556 pub request_options: RequestOptions,
11558}
11559
11560impl TikTokPostOptions {
11561 pub fn new() -> Self {
11563 Self::default()
11564 }
11565
11566 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11568 self.freshness = Some(value);
11569 self
11570 }
11571
11572 pub fn max_retries(mut self, value: u32) -> Self {
11574 self.request_options.max_retries = Some(value);
11575 self
11576 }
11577
11578 pub fn timeout(mut self, value: Duration) -> Self {
11580 self.request_options.timeout = Some(value);
11581 self
11582 }
11583
11584 pub(crate) fn query(&self) -> Result<Query, Error> {
11585 let mut query = Query::default();
11586 query.push("freshness", &self.freshness);
11587 Ok(query)
11588 }
11589}
11590
11591pub type TikTokPostResponse = Response<TikTokPost>;
11593
11594#[derive(Clone, Debug, Default, PartialEq)]
11596#[non_exhaustive]
11597pub struct TikTokPostCommentRepliesOptions {
11598 pub freshness: Option<crate::options::Freshness>,
11600 pub cursor: Option<String>,
11602 pub request_options: RequestOptions,
11604}
11605
11606impl TikTokPostCommentRepliesOptions {
11607 pub fn new() -> Self {
11609 Self::default()
11610 }
11611
11612 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11614 self.freshness = Some(value);
11615 self
11616 }
11617
11618 pub fn cursor(mut self, value: impl Into<String>) -> Self {
11620 self.cursor = Some(value.into());
11621 self
11622 }
11623
11624 pub fn max_retries(mut self, value: u32) -> Self {
11626 self.request_options.max_retries = Some(value);
11627 self
11628 }
11629
11630 pub fn timeout(mut self, value: Duration) -> Self {
11632 self.request_options.timeout = Some(value);
11633 self
11634 }
11635
11636 pub(crate) fn query(&self) -> Result<Query, Error> {
11637 let mut query = Query::default();
11638 query.push("freshness", &self.freshness);
11639 query.push("cursor", &self.cursor);
11640 Ok(query)
11641 }
11642}
11643
11644pub type TikTokPostCommentRepliesPage = Page<TikTokComment>;
11646
11647#[derive(Clone, Debug, Default, PartialEq)]
11649#[non_exhaustive]
11650pub struct TikTokPostCommentsOptions {
11651 pub freshness: Option<crate::options::Freshness>,
11653 pub cursor: Option<String>,
11655 pub request_options: RequestOptions,
11657}
11658
11659impl TikTokPostCommentsOptions {
11660 pub fn new() -> Self {
11662 Self::default()
11663 }
11664
11665 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11667 self.freshness = Some(value);
11668 self
11669 }
11670
11671 pub fn cursor(mut self, value: impl Into<String>) -> Self {
11673 self.cursor = Some(value.into());
11674 self
11675 }
11676
11677 pub fn max_retries(mut self, value: u32) -> Self {
11679 self.request_options.max_retries = Some(value);
11680 self
11681 }
11682
11683 pub fn timeout(mut self, value: Duration) -> Self {
11685 self.request_options.timeout = Some(value);
11686 self
11687 }
11688
11689 pub(crate) fn query(&self) -> Result<Query, Error> {
11690 let mut query = Query::default();
11691 query.push("freshness", &self.freshness);
11692 query.push("cursor", &self.cursor);
11693 Ok(query)
11694 }
11695}
11696
11697pub type TikTokPostCommentsPage = Page<TikTokComment>;
11699
11700#[derive(Clone, Debug, Default, PartialEq)]
11702#[non_exhaustive]
11703pub struct TikTokProfileOptions {
11704 pub freshness: Option<crate::options::Freshness>,
11706 pub request_options: RequestOptions,
11708}
11709
11710impl TikTokProfileOptions {
11711 pub fn new() -> Self {
11713 Self::default()
11714 }
11715
11716 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11718 self.freshness = Some(value);
11719 self
11720 }
11721
11722 pub fn max_retries(mut self, value: u32) -> Self {
11724 self.request_options.max_retries = Some(value);
11725 self
11726 }
11727
11728 pub fn timeout(mut self, value: Duration) -> Self {
11730 self.request_options.timeout = Some(value);
11731 self
11732 }
11733
11734 pub(crate) fn query(&self) -> Result<Query, Error> {
11735 let mut query = Query::default();
11736 query.push("freshness", &self.freshness);
11737 Ok(query)
11738 }
11739}
11740
11741pub type TikTokProfileResponse = Response<TikTokProfile>;
11743
11744#[derive(Clone, Debug, Default, PartialEq)]
11746#[non_exhaustive]
11747pub struct TikTokProfileFollowersOptions {
11748 pub freshness: Option<crate::options::Freshness>,
11750 pub cursor: Option<String>,
11752 pub request_options: RequestOptions,
11754}
11755
11756impl TikTokProfileFollowersOptions {
11757 pub fn new() -> Self {
11759 Self::default()
11760 }
11761
11762 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11764 self.freshness = Some(value);
11765 self
11766 }
11767
11768 pub fn cursor(mut self, value: impl Into<String>) -> Self {
11770 self.cursor = Some(value.into());
11771 self
11772 }
11773
11774 pub fn max_retries(mut self, value: u32) -> Self {
11776 self.request_options.max_retries = Some(value);
11777 self
11778 }
11779
11780 pub fn timeout(mut self, value: Duration) -> Self {
11782 self.request_options.timeout = Some(value);
11783 self
11784 }
11785
11786 pub(crate) fn query(&self) -> Result<Query, Error> {
11787 let mut query = Query::default();
11788 query.push("freshness", &self.freshness);
11789 query.push("cursor", &self.cursor);
11790 Ok(query)
11791 }
11792}
11793
11794pub type TikTokProfileFollowersPage = Page<TikTokProfile>;
11796
11797#[derive(Clone, Debug, Default, PartialEq)]
11799#[non_exhaustive]
11800pub struct TikTokProfileFollowingOptions {
11801 pub freshness: Option<crate::options::Freshness>,
11803 pub cursor: Option<String>,
11805 pub request_options: RequestOptions,
11807}
11808
11809impl TikTokProfileFollowingOptions {
11810 pub fn new() -> Self {
11812 Self::default()
11813 }
11814
11815 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11817 self.freshness = Some(value);
11818 self
11819 }
11820
11821 pub fn cursor(mut self, value: impl Into<String>) -> Self {
11823 self.cursor = Some(value.into());
11824 self
11825 }
11826
11827 pub fn max_retries(mut self, value: u32) -> Self {
11829 self.request_options.max_retries = Some(value);
11830 self
11831 }
11832
11833 pub fn timeout(mut self, value: Duration) -> Self {
11835 self.request_options.timeout = Some(value);
11836 self
11837 }
11838
11839 pub(crate) fn query(&self) -> Result<Query, Error> {
11840 let mut query = Query::default();
11841 query.push("freshness", &self.freshness);
11842 query.push("cursor", &self.cursor);
11843 Ok(query)
11844 }
11845}
11846
11847pub type TikTokProfileFollowingPage = Page<TikTokProfile>;
11849
11850#[derive(Clone, Debug, Default, PartialEq)]
11852#[non_exhaustive]
11853pub struct TikTokProfileLikedPostsOptions {
11854 pub freshness: Option<crate::options::Freshness>,
11856 pub cursor: Option<String>,
11858 pub request_options: RequestOptions,
11860}
11861
11862impl TikTokProfileLikedPostsOptions {
11863 pub fn new() -> Self {
11865 Self::default()
11866 }
11867
11868 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11870 self.freshness = Some(value);
11871 self
11872 }
11873
11874 pub fn cursor(mut self, value: impl Into<String>) -> Self {
11876 self.cursor = Some(value.into());
11877 self
11878 }
11879
11880 pub fn max_retries(mut self, value: u32) -> Self {
11882 self.request_options.max_retries = Some(value);
11883 self
11884 }
11885
11886 pub fn timeout(mut self, value: Duration) -> Self {
11888 self.request_options.timeout = Some(value);
11889 self
11890 }
11891
11892 pub(crate) fn query(&self) -> Result<Query, Error> {
11893 let mut query = Query::default();
11894 query.push("freshness", &self.freshness);
11895 query.push("cursor", &self.cursor);
11896 Ok(query)
11897 }
11898}
11899
11900pub type TikTokProfileLikedPostsPage = Page<TikTokPost>;
11902
11903#[derive(Clone, Debug, Default, PartialEq)]
11905#[non_exhaustive]
11906pub struct TikTokProfilePlaylistOptions {
11907 pub freshness: Option<crate::options::Freshness>,
11909 pub request_options: RequestOptions,
11911}
11912
11913impl TikTokProfilePlaylistOptions {
11914 pub fn new() -> Self {
11916 Self::default()
11917 }
11918
11919 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11921 self.freshness = Some(value);
11922 self
11923 }
11924
11925 pub fn max_retries(mut self, value: u32) -> Self {
11927 self.request_options.max_retries = Some(value);
11928 self
11929 }
11930
11931 pub fn timeout(mut self, value: Duration) -> Self {
11933 self.request_options.timeout = Some(value);
11934 self
11935 }
11936
11937 pub(crate) fn query(&self) -> Result<Query, Error> {
11938 let mut query = Query::default();
11939 query.push("freshness", &self.freshness);
11940 Ok(query)
11941 }
11942}
11943
11944pub type TikTokProfilePlaylistResponse = Response<TikTokPlaylist>;
11946
11947#[derive(Clone, Debug, Default, PartialEq)]
11949#[non_exhaustive]
11950pub struct TikTokProfilePlaylistPostsOptions {
11951 pub freshness: Option<crate::options::Freshness>,
11953 pub cursor: Option<String>,
11955 pub request_options: RequestOptions,
11957}
11958
11959impl TikTokProfilePlaylistPostsOptions {
11960 pub fn new() -> Self {
11962 Self::default()
11963 }
11964
11965 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
11967 self.freshness = Some(value);
11968 self
11969 }
11970
11971 pub fn cursor(mut self, value: impl Into<String>) -> Self {
11973 self.cursor = Some(value.into());
11974 self
11975 }
11976
11977 pub fn max_retries(mut self, value: u32) -> Self {
11979 self.request_options.max_retries = Some(value);
11980 self
11981 }
11982
11983 pub fn timeout(mut self, value: Duration) -> Self {
11985 self.request_options.timeout = Some(value);
11986 self
11987 }
11988
11989 pub(crate) fn query(&self) -> Result<Query, Error> {
11990 let mut query = Query::default();
11991 query.push("freshness", &self.freshness);
11992 query.push("cursor", &self.cursor);
11993 Ok(query)
11994 }
11995}
11996
11997pub type TikTokProfilePlaylistPostsPage = Page<TikTokPost>;
11999
12000#[derive(Clone, Debug, Default, PartialEq)]
12002#[non_exhaustive]
12003pub struct TikTokProfilePlaylistsOptions {
12004 pub freshness: Option<crate::options::Freshness>,
12006 pub cursor: Option<String>,
12008 pub request_options: RequestOptions,
12010}
12011
12012impl TikTokProfilePlaylistsOptions {
12013 pub fn new() -> Self {
12015 Self::default()
12016 }
12017
12018 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12020 self.freshness = Some(value);
12021 self
12022 }
12023
12024 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12026 self.cursor = Some(value.into());
12027 self
12028 }
12029
12030 pub fn max_retries(mut self, value: u32) -> Self {
12032 self.request_options.max_retries = Some(value);
12033 self
12034 }
12035
12036 pub fn timeout(mut self, value: Duration) -> Self {
12038 self.request_options.timeout = Some(value);
12039 self
12040 }
12041
12042 pub(crate) fn query(&self) -> Result<Query, Error> {
12043 let mut query = Query::default();
12044 query.push("freshness", &self.freshness);
12045 query.push("cursor", &self.cursor);
12046 Ok(query)
12047 }
12048}
12049
12050pub type TikTokProfilePlaylistsPage = Page<TikTokPlaylist>;
12052
12053#[derive(Clone, Debug, Default, PartialEq)]
12055#[non_exhaustive]
12056pub struct TikTokProfilePostsOptions {
12057 pub freshness: Option<crate::options::Freshness>,
12059 pub cursor: Option<String>,
12061 pub since: Option<chrono::DateTime<chrono::Utc>>,
12063 pub request_options: RequestOptions,
12065}
12066
12067impl TikTokProfilePostsOptions {
12068 pub fn new() -> Self {
12070 Self::default()
12071 }
12072
12073 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12075 self.freshness = Some(value);
12076 self
12077 }
12078
12079 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12081 self.cursor = Some(value.into());
12082 self
12083 }
12084
12085 pub fn since(mut self, value: chrono::DateTime<chrono::Utc>) -> Self {
12087 self.since = Some(value);
12088 self
12089 }
12090
12091 pub fn max_retries(mut self, value: u32) -> Self {
12093 self.request_options.max_retries = Some(value);
12094 self
12095 }
12096
12097 pub fn timeout(mut self, value: Duration) -> Self {
12099 self.request_options.timeout = Some(value);
12100 self
12101 }
12102
12103 pub(crate) fn query(&self) -> Result<Query, Error> {
12104 let mut query = Query::default();
12105 query.push("freshness", &self.freshness);
12106 query.push("cursor", &self.cursor);
12107 query.push("since", &self.since);
12108 Ok(query)
12109 }
12110}
12111
12112pub type TikTokProfilePostsPage = Page<TikTokPost>;
12114
12115#[derive(Clone, Debug, PartialEq)]
12117#[non_exhaustive]
12118pub struct TikTokSearchHashtagsOptions {
12119 pub q: String,
12121 pub freshness: Option<crate::options::Freshness>,
12123 pub cursor: Option<String>,
12125 pub request_options: RequestOptions,
12127}
12128
12129impl TikTokSearchHashtagsOptions {
12130 pub fn new(q: impl Into<String>) -> Self {
12132 Self {
12133 q: q.into(),
12134 freshness: None,
12135 cursor: None,
12136 request_options: RequestOptions::default(),
12137 }
12138 }
12139
12140 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12142 self.freshness = Some(value);
12143 self
12144 }
12145
12146 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12148 self.cursor = Some(value.into());
12149 self
12150 }
12151
12152 pub fn max_retries(mut self, value: u32) -> Self {
12154 self.request_options.max_retries = Some(value);
12155 self
12156 }
12157
12158 pub fn timeout(mut self, value: Duration) -> Self {
12160 self.request_options.timeout = Some(value);
12161 self
12162 }
12163
12164 pub(crate) fn query(&self) -> Result<Query, Error> {
12165 let mut query = Query::default();
12166 query.require("q", &self.q)?;
12167 query.push("freshness", &self.freshness);
12168 query.push("cursor", &self.cursor);
12169 Ok(query)
12170 }
12171}
12172
12173pub type TikTokSearchHashtagsPage = Page<TikTokHashtag>;
12175
12176#[derive(Clone, Debug, PartialEq)]
12178#[non_exhaustive]
12179pub struct TikTokSearchLocationsOptions {
12180 pub q: String,
12182 pub freshness: Option<crate::options::Freshness>,
12184 pub cursor: Option<String>,
12186 pub request_options: RequestOptions,
12188}
12189
12190impl TikTokSearchLocationsOptions {
12191 pub fn new(q: impl Into<String>) -> Self {
12193 Self {
12194 q: q.into(),
12195 freshness: None,
12196 cursor: None,
12197 request_options: RequestOptions::default(),
12198 }
12199 }
12200
12201 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12203 self.freshness = Some(value);
12204 self
12205 }
12206
12207 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12209 self.cursor = Some(value.into());
12210 self
12211 }
12212
12213 pub fn max_retries(mut self, value: u32) -> Self {
12215 self.request_options.max_retries = Some(value);
12216 self
12217 }
12218
12219 pub fn timeout(mut self, value: Duration) -> Self {
12221 self.request_options.timeout = Some(value);
12222 self
12223 }
12224
12225 pub(crate) fn query(&self) -> Result<Query, Error> {
12226 let mut query = Query::default();
12227 query.require("q", &self.q)?;
12228 query.push("freshness", &self.freshness);
12229 query.push("cursor", &self.cursor);
12230 Ok(query)
12231 }
12232}
12233
12234pub type TikTokSearchLocationsPage = Page<TikTokLocation>;
12236
12237#[derive(Clone, Debug, PartialEq)]
12239#[non_exhaustive]
12240pub struct TikTokSearchMusicOptions {
12241 pub q: String,
12243 pub freshness: Option<crate::options::Freshness>,
12245 pub cursor: Option<String>,
12247 pub request_options: RequestOptions,
12249}
12250
12251impl TikTokSearchMusicOptions {
12252 pub fn new(q: impl Into<String>) -> Self {
12254 Self {
12255 q: q.into(),
12256 freshness: None,
12257 cursor: None,
12258 request_options: RequestOptions::default(),
12259 }
12260 }
12261
12262 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12264 self.freshness = Some(value);
12265 self
12266 }
12267
12268 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12270 self.cursor = Some(value.into());
12271 self
12272 }
12273
12274 pub fn max_retries(mut self, value: u32) -> Self {
12276 self.request_options.max_retries = Some(value);
12277 self
12278 }
12279
12280 pub fn timeout(mut self, value: Duration) -> Self {
12282 self.request_options.timeout = Some(value);
12283 self
12284 }
12285
12286 pub(crate) fn query(&self) -> Result<Query, Error> {
12287 let mut query = Query::default();
12288 query.require("q", &self.q)?;
12289 query.push("freshness", &self.freshness);
12290 query.push("cursor", &self.cursor);
12291 Ok(query)
12292 }
12293}
12294
12295pub type TikTokSearchMusicPage = Page<TikTokMusic>;
12297
12298#[derive(Clone, Debug, PartialEq)]
12300#[non_exhaustive]
12301pub struct TikTokSearchPostsOptions {
12302 pub q: String,
12304 pub freshness: Option<crate::options::Freshness>,
12306 pub cursor: Option<String>,
12308 pub request_options: RequestOptions,
12310}
12311
12312impl TikTokSearchPostsOptions {
12313 pub fn new(q: impl Into<String>) -> Self {
12315 Self {
12316 q: q.into(),
12317 freshness: None,
12318 cursor: None,
12319 request_options: RequestOptions::default(),
12320 }
12321 }
12322
12323 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12325 self.freshness = Some(value);
12326 self
12327 }
12328
12329 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12331 self.cursor = Some(value.into());
12332 self
12333 }
12334
12335 pub fn max_retries(mut self, value: u32) -> Self {
12337 self.request_options.max_retries = Some(value);
12338 self
12339 }
12340
12341 pub fn timeout(mut self, value: Duration) -> Self {
12343 self.request_options.timeout = Some(value);
12344 self
12345 }
12346
12347 pub(crate) fn query(&self) -> Result<Query, Error> {
12348 let mut query = Query::default();
12349 query.require("q", &self.q)?;
12350 query.push("freshness", &self.freshness);
12351 query.push("cursor", &self.cursor);
12352 Ok(query)
12353 }
12354}
12355
12356pub type TikTokSearchPostsPage = Page<TikTokPost>;
12358
12359#[derive(Clone, Debug, PartialEq)]
12361#[non_exhaustive]
12362pub struct TikTokSearchProfilesOptions {
12363 pub q: String,
12365 pub freshness: Option<crate::options::Freshness>,
12367 pub cursor: Option<String>,
12369 pub request_options: RequestOptions,
12371}
12372
12373impl TikTokSearchProfilesOptions {
12374 pub fn new(q: impl Into<String>) -> Self {
12376 Self {
12377 q: q.into(),
12378 freshness: None,
12379 cursor: None,
12380 request_options: RequestOptions::default(),
12381 }
12382 }
12383
12384 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12386 self.freshness = Some(value);
12387 self
12388 }
12389
12390 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12392 self.cursor = Some(value.into());
12393 self
12394 }
12395
12396 pub fn max_retries(mut self, value: u32) -> Self {
12398 self.request_options.max_retries = Some(value);
12399 self
12400 }
12401
12402 pub fn timeout(mut self, value: Duration) -> Self {
12404 self.request_options.timeout = Some(value);
12405 self
12406 }
12407
12408 pub(crate) fn query(&self) -> Result<Query, Error> {
12409 let mut query = Query::default();
12410 query.require("q", &self.q)?;
12411 query.push("freshness", &self.freshness);
12412 query.push("cursor", &self.cursor);
12413 Ok(query)
12414 }
12415}
12416
12417pub type TikTokSearchProfilesPage = Page<TikTokProfile>;
12419
12420#[derive(Clone, Debug, Default, PartialEq)]
12422#[non_exhaustive]
12423pub struct TikTokTrendingCategoriesOptions {
12424 pub freshness: Option<crate::options::Freshness>,
12426 pub cursor: Option<String>,
12428 pub request_options: RequestOptions,
12430}
12431
12432impl TikTokTrendingCategoriesOptions {
12433 pub fn new() -> Self {
12435 Self::default()
12436 }
12437
12438 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12440 self.freshness = Some(value);
12441 self
12442 }
12443
12444 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12446 self.cursor = Some(value.into());
12447 self
12448 }
12449
12450 pub fn max_retries(mut self, value: u32) -> Self {
12452 self.request_options.max_retries = Some(value);
12453 self
12454 }
12455
12456 pub fn timeout(mut self, value: Duration) -> Self {
12458 self.request_options.timeout = Some(value);
12459 self
12460 }
12461
12462 pub(crate) fn query(&self) -> Result<Query, Error> {
12463 let mut query = Query::default();
12464 query.push("freshness", &self.freshness);
12465 query.push("cursor", &self.cursor);
12466 Ok(query)
12467 }
12468}
12469
12470pub type TikTokTrendingCategoriesPage = Page<TikTokCategory>;
12472
12473#[derive(Clone, Debug, Default, PartialEq)]
12475#[non_exhaustive]
12476pub struct TikTokTrendingMusicOptions {
12477 pub freshness: Option<crate::options::Freshness>,
12479 pub cursor: Option<String>,
12481 pub request_options: RequestOptions,
12483}
12484
12485impl TikTokTrendingMusicOptions {
12486 pub fn new() -> Self {
12488 Self::default()
12489 }
12490
12491 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12493 self.freshness = Some(value);
12494 self
12495 }
12496
12497 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12499 self.cursor = Some(value.into());
12500 self
12501 }
12502
12503 pub fn max_retries(mut self, value: u32) -> Self {
12505 self.request_options.max_retries = Some(value);
12506 self
12507 }
12508
12509 pub fn timeout(mut self, value: Duration) -> Self {
12511 self.request_options.timeout = Some(value);
12512 self
12513 }
12514
12515 pub(crate) fn query(&self) -> Result<Query, Error> {
12516 let mut query = Query::default();
12517 query.push("freshness", &self.freshness);
12518 query.push("cursor", &self.cursor);
12519 Ok(query)
12520 }
12521}
12522
12523pub type TikTokTrendingMusicPage = Page<TikTokMusic>;
12525
12526#[derive(Clone, Debug, Default, PartialEq)]
12528#[non_exhaustive]
12529pub struct TikTokTrendingPostsOptions {
12530 pub freshness: Option<crate::options::Freshness>,
12532 pub cursor: Option<String>,
12534 pub request_options: RequestOptions,
12536}
12537
12538impl TikTokTrendingPostsOptions {
12539 pub fn new() -> Self {
12541 Self::default()
12542 }
12543
12544 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12546 self.freshness = Some(value);
12547 self
12548 }
12549
12550 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12552 self.cursor = Some(value.into());
12553 self
12554 }
12555
12556 pub fn max_retries(mut self, value: u32) -> Self {
12558 self.request_options.max_retries = Some(value);
12559 self
12560 }
12561
12562 pub fn timeout(mut self, value: Duration) -> Self {
12564 self.request_options.timeout = Some(value);
12565 self
12566 }
12567
12568 pub(crate) fn query(&self) -> Result<Query, Error> {
12569 let mut query = Query::default();
12570 query.push("freshness", &self.freshness);
12571 query.push("cursor", &self.cursor);
12572 Ok(query)
12573 }
12574}
12575
12576pub type TikTokTrendingPostsPage = Page<TikTokPost>;
12578
12579#[derive(Clone, Debug, Default, PartialEq)]
12581#[non_exhaustive]
12582pub struct TwitterListPostsOptions {
12583 pub freshness: Option<crate::options::Freshness>,
12585 pub cursor: Option<String>,
12587 pub request_options: RequestOptions,
12589}
12590
12591impl TwitterListPostsOptions {
12592 pub fn new() -> Self {
12594 Self::default()
12595 }
12596
12597 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12599 self.freshness = Some(value);
12600 self
12601 }
12602
12603 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12605 self.cursor = Some(value.into());
12606 self
12607 }
12608
12609 pub fn max_retries(mut self, value: u32) -> Self {
12611 self.request_options.max_retries = Some(value);
12612 self
12613 }
12614
12615 pub fn timeout(mut self, value: Duration) -> Self {
12617 self.request_options.timeout = Some(value);
12618 self
12619 }
12620
12621 pub(crate) fn query(&self) -> Result<Query, Error> {
12622 let mut query = Query::default();
12623 query.push("freshness", &self.freshness);
12624 query.push("cursor", &self.cursor);
12625 Ok(query)
12626 }
12627}
12628
12629pub type TwitterListPostsPage = Page<TwitterPost>;
12631
12632#[derive(Clone, Debug, Default, PartialEq)]
12634#[non_exhaustive]
12635pub struct TwitterPostOptions {
12636 pub freshness: Option<crate::options::Freshness>,
12638 pub request_options: RequestOptions,
12640}
12641
12642impl TwitterPostOptions {
12643 pub fn new() -> Self {
12645 Self::default()
12646 }
12647
12648 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12650 self.freshness = Some(value);
12651 self
12652 }
12653
12654 pub fn max_retries(mut self, value: u32) -> Self {
12656 self.request_options.max_retries = Some(value);
12657 self
12658 }
12659
12660 pub fn timeout(mut self, value: Duration) -> Self {
12662 self.request_options.timeout = Some(value);
12663 self
12664 }
12665
12666 pub(crate) fn query(&self) -> Result<Query, Error> {
12667 let mut query = Query::default();
12668 query.push("freshness", &self.freshness);
12669 Ok(query)
12670 }
12671}
12672
12673pub type TwitterPostResponse = Response<TwitterPost>;
12675
12676#[derive(Clone, Debug, Default, PartialEq)]
12678#[non_exhaustive]
12679pub struct TwitterPostCommentRepliesOptions {
12680 pub freshness: Option<crate::options::Freshness>,
12682 pub cursor: Option<String>,
12684 pub request_options: RequestOptions,
12686}
12687
12688impl TwitterPostCommentRepliesOptions {
12689 pub fn new() -> Self {
12691 Self::default()
12692 }
12693
12694 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12696 self.freshness = Some(value);
12697 self
12698 }
12699
12700 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12702 self.cursor = Some(value.into());
12703 self
12704 }
12705
12706 pub fn max_retries(mut self, value: u32) -> Self {
12708 self.request_options.max_retries = Some(value);
12709 self
12710 }
12711
12712 pub fn timeout(mut self, value: Duration) -> Self {
12714 self.request_options.timeout = Some(value);
12715 self
12716 }
12717
12718 pub(crate) fn query(&self) -> Result<Query, Error> {
12719 let mut query = Query::default();
12720 query.push("freshness", &self.freshness);
12721 query.push("cursor", &self.cursor);
12722 Ok(query)
12723 }
12724}
12725
12726pub type TwitterPostCommentRepliesPage = Page<TwitterPost>;
12728
12729#[derive(Clone, Debug, Default, PartialEq)]
12731#[non_exhaustive]
12732pub struct TwitterPostCommentsOptions {
12733 pub freshness: Option<crate::options::Freshness>,
12735 pub cursor: Option<String>,
12737 pub request_options: RequestOptions,
12739}
12740
12741impl TwitterPostCommentsOptions {
12742 pub fn new() -> Self {
12744 Self::default()
12745 }
12746
12747 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12749 self.freshness = Some(value);
12750 self
12751 }
12752
12753 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12755 self.cursor = Some(value.into());
12756 self
12757 }
12758
12759 pub fn max_retries(mut self, value: u32) -> Self {
12761 self.request_options.max_retries = Some(value);
12762 self
12763 }
12764
12765 pub fn timeout(mut self, value: Duration) -> Self {
12767 self.request_options.timeout = Some(value);
12768 self
12769 }
12770
12771 pub(crate) fn query(&self) -> Result<Query, Error> {
12772 let mut query = Query::default();
12773 query.push("freshness", &self.freshness);
12774 query.push("cursor", &self.cursor);
12775 Ok(query)
12776 }
12777}
12778
12779pub type TwitterPostCommentsPage = Page<TwitterPost>;
12781
12782#[derive(Clone, Debug, Default, PartialEq)]
12784#[non_exhaustive]
12785pub struct TwitterPostRepostersOptions {
12786 pub freshness: Option<crate::options::Freshness>,
12788 pub cursor: Option<String>,
12790 pub request_options: RequestOptions,
12792}
12793
12794impl TwitterPostRepostersOptions {
12795 pub fn new() -> Self {
12797 Self::default()
12798 }
12799
12800 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12802 self.freshness = Some(value);
12803 self
12804 }
12805
12806 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12808 self.cursor = Some(value.into());
12809 self
12810 }
12811
12812 pub fn max_retries(mut self, value: u32) -> Self {
12814 self.request_options.max_retries = Some(value);
12815 self
12816 }
12817
12818 pub fn timeout(mut self, value: Duration) -> Self {
12820 self.request_options.timeout = Some(value);
12821 self
12822 }
12823
12824 pub(crate) fn query(&self) -> Result<Query, Error> {
12825 let mut query = Query::default();
12826 query.push("freshness", &self.freshness);
12827 query.push("cursor", &self.cursor);
12828 Ok(query)
12829 }
12830}
12831
12832pub type TwitterPostRepostersPage = Page<TwitterProfile>;
12834
12835#[derive(Clone, Debug, Default, PartialEq)]
12837#[non_exhaustive]
12838pub struct TwitterProfileOptions {
12839 pub freshness: Option<crate::options::Freshness>,
12841 pub request_options: RequestOptions,
12843}
12844
12845impl TwitterProfileOptions {
12846 pub fn new() -> Self {
12848 Self::default()
12849 }
12850
12851 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12853 self.freshness = Some(value);
12854 self
12855 }
12856
12857 pub fn max_retries(mut self, value: u32) -> Self {
12859 self.request_options.max_retries = Some(value);
12860 self
12861 }
12862
12863 pub fn timeout(mut self, value: Duration) -> Self {
12865 self.request_options.timeout = Some(value);
12866 self
12867 }
12868
12869 pub(crate) fn query(&self) -> Result<Query, Error> {
12870 let mut query = Query::default();
12871 query.push("freshness", &self.freshness);
12872 Ok(query)
12873 }
12874}
12875
12876pub type TwitterProfileResponse = Response<TwitterProfile>;
12878
12879#[derive(Clone, Debug, Default, PartialEq)]
12881#[non_exhaustive]
12882pub struct TwitterProfileFollowersOptions {
12883 pub freshness: Option<crate::options::Freshness>,
12885 pub cursor: Option<String>,
12887 pub request_options: RequestOptions,
12889}
12890
12891impl TwitterProfileFollowersOptions {
12892 pub fn new() -> Self {
12894 Self::default()
12895 }
12896
12897 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12899 self.freshness = Some(value);
12900 self
12901 }
12902
12903 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12905 self.cursor = Some(value.into());
12906 self
12907 }
12908
12909 pub fn max_retries(mut self, value: u32) -> Self {
12911 self.request_options.max_retries = Some(value);
12912 self
12913 }
12914
12915 pub fn timeout(mut self, value: Duration) -> Self {
12917 self.request_options.timeout = Some(value);
12918 self
12919 }
12920
12921 pub(crate) fn query(&self) -> Result<Query, Error> {
12922 let mut query = Query::default();
12923 query.push("freshness", &self.freshness);
12924 query.push("cursor", &self.cursor);
12925 Ok(query)
12926 }
12927}
12928
12929pub type TwitterProfileFollowersPage = Page<TwitterProfile>;
12931
12932#[derive(Clone, Debug, Default, PartialEq)]
12934#[non_exhaustive]
12935pub struct TwitterProfileFollowingOptions {
12936 pub freshness: Option<crate::options::Freshness>,
12938 pub cursor: Option<String>,
12940 pub request_options: RequestOptions,
12942}
12943
12944impl TwitterProfileFollowingOptions {
12945 pub fn new() -> Self {
12947 Self::default()
12948 }
12949
12950 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
12952 self.freshness = Some(value);
12953 self
12954 }
12955
12956 pub fn cursor(mut self, value: impl Into<String>) -> Self {
12958 self.cursor = Some(value.into());
12959 self
12960 }
12961
12962 pub fn max_retries(mut self, value: u32) -> Self {
12964 self.request_options.max_retries = Some(value);
12965 self
12966 }
12967
12968 pub fn timeout(mut self, value: Duration) -> Self {
12970 self.request_options.timeout = Some(value);
12971 self
12972 }
12973
12974 pub(crate) fn query(&self) -> Result<Query, Error> {
12975 let mut query = Query::default();
12976 query.push("freshness", &self.freshness);
12977 query.push("cursor", &self.cursor);
12978 Ok(query)
12979 }
12980}
12981
12982pub type TwitterProfileFollowingPage = Page<TwitterProfile>;
12984
12985#[derive(Clone, Debug, Default, PartialEq)]
12987#[non_exhaustive]
12988pub struct TwitterProfileMediaOptions {
12989 pub freshness: Option<crate::options::Freshness>,
12991 pub cursor: Option<String>,
12993 pub request_options: RequestOptions,
12995}
12996
12997impl TwitterProfileMediaOptions {
12998 pub fn new() -> Self {
13000 Self::default()
13001 }
13002
13003 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13005 self.freshness = Some(value);
13006 self
13007 }
13008
13009 pub fn cursor(mut self, value: impl Into<String>) -> Self {
13011 self.cursor = Some(value.into());
13012 self
13013 }
13014
13015 pub fn max_retries(mut self, value: u32) -> Self {
13017 self.request_options.max_retries = Some(value);
13018 self
13019 }
13020
13021 pub fn timeout(mut self, value: Duration) -> Self {
13023 self.request_options.timeout = Some(value);
13024 self
13025 }
13026
13027 pub(crate) fn query(&self) -> Result<Query, Error> {
13028 let mut query = Query::default();
13029 query.push("freshness", &self.freshness);
13030 query.push("cursor", &self.cursor);
13031 Ok(query)
13032 }
13033}
13034
13035pub type TwitterProfileMediaPage = Page<TwitterPost>;
13037
13038#[derive(Clone, Debug, Default, PartialEq)]
13040#[non_exhaustive]
13041pub struct TwitterProfilePostsOptions {
13042 pub freshness: Option<crate::options::Freshness>,
13044 pub cursor: Option<String>,
13046 pub since: Option<chrono::DateTime<chrono::Utc>>,
13048 pub request_options: RequestOptions,
13050}
13051
13052impl TwitterProfilePostsOptions {
13053 pub fn new() -> Self {
13055 Self::default()
13056 }
13057
13058 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13060 self.freshness = Some(value);
13061 self
13062 }
13063
13064 pub fn cursor(mut self, value: impl Into<String>) -> Self {
13066 self.cursor = Some(value.into());
13067 self
13068 }
13069
13070 pub fn since(mut self, value: chrono::DateTime<chrono::Utc>) -> Self {
13072 self.since = Some(value);
13073 self
13074 }
13075
13076 pub fn max_retries(mut self, value: u32) -> Self {
13078 self.request_options.max_retries = Some(value);
13079 self
13080 }
13081
13082 pub fn timeout(mut self, value: Duration) -> Self {
13084 self.request_options.timeout = Some(value);
13085 self
13086 }
13087
13088 pub(crate) fn query(&self) -> Result<Query, Error> {
13089 let mut query = Query::default();
13090 query.push("freshness", &self.freshness);
13091 query.push("cursor", &self.cursor);
13092 query.push("since", &self.since);
13093 Ok(query)
13094 }
13095}
13096
13097pub type TwitterProfilePostsPage = Page<TwitterPost>;
13099
13100#[derive(Clone, Debug, Default, PartialEq)]
13102#[non_exhaustive]
13103pub struct TwitterProfileRepliesOptions {
13104 pub freshness: Option<crate::options::Freshness>,
13106 pub cursor: Option<String>,
13108 pub request_options: RequestOptions,
13110}
13111
13112impl TwitterProfileRepliesOptions {
13113 pub fn new() -> Self {
13115 Self::default()
13116 }
13117
13118 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13120 self.freshness = Some(value);
13121 self
13122 }
13123
13124 pub fn cursor(mut self, value: impl Into<String>) -> Self {
13126 self.cursor = Some(value.into());
13127 self
13128 }
13129
13130 pub fn max_retries(mut self, value: u32) -> Self {
13132 self.request_options.max_retries = Some(value);
13133 self
13134 }
13135
13136 pub fn timeout(mut self, value: Duration) -> Self {
13138 self.request_options.timeout = Some(value);
13139 self
13140 }
13141
13142 pub(crate) fn query(&self) -> Result<Query, Error> {
13143 let mut query = Query::default();
13144 query.push("freshness", &self.freshness);
13145 query.push("cursor", &self.cursor);
13146 Ok(query)
13147 }
13148}
13149
13150pub type TwitterProfileRepliesPage = Page<TwitterPost>;
13152
13153#[derive(Clone, Debug, PartialEq)]
13155#[non_exhaustive]
13156pub struct TwitterSearchMediaOptions {
13157 pub q: String,
13159 pub r#type: String,
13161 pub freshness: Option<crate::options::Freshness>,
13163 pub cursor: Option<String>,
13165 pub request_options: RequestOptions,
13167}
13168
13169impl TwitterSearchMediaOptions {
13170 pub fn new(q: impl Into<String>, r#type: impl Into<String>) -> Self {
13172 Self {
13173 q: q.into(),
13174 r#type: r#type.into(),
13175 freshness: None,
13176 cursor: None,
13177 request_options: RequestOptions::default(),
13178 }
13179 }
13180
13181 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13183 self.freshness = Some(value);
13184 self
13185 }
13186
13187 pub fn cursor(mut self, value: impl Into<String>) -> Self {
13189 self.cursor = Some(value.into());
13190 self
13191 }
13192
13193 pub fn max_retries(mut self, value: u32) -> Self {
13195 self.request_options.max_retries = Some(value);
13196 self
13197 }
13198
13199 pub fn timeout(mut self, value: Duration) -> Self {
13201 self.request_options.timeout = Some(value);
13202 self
13203 }
13204
13205 pub(crate) fn query(&self) -> Result<Query, Error> {
13206 let mut query = Query::default();
13207 query.require("q", &self.q)?;
13208 query.require("type", &self.r#type)?;
13209 query.push("freshness", &self.freshness);
13210 query.push("cursor", &self.cursor);
13211 Ok(query)
13212 }
13213}
13214
13215pub type TwitterSearchMediaPage = Page<TwitterPost>;
13217
13218#[derive(Clone, Debug, PartialEq)]
13220#[non_exhaustive]
13221pub struct TwitterSearchPostsOptions {
13222 pub q: String,
13224 pub sort: Option<String>,
13227 pub freshness: Option<crate::options::Freshness>,
13229 pub cursor: Option<String>,
13231 pub request_options: RequestOptions,
13233}
13234
13235impl TwitterSearchPostsOptions {
13236 pub fn new(q: impl Into<String>) -> Self {
13238 Self {
13239 q: q.into(),
13240 sort: None,
13241 freshness: None,
13242 cursor: None,
13243 request_options: RequestOptions::default(),
13244 }
13245 }
13246
13247 pub fn sort(mut self, value: impl Into<String>) -> Self {
13250 self.sort = Some(value.into());
13251 self
13252 }
13253
13254 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13256 self.freshness = Some(value);
13257 self
13258 }
13259
13260 pub fn cursor(mut self, value: impl Into<String>) -> Self {
13262 self.cursor = Some(value.into());
13263 self
13264 }
13265
13266 pub fn max_retries(mut self, value: u32) -> Self {
13268 self.request_options.max_retries = Some(value);
13269 self
13270 }
13271
13272 pub fn timeout(mut self, value: Duration) -> Self {
13274 self.request_options.timeout = Some(value);
13275 self
13276 }
13277
13278 pub(crate) fn query(&self) -> Result<Query, Error> {
13279 let mut query = Query::default();
13280 query.require("q", &self.q)?;
13281 query.push("sort", &self.sort);
13282 query.push("freshness", &self.freshness);
13283 query.push("cursor", &self.cursor);
13284 Ok(query)
13285 }
13286}
13287
13288pub type TwitterSearchPostsPage = Page<TwitterPost>;
13290
13291#[derive(Clone, Debug, PartialEq)]
13293#[non_exhaustive]
13294pub struct TwitterSearchSuggestionsOptions {
13295 pub q: String,
13297 pub freshness: Option<crate::options::Freshness>,
13299 pub cursor: Option<String>,
13301 pub request_options: RequestOptions,
13303}
13304
13305impl TwitterSearchSuggestionsOptions {
13306 pub fn new(q: impl Into<String>) -> Self {
13308 Self {
13309 q: q.into(),
13310 freshness: None,
13311 cursor: None,
13312 request_options: RequestOptions::default(),
13313 }
13314 }
13315
13316 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13318 self.freshness = Some(value);
13319 self
13320 }
13321
13322 pub fn cursor(mut self, value: impl Into<String>) -> Self {
13324 self.cursor = Some(value.into());
13325 self
13326 }
13327
13328 pub fn max_retries(mut self, value: u32) -> Self {
13330 self.request_options.max_retries = Some(value);
13331 self
13332 }
13333
13334 pub fn timeout(mut self, value: Duration) -> Self {
13336 self.request_options.timeout = Some(value);
13337 self
13338 }
13339
13340 pub(crate) fn query(&self) -> Result<Query, Error> {
13341 let mut query = Query::default();
13342 query.require("q", &self.q)?;
13343 query.push("freshness", &self.freshness);
13344 query.push("cursor", &self.cursor);
13345 Ok(query)
13346 }
13347}
13348
13349pub type TwitterSearchSuggestionsPage = Page<TwitterProfile>;
13351
13352#[derive(Clone, Debug, PartialEq)]
13354#[non_exhaustive]
13355pub struct TwitterSearchUsersOptions {
13356 pub q: String,
13358 pub freshness: Option<crate::options::Freshness>,
13360 pub cursor: Option<String>,
13362 pub request_options: RequestOptions,
13364}
13365
13366impl TwitterSearchUsersOptions {
13367 pub fn new(q: impl Into<String>) -> Self {
13369 Self {
13370 q: q.into(),
13371 freshness: None,
13372 cursor: None,
13373 request_options: RequestOptions::default(),
13374 }
13375 }
13376
13377 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13379 self.freshness = Some(value);
13380 self
13381 }
13382
13383 pub fn cursor(mut self, value: impl Into<String>) -> Self {
13385 self.cursor = Some(value.into());
13386 self
13387 }
13388
13389 pub fn max_retries(mut self, value: u32) -> Self {
13391 self.request_options.max_retries = Some(value);
13392 self
13393 }
13394
13395 pub fn timeout(mut self, value: Duration) -> Self {
13397 self.request_options.timeout = Some(value);
13398 self
13399 }
13400
13401 pub(crate) fn query(&self) -> Result<Query, Error> {
13402 let mut query = Query::default();
13403 query.require("q", &self.q)?;
13404 query.push("freshness", &self.freshness);
13405 query.push("cursor", &self.cursor);
13406 Ok(query)
13407 }
13408}
13409
13410pub type TwitterSearchUsersPage = Page<TwitterProfile>;
13412
13413#[derive(Clone, Debug, Default, PartialEq)]
13415#[non_exhaustive]
13416pub struct YouTubeChartsArtistsOptions {
13417 pub country: Option<String>,
13419 pub freshness: Option<crate::options::Freshness>,
13421 pub request_options: RequestOptions,
13423}
13424
13425impl YouTubeChartsArtistsOptions {
13426 pub fn new() -> Self {
13428 Self::default()
13429 }
13430
13431 pub fn country(mut self, value: impl Into<String>) -> Self {
13433 self.country = Some(value.into());
13434 self
13435 }
13436
13437 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13439 self.freshness = Some(value);
13440 self
13441 }
13442
13443 pub fn max_retries(mut self, value: u32) -> Self {
13445 self.request_options.max_retries = Some(value);
13446 self
13447 }
13448
13449 pub fn timeout(mut self, value: Duration) -> Self {
13451 self.request_options.timeout = Some(value);
13452 self
13453 }
13454
13455 pub(crate) fn query(&self) -> Result<Query, Error> {
13456 let mut query = Query::default();
13457 query.push("country", &self.country);
13458 query.push("freshness", &self.freshness);
13459 Ok(query)
13460 }
13461}
13462
13463pub type YouTubeChartsArtistsResponse = Response<Vec<YouTubeChartEntry>>;
13465
13466#[derive(Clone, Debug, Default, PartialEq)]
13468#[non_exhaustive]
13469pub struct YouTubeChartsTracksOptions {
13470 pub country: Option<String>,
13472 pub freshness: Option<crate::options::Freshness>,
13474 pub request_options: RequestOptions,
13476}
13477
13478impl YouTubeChartsTracksOptions {
13479 pub fn new() -> Self {
13481 Self::default()
13482 }
13483
13484 pub fn country(mut self, value: impl Into<String>) -> Self {
13486 self.country = Some(value.into());
13487 self
13488 }
13489
13490 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13492 self.freshness = Some(value);
13493 self
13494 }
13495
13496 pub fn max_retries(mut self, value: u32) -> Self {
13498 self.request_options.max_retries = Some(value);
13499 self
13500 }
13501
13502 pub fn timeout(mut self, value: Duration) -> Self {
13504 self.request_options.timeout = Some(value);
13505 self
13506 }
13507
13508 pub(crate) fn query(&self) -> Result<Query, Error> {
13509 let mut query = Query::default();
13510 query.push("country", &self.country);
13511 query.push("freshness", &self.freshness);
13512 Ok(query)
13513 }
13514}
13515
13516pub type YouTubeChartsTracksResponse = Response<Vec<YouTubeChartEntry>>;
13518
13519#[derive(Clone, Debug, Default, PartialEq)]
13521#[non_exhaustive]
13522pub struct YouTubeChartsVideosOptions {
13523 pub country: Option<String>,
13525 pub freshness: Option<crate::options::Freshness>,
13527 pub request_options: RequestOptions,
13529}
13530
13531impl YouTubeChartsVideosOptions {
13532 pub fn new() -> Self {
13534 Self::default()
13535 }
13536
13537 pub fn country(mut self, value: impl Into<String>) -> Self {
13539 self.country = Some(value.into());
13540 self
13541 }
13542
13543 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13545 self.freshness = Some(value);
13546 self
13547 }
13548
13549 pub fn max_retries(mut self, value: u32) -> Self {
13551 self.request_options.max_retries = Some(value);
13552 self
13553 }
13554
13555 pub fn timeout(mut self, value: Duration) -> Self {
13557 self.request_options.timeout = Some(value);
13558 self
13559 }
13560
13561 pub(crate) fn query(&self) -> Result<Query, Error> {
13562 let mut query = Query::default();
13563 query.push("country", &self.country);
13564 query.push("freshness", &self.freshness);
13565 Ok(query)
13566 }
13567}
13568
13569pub type YouTubeChartsVideosResponse = Response<Vec<YouTubeChartEntry>>;
13571
13572#[derive(Clone, Debug, Default, PartialEq)]
13574#[non_exhaustive]
13575pub struct YouTubeCommunityPostOptions {
13576 pub freshness: Option<crate::options::Freshness>,
13578 pub request_options: RequestOptions,
13580}
13581
13582impl YouTubeCommunityPostOptions {
13583 pub fn new() -> Self {
13585 Self::default()
13586 }
13587
13588 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13590 self.freshness = Some(value);
13591 self
13592 }
13593
13594 pub fn max_retries(mut self, value: u32) -> Self {
13596 self.request_options.max_retries = Some(value);
13597 self
13598 }
13599
13600 pub fn timeout(mut self, value: Duration) -> Self {
13602 self.request_options.timeout = Some(value);
13603 self
13604 }
13605
13606 pub(crate) fn query(&self) -> Result<Query, Error> {
13607 let mut query = Query::default();
13608 query.push("freshness", &self.freshness);
13609 Ok(query)
13610 }
13611}
13612
13613pub type YouTubeCommunityPostResponse = Response<YouTubeCommunityPost>;
13615
13616#[derive(Clone, Debug, Default, PartialEq)]
13618#[non_exhaustive]
13619pub struct YouTubeCommunityPostCommentsOptions {
13620 pub sort: Option<String>,
13623 pub freshness: Option<crate::options::Freshness>,
13625 pub cursor: Option<String>,
13627 pub request_options: RequestOptions,
13629}
13630
13631impl YouTubeCommunityPostCommentsOptions {
13632 pub fn new() -> Self {
13634 Self::default()
13635 }
13636
13637 pub fn sort(mut self, value: impl Into<String>) -> Self {
13640 self.sort = Some(value.into());
13641 self
13642 }
13643
13644 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13646 self.freshness = Some(value);
13647 self
13648 }
13649
13650 pub fn cursor(mut self, value: impl Into<String>) -> Self {
13652 self.cursor = Some(value.into());
13653 self
13654 }
13655
13656 pub fn max_retries(mut self, value: u32) -> Self {
13658 self.request_options.max_retries = Some(value);
13659 self
13660 }
13661
13662 pub fn timeout(mut self, value: Duration) -> Self {
13664 self.request_options.timeout = Some(value);
13665 self
13666 }
13667
13668 pub(crate) fn query(&self) -> Result<Query, Error> {
13669 let mut query = Query::default();
13670 query.push("sort", &self.sort);
13671 query.push("freshness", &self.freshness);
13672 query.push("cursor", &self.cursor);
13673 Ok(query)
13674 }
13675}
13676
13677pub type YouTubeCommunityPostCommentsPage = Page<YouTubeComment>;
13679
13680#[derive(Clone, Debug, Default, PartialEq)]
13682#[non_exhaustive]
13683pub struct YouTubeHashtagPostsOptions {
13684 pub freshness: Option<crate::options::Freshness>,
13686 pub cursor: Option<String>,
13688 pub request_options: RequestOptions,
13690}
13691
13692impl YouTubeHashtagPostsOptions {
13693 pub fn new() -> Self {
13695 Self::default()
13696 }
13697
13698 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13700 self.freshness = Some(value);
13701 self
13702 }
13703
13704 pub fn cursor(mut self, value: impl Into<String>) -> Self {
13706 self.cursor = Some(value.into());
13707 self
13708 }
13709
13710 pub fn max_retries(mut self, value: u32) -> Self {
13712 self.request_options.max_retries = Some(value);
13713 self
13714 }
13715
13716 pub fn timeout(mut self, value: Duration) -> Self {
13718 self.request_options.timeout = Some(value);
13719 self
13720 }
13721
13722 pub(crate) fn query(&self) -> Result<Query, Error> {
13723 let mut query = Query::default();
13724 query.push("freshness", &self.freshness);
13725 query.push("cursor", &self.cursor);
13726 Ok(query)
13727 }
13728}
13729
13730pub type YouTubeHashtagPostsPage = Page<YouTubePost>;
13732
13733#[derive(Clone, Debug, Default, PartialEq)]
13735#[non_exhaustive]
13736pub struct YouTubePlaylistPostsOptions {
13737 pub freshness: Option<crate::options::Freshness>,
13739 pub cursor: Option<String>,
13741 pub request_options: RequestOptions,
13743}
13744
13745impl YouTubePlaylistPostsOptions {
13746 pub fn new() -> Self {
13748 Self::default()
13749 }
13750
13751 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13753 self.freshness = Some(value);
13754 self
13755 }
13756
13757 pub fn cursor(mut self, value: impl Into<String>) -> Self {
13759 self.cursor = Some(value.into());
13760 self
13761 }
13762
13763 pub fn max_retries(mut self, value: u32) -> Self {
13765 self.request_options.max_retries = Some(value);
13766 self
13767 }
13768
13769 pub fn timeout(mut self, value: Duration) -> Self {
13771 self.request_options.timeout = Some(value);
13772 self
13773 }
13774
13775 pub(crate) fn query(&self) -> Result<Query, Error> {
13776 let mut query = Query::default();
13777 query.push("freshness", &self.freshness);
13778 query.push("cursor", &self.cursor);
13779 Ok(query)
13780 }
13781}
13782
13783pub type YouTubePlaylistPostsPage = Page<YouTubePost>;
13785
13786#[derive(Clone, Debug, Default, PartialEq)]
13788#[non_exhaustive]
13789pub struct YouTubePostOptions {
13790 pub freshness: Option<crate::options::Freshness>,
13792 pub request_options: RequestOptions,
13794}
13795
13796impl YouTubePostOptions {
13797 pub fn new() -> Self {
13799 Self::default()
13800 }
13801
13802 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13804 self.freshness = Some(value);
13805 self
13806 }
13807
13808 pub fn max_retries(mut self, value: u32) -> Self {
13810 self.request_options.max_retries = Some(value);
13811 self
13812 }
13813
13814 pub fn timeout(mut self, value: Duration) -> Self {
13816 self.request_options.timeout = Some(value);
13817 self
13818 }
13819
13820 pub(crate) fn query(&self) -> Result<Query, Error> {
13821 let mut query = Query::default();
13822 query.push("freshness", &self.freshness);
13823 Ok(query)
13824 }
13825}
13826
13827pub type YouTubePostResponse = Response<YouTubePost>;
13829
13830#[derive(Clone, Debug, PartialEq)]
13832#[non_exhaustive]
13833pub struct YouTubePostCommentRepliesOptions {
13834 pub token: String,
13836 pub freshness: Option<crate::options::Freshness>,
13838 pub cursor: Option<String>,
13840 pub request_options: RequestOptions,
13842}
13843
13844impl YouTubePostCommentRepliesOptions {
13845 pub fn new(token: impl Into<String>) -> Self {
13847 Self {
13848 token: token.into(),
13849 freshness: None,
13850 cursor: None,
13851 request_options: RequestOptions::default(),
13852 }
13853 }
13854
13855 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13857 self.freshness = Some(value);
13858 self
13859 }
13860
13861 pub fn cursor(mut self, value: impl Into<String>) -> Self {
13863 self.cursor = Some(value.into());
13864 self
13865 }
13866
13867 pub fn max_retries(mut self, value: u32) -> Self {
13869 self.request_options.max_retries = Some(value);
13870 self
13871 }
13872
13873 pub fn timeout(mut self, value: Duration) -> Self {
13875 self.request_options.timeout = Some(value);
13876 self
13877 }
13878
13879 pub(crate) fn query(&self) -> Result<Query, Error> {
13880 let mut query = Query::default();
13881 query.require("token", &self.token)?;
13882 query.push("freshness", &self.freshness);
13883 query.push("cursor", &self.cursor);
13884 Ok(query)
13885 }
13886}
13887
13888pub type YouTubePostCommentRepliesPage = Page<YouTubeComment>;
13890
13891#[derive(Clone, Debug, Default, PartialEq)]
13893#[non_exhaustive]
13894pub struct YouTubePostCommentsOptions {
13895 pub sort: Option<String>,
13898 pub freshness: Option<crate::options::Freshness>,
13900 pub cursor: Option<String>,
13902 pub request_options: RequestOptions,
13904}
13905
13906impl YouTubePostCommentsOptions {
13907 pub fn new() -> Self {
13909 Self::default()
13910 }
13911
13912 pub fn sort(mut self, value: impl Into<String>) -> Self {
13915 self.sort = Some(value.into());
13916 self
13917 }
13918
13919 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13921 self.freshness = Some(value);
13922 self
13923 }
13924
13925 pub fn cursor(mut self, value: impl Into<String>) -> Self {
13927 self.cursor = Some(value.into());
13928 self
13929 }
13930
13931 pub fn max_retries(mut self, value: u32) -> Self {
13933 self.request_options.max_retries = Some(value);
13934 self
13935 }
13936
13937 pub fn timeout(mut self, value: Duration) -> Self {
13939 self.request_options.timeout = Some(value);
13940 self
13941 }
13942
13943 pub(crate) fn query(&self) -> Result<Query, Error> {
13944 let mut query = Query::default();
13945 query.push("sort", &self.sort);
13946 query.push("freshness", &self.freshness);
13947 query.push("cursor", &self.cursor);
13948 Ok(query)
13949 }
13950}
13951
13952pub type YouTubePostCommentsPage = Page<YouTubeComment>;
13954
13955#[derive(Clone, Debug, Default, PartialEq)]
13957#[non_exhaustive]
13958pub struct YouTubePostFilesOptions {
13959 pub freshness: Option<crate::options::Freshness>,
13961 pub request_options: RequestOptions,
13963}
13964
13965impl YouTubePostFilesOptions {
13966 pub fn new() -> Self {
13968 Self::default()
13969 }
13970
13971 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
13973 self.freshness = Some(value);
13974 self
13975 }
13976
13977 pub fn max_retries(mut self, value: u32) -> Self {
13979 self.request_options.max_retries = Some(value);
13980 self
13981 }
13982
13983 pub fn timeout(mut self, value: Duration) -> Self {
13985 self.request_options.timeout = Some(value);
13986 self
13987 }
13988
13989 pub(crate) fn query(&self) -> Result<Query, Error> {
13990 let mut query = Query::default();
13991 query.push("freshness", &self.freshness);
13992 Ok(query)
13993 }
13994}
13995
13996pub type YouTubePostFilesResponse = Response<YouTubeFiles>;
13998
13999#[derive(Clone, Debug, PartialEq)]
14001#[non_exhaustive]
14002pub struct YouTubePostFrameOptions {
14003 pub at: i64,
14006 pub freshness: Option<crate::options::Freshness>,
14008 pub request_options: RequestOptions,
14010}
14011
14012impl YouTubePostFrameOptions {
14013 pub fn new(at: i64) -> Self {
14015 Self {
14016 at,
14017 freshness: None,
14018 request_options: RequestOptions::default(),
14019 }
14020 }
14021
14022 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14024 self.freshness = Some(value);
14025 self
14026 }
14027
14028 pub fn max_retries(mut self, value: u32) -> Self {
14030 self.request_options.max_retries = Some(value);
14031 self
14032 }
14033
14034 pub fn timeout(mut self, value: Duration) -> Self {
14036 self.request_options.timeout = Some(value);
14037 self
14038 }
14039
14040 pub(crate) fn query(&self) -> Result<Query, Error> {
14041 let mut query = Query::default();
14042 query.require("at", &self.at)?;
14043 query.push("freshness", &self.freshness);
14044 Ok(query)
14045 }
14046}
14047
14048pub type YouTubePostFrameResponse = Response<YouTubeFrame>;
14050
14051#[derive(Clone, Debug, Default, PartialEq)]
14053#[non_exhaustive]
14054pub struct YouTubePostRelatedOptions {
14055 pub freshness: Option<crate::options::Freshness>,
14057 pub cursor: Option<String>,
14059 pub request_options: RequestOptions,
14061}
14062
14063impl YouTubePostRelatedOptions {
14064 pub fn new() -> Self {
14066 Self::default()
14067 }
14068
14069 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14071 self.freshness = Some(value);
14072 self
14073 }
14074
14075 pub fn cursor(mut self, value: impl Into<String>) -> Self {
14077 self.cursor = Some(value.into());
14078 self
14079 }
14080
14081 pub fn max_retries(mut self, value: u32) -> Self {
14083 self.request_options.max_retries = Some(value);
14084 self
14085 }
14086
14087 pub fn timeout(mut self, value: Duration) -> Self {
14089 self.request_options.timeout = Some(value);
14090 self
14091 }
14092
14093 pub(crate) fn query(&self) -> Result<Query, Error> {
14094 let mut query = Query::default();
14095 query.push("freshness", &self.freshness);
14096 query.push("cursor", &self.cursor);
14097 Ok(query)
14098 }
14099}
14100
14101pub type YouTubePostRelatedPage = Page<YouTubePost>;
14103
14104#[derive(Clone, Debug, Default, PartialEq)]
14106#[non_exhaustive]
14107pub struct YouTubePostSoundPostsOptions {
14108 pub freshness: Option<crate::options::Freshness>,
14110 pub cursor: Option<String>,
14112 pub request_options: RequestOptions,
14114}
14115
14116impl YouTubePostSoundPostsOptions {
14117 pub fn new() -> Self {
14119 Self::default()
14120 }
14121
14122 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14124 self.freshness = Some(value);
14125 self
14126 }
14127
14128 pub fn cursor(mut self, value: impl Into<String>) -> Self {
14130 self.cursor = Some(value.into());
14131 self
14132 }
14133
14134 pub fn max_retries(mut self, value: u32) -> Self {
14136 self.request_options.max_retries = Some(value);
14137 self
14138 }
14139
14140 pub fn timeout(mut self, value: Duration) -> Self {
14142 self.request_options.timeout = Some(value);
14143 self
14144 }
14145
14146 pub(crate) fn query(&self) -> Result<Query, Error> {
14147 let mut query = Query::default();
14148 query.push("freshness", &self.freshness);
14149 query.push("cursor", &self.cursor);
14150 Ok(query)
14151 }
14152}
14153
14154pub type YouTubePostSoundPostsPage = Page<YouTubePost>;
14156
14157#[derive(Clone, Debug, Default, PartialEq)]
14159#[non_exhaustive]
14160pub struct YouTubePostStoryboardOptions {
14161 pub freshness: Option<crate::options::Freshness>,
14163 pub request_options: RequestOptions,
14165}
14166
14167impl YouTubePostStoryboardOptions {
14168 pub fn new() -> Self {
14170 Self::default()
14171 }
14172
14173 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14175 self.freshness = Some(value);
14176 self
14177 }
14178
14179 pub fn max_retries(mut self, value: u32) -> Self {
14181 self.request_options.max_retries = Some(value);
14182 self
14183 }
14184
14185 pub fn timeout(mut self, value: Duration) -> Self {
14187 self.request_options.timeout = Some(value);
14188 self
14189 }
14190
14191 pub(crate) fn query(&self) -> Result<Query, Error> {
14192 let mut query = Query::default();
14193 query.push("freshness", &self.freshness);
14194 Ok(query)
14195 }
14196}
14197
14198pub type YouTubePostStoryboardResponse = Response<YouTubeStoryboard>;
14200
14201#[derive(Clone, Debug, Default, PartialEq)]
14203#[non_exhaustive]
14204pub struct YouTubePostTranscriptOptions {
14205 pub language: Option<String>,
14207 pub freshness: Option<crate::options::Freshness>,
14209 pub request_options: RequestOptions,
14211}
14212
14213impl YouTubePostTranscriptOptions {
14214 pub fn new() -> Self {
14216 Self::default()
14217 }
14218
14219 pub fn language(mut self, value: impl Into<String>) -> Self {
14221 self.language = Some(value.into());
14222 self
14223 }
14224
14225 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14227 self.freshness = Some(value);
14228 self
14229 }
14230
14231 pub fn max_retries(mut self, value: u32) -> Self {
14233 self.request_options.max_retries = Some(value);
14234 self
14235 }
14236
14237 pub fn timeout(mut self, value: Duration) -> Self {
14239 self.request_options.timeout = Some(value);
14240 self
14241 }
14242
14243 pub(crate) fn query(&self) -> Result<Query, Error> {
14244 let mut query = Query::default();
14245 query.push("language", &self.language);
14246 query.push("freshness", &self.freshness);
14247 Ok(query)
14248 }
14249}
14250
14251pub type YouTubePostTranscriptResponse = Response<YouTubeTranscript>;
14253
14254#[derive(Clone, Debug, Default, PartialEq)]
14256#[non_exhaustive]
14257pub struct YouTubeProfileOptions {
14258 pub freshness: Option<crate::options::Freshness>,
14260 pub request_options: RequestOptions,
14262}
14263
14264impl YouTubeProfileOptions {
14265 pub fn new() -> Self {
14267 Self::default()
14268 }
14269
14270 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14272 self.freshness = Some(value);
14273 self
14274 }
14275
14276 pub fn max_retries(mut self, value: u32) -> Self {
14278 self.request_options.max_retries = Some(value);
14279 self
14280 }
14281
14282 pub fn timeout(mut self, value: Duration) -> Self {
14284 self.request_options.timeout = Some(value);
14285 self
14286 }
14287
14288 pub(crate) fn query(&self) -> Result<Query, Error> {
14289 let mut query = Query::default();
14290 query.push("freshness", &self.freshness);
14291 Ok(query)
14292 }
14293}
14294
14295pub type YouTubeProfileResponse = Response<YouTubeProfile>;
14297
14298#[derive(Clone, Debug, Default, PartialEq)]
14300#[non_exhaustive]
14301pub struct YouTubeProfileCommunityPostsOptions {
14302 pub freshness: Option<crate::options::Freshness>,
14304 pub cursor: Option<String>,
14306 pub request_options: RequestOptions,
14308}
14309
14310impl YouTubeProfileCommunityPostsOptions {
14311 pub fn new() -> Self {
14313 Self::default()
14314 }
14315
14316 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14318 self.freshness = Some(value);
14319 self
14320 }
14321
14322 pub fn cursor(mut self, value: impl Into<String>) -> Self {
14324 self.cursor = Some(value.into());
14325 self
14326 }
14327
14328 pub fn max_retries(mut self, value: u32) -> Self {
14330 self.request_options.max_retries = Some(value);
14331 self
14332 }
14333
14334 pub fn timeout(mut self, value: Duration) -> Self {
14336 self.request_options.timeout = Some(value);
14337 self
14338 }
14339
14340 pub(crate) fn query(&self) -> Result<Query, Error> {
14341 let mut query = Query::default();
14342 query.push("freshness", &self.freshness);
14343 query.push("cursor", &self.cursor);
14344 Ok(query)
14345 }
14346}
14347
14348pub type YouTubeProfileCommunityPostsPage = Page<YouTubeCommunityPost>;
14350
14351#[derive(Clone, Debug, Default, PartialEq)]
14353#[non_exhaustive]
14354pub struct YouTubeProfileLivestreamsOptions {
14355 pub sort: Option<String>,
14358 pub freshness: Option<crate::options::Freshness>,
14360 pub cursor: Option<String>,
14362 pub request_options: RequestOptions,
14364}
14365
14366impl YouTubeProfileLivestreamsOptions {
14367 pub fn new() -> Self {
14369 Self::default()
14370 }
14371
14372 pub fn sort(mut self, value: impl Into<String>) -> Self {
14375 self.sort = Some(value.into());
14376 self
14377 }
14378
14379 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14381 self.freshness = Some(value);
14382 self
14383 }
14384
14385 pub fn cursor(mut self, value: impl Into<String>) -> Self {
14387 self.cursor = Some(value.into());
14388 self
14389 }
14390
14391 pub fn max_retries(mut self, value: u32) -> Self {
14393 self.request_options.max_retries = Some(value);
14394 self
14395 }
14396
14397 pub fn timeout(mut self, value: Duration) -> Self {
14399 self.request_options.timeout = Some(value);
14400 self
14401 }
14402
14403 pub(crate) fn query(&self) -> Result<Query, Error> {
14404 let mut query = Query::default();
14405 query.push("sort", &self.sort);
14406 query.push("freshness", &self.freshness);
14407 query.push("cursor", &self.cursor);
14408 Ok(query)
14409 }
14410}
14411
14412pub type YouTubeProfileLivestreamsPage = Page<YouTubePost>;
14414
14415#[derive(Clone, Debug, Default, PartialEq)]
14417#[non_exhaustive]
14418pub struct YouTubeProfilePlaylistsOptions {
14419 pub freshness: Option<crate::options::Freshness>,
14421 pub cursor: Option<String>,
14423 pub request_options: RequestOptions,
14425}
14426
14427impl YouTubeProfilePlaylistsOptions {
14428 pub fn new() -> Self {
14430 Self::default()
14431 }
14432
14433 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14435 self.freshness = Some(value);
14436 self
14437 }
14438
14439 pub fn cursor(mut self, value: impl Into<String>) -> Self {
14441 self.cursor = Some(value.into());
14442 self
14443 }
14444
14445 pub fn max_retries(mut self, value: u32) -> Self {
14447 self.request_options.max_retries = Some(value);
14448 self
14449 }
14450
14451 pub fn timeout(mut self, value: Duration) -> Self {
14453 self.request_options.timeout = Some(value);
14454 self
14455 }
14456
14457 pub(crate) fn query(&self) -> Result<Query, Error> {
14458 let mut query = Query::default();
14459 query.push("freshness", &self.freshness);
14460 query.push("cursor", &self.cursor);
14461 Ok(query)
14462 }
14463}
14464
14465pub type YouTubeProfilePlaylistsPage = Page<YouTubePlaylist>;
14467
14468#[derive(Clone, Debug, Default, PartialEq)]
14470#[non_exhaustive]
14471pub struct YouTubeProfileProductsOptions {
14472 pub freshness: Option<crate::options::Freshness>,
14474 pub cursor: Option<String>,
14476 pub request_options: RequestOptions,
14478}
14479
14480impl YouTubeProfileProductsOptions {
14481 pub fn new() -> Self {
14483 Self::default()
14484 }
14485
14486 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14488 self.freshness = Some(value);
14489 self
14490 }
14491
14492 pub fn cursor(mut self, value: impl Into<String>) -> Self {
14494 self.cursor = Some(value.into());
14495 self
14496 }
14497
14498 pub fn max_retries(mut self, value: u32) -> Self {
14500 self.request_options.max_retries = Some(value);
14501 self
14502 }
14503
14504 pub fn timeout(mut self, value: Duration) -> Self {
14506 self.request_options.timeout = Some(value);
14507 self
14508 }
14509
14510 pub(crate) fn query(&self) -> Result<Query, Error> {
14511 let mut query = Query::default();
14512 query.push("freshness", &self.freshness);
14513 query.push("cursor", &self.cursor);
14514 Ok(query)
14515 }
14516}
14517
14518pub type YouTubeProfileProductsPage = Page<YouTubeProduct>;
14520
14521#[derive(Clone, Debug, PartialEq)]
14523#[non_exhaustive]
14524pub struct YouTubeProfileSearchOptions {
14525 pub q: String,
14527 pub freshness: Option<crate::options::Freshness>,
14529 pub cursor: Option<String>,
14531 pub request_options: RequestOptions,
14533}
14534
14535impl YouTubeProfileSearchOptions {
14536 pub fn new(q: impl Into<String>) -> Self {
14538 Self {
14539 q: q.into(),
14540 freshness: None,
14541 cursor: None,
14542 request_options: RequestOptions::default(),
14543 }
14544 }
14545
14546 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14548 self.freshness = Some(value);
14549 self
14550 }
14551
14552 pub fn cursor(mut self, value: impl Into<String>) -> Self {
14554 self.cursor = Some(value.into());
14555 self
14556 }
14557
14558 pub fn max_retries(mut self, value: u32) -> Self {
14560 self.request_options.max_retries = Some(value);
14561 self
14562 }
14563
14564 pub fn timeout(mut self, value: Duration) -> Self {
14566 self.request_options.timeout = Some(value);
14567 self
14568 }
14569
14570 pub(crate) fn query(&self) -> Result<Query, Error> {
14571 let mut query = Query::default();
14572 query.require("q", &self.q)?;
14573 query.push("freshness", &self.freshness);
14574 query.push("cursor", &self.cursor);
14575 Ok(query)
14576 }
14577}
14578
14579pub type YouTubeProfileSearchPage = Page<YouTubePost>;
14581
14582#[derive(Clone, Debug, Default, PartialEq)]
14584#[non_exhaustive]
14585pub struct YouTubeProfileShortsOptions {
14586 pub sort: Option<String>,
14589 pub freshness: Option<crate::options::Freshness>,
14591 pub cursor: Option<String>,
14593 pub request_options: RequestOptions,
14595}
14596
14597impl YouTubeProfileShortsOptions {
14598 pub fn new() -> Self {
14600 Self::default()
14601 }
14602
14603 pub fn sort(mut self, value: impl Into<String>) -> Self {
14606 self.sort = Some(value.into());
14607 self
14608 }
14609
14610 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14612 self.freshness = Some(value);
14613 self
14614 }
14615
14616 pub fn cursor(mut self, value: impl Into<String>) -> Self {
14618 self.cursor = Some(value.into());
14619 self
14620 }
14621
14622 pub fn max_retries(mut self, value: u32) -> Self {
14624 self.request_options.max_retries = Some(value);
14625 self
14626 }
14627
14628 pub fn timeout(mut self, value: Duration) -> Self {
14630 self.request_options.timeout = Some(value);
14631 self
14632 }
14633
14634 pub(crate) fn query(&self) -> Result<Query, Error> {
14635 let mut query = Query::default();
14636 query.push("sort", &self.sort);
14637 query.push("freshness", &self.freshness);
14638 query.push("cursor", &self.cursor);
14639 Ok(query)
14640 }
14641}
14642
14643pub type YouTubeProfileShortsPage = Page<YouTubePost>;
14645
14646#[derive(Clone, Debug, Default, PartialEq)]
14648#[non_exhaustive]
14649pub struct YouTubeProfileVideosOptions {
14650 pub sort: Option<String>,
14653 pub since: Option<chrono::DateTime<chrono::Utc>>,
14655 pub freshness: Option<crate::options::Freshness>,
14657 pub cursor: Option<String>,
14659 pub request_options: RequestOptions,
14661}
14662
14663impl YouTubeProfileVideosOptions {
14664 pub fn new() -> Self {
14666 Self::default()
14667 }
14668
14669 pub fn sort(mut self, value: impl Into<String>) -> Self {
14672 self.sort = Some(value.into());
14673 self
14674 }
14675
14676 pub fn since(mut self, value: chrono::DateTime<chrono::Utc>) -> Self {
14678 self.since = Some(value);
14679 self
14680 }
14681
14682 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14684 self.freshness = Some(value);
14685 self
14686 }
14687
14688 pub fn cursor(mut self, value: impl Into<String>) -> Self {
14690 self.cursor = Some(value.into());
14691 self
14692 }
14693
14694 pub fn max_retries(mut self, value: u32) -> Self {
14696 self.request_options.max_retries = Some(value);
14697 self
14698 }
14699
14700 pub fn timeout(mut self, value: Duration) -> Self {
14702 self.request_options.timeout = Some(value);
14703 self
14704 }
14705
14706 pub(crate) fn query(&self) -> Result<Query, Error> {
14707 let mut query = Query::default();
14708 query.push("sort", &self.sort);
14709 query.push("since", &self.since);
14710 query.push("freshness", &self.freshness);
14711 query.push("cursor", &self.cursor);
14712 Ok(query)
14713 }
14714}
14715
14716pub type YouTubeProfileVideosPage = Page<YouTubePost>;
14718
14719#[derive(Clone, Debug, PartialEq)]
14721#[non_exhaustive]
14722pub struct YouTubeSearchPlaylistsOptions {
14723 pub q: String,
14725 pub freshness: Option<crate::options::Freshness>,
14727 pub cursor: Option<String>,
14729 pub request_options: RequestOptions,
14731}
14732
14733impl YouTubeSearchPlaylistsOptions {
14734 pub fn new(q: impl Into<String>) -> Self {
14736 Self {
14737 q: q.into(),
14738 freshness: None,
14739 cursor: None,
14740 request_options: RequestOptions::default(),
14741 }
14742 }
14743
14744 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14746 self.freshness = Some(value);
14747 self
14748 }
14749
14750 pub fn cursor(mut self, value: impl Into<String>) -> Self {
14752 self.cursor = Some(value.into());
14753 self
14754 }
14755
14756 pub fn max_retries(mut self, value: u32) -> Self {
14758 self.request_options.max_retries = Some(value);
14759 self
14760 }
14761
14762 pub fn timeout(mut self, value: Duration) -> Self {
14764 self.request_options.timeout = Some(value);
14765 self
14766 }
14767
14768 pub(crate) fn query(&self) -> Result<Query, Error> {
14769 let mut query = Query::default();
14770 query.require("q", &self.q)?;
14771 query.push("freshness", &self.freshness);
14772 query.push("cursor", &self.cursor);
14773 Ok(query)
14774 }
14775}
14776
14777pub type YouTubeSearchPlaylistsPage = Page<YouTubePlaylist>;
14779
14780#[derive(Clone, Debug, PartialEq)]
14782#[non_exhaustive]
14783pub struct YouTubeSearchPostsOptions {
14784 pub q: String,
14786 pub sort: Option<String>,
14789 pub r#type: Option<String>,
14791 pub duration: Option<String>,
14794 pub uploaded: Option<String>,
14796 pub freshness: Option<crate::options::Freshness>,
14798 pub cursor: Option<String>,
14800 pub request_options: RequestOptions,
14802}
14803
14804impl YouTubeSearchPostsOptions {
14805 pub fn new(q: impl Into<String>) -> Self {
14807 Self {
14808 q: q.into(),
14809 sort: None,
14810 r#type: None,
14811 duration: None,
14812 uploaded: None,
14813 freshness: None,
14814 cursor: None,
14815 request_options: RequestOptions::default(),
14816 }
14817 }
14818
14819 pub fn sort(mut self, value: impl Into<String>) -> Self {
14822 self.sort = Some(value.into());
14823 self
14824 }
14825
14826 pub fn r#type(mut self, value: impl Into<String>) -> Self {
14828 self.r#type = Some(value.into());
14829 self
14830 }
14831
14832 pub fn duration(mut self, value: impl Into<String>) -> Self {
14835 self.duration = Some(value.into());
14836 self
14837 }
14838
14839 pub fn uploaded(mut self, value: impl Into<String>) -> Self {
14841 self.uploaded = Some(value.into());
14842 self
14843 }
14844
14845 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14847 self.freshness = Some(value);
14848 self
14849 }
14850
14851 pub fn cursor(mut self, value: impl Into<String>) -> Self {
14853 self.cursor = Some(value.into());
14854 self
14855 }
14856
14857 pub fn max_retries(mut self, value: u32) -> Self {
14859 self.request_options.max_retries = Some(value);
14860 self
14861 }
14862
14863 pub fn timeout(mut self, value: Duration) -> Self {
14865 self.request_options.timeout = Some(value);
14866 self
14867 }
14868
14869 pub(crate) fn query(&self) -> Result<Query, Error> {
14870 let mut query = Query::default();
14871 query.require("q", &self.q)?;
14872 query.push("sort", &self.sort);
14873 query.push("type", &self.r#type);
14874 query.push("duration", &self.duration);
14875 query.push("uploaded", &self.uploaded);
14876 query.push("freshness", &self.freshness);
14877 query.push("cursor", &self.cursor);
14878 Ok(query)
14879 }
14880}
14881
14882pub type YouTubeSearchPostsPage = Page<YouTubePost>;
14884
14885#[derive(Clone, Debug, PartialEq)]
14887#[non_exhaustive]
14888pub struct YouTubeSearchProfilesOptions {
14889 pub q: String,
14891 pub freshness: Option<crate::options::Freshness>,
14893 pub cursor: Option<String>,
14895 pub request_options: RequestOptions,
14897}
14898
14899impl YouTubeSearchProfilesOptions {
14900 pub fn new(q: impl Into<String>) -> Self {
14902 Self {
14903 q: q.into(),
14904 freshness: None,
14905 cursor: None,
14906 request_options: RequestOptions::default(),
14907 }
14908 }
14909
14910 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14912 self.freshness = Some(value);
14913 self
14914 }
14915
14916 pub fn cursor(mut self, value: impl Into<String>) -> Self {
14918 self.cursor = Some(value.into());
14919 self
14920 }
14921
14922 pub fn max_retries(mut self, value: u32) -> Self {
14924 self.request_options.max_retries = Some(value);
14925 self
14926 }
14927
14928 pub fn timeout(mut self, value: Duration) -> Self {
14930 self.request_options.timeout = Some(value);
14931 self
14932 }
14933
14934 pub(crate) fn query(&self) -> Result<Query, Error> {
14935 let mut query = Query::default();
14936 query.require("q", &self.q)?;
14937 query.push("freshness", &self.freshness);
14938 query.push("cursor", &self.cursor);
14939 Ok(query)
14940 }
14941}
14942
14943pub type YouTubeSearchProfilesPage = Page<YouTubeProfile>;
14945
14946#[derive(Clone, Debug, PartialEq)]
14948#[non_exhaustive]
14949pub struct YouTubeSearchSuggestionsOptions {
14950 pub q: String,
14952 pub freshness: Option<crate::options::Freshness>,
14954 pub request_options: RequestOptions,
14956}
14957
14958impl YouTubeSearchSuggestionsOptions {
14959 pub fn new(q: impl Into<String>) -> Self {
14961 Self {
14962 q: q.into(),
14963 freshness: None,
14964 request_options: RequestOptions::default(),
14965 }
14966 }
14967
14968 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
14970 self.freshness = Some(value);
14971 self
14972 }
14973
14974 pub fn max_retries(mut self, value: u32) -> Self {
14976 self.request_options.max_retries = Some(value);
14977 self
14978 }
14979
14980 pub fn timeout(mut self, value: Duration) -> Self {
14982 self.request_options.timeout = Some(value);
14983 self
14984 }
14985
14986 pub(crate) fn query(&self) -> Result<Query, Error> {
14987 let mut query = Query::default();
14988 query.require("q", &self.q)?;
14989 query.push("freshness", &self.freshness);
14990 Ok(query)
14991 }
14992}
14993
14994pub type YouTubeSearchSuggestionsResponse = Response<Vec<YouTubeSuggestion>>;
14996
14997#[derive(Clone, Debug, Default, PartialEq)]
14999#[non_exhaustive]
15000pub struct YouTubeTrendingPostsOptions {
15001 pub country: Option<String>,
15003 pub category: Option<String>,
15005 pub freshness: Option<crate::options::Freshness>,
15007 pub request_options: RequestOptions,
15009}
15010
15011impl YouTubeTrendingPostsOptions {
15012 pub fn new() -> Self {
15014 Self::default()
15015 }
15016
15017 pub fn country(mut self, value: impl Into<String>) -> Self {
15019 self.country = Some(value.into());
15020 self
15021 }
15022
15023 pub fn category(mut self, value: impl Into<String>) -> Self {
15025 self.category = Some(value.into());
15026 self
15027 }
15028
15029 pub fn freshness(mut self, value: crate::options::Freshness) -> Self {
15031 self.freshness = Some(value);
15032 self
15033 }
15034
15035 pub fn max_retries(mut self, value: u32) -> Self {
15037 self.request_options.max_retries = Some(value);
15038 self
15039 }
15040
15041 pub fn timeout(mut self, value: Duration) -> Self {
15043 self.request_options.timeout = Some(value);
15044 self
15045 }
15046
15047 pub(crate) fn query(&self) -> Result<Query, Error> {
15048 let mut query = Query::default();
15049 query.push("country", &self.country);
15050 query.push("category", &self.category);
15051 query.push("freshness", &self.freshness);
15052 Ok(query)
15053 }
15054}
15055
15056pub type YouTubeTrendingPostsResponse = Response<Vec<YouTubePost>>;