1use super::structs::*;
2use crate::generated::endpoints;
3use crate::Endpoint;
4use crate::Request;
5use bytes::Bytes;
6use std::collections::BTreeMap;
7
8impl crate::Forgejo {
9 pub fn activitypub_instance_actor(
11 &self,
12 ) -> Request<'_, endpoints::ActivitypubInstanceActor, ActivityPub> {
13 endpoints::ActivitypubInstanceActor {}
14 .make_request()
15 .wrap::<_, _>(self)
16 }
17
18 pub fn activitypub_instance_actor_inbox(
20 &self,
21 ) -> Request<'_, endpoints::ActivitypubInstanceActorInbox, ()> {
22 endpoints::ActivitypubInstanceActorInbox {}
23 .make_request()
24 .wrap::<_, _>(self)
25 }
26
27 pub fn activitypub_instance_actor_outbox(
29 &self,
30 ) -> Request<'_, endpoints::ActivitypubInstanceActorOutbox, Bytes> {
31 endpoints::ActivitypubInstanceActorOutbox {}
32 .make_request()
33 .wrap::<_, _>(self)
34 }
35
36 pub fn activitypub_repository(
40 &self,
41 repository_id: i64,
42 ) -> Request<'_, endpoints::ActivitypubRepository, ActivityPub> {
43 endpoints::ActivitypubRepository { repository_id }
44 .make_request()
45 .wrap::<_, _>(self)
46 }
47
48 pub fn activitypub_repository_inbox(
53 &self,
54 repository_id: i64,
55 body: ForgeLike,
56 ) -> Request<'_, endpoints::ActivitypubRepositoryInbox, ()> {
57 endpoints::ActivitypubRepositoryInbox {
58 repository_id,
59 body: body,
60 }
61 .make_request()
62 .wrap::<_, _>(self)
63 }
64
65 pub fn activitypub_repository_outbox(
69 &self,
70 repository_id: i64,
71 ) -> Request<'_, endpoints::ActivitypubRepositoryOutbox, Bytes> {
72 endpoints::ActivitypubRepositoryOutbox { repository_id }
73 .make_request()
74 .wrap::<_, _>(self)
75 }
76
77 pub fn activitypub_person(
81 &self,
82 user_id: i64,
83 ) -> Request<'_, endpoints::ActivitypubPerson, ActivityPub> {
84 endpoints::ActivitypubPerson { user_id }
85 .make_request()
86 .wrap::<_, _>(self)
87 }
88
89 pub fn activitypub_person_activity_note(
94 &self,
95 user_id: u32,
96 activity_id: u32,
97 ) -> Request<'_, endpoints::ActivitypubPersonActivityNote, ActivityPub> {
98 endpoints::ActivitypubPersonActivityNote {
99 user_id,
100 activity_id,
101 }
102 .make_request()
103 .wrap::<_, _>(self)
104 }
105
106 pub fn activitypub_person_activity(
111 &self,
112 user_id: u32,
113 activity_id: u32,
114 ) -> Request<'_, endpoints::ActivitypubPersonActivity, ActivityPub> {
115 endpoints::ActivitypubPersonActivity {
116 user_id,
117 activity_id,
118 }
119 .make_request()
120 .wrap::<_, _>(self)
121 }
122
123 pub fn activitypub_person_inbox(
127 &self,
128 user_id: i64,
129 ) -> Request<'_, endpoints::ActivitypubPersonInbox, ()> {
130 endpoints::ActivitypubPersonInbox { user_id }
131 .make_request()
132 .wrap::<_, _>(self)
133 }
134
135 pub fn activitypub_person_feed(
139 &self,
140 user_id: u32,
141 ) -> Request<'_, endpoints::ActivitypubPersonFeed, ForgeOutbox> {
142 endpoints::ActivitypubPersonFeed { user_id }
143 .make_request()
144 .wrap::<_, _>(self)
145 }
146
147 pub fn admin_cron_list(
150 &self,
151 ) -> Request<'_, endpoints::AdminCronList, (CronListHeaders, Vec<Cron>)> {
152 endpoints::AdminCronList {}
153 .make_request()
154 .wrap::<_, _>(self)
155 }
156
157 pub fn admin_cron_run(&self, task: &str) -> Request<'_, endpoints::AdminCronRun<'_>, ()> {
161 endpoints::AdminCronRun { task }
162 .make_request()
163 .wrap::<_, _>(self)
164 }
165
166 pub fn admin_get_all_emails(&self) -> Request<'_, endpoints::AdminGetAllEmails, Vec<Email>> {
169 endpoints::AdminGetAllEmails {}
170 .make_request()
171 .wrap::<_, _>(self)
172 }
173
174 pub fn admin_search_emails(
177 &self,
178 query: AdminSearchEmailsQuery,
179 ) -> Request<'_, endpoints::AdminSearchEmails, Vec<Email>> {
180 endpoints::AdminSearchEmails { query }
181 .make_request()
182 .wrap::<_, _>(self)
183 }
184
185 pub fn admin_list_hooks(&self) -> Request<'_, endpoints::AdminListHooks, Vec<Hook>> {
188 endpoints::AdminListHooks {}
189 .make_request()
190 .wrap::<_, _>(self)
191 }
192
193 pub fn admin_create_hook(
197 &self,
198 body: CreateHookOption,
199 ) -> Request<'_, endpoints::AdminCreateHook, Hook> {
200 endpoints::AdminCreateHook { body: body }
201 .make_request()
202 .wrap::<_, _>(self)
203 }
204
205 pub fn admin_get_hook(&self, id: i64) -> Request<'_, endpoints::AdminGetHook, Hook> {
209 endpoints::AdminGetHook { id }
210 .make_request()
211 .wrap::<_, _>(self)
212 }
213
214 pub fn admin_delete_hook(&self, id: i64) -> Request<'_, endpoints::AdminDeleteHook, ()> {
218 endpoints::AdminDeleteHook { id }
219 .make_request()
220 .wrap::<_, _>(self)
221 }
222
223 pub fn admin_edit_hook(
228 &self,
229 id: i64,
230 body: EditHookOption,
231 ) -> Request<'_, endpoints::AdminEditHook, Hook> {
232 endpoints::AdminEditHook { id, body: body }
233 .make_request()
234 .wrap::<_, _>(self)
235 }
236
237 pub fn admin_get_all_orgs(
240 &self,
241 ) -> Request<'_, endpoints::AdminGetAllOrgs, (OrganizationListHeaders, Vec<Organization>)> {
242 endpoints::AdminGetAllOrgs {}
243 .make_request()
244 .wrap::<_, _>(self)
245 }
246
247 pub fn admin_list_quota_groups(
249 &self,
250 ) -> Request<'_, endpoints::AdminListQuotaGroups, Vec<QuotaGroup>> {
251 endpoints::AdminListQuotaGroups {}
252 .make_request()
253 .wrap::<_, _>(self)
254 }
255
256 pub fn admin_create_quota_group(
262 &self,
263 group: CreateQuotaGroupOptions,
264 ) -> Request<'_, endpoints::AdminCreateQuotaGroup, QuotaGroup> {
265 endpoints::AdminCreateQuotaGroup { body: group }
266 .make_request()
267 .wrap::<_, _>(self)
268 }
269
270 pub fn admin_get_quota_group(
274 &self,
275 quotagroup: &str,
276 ) -> Request<'_, endpoints::AdminGetQuotaGroup<'_>, QuotaGroup> {
277 endpoints::AdminGetQuotaGroup { quotagroup }
278 .make_request()
279 .wrap::<_, _>(self)
280 }
281
282 pub fn admin_delete_quota_group(
286 &self,
287 quotagroup: &str,
288 ) -> Request<'_, endpoints::AdminDeleteQuotaGroup<'_>, ()> {
289 endpoints::AdminDeleteQuotaGroup { quotagroup }
290 .make_request()
291 .wrap::<_, _>(self)
292 }
293
294 pub fn admin_add_rule_to_quota_group(
299 &self,
300 quotagroup: &str,
301 quotarule: &str,
302 ) -> Request<'_, endpoints::AdminAddRuleToQuotaGroup<'_>, ()> {
303 endpoints::AdminAddRuleToQuotaGroup {
304 quotagroup,
305 quotarule,
306 }
307 .make_request()
308 .wrap::<_, _>(self)
309 }
310
311 pub fn admin_remove_rule_from_quota_group(
316 &self,
317 quotagroup: &str,
318 quotarule: &str,
319 ) -> Request<'_, endpoints::AdminRemoveRuleFromQuotaGroup<'_>, ()> {
320 endpoints::AdminRemoveRuleFromQuotaGroup {
321 quotagroup,
322 quotarule,
323 }
324 .make_request()
325 .wrap::<_, _>(self)
326 }
327
328 pub fn admin_list_users_in_quota_group(
332 &self,
333 quotagroup: &str,
334 ) -> Request<'_, endpoints::AdminListUsersInQuotaGroup<'_>, (UserListHeaders, Vec<User>)> {
335 endpoints::AdminListUsersInQuotaGroup { quotagroup }
336 .make_request()
337 .wrap::<_, _>(self)
338 }
339
340 pub fn admin_add_user_to_quota_group(
345 &self,
346 quotagroup: &str,
347 username: &str,
348 ) -> Request<'_, endpoints::AdminAddUserToQuotaGroup<'_>, ()> {
349 endpoints::AdminAddUserToQuotaGroup {
350 quotagroup,
351 username,
352 }
353 .make_request()
354 .wrap::<_, _>(self)
355 }
356
357 pub fn admin_remove_user_from_quota_group(
362 &self,
363 quotagroup: &str,
364 username: &str,
365 ) -> Request<'_, endpoints::AdminRemoveUserFromQuotaGroup<'_>, ()> {
366 endpoints::AdminRemoveUserFromQuotaGroup {
367 quotagroup,
368 username,
369 }
370 .make_request()
371 .wrap::<_, _>(self)
372 }
373
374 pub fn admin_list_quota_rules(
376 &self,
377 ) -> Request<'_, endpoints::AdminListQuotaRules, Vec<QuotaRuleInfo>> {
378 endpoints::AdminListQuotaRules {}
379 .make_request()
380 .wrap::<_, _>(self)
381 }
382
383 pub fn admin_create_quota_rule(
389 &self,
390 rule: CreateQuotaRuleOptions,
391 ) -> Request<'_, endpoints::AdminCreateQuotaRule, QuotaRuleInfo> {
392 endpoints::AdminCreateQuotaRule { body: rule }
393 .make_request()
394 .wrap::<_, _>(self)
395 }
396
397 pub fn admin_get_quota_rule(
401 &self,
402 quotarule: &str,
403 ) -> Request<'_, endpoints::AdminGetQuotaRule<'_>, QuotaRuleInfo> {
404 endpoints::AdminGetQuotaRule { quotarule }
405 .make_request()
406 .wrap::<_, _>(self)
407 }
408
409 pub fn admin_delete_quota_rule(
413 &self,
414 quotarule: &str,
415 ) -> Request<'_, endpoints::AdminDeleteQuotaRule<'_>, ()> {
416 endpoints::AdminDeleteQuotaRule { quotarule }
417 .make_request()
418 .wrap::<_, _>(self)
419 }
420
421 pub fn admin_edit_quota_rule(
426 &self,
427 quotarule: &str,
428 rule: EditQuotaRuleOptions,
429 ) -> Request<'_, endpoints::AdminEditQuotaRule<'_>, QuotaRuleInfo> {
430 endpoints::AdminEditQuotaRule {
431 quotarule,
432 body: rule,
433 }
434 .make_request()
435 .wrap::<_, _>(self)
436 }
437
438 pub fn admin_search_run_jobs(
441 &self,
442 query: AdminSearchRunJobsQuery,
443 ) -> Request<'_, endpoints::AdminSearchRunJobs, Vec<ActionRunJob>> {
444 endpoints::AdminSearchRunJobs { query }
445 .make_request()
446 .wrap::<_, _>(self)
447 }
448
449 pub fn admin_get_runner_registration_token(
451 &self,
452 ) -> Request<'_, endpoints::AdminGetRunnerRegistrationToken, RegistrationToken> {
453 endpoints::AdminGetRunnerRegistrationToken {}
454 .make_request()
455 .wrap::<_, _>(self)
456 }
457
458 pub fn admin_unadopted_list(
461 &self,
462 query: AdminUnadoptedListQuery,
463 ) -> Request<'_, endpoints::AdminUnadoptedList, Vec<String>> {
464 endpoints::AdminUnadoptedList { query }
465 .make_request()
466 .wrap::<_, _>(self)
467 }
468
469 pub fn admin_adopt_repository(
474 &self,
475 owner: &str,
476 repo: &str,
477 ) -> Request<'_, endpoints::AdminAdoptRepository<'_>, ()> {
478 endpoints::AdminAdoptRepository { owner, repo }
479 .make_request()
480 .wrap::<_, _>(self)
481 }
482
483 pub fn admin_delete_unadopted_repository(
488 &self,
489 owner: &str,
490 repo: &str,
491 ) -> Request<'_, endpoints::AdminDeleteUnadoptedRepository<'_>, ()> {
492 endpoints::AdminDeleteUnadoptedRepository { owner, repo }
493 .make_request()
494 .wrap::<_, _>(self)
495 }
496
497 pub fn admin_search_users(
500 &self,
501 query: AdminSearchUsersQuery,
502 ) -> Request<'_, endpoints::AdminSearchUsers, (UserListHeaders, Vec<User>)> {
503 endpoints::AdminSearchUsers { query }
504 .make_request()
505 .wrap::<_, _>(self)
506 }
507
508 pub fn admin_create_user(
512 &self,
513 body: CreateUserOption,
514 ) -> Request<'_, endpoints::AdminCreateUser, User> {
515 endpoints::AdminCreateUser { body: body }
516 .make_request()
517 .wrap::<_, _>(self)
518 }
519
520 pub fn admin_delete_user(
524 &self,
525 username: &str,
526 query: AdminDeleteUserQuery,
527 ) -> Request<'_, endpoints::AdminDeleteUser<'_>, ()> {
528 endpoints::AdminDeleteUser { username, query }
529 .make_request()
530 .wrap::<_, _>(self)
531 }
532
533 pub fn admin_edit_user(
538 &self,
539 username: &str,
540 body: EditUserOption,
541 ) -> Request<'_, endpoints::AdminEditUser<'_>, User> {
542 endpoints::AdminEditUser {
543 username,
544 body: body,
545 }
546 .make_request()
547 .wrap::<_, _>(self)
548 }
549
550 pub fn admin_list_user_emails(
554 &self,
555 username: &str,
556 ) -> Request<'_, endpoints::AdminListUserEmails<'_>, Vec<Email>> {
557 endpoints::AdminListUserEmails { username }
558 .make_request()
559 .wrap::<_, _>(self)
560 }
561
562 pub fn admin_delete_user_emails(
567 &self,
568 username: &str,
569 body: DeleteEmailOption,
570 ) -> Request<'_, endpoints::AdminDeleteUserEmails<'_>, ()> {
571 endpoints::AdminDeleteUserEmails {
572 username,
573 body: body,
574 }
575 .make_request()
576 .wrap::<_, _>(self)
577 }
578
579 pub fn admin_create_public_key(
584 &self,
585 username: &str,
586 key: CreateKeyOption,
587 ) -> Request<'_, endpoints::AdminCreatePublicKey<'_>, PublicKey> {
588 endpoints::AdminCreatePublicKey {
589 username,
590 body: key,
591 }
592 .make_request()
593 .wrap::<_, _>(self)
594 }
595
596 pub fn admin_delete_user_public_key(
601 &self,
602 username: &str,
603 id: i64,
604 ) -> Request<'_, endpoints::AdminDeleteUserPublicKey<'_>, ()> {
605 endpoints::AdminDeleteUserPublicKey { username, id }
606 .make_request()
607 .wrap::<_, _>(self)
608 }
609
610 pub fn admin_create_org(
615 &self,
616 username: &str,
617 organization: CreateOrgOption,
618 ) -> Request<'_, endpoints::AdminCreateOrg<'_>, Organization> {
619 endpoints::AdminCreateOrg {
620 username,
621 body: organization,
622 }
623 .make_request()
624 .wrap::<_, _>(self)
625 }
626
627 pub fn admin_get_user_quota(
631 &self,
632 username: &str,
633 ) -> Request<'_, endpoints::AdminGetUserQuota<'_>, QuotaInfo> {
634 endpoints::AdminGetUserQuota { username }
635 .make_request()
636 .wrap::<_, _>(self)
637 }
638
639 pub fn admin_set_user_quota_groups(
646 &self,
647 username: &str,
648 groups: SetUserQuotaGroupsOptions,
649 ) -> Request<'_, endpoints::AdminSetUserQuotaGroups<'_>, ()> {
650 endpoints::AdminSetUserQuotaGroups {
651 username,
652 body: groups,
653 }
654 .make_request()
655 .wrap::<_, _>(self)
656 }
657
658 pub fn admin_rename_user(
663 &self,
664 username: &str,
665 body: RenameUserOption,
666 ) -> Request<'_, endpoints::AdminRenameUser<'_>, ()> {
667 endpoints::AdminRenameUser {
668 username,
669 body: body,
670 }
671 .make_request()
672 .wrap::<_, _>(self)
673 }
674
675 pub fn admin_create_repo(
680 &self,
681 username: &str,
682 repository: CreateRepoOption,
683 ) -> Request<'_, endpoints::AdminCreateRepo<'_>, Repository> {
684 endpoints::AdminCreateRepo {
685 username,
686 body: repository,
687 }
688 .make_request()
689 .wrap::<_, _>(self)
690 }
691
692 pub fn list_gitignores_templates(
694 &self,
695 ) -> Request<'_, endpoints::ListGitignoresTemplates, Vec<String>> {
696 endpoints::ListGitignoresTemplates {}
697 .make_request()
698 .wrap::<_, _>(self)
699 }
700
701 pub fn get_gitignore_template_info(
705 &self,
706 name: &str,
707 ) -> Request<'_, endpoints::GetGitignoreTemplateInfo<'_>, GitignoreTemplateInfo> {
708 endpoints::GetGitignoreTemplateInfo { name }
709 .make_request()
710 .wrap::<_, _>(self)
711 }
712
713 pub fn list_label_templates(&self) -> Request<'_, endpoints::ListLabelTemplates, Vec<String>> {
715 endpoints::ListLabelTemplates {}
716 .make_request()
717 .wrap::<_, _>(self)
718 }
719
720 pub fn get_label_template_info(
724 &self,
725 name: &str,
726 ) -> Request<'_, endpoints::GetLabelTemplateInfo<'_>, Vec<LabelTemplate>> {
727 endpoints::GetLabelTemplateInfo { name }
728 .make_request()
729 .wrap::<_, _>(self)
730 }
731
732 pub fn list_license_templates(
734 &self,
735 ) -> Request<'_, endpoints::ListLicenseTemplates, Vec<LicensesTemplateListEntry>> {
736 endpoints::ListLicenseTemplates {}
737 .make_request()
738 .wrap::<_, _>(self)
739 }
740
741 pub fn get_license_template_info(
745 &self,
746 name: &str,
747 ) -> Request<'_, endpoints::GetLicenseTemplateInfo<'_>, LicenseTemplateInfo> {
748 endpoints::GetLicenseTemplateInfo { name }
749 .make_request()
750 .wrap::<_, _>(self)
751 }
752
753 pub fn render_markdown(
757 &self,
758 body: MarkdownOption,
759 ) -> Request<'_, endpoints::RenderMarkdown, String> {
760 endpoints::RenderMarkdown { body: body }
761 .make_request()
762 .wrap::<_, _>(self)
763 }
764
765 pub fn render_markdown_raw(
771 &self,
772 body: String,
773 ) -> Request<'_, endpoints::RenderMarkdownRaw, String> {
774 endpoints::RenderMarkdownRaw { body: body }
775 .make_request()
776 .wrap::<_, _>(self)
777 }
778
779 pub fn render_markup(
783 &self,
784 body: MarkupOption,
785 ) -> Request<'_, endpoints::RenderMarkup, String> {
786 endpoints::RenderMarkup { body: body }
787 .make_request()
788 .wrap::<_, _>(self)
789 }
790
791 pub fn get_node_info(&self) -> Request<'_, endpoints::GetNodeInfo, NodeInfo> {
793 endpoints::GetNodeInfo {}.make_request().wrap::<_, _>(self)
794 }
795
796 pub fn notify_get_list(
799 &self,
800 query: NotifyGetListQuery,
801 ) -> Request<
802 '_,
803 endpoints::NotifyGetList,
804 (NotificationThreadListHeaders, Vec<NotificationThread>),
805 > {
806 endpoints::NotifyGetList { query }
807 .make_request()
808 .wrap::<_, _>(self)
809 }
810
811 pub fn notify_read_list(
814 &self,
815 query: NotifyReadListQuery,
816 ) -> Request<'_, endpoints::NotifyReadList, Vec<NotificationThread>> {
817 endpoints::NotifyReadList { query }
818 .make_request()
819 .wrap::<_, _>(self)
820 }
821
822 pub fn notify_new_available(
824 &self,
825 ) -> Request<'_, endpoints::NotifyNewAvailable, NotificationCount> {
826 endpoints::NotifyNewAvailable {}
827 .make_request()
828 .wrap::<_, _>(self)
829 }
830
831 pub fn notify_get_thread(
835 &self,
836 id: i64,
837 ) -> Request<'_, endpoints::NotifyGetThread, NotificationThread> {
838 endpoints::NotifyGetThread { id }
839 .make_request()
840 .wrap::<_, _>(self)
841 }
842
843 pub fn notify_read_thread(
847 &self,
848 id: i64,
849 query: NotifyReadThreadQuery,
850 ) -> Request<'_, endpoints::NotifyReadThread, NotificationThread> {
851 endpoints::NotifyReadThread { id, query }
852 .make_request()
853 .wrap::<_, _>(self)
854 }
855
856 pub fn create_org_repo_deprecated(
861 &self,
862 org: &str,
863 body: CreateRepoOption,
864 ) -> Request<'_, endpoints::CreateOrgRepoDeprecated<'_>, Repository> {
865 endpoints::CreateOrgRepoDeprecated { org, body: body }
866 .make_request()
867 .wrap::<_, _>(self)
868 }
869
870 pub fn org_get_all(
873 &self,
874 ) -> Request<'_, endpoints::OrgGetAll, (OrganizationListHeaders, Vec<Organization>)> {
875 endpoints::OrgGetAll {}.make_request().wrap::<_, _>(self)
876 }
877
878 pub fn org_create(
882 &self,
883 organization: CreateOrgOption,
884 ) -> Request<'_, endpoints::OrgCreate, Organization> {
885 endpoints::OrgCreate { body: organization }
886 .make_request()
887 .wrap::<_, _>(self)
888 }
889
890 pub fn org_get(&self, org: &str) -> Request<'_, endpoints::OrgGet<'_>, Organization> {
894 endpoints::OrgGet { org }.make_request().wrap::<_, _>(self)
895 }
896
897 pub fn org_delete(&self, org: &str) -> Request<'_, endpoints::OrgDelete<'_>, ()> {
901 endpoints::OrgDelete { org }
902 .make_request()
903 .wrap::<_, _>(self)
904 }
905
906 pub fn org_edit(
911 &self,
912 org: &str,
913 body: EditOrgOption,
914 ) -> Request<'_, endpoints::OrgEdit<'_>, Organization> {
915 endpoints::OrgEdit { org, body: body }
916 .make_request()
917 .wrap::<_, _>(self)
918 }
919
920 pub fn org_search_run_jobs(
924 &self,
925 org: &str,
926 query: OrgSearchRunJobsQuery,
927 ) -> Request<'_, endpoints::OrgSearchRunJobs<'_>, Vec<ActionRunJob>> {
928 endpoints::OrgSearchRunJobs { org, query }
929 .make_request()
930 .wrap::<_, _>(self)
931 }
932
933 pub fn org_get_runner_registration_token(
937 &self,
938 org: &str,
939 ) -> Request<'_, endpoints::OrgGetRunnerRegistrationToken<'_>, RegistrationToken> {
940 endpoints::OrgGetRunnerRegistrationToken { org }
941 .make_request()
942 .wrap::<_, _>(self)
943 }
944
945 pub fn org_list_actions_secrets(
949 &self,
950 org: &str,
951 ) -> Request<'_, endpoints::OrgListActionsSecrets<'_>, (SecretListHeaders, Vec<Secret>)> {
952 endpoints::OrgListActionsSecrets { org }
953 .make_request()
954 .wrap::<_, _>(self)
955 }
956
957 pub fn update_org_secret(
963 &self,
964 org: &str,
965 secretname: &str,
966 body: CreateOrUpdateSecretOption,
967 ) -> Request<'_, endpoints::UpdateOrgSecret<'_>, ()> {
968 endpoints::UpdateOrgSecret {
969 org,
970 secretname,
971 body: body,
972 }
973 .make_request()
974 .wrap::<_, _>(self)
975 }
976
977 pub fn delete_org_secret(
982 &self,
983 org: &str,
984 secretname: &str,
985 ) -> Request<'_, endpoints::DeleteOrgSecret<'_>, ()> {
986 endpoints::DeleteOrgSecret { org, secretname }
987 .make_request()
988 .wrap::<_, _>(self)
989 }
990
991 pub fn get_org_variables_list(
995 &self,
996 org: &str,
997 ) -> Request<'_, endpoints::GetOrgVariablesList<'_>, (VariableListHeaders, Vec<ActionVariable>)>
998 {
999 endpoints::GetOrgVariablesList { org }
1000 .make_request()
1001 .wrap::<_, _>(self)
1002 }
1003
1004 pub fn get_org_variable(
1009 &self,
1010 org: &str,
1011 variablename: &str,
1012 ) -> Request<'_, endpoints::GetOrgVariable<'_>, ActionVariable> {
1013 endpoints::GetOrgVariable { org, variablename }
1014 .make_request()
1015 .wrap::<_, _>(self)
1016 }
1017
1018 pub fn update_org_variable(
1024 &self,
1025 org: &str,
1026 variablename: &str,
1027 body: UpdateVariableOption,
1028 ) -> Request<'_, endpoints::UpdateOrgVariable<'_>, ()> {
1029 endpoints::UpdateOrgVariable {
1030 org,
1031 variablename,
1032 body: body,
1033 }
1034 .make_request()
1035 .wrap::<_, _>(self)
1036 }
1037
1038 pub fn create_org_variable(
1044 &self,
1045 org: &str,
1046 variablename: &str,
1047 body: CreateVariableOption,
1048 ) -> Request<'_, endpoints::CreateOrgVariable<'_>, ()> {
1049 endpoints::CreateOrgVariable {
1050 org,
1051 variablename,
1052 body: body,
1053 }
1054 .make_request()
1055 .wrap::<_, _>(self)
1056 }
1057
1058 pub fn delete_org_variable(
1063 &self,
1064 org: &str,
1065 variablename: &str,
1066 ) -> Request<'_, endpoints::DeleteOrgVariable<'_>, ()> {
1067 endpoints::DeleteOrgVariable { org, variablename }
1068 .make_request()
1069 .wrap::<_, _>(self)
1070 }
1071
1072 pub fn org_list_activity_feeds(
1076 &self,
1077 org: &str,
1078 query: OrgListActivityFeedsQuery,
1079 ) -> Request<'_, endpoints::OrgListActivityFeeds<'_>, (ActivityFeedsListHeaders, Vec<Activity>)>
1080 {
1081 endpoints::OrgListActivityFeeds { org, query }
1082 .make_request()
1083 .wrap::<_, _>(self)
1084 }
1085
1086 pub fn org_update_avatar(
1091 &self,
1092 org: &str,
1093 body: UpdateUserAvatarOption,
1094 ) -> Request<'_, endpoints::OrgUpdateAvatar<'_>, ()> {
1095 endpoints::OrgUpdateAvatar { org, body: body }
1096 .make_request()
1097 .wrap::<_, _>(self)
1098 }
1099
1100 pub fn org_delete_avatar(&self, org: &str) -> Request<'_, endpoints::OrgDeleteAvatar<'_>, ()> {
1104 endpoints::OrgDeleteAvatar { org }
1105 .make_request()
1106 .wrap::<_, _>(self)
1107 }
1108
1109 pub fn org_block_user(
1114 &self,
1115 org: &str,
1116 username: &str,
1117 ) -> Request<'_, endpoints::OrgBlockUser<'_>, ()> {
1118 endpoints::OrgBlockUser { org, username }
1119 .make_request()
1120 .wrap::<_, _>(self)
1121 }
1122
1123 pub fn org_list_hooks(&self, org: &str) -> Request<'_, endpoints::OrgListHooks<'_>, Vec<Hook>> {
1127 endpoints::OrgListHooks { org }
1128 .make_request()
1129 .wrap::<_, _>(self)
1130 }
1131
1132 pub fn org_create_hook(
1137 &self,
1138 org: &str,
1139 body: CreateHookOption,
1140 ) -> Request<'_, endpoints::OrgCreateHook<'_>, Hook> {
1141 endpoints::OrgCreateHook { org, body: body }
1142 .make_request()
1143 .wrap::<_, _>(self)
1144 }
1145
1146 pub fn org_get_hook(&self, org: &str, id: i64) -> Request<'_, endpoints::OrgGetHook<'_>, Hook> {
1151 endpoints::OrgGetHook { org, id }
1152 .make_request()
1153 .wrap::<_, _>(self)
1154 }
1155
1156 pub fn org_delete_hook(
1161 &self,
1162 org: &str,
1163 id: i64,
1164 ) -> Request<'_, endpoints::OrgDeleteHook<'_>, ()> {
1165 endpoints::OrgDeleteHook { org, id }
1166 .make_request()
1167 .wrap::<_, _>(self)
1168 }
1169
1170 pub fn org_edit_hook(
1176 &self,
1177 org: &str,
1178 id: i64,
1179 body: EditHookOption,
1180 ) -> Request<'_, endpoints::OrgEditHook<'_>, Hook> {
1181 endpoints::OrgEditHook {
1182 org,
1183 id,
1184 body: body,
1185 }
1186 .make_request()
1187 .wrap::<_, _>(self)
1188 }
1189
1190 pub fn org_list_labels(
1194 &self,
1195 org: &str,
1196 query: OrgListLabelsQuery,
1197 ) -> Request<'_, endpoints::OrgListLabels<'_>, (LabelListHeaders, Vec<Label>)> {
1198 endpoints::OrgListLabels { org, query }
1199 .make_request()
1200 .wrap::<_, _>(self)
1201 }
1202
1203 pub fn org_create_label(
1208 &self,
1209 org: &str,
1210 body: CreateLabelOption,
1211 ) -> Request<'_, endpoints::OrgCreateLabel<'_>, Label> {
1212 endpoints::OrgCreateLabel { org, body: body }
1213 .make_request()
1214 .wrap::<_, _>(self)
1215 }
1216
1217 pub fn org_get_label(
1222 &self,
1223 org: &str,
1224 id: i64,
1225 ) -> Request<'_, endpoints::OrgGetLabel<'_>, Label> {
1226 endpoints::OrgGetLabel { org, id }
1227 .make_request()
1228 .wrap::<_, _>(self)
1229 }
1230
1231 pub fn org_delete_label(
1236 &self,
1237 org: &str,
1238 id: i64,
1239 ) -> Request<'_, endpoints::OrgDeleteLabel<'_>, ()> {
1240 endpoints::OrgDeleteLabel { org, id }
1241 .make_request()
1242 .wrap::<_, _>(self)
1243 }
1244
1245 pub fn org_edit_label(
1251 &self,
1252 org: &str,
1253 id: i64,
1254 body: EditLabelOption,
1255 ) -> Request<'_, endpoints::OrgEditLabel<'_>, Label> {
1256 endpoints::OrgEditLabel {
1257 org,
1258 id,
1259 body: body,
1260 }
1261 .make_request()
1262 .wrap::<_, _>(self)
1263 }
1264
1265 pub fn org_list_blocked_users(
1269 &self,
1270 org: &str,
1271 ) -> Request<'_, endpoints::OrgListBlockedUsers<'_>, (BlockedUserListHeaders, Vec<BlockedUser>)>
1272 {
1273 endpoints::OrgListBlockedUsers { org }
1274 .make_request()
1275 .wrap::<_, _>(self)
1276 }
1277
1278 pub fn org_list_members(
1282 &self,
1283 org: &str,
1284 ) -> Request<'_, endpoints::OrgListMembers<'_>, (UserListHeaders, Vec<User>)> {
1285 endpoints::OrgListMembers { org }
1286 .make_request()
1287 .wrap::<_, _>(self)
1288 }
1289
1290 pub fn org_is_member(
1295 &self,
1296 org: &str,
1297 username: &str,
1298 ) -> Request<'_, endpoints::OrgIsMember<'_>, ()> {
1299 endpoints::OrgIsMember { org, username }
1300 .make_request()
1301 .wrap::<_, _>(self)
1302 }
1303
1304 pub fn org_delete_member(
1309 &self,
1310 org: &str,
1311 username: &str,
1312 ) -> Request<'_, endpoints::OrgDeleteMember<'_>, ()> {
1313 endpoints::OrgDeleteMember { org, username }
1314 .make_request()
1315 .wrap::<_, _>(self)
1316 }
1317
1318 pub fn org_list_public_members(
1322 &self,
1323 org: &str,
1324 ) -> Request<'_, endpoints::OrgListPublicMembers<'_>, (UserListHeaders, Vec<User>)> {
1325 endpoints::OrgListPublicMembers { org }
1326 .make_request()
1327 .wrap::<_, _>(self)
1328 }
1329
1330 pub fn org_is_public_member(
1335 &self,
1336 org: &str,
1337 username: &str,
1338 ) -> Request<'_, endpoints::OrgIsPublicMember<'_>, ()> {
1339 endpoints::OrgIsPublicMember { org, username }
1340 .make_request()
1341 .wrap::<_, _>(self)
1342 }
1343
1344 pub fn org_publicize_member(
1349 &self,
1350 org: &str,
1351 username: &str,
1352 ) -> Request<'_, endpoints::OrgPublicizeMember<'_>, ()> {
1353 endpoints::OrgPublicizeMember { org, username }
1354 .make_request()
1355 .wrap::<_, _>(self)
1356 }
1357
1358 pub fn org_conceal_member(
1363 &self,
1364 org: &str,
1365 username: &str,
1366 ) -> Request<'_, endpoints::OrgConcealMember<'_>, ()> {
1367 endpoints::OrgConcealMember { org, username }
1368 .make_request()
1369 .wrap::<_, _>(self)
1370 }
1371
1372 pub fn org_get_quota(&self, org: &str) -> Request<'_, endpoints::OrgGetQuota<'_>, QuotaInfo> {
1376 endpoints::OrgGetQuota { org }
1377 .make_request()
1378 .wrap::<_, _>(self)
1379 }
1380
1381 pub fn org_list_quota_artifacts(
1385 &self,
1386 org: &str,
1387 ) -> Request<
1388 '_,
1389 endpoints::OrgListQuotaArtifacts<'_>,
1390 (QuotaUsedArtifactListHeaders, Vec<QuotaUsedArtifact>),
1391 > {
1392 endpoints::OrgListQuotaArtifacts { org }
1393 .make_request()
1394 .wrap::<_, _>(self)
1395 }
1396
1397 pub fn org_list_quota_attachments(
1401 &self,
1402 org: &str,
1403 ) -> Request<
1404 '_,
1405 endpoints::OrgListQuotaAttachments<'_>,
1406 (QuotaUsedAttachmentListHeaders, Vec<QuotaUsedAttachment>),
1407 > {
1408 endpoints::OrgListQuotaAttachments { org }
1409 .make_request()
1410 .wrap::<_, _>(self)
1411 }
1412
1413 pub fn org_check_quota(
1417 &self,
1418 org: &str,
1419 query: OrgCheckQuotaQuery,
1420 ) -> Request<'_, endpoints::OrgCheckQuota<'_>, bool> {
1421 endpoints::OrgCheckQuota { org, query }
1422 .make_request()
1423 .wrap::<_, _>(self)
1424 }
1425
1426 pub fn org_list_quota_packages(
1430 &self,
1431 org: &str,
1432 ) -> Request<
1433 '_,
1434 endpoints::OrgListQuotaPackages<'_>,
1435 (QuotaUsedPackageListHeaders, Vec<QuotaUsedPackage>),
1436 > {
1437 endpoints::OrgListQuotaPackages { org }
1438 .make_request()
1439 .wrap::<_, _>(self)
1440 }
1441
1442 pub fn rename_org(
1447 &self,
1448 org: &str,
1449 body: RenameOrgOption,
1450 ) -> Request<'_, endpoints::RenameOrg<'_>, ()> {
1451 endpoints::RenameOrg { org, body: body }
1452 .make_request()
1453 .wrap::<_, _>(self)
1454 }
1455
1456 pub fn org_list_repos(
1460 &self,
1461 org: &str,
1462 ) -> Request<'_, endpoints::OrgListRepos<'_>, (RepositoryListHeaders, Vec<Repository>)> {
1463 endpoints::OrgListRepos { org }
1464 .make_request()
1465 .wrap::<_, _>(self)
1466 }
1467
1468 pub fn create_org_repo(
1473 &self,
1474 org: &str,
1475 body: CreateRepoOption,
1476 ) -> Request<'_, endpoints::CreateOrgRepo<'_>, Repository> {
1477 endpoints::CreateOrgRepo { org, body: body }
1478 .make_request()
1479 .wrap::<_, _>(self)
1480 }
1481
1482 pub fn org_list_teams(
1486 &self,
1487 org: &str,
1488 ) -> Request<'_, endpoints::OrgListTeams<'_>, (TeamListHeaders, Vec<Team>)> {
1489 endpoints::OrgListTeams { org }
1490 .make_request()
1491 .wrap::<_, _>(self)
1492 }
1493
1494 pub fn org_create_team(
1499 &self,
1500 org: &str,
1501 body: CreateTeamOption,
1502 ) -> Request<'_, endpoints::OrgCreateTeam<'_>, Team> {
1503 endpoints::OrgCreateTeam { org, body: body }
1504 .make_request()
1505 .wrap::<_, _>(self)
1506 }
1507
1508 pub fn team_search(
1512 &self,
1513 org: &str,
1514 query: TeamSearchQuery,
1515 ) -> Request<'_, endpoints::TeamSearch<'_>, TeamSearchResults> {
1516 endpoints::TeamSearch { org, query }
1517 .make_request()
1518 .wrap::<_, _>(self)
1519 }
1520
1521 pub fn org_unblock_user(
1526 &self,
1527 org: &str,
1528 username: &str,
1529 ) -> Request<'_, endpoints::OrgUnblockUser<'_>, ()> {
1530 endpoints::OrgUnblockUser { org, username }
1531 .make_request()
1532 .wrap::<_, _>(self)
1533 }
1534
1535 pub fn list_packages(
1539 &self,
1540 owner: &str,
1541 query: ListPackagesQuery,
1542 ) -> Request<'_, endpoints::ListPackages<'_>, (PackageListHeaders, Vec<Package>)> {
1543 endpoints::ListPackages { owner, query }
1544 .make_request()
1545 .wrap::<_, _>(self)
1546 }
1547
1548 pub fn link_package(
1555 &self,
1556 owner: &str,
1557 r#type: &str,
1558 name: &str,
1559 repo_name: &str,
1560 ) -> Request<'_, endpoints::LinkPackage<'_>, ()> {
1561 endpoints::LinkPackage {
1562 owner,
1563 r#type,
1564 name,
1565 repo_name,
1566 }
1567 .make_request()
1568 .wrap::<_, _>(self)
1569 }
1570
1571 pub fn unlink_package(
1577 &self,
1578 owner: &str,
1579 r#type: &str,
1580 name: &str,
1581 ) -> Request<'_, endpoints::UnlinkPackage<'_>, ()> {
1582 endpoints::UnlinkPackage {
1583 owner,
1584 r#type,
1585 name,
1586 }
1587 .make_request()
1588 .wrap::<_, _>(self)
1589 }
1590
1591 pub fn get_package(
1598 &self,
1599 owner: &str,
1600 r#type: &str,
1601 name: &str,
1602 version: &str,
1603 ) -> Request<'_, endpoints::GetPackage<'_>, Package> {
1604 endpoints::GetPackage {
1605 owner,
1606 r#type,
1607 name,
1608 version,
1609 }
1610 .make_request()
1611 .wrap::<_, _>(self)
1612 }
1613
1614 pub fn delete_package(
1621 &self,
1622 owner: &str,
1623 r#type: &str,
1624 name: &str,
1625 version: &str,
1626 ) -> Request<'_, endpoints::DeletePackage<'_>, ()> {
1627 endpoints::DeletePackage {
1628 owner,
1629 r#type,
1630 name,
1631 version,
1632 }
1633 .make_request()
1634 .wrap::<_, _>(self)
1635 }
1636
1637 pub fn list_package_files(
1644 &self,
1645 owner: &str,
1646 r#type: &str,
1647 name: &str,
1648 version: &str,
1649 ) -> Request<'_, endpoints::ListPackageFiles<'_>, Vec<PackageFile>> {
1650 endpoints::ListPackageFiles {
1651 owner,
1652 r#type,
1653 name,
1654 version,
1655 }
1656 .make_request()
1657 .wrap::<_, _>(self)
1658 }
1659
1660 pub fn issue_search_issues(
1663 &self,
1664 query: IssueSearchIssuesQuery,
1665 ) -> Request<'_, endpoints::IssueSearchIssues, (IssueListHeaders, Vec<Issue>)> {
1666 endpoints::IssueSearchIssues { query }
1667 .make_request()
1668 .wrap::<_, _>(self)
1669 }
1670
1671 pub fn repo_migrate(
1675 &self,
1676 body: MigrateRepoOptions,
1677 ) -> Request<'_, endpoints::RepoMigrate, Repository> {
1678 endpoints::RepoMigrate { body: body }
1679 .make_request()
1680 .wrap::<_, _>(self)
1681 }
1682
1683 pub fn repo_search(
1686 &self,
1687 query: RepoSearchQuery,
1688 ) -> Request<'_, endpoints::RepoSearch, SearchResults> {
1689 endpoints::RepoSearch { query }
1690 .make_request()
1691 .wrap::<_, _>(self)
1692 }
1693
1694 pub fn repo_get(
1699 &self,
1700 owner: &str,
1701 repo: &str,
1702 ) -> Request<'_, endpoints::RepoGet<'_>, Repository> {
1703 endpoints::RepoGet { owner, repo }
1704 .make_request()
1705 .wrap::<_, _>(self)
1706 }
1707
1708 pub fn repo_delete(
1713 &self,
1714 owner: &str,
1715 repo: &str,
1716 ) -> Request<'_, endpoints::RepoDelete<'_>, ()> {
1717 endpoints::RepoDelete { owner, repo }
1718 .make_request()
1719 .wrap::<_, _>(self)
1720 }
1721
1722 pub fn repo_edit(
1730 &self,
1731 owner: &str,
1732 repo: &str,
1733 body: EditRepoOption,
1734 ) -> Request<'_, endpoints::RepoEdit<'_>, Repository> {
1735 endpoints::RepoEdit {
1736 owner,
1737 repo,
1738 body: body,
1739 }
1740 .make_request()
1741 .wrap::<_, _>(self)
1742 }
1743
1744 pub fn repo_search_run_jobs(
1749 &self,
1750 owner: &str,
1751 repo: &str,
1752 query: RepoSearchRunJobsQuery,
1753 ) -> Request<'_, endpoints::RepoSearchRunJobs<'_>, Vec<ActionRunJob>> {
1754 endpoints::RepoSearchRunJobs { owner, repo, query }
1755 .make_request()
1756 .wrap::<_, _>(self)
1757 }
1758
1759 pub fn repo_get_runner_registration_token(
1764 &self,
1765 owner: &str,
1766 repo: &str,
1767 ) -> Request<'_, endpoints::RepoGetRunnerRegistrationToken<'_>, RegistrationToken> {
1768 endpoints::RepoGetRunnerRegistrationToken { owner, repo }
1769 .make_request()
1770 .wrap::<_, _>(self)
1771 }
1772
1773 pub fn list_action_runs(
1778 &self,
1779 owner: &str,
1780 repo: &str,
1781 query: ListActionRunsQuery,
1782 ) -> Request<'_, endpoints::ListActionRuns<'_>, ListActionRunResponse> {
1783 endpoints::ListActionRuns { owner, repo, query }
1784 .make_request()
1785 .wrap::<_, _>(self)
1786 }
1787
1788 pub fn get_action_run(
1794 &self,
1795 owner: &str,
1796 repo: &str,
1797 run_id: i64,
1798 ) -> Request<'_, endpoints::GetActionRun<'_>, ActionRun> {
1799 endpoints::GetActionRun {
1800 owner,
1801 repo,
1802 run_id,
1803 }
1804 .make_request()
1805 .wrap::<_, _>(self)
1806 }
1807
1808 pub fn repo_list_actions_secrets(
1813 &self,
1814 owner: &str,
1815 repo: &str,
1816 ) -> Request<'_, endpoints::RepoListActionsSecrets<'_>, (SecretListHeaders, Vec<Secret>)> {
1817 endpoints::RepoListActionsSecrets { owner, repo }
1818 .make_request()
1819 .wrap::<_, _>(self)
1820 }
1821
1822 pub fn update_repo_secret(
1829 &self,
1830 owner: &str,
1831 repo: &str,
1832 secretname: &str,
1833 body: CreateOrUpdateSecretOption,
1834 ) -> Request<'_, endpoints::UpdateRepoSecret<'_>, ()> {
1835 endpoints::UpdateRepoSecret {
1836 owner,
1837 repo,
1838 secretname,
1839 body: body,
1840 }
1841 .make_request()
1842 .wrap::<_, _>(self)
1843 }
1844
1845 pub fn delete_repo_secret(
1851 &self,
1852 owner: &str,
1853 repo: &str,
1854 secretname: &str,
1855 ) -> Request<'_, endpoints::DeleteRepoSecret<'_>, ()> {
1856 endpoints::DeleteRepoSecret {
1857 owner,
1858 repo,
1859 secretname,
1860 }
1861 .make_request()
1862 .wrap::<_, _>(self)
1863 }
1864
1865 pub fn list_action_tasks(
1870 &self,
1871 owner: &str,
1872 repo: &str,
1873 ) -> Request<'_, endpoints::ListActionTasks<'_>, ActionTaskResponse> {
1874 endpoints::ListActionTasks { owner, repo }
1875 .make_request()
1876 .wrap::<_, _>(self)
1877 }
1878
1879 pub fn get_repo_variables_list(
1884 &self,
1885 owner: &str,
1886 repo: &str,
1887 ) -> Request<'_, endpoints::GetRepoVariablesList<'_>, (VariableListHeaders, Vec<ActionVariable>)>
1888 {
1889 endpoints::GetRepoVariablesList { owner, repo }
1890 .make_request()
1891 .wrap::<_, _>(self)
1892 }
1893
1894 pub fn get_repo_variable(
1900 &self,
1901 owner: &str,
1902 repo: &str,
1903 variablename: &str,
1904 ) -> Request<'_, endpoints::GetRepoVariable<'_>, ActionVariable> {
1905 endpoints::GetRepoVariable {
1906 owner,
1907 repo,
1908 variablename,
1909 }
1910 .make_request()
1911 .wrap::<_, _>(self)
1912 }
1913
1914 pub fn update_repo_variable(
1921 &self,
1922 owner: &str,
1923 repo: &str,
1924 variablename: &str,
1925 body: UpdateVariableOption,
1926 ) -> Request<'_, endpoints::UpdateRepoVariable<'_>, ()> {
1927 endpoints::UpdateRepoVariable {
1928 owner,
1929 repo,
1930 variablename,
1931 body: body,
1932 }
1933 .make_request()
1934 .wrap::<_, _>(self)
1935 }
1936
1937 pub fn create_repo_variable(
1944 &self,
1945 owner: &str,
1946 repo: &str,
1947 variablename: &str,
1948 body: CreateVariableOption,
1949 ) -> Request<'_, endpoints::CreateRepoVariable<'_>, ()> {
1950 endpoints::CreateRepoVariable {
1951 owner,
1952 repo,
1953 variablename,
1954 body: body,
1955 }
1956 .make_request()
1957 .wrap::<_, _>(self)
1958 }
1959
1960 pub fn delete_repo_variable(
1966 &self,
1967 owner: &str,
1968 repo: &str,
1969 variablename: &str,
1970 ) -> Request<'_, endpoints::DeleteRepoVariable<'_>, ()> {
1971 endpoints::DeleteRepoVariable {
1972 owner,
1973 repo,
1974 variablename,
1975 }
1976 .make_request()
1977 .wrap::<_, _>(self)
1978 }
1979
1980 pub fn dispatch_workflow(
1987 &self,
1988 owner: &str,
1989 repo: &str,
1990 workflowfilename: &str,
1991 body: DispatchWorkflowOption,
1992 ) -> Request<'_, endpoints::DispatchWorkflow<'_>, Option<DispatchWorkflowRun>> {
1993 endpoints::DispatchWorkflow {
1994 owner,
1995 repo,
1996 workflowfilename,
1997 body: body,
1998 }
1999 .make_request()
2000 .wrap::<_, _>(self)
2001 }
2002
2003 pub fn repo_list_activity_feeds(
2008 &self,
2009 owner: &str,
2010 repo: &str,
2011 query: RepoListActivityFeedsQuery,
2012 ) -> Request<'_, endpoints::RepoListActivityFeeds<'_>, (ActivityFeedsListHeaders, Vec<Activity>)>
2013 {
2014 endpoints::RepoListActivityFeeds { owner, repo, query }
2015 .make_request()
2016 .wrap::<_, _>(self)
2017 }
2018
2019 pub fn repo_get_archive(
2025 &self,
2026 owner: &str,
2027 repo: &str,
2028 archive: &str,
2029 ) -> Request<'_, endpoints::RepoGetArchive<'_>, Bytes> {
2030 endpoints::RepoGetArchive {
2031 owner,
2032 repo,
2033 archive,
2034 }
2035 .make_request()
2036 .wrap::<_, _>(self)
2037 }
2038
2039 pub fn repo_get_assignees(
2044 &self,
2045 owner: &str,
2046 repo: &str,
2047 ) -> Request<'_, endpoints::RepoGetAssignees<'_>, (UserListHeaders, Vec<User>)> {
2048 endpoints::RepoGetAssignees { owner, repo }
2049 .make_request()
2050 .wrap::<_, _>(self)
2051 }
2052
2053 pub fn repo_update_avatar(
2059 &self,
2060 owner: &str,
2061 repo: &str,
2062 body: UpdateRepoAvatarOption,
2063 ) -> Request<'_, endpoints::RepoUpdateAvatar<'_>, ()> {
2064 endpoints::RepoUpdateAvatar {
2065 owner,
2066 repo,
2067 body: body,
2068 }
2069 .make_request()
2070 .wrap::<_, _>(self)
2071 }
2072
2073 pub fn repo_delete_avatar(
2078 &self,
2079 owner: &str,
2080 repo: &str,
2081 ) -> Request<'_, endpoints::RepoDeleteAvatar<'_>, ()> {
2082 endpoints::RepoDeleteAvatar { owner, repo }
2083 .make_request()
2084 .wrap::<_, _>(self)
2085 }
2086
2087 pub fn repo_list_branch_protection(
2092 &self,
2093 owner: &str,
2094 repo: &str,
2095 ) -> Request<'_, endpoints::RepoListBranchProtection<'_>, Vec<BranchProtection>> {
2096 endpoints::RepoListBranchProtection { owner, repo }
2097 .make_request()
2098 .wrap::<_, _>(self)
2099 }
2100
2101 pub fn repo_create_branch_protection(
2107 &self,
2108 owner: &str,
2109 repo: &str,
2110 body: CreateBranchProtectionOption,
2111 ) -> Request<'_, endpoints::RepoCreateBranchProtection<'_>, BranchProtection> {
2112 endpoints::RepoCreateBranchProtection {
2113 owner,
2114 repo,
2115 body: body,
2116 }
2117 .make_request()
2118 .wrap::<_, _>(self)
2119 }
2120
2121 pub fn repo_get_branch_protection(
2127 &self,
2128 owner: &str,
2129 repo: &str,
2130 name: &str,
2131 ) -> Request<'_, endpoints::RepoGetBranchProtection<'_>, BranchProtection> {
2132 endpoints::RepoGetBranchProtection { owner, repo, name }
2133 .make_request()
2134 .wrap::<_, _>(self)
2135 }
2136
2137 pub fn repo_delete_branch_protection(
2143 &self,
2144 owner: &str,
2145 repo: &str,
2146 name: &str,
2147 ) -> Request<'_, endpoints::RepoDeleteBranchProtection<'_>, ()> {
2148 endpoints::RepoDeleteBranchProtection { owner, repo, name }
2149 .make_request()
2150 .wrap::<_, _>(self)
2151 }
2152
2153 pub fn repo_edit_branch_protection(
2160 &self,
2161 owner: &str,
2162 repo: &str,
2163 name: &str,
2164 body: EditBranchProtectionOption,
2165 ) -> Request<'_, endpoints::RepoEditBranchProtection<'_>, BranchProtection> {
2166 endpoints::RepoEditBranchProtection {
2167 owner,
2168 repo,
2169 name,
2170 body: body,
2171 }
2172 .make_request()
2173 .wrap::<_, _>(self)
2174 }
2175
2176 pub fn repo_list_branches(
2181 &self,
2182 owner: &str,
2183 repo: &str,
2184 ) -> Request<'_, endpoints::RepoListBranches<'_>, (BranchListHeaders, Vec<Branch>)> {
2185 endpoints::RepoListBranches { owner, repo }
2186 .make_request()
2187 .wrap::<_, _>(self)
2188 }
2189
2190 pub fn repo_create_branch(
2196 &self,
2197 owner: &str,
2198 repo: &str,
2199 body: CreateBranchRepoOption,
2200 ) -> Request<'_, endpoints::RepoCreateBranch<'_>, Branch> {
2201 endpoints::RepoCreateBranch {
2202 owner,
2203 repo,
2204 body: body,
2205 }
2206 .make_request()
2207 .wrap::<_, _>(self)
2208 }
2209
2210 pub fn repo_get_branch(
2216 &self,
2217 owner: &str,
2218 repo: &str,
2219 branch: &str,
2220 ) -> Request<'_, endpoints::RepoGetBranch<'_>, Branch> {
2221 endpoints::RepoGetBranch {
2222 owner,
2223 repo,
2224 branch,
2225 }
2226 .make_request()
2227 .wrap::<_, _>(self)
2228 }
2229
2230 pub fn repo_delete_branch(
2236 &self,
2237 owner: &str,
2238 repo: &str,
2239 branch: &str,
2240 ) -> Request<'_, endpoints::RepoDeleteBranch<'_>, ()> {
2241 endpoints::RepoDeleteBranch {
2242 owner,
2243 repo,
2244 branch,
2245 }
2246 .make_request()
2247 .wrap::<_, _>(self)
2248 }
2249
2250 pub fn repo_update_branch(
2257 &self,
2258 owner: &str,
2259 repo: &str,
2260 branch: &str,
2261 body: UpdateBranchRepoOption,
2262 ) -> Request<'_, endpoints::RepoUpdateBranch<'_>, ()> {
2263 endpoints::RepoUpdateBranch {
2264 owner,
2265 repo,
2266 branch,
2267 body: body,
2268 }
2269 .make_request()
2270 .wrap::<_, _>(self)
2271 }
2272
2273 pub fn repo_list_collaborators(
2278 &self,
2279 owner: &str,
2280 repo: &str,
2281 ) -> Request<'_, endpoints::RepoListCollaborators<'_>, (UserListHeaders, Vec<User>)> {
2282 endpoints::RepoListCollaborators { owner, repo }
2283 .make_request()
2284 .wrap::<_, _>(self)
2285 }
2286
2287 pub fn repo_check_collaborator(
2293 &self,
2294 owner: &str,
2295 repo: &str,
2296 collaborator: &str,
2297 ) -> Request<'_, endpoints::RepoCheckCollaborator<'_>, ()> {
2298 endpoints::RepoCheckCollaborator {
2299 owner,
2300 repo,
2301 collaborator,
2302 }
2303 .make_request()
2304 .wrap::<_, _>(self)
2305 }
2306
2307 pub fn repo_add_collaborator(
2314 &self,
2315 owner: &str,
2316 repo: &str,
2317 collaborator: &str,
2318 body: AddCollaboratorOption,
2319 ) -> Request<'_, endpoints::RepoAddCollaborator<'_>, ()> {
2320 endpoints::RepoAddCollaborator {
2321 owner,
2322 repo,
2323 collaborator,
2324 body: body,
2325 }
2326 .make_request()
2327 .wrap::<_, _>(self)
2328 }
2329
2330 pub fn repo_delete_collaborator(
2336 &self,
2337 owner: &str,
2338 repo: &str,
2339 collaborator: &str,
2340 ) -> Request<'_, endpoints::RepoDeleteCollaborator<'_>, ()> {
2341 endpoints::RepoDeleteCollaborator {
2342 owner,
2343 repo,
2344 collaborator,
2345 }
2346 .make_request()
2347 .wrap::<_, _>(self)
2348 }
2349
2350 pub fn repo_get_repo_permissions(
2356 &self,
2357 owner: &str,
2358 repo: &str,
2359 collaborator: &str,
2360 ) -> Request<'_, endpoints::RepoGetRepoPermissions<'_>, RepoCollaboratorPermission> {
2361 endpoints::RepoGetRepoPermissions {
2362 owner,
2363 repo,
2364 collaborator,
2365 }
2366 .make_request()
2367 .wrap::<_, _>(self)
2368 }
2369
2370 pub fn repo_get_all_commits(
2375 &self,
2376 owner: &str,
2377 repo: &str,
2378 query: RepoGetAllCommitsQuery,
2379 ) -> Request<'_, endpoints::RepoGetAllCommits<'_>, (CommitListHeaders, Vec<Commit>)> {
2380 endpoints::RepoGetAllCommits { owner, repo, query }
2381 .make_request()
2382 .wrap::<_, _>(self)
2383 }
2384
2385 pub fn repo_get_combined_status_by_ref(
2391 &self,
2392 owner: &str,
2393 repo: &str,
2394 r#ref: &str,
2395 ) -> Request<
2396 '_,
2397 endpoints::RepoGetCombinedStatusByRef<'_>,
2398 (CombinedStatusHeaders, CombinedStatus),
2399 > {
2400 endpoints::RepoGetCombinedStatusByRef { owner, repo, r#ref }
2401 .make_request()
2402 .wrap::<_, _>(self)
2403 }
2404
2405 pub fn repo_list_statuses_by_ref(
2411 &self,
2412 owner: &str,
2413 repo: &str,
2414 r#ref: &str,
2415 query: RepoListStatusesByRefQuery,
2416 ) -> Request<
2417 '_,
2418 endpoints::RepoListStatusesByRef<'_>,
2419 (CommitStatusListHeaders, Vec<CommitStatus>),
2420 > {
2421 endpoints::RepoListStatusesByRef {
2422 owner,
2423 repo,
2424 r#ref,
2425 query,
2426 }
2427 .make_request()
2428 .wrap::<_, _>(self)
2429 }
2430
2431 pub fn repo_get_commit_pull_request(
2437 &self,
2438 owner: &str,
2439 repo: &str,
2440 sha: &str,
2441 ) -> Request<'_, endpoints::RepoGetCommitPullRequest<'_>, PullRequest> {
2442 endpoints::RepoGetCommitPullRequest { owner, repo, sha }
2443 .make_request()
2444 .wrap::<_, _>(self)
2445 }
2446
2447 pub fn repo_compare_diff(
2453 &self,
2454 owner: &str,
2455 repo: &str,
2456 basehead: &str,
2457 ) -> Request<'_, endpoints::RepoCompareDiff<'_>, Compare> {
2458 endpoints::RepoCompareDiff {
2459 owner,
2460 repo,
2461 basehead,
2462 }
2463 .make_request()
2464 .wrap::<_, _>(self)
2465 }
2466
2467 pub fn repo_get_contents_list(
2472 &self,
2473 owner: &str,
2474 repo: &str,
2475 query: RepoGetContentsListQuery,
2476 ) -> Request<'_, endpoints::RepoGetContentsList<'_>, Vec<ContentsResponse>> {
2477 endpoints::RepoGetContentsList { owner, repo, query }
2478 .make_request()
2479 .wrap::<_, _>(self)
2480 }
2481
2482 pub fn repo_change_files(
2488 &self,
2489 owner: &str,
2490 repo: &str,
2491 body: ChangeFilesOptions,
2492 ) -> Request<'_, endpoints::RepoChangeFiles<'_>, FilesResponse> {
2493 endpoints::RepoChangeFiles {
2494 owner,
2495 repo,
2496 body: body,
2497 }
2498 .make_request()
2499 .wrap::<_, _>(self)
2500 }
2501
2502 pub fn repo_get_contents(
2508 &self,
2509 owner: &str,
2510 repo: &str,
2511 filepath: &str,
2512 query: RepoGetContentsQuery,
2513 ) -> Request<'_, endpoints::RepoGetContents<'_>, ContentsResponse> {
2514 endpoints::RepoGetContents {
2515 owner,
2516 repo,
2517 filepath,
2518 query,
2519 }
2520 .make_request()
2521 .wrap::<_, _>(self)
2522 }
2523
2524 pub fn repo_update_file(
2531 &self,
2532 owner: &str,
2533 repo: &str,
2534 filepath: &str,
2535 body: UpdateFileOptions,
2536 ) -> Request<'_, endpoints::RepoUpdateFile<'_>, FileResponse> {
2537 endpoints::RepoUpdateFile {
2538 owner,
2539 repo,
2540 filepath,
2541 body: body,
2542 }
2543 .make_request()
2544 .wrap::<_, _>(self)
2545 }
2546
2547 pub fn repo_create_file(
2554 &self,
2555 owner: &str,
2556 repo: &str,
2557 filepath: &str,
2558 body: CreateFileOptions,
2559 ) -> Request<'_, endpoints::RepoCreateFile<'_>, FileResponse> {
2560 endpoints::RepoCreateFile {
2561 owner,
2562 repo,
2563 filepath,
2564 body: body,
2565 }
2566 .make_request()
2567 .wrap::<_, _>(self)
2568 }
2569
2570 pub fn repo_delete_file(
2577 &self,
2578 owner: &str,
2579 repo: &str,
2580 filepath: &str,
2581 body: DeleteFileOptions,
2582 ) -> Request<'_, endpoints::RepoDeleteFile<'_>, FileDeleteResponse> {
2583 endpoints::RepoDeleteFile {
2584 owner,
2585 repo,
2586 filepath,
2587 body: body,
2588 }
2589 .make_request()
2590 .wrap::<_, _>(self)
2591 }
2592
2593 pub fn repo_convert(
2598 &self,
2599 owner: &str,
2600 repo: &str,
2601 ) -> Request<'_, endpoints::RepoConvert<'_>, Repository> {
2602 endpoints::RepoConvert { owner, repo }
2603 .make_request()
2604 .wrap::<_, _>(self)
2605 }
2606
2607 pub fn repo_apply_diff_patch(
2613 &self,
2614 owner: &str,
2615 repo: &str,
2616 body: UpdateFileOptions,
2617 ) -> Request<'_, endpoints::RepoApplyDiffPatch<'_>, FileResponse> {
2618 endpoints::RepoApplyDiffPatch {
2619 owner,
2620 repo,
2621 body: body,
2622 }
2623 .make_request()
2624 .wrap::<_, _>(self)
2625 }
2626
2627 pub fn repo_get_editor_config(
2633 &self,
2634 owner: &str,
2635 repo: &str,
2636 filepath: &str,
2637 query: RepoGetEditorConfigQuery,
2638 ) -> Request<'_, endpoints::RepoGetEditorConfig<'_>, BTreeMap<String, String>> {
2639 endpoints::RepoGetEditorConfig {
2640 owner,
2641 repo,
2642 filepath,
2643 query,
2644 }
2645 .make_request()
2646 .wrap::<_, _>(self)
2647 }
2648
2649 pub fn repo_list_flags(
2654 &self,
2655 owner: &str,
2656 repo: &str,
2657 ) -> Request<'_, endpoints::RepoListFlags<'_>, Vec<String>> {
2658 endpoints::RepoListFlags { owner, repo }
2659 .make_request()
2660 .wrap::<_, _>(self)
2661 }
2662
2663 pub fn repo_replace_all_flags(
2669 &self,
2670 owner: &str,
2671 repo: &str,
2672 body: ReplaceFlagsOption,
2673 ) -> Request<'_, endpoints::RepoReplaceAllFlags<'_>, ()> {
2674 endpoints::RepoReplaceAllFlags {
2675 owner,
2676 repo,
2677 body: body,
2678 }
2679 .make_request()
2680 .wrap::<_, _>(self)
2681 }
2682
2683 pub fn repo_delete_all_flags(
2688 &self,
2689 owner: &str,
2690 repo: &str,
2691 ) -> Request<'_, endpoints::RepoDeleteAllFlags<'_>, ()> {
2692 endpoints::RepoDeleteAllFlags { owner, repo }
2693 .make_request()
2694 .wrap::<_, _>(self)
2695 }
2696
2697 pub fn repo_check_flag(
2703 &self,
2704 owner: &str,
2705 repo: &str,
2706 flag: &str,
2707 ) -> Request<'_, endpoints::RepoCheckFlag<'_>, ()> {
2708 endpoints::RepoCheckFlag { owner, repo, flag }
2709 .make_request()
2710 .wrap::<_, _>(self)
2711 }
2712
2713 pub fn repo_add_flag(
2719 &self,
2720 owner: &str,
2721 repo: &str,
2722 flag: &str,
2723 ) -> Request<'_, endpoints::RepoAddFlag<'_>, ()> {
2724 endpoints::RepoAddFlag { owner, repo, flag }
2725 .make_request()
2726 .wrap::<_, _>(self)
2727 }
2728
2729 pub fn repo_delete_flag(
2735 &self,
2736 owner: &str,
2737 repo: &str,
2738 flag: &str,
2739 ) -> Request<'_, endpoints::RepoDeleteFlag<'_>, ()> {
2740 endpoints::RepoDeleteFlag { owner, repo, flag }
2741 .make_request()
2742 .wrap::<_, _>(self)
2743 }
2744
2745 pub fn list_forks(
2750 &self,
2751 owner: &str,
2752 repo: &str,
2753 ) -> Request<'_, endpoints::ListForks<'_>, (RepositoryListHeaders, Vec<Repository>)> {
2754 endpoints::ListForks { owner, repo }
2755 .make_request()
2756 .wrap::<_, _>(self)
2757 }
2758
2759 pub fn create_fork(
2765 &self,
2766 owner: &str,
2767 repo: &str,
2768 body: CreateForkOption,
2769 ) -> Request<'_, endpoints::CreateFork<'_>, Repository> {
2770 endpoints::CreateFork {
2771 owner,
2772 repo,
2773 body: body,
2774 }
2775 .make_request()
2776 .wrap::<_, _>(self)
2777 }
2778
2779 pub fn get_blobs(
2784 &self,
2785 owner: &str,
2786 repo: &str,
2787 query: GetBlobsQuery,
2788 ) -> Request<'_, endpoints::GetBlobs<'_>, Vec<GitBlob>> {
2789 endpoints::GetBlobs { owner, repo, query }
2790 .make_request()
2791 .wrap::<_, _>(self)
2792 }
2793
2794 pub fn get_blob(
2800 &self,
2801 owner: &str,
2802 repo: &str,
2803 sha: &str,
2804 ) -> Request<'_, endpoints::GetBlob<'_>, GitBlob> {
2805 endpoints::GetBlob { owner, repo, sha }
2806 .make_request()
2807 .wrap::<_, _>(self)
2808 }
2809
2810 pub fn repo_get_single_commit(
2816 &self,
2817 owner: &str,
2818 repo: &str,
2819 sha: &str,
2820 query: RepoGetSingleCommitQuery,
2821 ) -> Request<'_, endpoints::RepoGetSingleCommit<'_>, Commit> {
2822 endpoints::RepoGetSingleCommit {
2823 owner,
2824 repo,
2825 sha,
2826 query,
2827 }
2828 .make_request()
2829 .wrap::<_, _>(self)
2830 }
2831
2832 pub fn repo_download_commit_diff_or_patch(
2839 &self,
2840 owner: &str,
2841 repo: &str,
2842 sha: &str,
2843 diff_type: &str,
2844 ) -> Request<'_, endpoints::RepoDownloadCommitDiffOrPatch<'_>, String> {
2845 endpoints::RepoDownloadCommitDiffOrPatch {
2846 owner,
2847 repo,
2848 sha,
2849 diff_type,
2850 }
2851 .make_request()
2852 .wrap::<_, _>(self)
2853 }
2854
2855 pub fn repo_get_note(
2861 &self,
2862 owner: &str,
2863 repo: &str,
2864 sha: &str,
2865 query: RepoGetNoteQuery,
2866 ) -> Request<'_, endpoints::RepoGetNote<'_>, Note> {
2867 endpoints::RepoGetNote {
2868 owner,
2869 repo,
2870 sha,
2871 query,
2872 }
2873 .make_request()
2874 .wrap::<_, _>(self)
2875 }
2876
2877 pub fn repo_set_note(
2884 &self,
2885 owner: &str,
2886 repo: &str,
2887 sha: &str,
2888 body: NoteOptions,
2889 ) -> Request<'_, endpoints::RepoSetNote<'_>, Note> {
2890 endpoints::RepoSetNote {
2891 owner,
2892 repo,
2893 sha,
2894 body: body,
2895 }
2896 .make_request()
2897 .wrap::<_, _>(self)
2898 }
2899
2900 pub fn repo_remove_note(
2906 &self,
2907 owner: &str,
2908 repo: &str,
2909 sha: &str,
2910 ) -> Request<'_, endpoints::RepoRemoveNote<'_>, ()> {
2911 endpoints::RepoRemoveNote { owner, repo, sha }
2912 .make_request()
2913 .wrap::<_, _>(self)
2914 }
2915
2916 pub fn repo_list_all_git_refs(
2921 &self,
2922 owner: &str,
2923 repo: &str,
2924 ) -> Request<'_, endpoints::RepoListAllGitRefs<'_>, Vec<Reference>> {
2925 endpoints::RepoListAllGitRefs { owner, repo }
2926 .make_request()
2927 .wrap::<_, _>(self)
2928 }
2929
2930 pub fn repo_list_git_refs(
2936 &self,
2937 owner: &str,
2938 repo: &str,
2939 r#ref: &str,
2940 ) -> Request<'_, endpoints::RepoListGitRefs<'_>, Vec<Reference>> {
2941 endpoints::RepoListGitRefs { owner, repo, r#ref }
2942 .make_request()
2943 .wrap::<_, _>(self)
2944 }
2945
2946 pub fn get_annotated_tag(
2952 &self,
2953 owner: &str,
2954 repo: &str,
2955 sha: &str,
2956 ) -> Request<'_, endpoints::GetAnnotatedTag<'_>, AnnotatedTag> {
2957 endpoints::GetAnnotatedTag { owner, repo, sha }
2958 .make_request()
2959 .wrap::<_, _>(self)
2960 }
2961
2962 pub fn get_tree(
2968 &self,
2969 owner: &str,
2970 repo: &str,
2971 sha: &str,
2972 query: GetTreeQuery,
2973 ) -> Request<'_, endpoints::GetTree<'_>, GitTreeResponse> {
2974 endpoints::GetTree {
2975 owner,
2976 repo,
2977 sha,
2978 query,
2979 }
2980 .make_request()
2981 .wrap::<_, _>(self)
2982 }
2983
2984 pub fn repo_list_hooks(
2989 &self,
2990 owner: &str,
2991 repo: &str,
2992 ) -> Request<'_, endpoints::RepoListHooks<'_>, (HookListHeaders, Vec<Hook>)> {
2993 endpoints::RepoListHooks { owner, repo }
2994 .make_request()
2995 .wrap::<_, _>(self)
2996 }
2997
2998 pub fn repo_create_hook(
3004 &self,
3005 owner: &str,
3006 repo: &str,
3007 body: CreateHookOption,
3008 ) -> Request<'_, endpoints::RepoCreateHook<'_>, Hook> {
3009 endpoints::RepoCreateHook {
3010 owner,
3011 repo,
3012 body: body,
3013 }
3014 .make_request()
3015 .wrap::<_, _>(self)
3016 }
3017
3018 pub fn repo_list_git_hooks(
3023 &self,
3024 owner: &str,
3025 repo: &str,
3026 ) -> Request<'_, endpoints::RepoListGitHooks<'_>, Vec<GitHook>> {
3027 endpoints::RepoListGitHooks { owner, repo }
3028 .make_request()
3029 .wrap::<_, _>(self)
3030 }
3031
3032 pub fn repo_get_git_hook(
3038 &self,
3039 owner: &str,
3040 repo: &str,
3041 id: &str,
3042 ) -> Request<'_, endpoints::RepoGetGitHook<'_>, GitHook> {
3043 endpoints::RepoGetGitHook { owner, repo, id }
3044 .make_request()
3045 .wrap::<_, _>(self)
3046 }
3047
3048 pub fn repo_delete_git_hook(
3054 &self,
3055 owner: &str,
3056 repo: &str,
3057 id: &str,
3058 ) -> Request<'_, endpoints::RepoDeleteGitHook<'_>, ()> {
3059 endpoints::RepoDeleteGitHook { owner, repo, id }
3060 .make_request()
3061 .wrap::<_, _>(self)
3062 }
3063
3064 pub fn repo_edit_git_hook(
3071 &self,
3072 owner: &str,
3073 repo: &str,
3074 id: &str,
3075 body: EditGitHookOption,
3076 ) -> Request<'_, endpoints::RepoEditGitHook<'_>, GitHook> {
3077 endpoints::RepoEditGitHook {
3078 owner,
3079 repo,
3080 id,
3081 body: body,
3082 }
3083 .make_request()
3084 .wrap::<_, _>(self)
3085 }
3086
3087 pub fn repo_get_hook(
3093 &self,
3094 owner: &str,
3095 repo: &str,
3096 id: i64,
3097 ) -> Request<'_, endpoints::RepoGetHook<'_>, Hook> {
3098 endpoints::RepoGetHook { owner, repo, id }
3099 .make_request()
3100 .wrap::<_, _>(self)
3101 }
3102
3103 pub fn repo_delete_hook(
3109 &self,
3110 owner: &str,
3111 repo: &str,
3112 id: i64,
3113 ) -> Request<'_, endpoints::RepoDeleteHook<'_>, ()> {
3114 endpoints::RepoDeleteHook { owner, repo, id }
3115 .make_request()
3116 .wrap::<_, _>(self)
3117 }
3118
3119 pub fn repo_edit_hook(
3126 &self,
3127 owner: &str,
3128 repo: &str,
3129 id: i64,
3130 body: EditHookOption,
3131 ) -> Request<'_, endpoints::RepoEditHook<'_>, Hook> {
3132 endpoints::RepoEditHook {
3133 owner,
3134 repo,
3135 id,
3136 body: body,
3137 }
3138 .make_request()
3139 .wrap::<_, _>(self)
3140 }
3141
3142 pub fn repo_test_hook(
3148 &self,
3149 owner: &str,
3150 repo: &str,
3151 id: i64,
3152 query: RepoTestHookQuery,
3153 ) -> Request<'_, endpoints::RepoTestHook<'_>, ()> {
3154 endpoints::RepoTestHook {
3155 owner,
3156 repo,
3157 id,
3158 query,
3159 }
3160 .make_request()
3161 .wrap::<_, _>(self)
3162 }
3163
3164 pub fn repo_get_issue_config(
3169 &self,
3170 owner: &str,
3171 repo: &str,
3172 ) -> Request<'_, endpoints::RepoGetIssueConfig<'_>, IssueConfig> {
3173 endpoints::RepoGetIssueConfig { owner, repo }
3174 .make_request()
3175 .wrap::<_, _>(self)
3176 }
3177
3178 pub fn repo_validate_issue_config(
3183 &self,
3184 owner: &str,
3185 repo: &str,
3186 ) -> Request<'_, endpoints::RepoValidateIssueConfig<'_>, IssueConfigValidation> {
3187 endpoints::RepoValidateIssueConfig { owner, repo }
3188 .make_request()
3189 .wrap::<_, _>(self)
3190 }
3191
3192 pub fn repo_get_issue_templates(
3197 &self,
3198 owner: &str,
3199 repo: &str,
3200 ) -> Request<'_, endpoints::RepoGetIssueTemplates<'_>, Vec<IssueTemplate>> {
3201 endpoints::RepoGetIssueTemplates { owner, repo }
3202 .make_request()
3203 .wrap::<_, _>(self)
3204 }
3205
3206 pub fn issue_list_issues(
3211 &self,
3212 owner: &str,
3213 repo: &str,
3214 query: IssueListIssuesQuery,
3215 ) -> Request<'_, endpoints::IssueListIssues<'_>, (IssueListHeaders, Vec<Issue>)> {
3216 endpoints::IssueListIssues { owner, repo, query }
3217 .make_request()
3218 .wrap::<_, _>(self)
3219 }
3220
3221 pub fn issue_create_issue(
3227 &self,
3228 owner: &str,
3229 repo: &str,
3230 body: CreateIssueOption,
3231 ) -> Request<'_, endpoints::IssueCreateIssue<'_>, Issue> {
3232 endpoints::IssueCreateIssue {
3233 owner,
3234 repo,
3235 body: body,
3236 }
3237 .make_request()
3238 .wrap::<_, _>(self)
3239 }
3240
3241 pub fn issue_get_repo_comments(
3246 &self,
3247 owner: &str,
3248 repo: &str,
3249 query: IssueGetRepoCommentsQuery,
3250 ) -> Request<'_, endpoints::IssueGetRepoComments<'_>, (CommentListHeaders, Vec<Comment>)> {
3251 endpoints::IssueGetRepoComments { owner, repo, query }
3252 .make_request()
3253 .wrap::<_, _>(self)
3254 }
3255
3256 pub fn issue_get_comment(
3262 &self,
3263 owner: &str,
3264 repo: &str,
3265 id: i64,
3266 ) -> Request<'_, endpoints::IssueGetComment<'_>, Option<Comment>> {
3267 endpoints::IssueGetComment { owner, repo, id }
3268 .make_request()
3269 .wrap::<_, _>(self)
3270 }
3271
3272 pub fn issue_delete_comment(
3278 &self,
3279 owner: &str,
3280 repo: &str,
3281 id: i64,
3282 ) -> Request<'_, endpoints::IssueDeleteComment<'_>, ()> {
3283 endpoints::IssueDeleteComment { owner, repo, id }
3284 .make_request()
3285 .wrap::<_, _>(self)
3286 }
3287
3288 pub fn issue_edit_comment(
3295 &self,
3296 owner: &str,
3297 repo: &str,
3298 id: i64,
3299 body: EditIssueCommentOption,
3300 ) -> Request<'_, endpoints::IssueEditComment<'_>, Option<Comment>> {
3301 endpoints::IssueEditComment {
3302 owner,
3303 repo,
3304 id,
3305 body: body,
3306 }
3307 .make_request()
3308 .wrap::<_, _>(self)
3309 }
3310
3311 pub fn issue_list_issue_comment_attachments(
3317 &self,
3318 owner: &str,
3319 repo: &str,
3320 id: i64,
3321 ) -> Request<'_, endpoints::IssueListIssueCommentAttachments<'_>, Vec<Attachment>> {
3322 endpoints::IssueListIssueCommentAttachments { owner, repo, id }
3323 .make_request()
3324 .wrap::<_, _>(self)
3325 }
3326
3327 pub fn issue_create_issue_comment_attachment(
3334 &self,
3335 owner: &str,
3336 repo: &str,
3337 id: i64,
3338 attachment: &[u8],
3339 query: IssueCreateIssueCommentAttachmentQuery,
3340 ) -> Request<'_, endpoints::IssueCreateIssueCommentAttachment<'_>, Attachment> {
3341 endpoints::IssueCreateIssueCommentAttachment {
3342 owner,
3343 repo,
3344 id,
3345 attachment: &attachment,
3346 query,
3347 }
3348 .make_request()
3349 .wrap::<_, _>(self)
3350 }
3351
3352 pub fn issue_get_issue_comment_attachment(
3359 &self,
3360 owner: &str,
3361 repo: &str,
3362 id: i64,
3363 attachment_id: i64,
3364 ) -> Request<'_, endpoints::IssueGetIssueCommentAttachment<'_>, Attachment> {
3365 endpoints::IssueGetIssueCommentAttachment {
3366 owner,
3367 repo,
3368 id,
3369 attachment_id,
3370 }
3371 .make_request()
3372 .wrap::<_, _>(self)
3373 }
3374
3375 pub fn issue_delete_issue_comment_attachment(
3382 &self,
3383 owner: &str,
3384 repo: &str,
3385 id: i64,
3386 attachment_id: i64,
3387 ) -> Request<'_, endpoints::IssueDeleteIssueCommentAttachment<'_>, ()> {
3388 endpoints::IssueDeleteIssueCommentAttachment {
3389 owner,
3390 repo,
3391 id,
3392 attachment_id,
3393 }
3394 .make_request()
3395 .wrap::<_, _>(self)
3396 }
3397
3398 pub fn issue_edit_issue_comment_attachment(
3406 &self,
3407 owner: &str,
3408 repo: &str,
3409 id: i64,
3410 attachment_id: i64,
3411 body: EditAttachmentOptions,
3412 ) -> Request<'_, endpoints::IssueEditIssueCommentAttachment<'_>, Attachment> {
3413 endpoints::IssueEditIssueCommentAttachment {
3414 owner,
3415 repo,
3416 id,
3417 attachment_id,
3418 body: body,
3419 }
3420 .make_request()
3421 .wrap::<_, _>(self)
3422 }
3423
3424 pub fn issue_get_comment_reactions(
3430 &self,
3431 owner: &str,
3432 repo: &str,
3433 id: i64,
3434 ) -> Request<'_, endpoints::IssueGetCommentReactions<'_>, Vec<Reaction>> {
3435 endpoints::IssueGetCommentReactions { owner, repo, id }
3436 .make_request()
3437 .wrap::<_, _>(self)
3438 }
3439
3440 pub fn issue_post_comment_reaction(
3447 &self,
3448 owner: &str,
3449 repo: &str,
3450 id: i64,
3451 content: EditReactionOption,
3452 ) -> Request<'_, endpoints::IssuePostCommentReaction<'_>, Reaction> {
3453 endpoints::IssuePostCommentReaction {
3454 owner,
3455 repo,
3456 id,
3457 body: content,
3458 }
3459 .make_request()
3460 .wrap::<_, _>(self)
3461 }
3462
3463 pub fn issue_delete_comment_reaction(
3470 &self,
3471 owner: &str,
3472 repo: &str,
3473 id: i64,
3474 content: EditReactionOption,
3475 ) -> Request<'_, endpoints::IssueDeleteCommentReaction<'_>, ()> {
3476 endpoints::IssueDeleteCommentReaction {
3477 owner,
3478 repo,
3479 id,
3480 body: content,
3481 }
3482 .make_request()
3483 .wrap::<_, _>(self)
3484 }
3485
3486 pub fn repo_list_pinned_issues(
3491 &self,
3492 owner: &str,
3493 repo: &str,
3494 ) -> Request<'_, endpoints::RepoListPinnedIssues<'_>, Vec<Issue>> {
3495 endpoints::RepoListPinnedIssues { owner, repo }
3496 .make_request()
3497 .wrap::<_, _>(self)
3498 }
3499
3500 pub fn issue_get_issue(
3506 &self,
3507 owner: &str,
3508 repo: &str,
3509 index: i64,
3510 ) -> Request<'_, endpoints::IssueGetIssue<'_>, Issue> {
3511 endpoints::IssueGetIssue { owner, repo, index }
3512 .make_request()
3513 .wrap::<_, _>(self)
3514 }
3515
3516 pub fn issue_delete(
3522 &self,
3523 owner: &str,
3524 repo: &str,
3525 index: i64,
3526 ) -> Request<'_, endpoints::IssueDelete<'_>, ()> {
3527 endpoints::IssueDelete { owner, repo, index }
3528 .make_request()
3529 .wrap::<_, _>(self)
3530 }
3531
3532 pub fn issue_edit_issue(
3539 &self,
3540 owner: &str,
3541 repo: &str,
3542 index: i64,
3543 body: EditIssueOption,
3544 ) -> Request<'_, endpoints::IssueEditIssue<'_>, Issue> {
3545 endpoints::IssueEditIssue {
3546 owner,
3547 repo,
3548 index,
3549 body: body,
3550 }
3551 .make_request()
3552 .wrap::<_, _>(self)
3553 }
3554
3555 pub fn issue_list_issue_attachments(
3561 &self,
3562 owner: &str,
3563 repo: &str,
3564 index: i64,
3565 ) -> Request<'_, endpoints::IssueListIssueAttachments<'_>, Vec<Attachment>> {
3566 endpoints::IssueListIssueAttachments { owner, repo, index }
3567 .make_request()
3568 .wrap::<_, _>(self)
3569 }
3570
3571 pub fn issue_create_issue_attachment(
3578 &self,
3579 owner: &str,
3580 repo: &str,
3581 index: i64,
3582 attachment: &[u8],
3583 query: IssueCreateIssueAttachmentQuery,
3584 ) -> Request<'_, endpoints::IssueCreateIssueAttachment<'_>, Attachment> {
3585 endpoints::IssueCreateIssueAttachment {
3586 owner,
3587 repo,
3588 index,
3589 attachment: &attachment,
3590 query,
3591 }
3592 .make_request()
3593 .wrap::<_, _>(self)
3594 }
3595
3596 pub fn issue_get_issue_attachment(
3603 &self,
3604 owner: &str,
3605 repo: &str,
3606 index: i64,
3607 attachment_id: i64,
3608 ) -> Request<'_, endpoints::IssueGetIssueAttachment<'_>, Attachment> {
3609 endpoints::IssueGetIssueAttachment {
3610 owner,
3611 repo,
3612 index,
3613 attachment_id,
3614 }
3615 .make_request()
3616 .wrap::<_, _>(self)
3617 }
3618
3619 pub fn issue_delete_issue_attachment(
3626 &self,
3627 owner: &str,
3628 repo: &str,
3629 index: i64,
3630 attachment_id: i64,
3631 ) -> Request<'_, endpoints::IssueDeleteIssueAttachment<'_>, ()> {
3632 endpoints::IssueDeleteIssueAttachment {
3633 owner,
3634 repo,
3635 index,
3636 attachment_id,
3637 }
3638 .make_request()
3639 .wrap::<_, _>(self)
3640 }
3641
3642 pub fn issue_edit_issue_attachment(
3650 &self,
3651 owner: &str,
3652 repo: &str,
3653 index: i64,
3654 attachment_id: i64,
3655 body: EditAttachmentOptions,
3656 ) -> Request<'_, endpoints::IssueEditIssueAttachment<'_>, Attachment> {
3657 endpoints::IssueEditIssueAttachment {
3658 owner,
3659 repo,
3660 index,
3661 attachment_id,
3662 body: body,
3663 }
3664 .make_request()
3665 .wrap::<_, _>(self)
3666 }
3667
3668 pub fn issue_list_blocks(
3674 &self,
3675 owner: &str,
3676 repo: &str,
3677 index: i64,
3678 ) -> Request<'_, endpoints::IssueListBlocks<'_>, Vec<Issue>> {
3679 endpoints::IssueListBlocks { owner, repo, index }
3680 .make_request()
3681 .wrap::<_, _>(self)
3682 }
3683
3684 pub fn issue_create_issue_blocking(
3691 &self,
3692 owner: &str,
3693 repo: &str,
3694 index: i64,
3695 body: IssueMeta,
3696 ) -> Request<'_, endpoints::IssueCreateIssueBlocking<'_>, Issue> {
3697 endpoints::IssueCreateIssueBlocking {
3698 owner,
3699 repo,
3700 index,
3701 body: body,
3702 }
3703 .make_request()
3704 .wrap::<_, _>(self)
3705 }
3706
3707 pub fn issue_remove_issue_blocking(
3714 &self,
3715 owner: &str,
3716 repo: &str,
3717 index: i64,
3718 body: IssueMeta,
3719 ) -> Request<'_, endpoints::IssueRemoveIssueBlocking<'_>, Issue> {
3720 endpoints::IssueRemoveIssueBlocking {
3721 owner,
3722 repo,
3723 index,
3724 body: body,
3725 }
3726 .make_request()
3727 .wrap::<_, _>(self)
3728 }
3729
3730 pub fn issue_get_comments(
3736 &self,
3737 owner: &str,
3738 repo: &str,
3739 index: i64,
3740 query: IssueGetCommentsQuery,
3741 ) -> Request<'_, endpoints::IssueGetComments<'_>, (CommentListHeaders, Vec<Comment>)> {
3742 endpoints::IssueGetComments {
3743 owner,
3744 repo,
3745 index,
3746 query,
3747 }
3748 .make_request()
3749 .wrap::<_, _>(self)
3750 }
3751
3752 pub fn issue_create_comment(
3759 &self,
3760 owner: &str,
3761 repo: &str,
3762 index: i64,
3763 body: CreateIssueCommentOption,
3764 ) -> Request<'_, endpoints::IssueCreateComment<'_>, Comment> {
3765 endpoints::IssueCreateComment {
3766 owner,
3767 repo,
3768 index,
3769 body: body,
3770 }
3771 .make_request()
3772 .wrap::<_, _>(self)
3773 }
3774
3775 pub fn issue_delete_comment_deprecated(
3782 &self,
3783 owner: &str,
3784 repo: &str,
3785 index: u32,
3786 id: i64,
3787 ) -> Request<'_, endpoints::IssueDeleteCommentDeprecated<'_>, ()> {
3788 endpoints::IssueDeleteCommentDeprecated {
3789 owner,
3790 repo,
3791 index,
3792 id,
3793 }
3794 .make_request()
3795 .wrap::<_, _>(self)
3796 }
3797
3798 pub fn issue_edit_comment_deprecated(
3806 &self,
3807 owner: &str,
3808 repo: &str,
3809 index: u32,
3810 id: i64,
3811 body: EditIssueCommentOption,
3812 ) -> Request<'_, endpoints::IssueEditCommentDeprecated<'_>, Option<Comment>> {
3813 endpoints::IssueEditCommentDeprecated {
3814 owner,
3815 repo,
3816 index,
3817 id,
3818 body: body,
3819 }
3820 .make_request()
3821 .wrap::<_, _>(self)
3822 }
3823
3824 pub fn issue_edit_issue_deadline(
3831 &self,
3832 owner: &str,
3833 repo: &str,
3834 index: i64,
3835 body: EditDeadlineOption,
3836 ) -> Request<'_, endpoints::IssueEditIssueDeadline<'_>, IssueDeadline> {
3837 endpoints::IssueEditIssueDeadline {
3838 owner,
3839 repo,
3840 index,
3841 body: body,
3842 }
3843 .make_request()
3844 .wrap::<_, _>(self)
3845 }
3846
3847 pub fn issue_list_issue_dependencies(
3853 &self,
3854 owner: &str,
3855 repo: &str,
3856 index: i64,
3857 ) -> Request<'_, endpoints::IssueListIssueDependencies<'_>, Vec<Issue>> {
3858 endpoints::IssueListIssueDependencies { owner, repo, index }
3859 .make_request()
3860 .wrap::<_, _>(self)
3861 }
3862
3863 pub fn issue_create_issue_dependencies(
3870 &self,
3871 owner: &str,
3872 repo: &str,
3873 index: i64,
3874 body: IssueMeta,
3875 ) -> Request<'_, endpoints::IssueCreateIssueDependencies<'_>, Issue> {
3876 endpoints::IssueCreateIssueDependencies {
3877 owner,
3878 repo,
3879 index,
3880 body: body,
3881 }
3882 .make_request()
3883 .wrap::<_, _>(self)
3884 }
3885
3886 pub fn issue_remove_issue_dependencies(
3893 &self,
3894 owner: &str,
3895 repo: &str,
3896 index: i64,
3897 body: IssueMeta,
3898 ) -> Request<'_, endpoints::IssueRemoveIssueDependencies<'_>, Issue> {
3899 endpoints::IssueRemoveIssueDependencies {
3900 owner,
3901 repo,
3902 index,
3903 body: body,
3904 }
3905 .make_request()
3906 .wrap::<_, _>(self)
3907 }
3908
3909 pub fn issue_get_labels(
3915 &self,
3916 owner: &str,
3917 repo: &str,
3918 index: i64,
3919 ) -> Request<'_, endpoints::IssueGetLabels<'_>, Vec<Label>> {
3920 endpoints::IssueGetLabels { owner, repo, index }
3921 .make_request()
3922 .wrap::<_, _>(self)
3923 }
3924
3925 pub fn issue_replace_labels(
3932 &self,
3933 owner: &str,
3934 repo: &str,
3935 index: i64,
3936 body: IssueLabelsOption,
3937 ) -> Request<'_, endpoints::IssueReplaceLabels<'_>, Vec<Label>> {
3938 endpoints::IssueReplaceLabels {
3939 owner,
3940 repo,
3941 index,
3942 body: body,
3943 }
3944 .make_request()
3945 .wrap::<_, _>(self)
3946 }
3947
3948 pub fn issue_add_label(
3955 &self,
3956 owner: &str,
3957 repo: &str,
3958 index: i64,
3959 body: IssueLabelsOption,
3960 ) -> Request<'_, endpoints::IssueAddLabel<'_>, Vec<Label>> {
3961 endpoints::IssueAddLabel {
3962 owner,
3963 repo,
3964 index,
3965 body: body,
3966 }
3967 .make_request()
3968 .wrap::<_, _>(self)
3969 }
3970
3971 pub fn issue_clear_labels(
3978 &self,
3979 owner: &str,
3980 repo: &str,
3981 index: i64,
3982 body: DeleteLabelsOption,
3983 ) -> Request<'_, endpoints::IssueClearLabels<'_>, ()> {
3984 endpoints::IssueClearLabels {
3985 owner,
3986 repo,
3987 index,
3988 body: body,
3989 }
3990 .make_request()
3991 .wrap::<_, _>(self)
3992 }
3993
3994 pub fn issue_remove_label(
4002 &self,
4003 owner: &str,
4004 repo: &str,
4005 index: i64,
4006 identifier: &str,
4007 body: DeleteLabelsOption,
4008 ) -> Request<'_, endpoints::IssueRemoveLabel<'_>, ()> {
4009 endpoints::IssueRemoveLabel {
4010 owner,
4011 repo,
4012 index,
4013 identifier,
4014 body: body,
4015 }
4016 .make_request()
4017 .wrap::<_, _>(self)
4018 }
4019
4020 pub fn pin_issue(
4026 &self,
4027 owner: &str,
4028 repo: &str,
4029 index: i64,
4030 ) -> Request<'_, endpoints::PinIssue<'_>, ()> {
4031 endpoints::PinIssue { owner, repo, index }
4032 .make_request()
4033 .wrap::<_, _>(self)
4034 }
4035
4036 pub fn unpin_issue(
4042 &self,
4043 owner: &str,
4044 repo: &str,
4045 index: i64,
4046 ) -> Request<'_, endpoints::UnpinIssue<'_>, ()> {
4047 endpoints::UnpinIssue { owner, repo, index }
4048 .make_request()
4049 .wrap::<_, _>(self)
4050 }
4051
4052 pub fn move_issue_pin(
4059 &self,
4060 owner: &str,
4061 repo: &str,
4062 index: i64,
4063 position: i64,
4064 ) -> Request<'_, endpoints::MoveIssuePin<'_>, ()> {
4065 endpoints::MoveIssuePin {
4066 owner,
4067 repo,
4068 index,
4069 position,
4070 }
4071 .make_request()
4072 .wrap::<_, _>(self)
4073 }
4074
4075 pub fn issue_get_issue_reactions(
4081 &self,
4082 owner: &str,
4083 repo: &str,
4084 index: i64,
4085 ) -> Request<'_, endpoints::IssueGetIssueReactions<'_>, (ReactionListHeaders, Vec<Reaction>)>
4086 {
4087 endpoints::IssueGetIssueReactions { owner, repo, index }
4088 .make_request()
4089 .wrap::<_, _>(self)
4090 }
4091
4092 pub fn issue_post_issue_reaction(
4099 &self,
4100 owner: &str,
4101 repo: &str,
4102 index: i64,
4103 content: EditReactionOption,
4104 ) -> Request<'_, endpoints::IssuePostIssueReaction<'_>, Reaction> {
4105 endpoints::IssuePostIssueReaction {
4106 owner,
4107 repo,
4108 index,
4109 body: content,
4110 }
4111 .make_request()
4112 .wrap::<_, _>(self)
4113 }
4114
4115 pub fn issue_delete_issue_reaction(
4122 &self,
4123 owner: &str,
4124 repo: &str,
4125 index: i64,
4126 content: EditReactionOption,
4127 ) -> Request<'_, endpoints::IssueDeleteIssueReaction<'_>, ()> {
4128 endpoints::IssueDeleteIssueReaction {
4129 owner,
4130 repo,
4131 index,
4132 body: content,
4133 }
4134 .make_request()
4135 .wrap::<_, _>(self)
4136 }
4137
4138 pub fn issue_delete_stop_watch(
4144 &self,
4145 owner: &str,
4146 repo: &str,
4147 index: i64,
4148 ) -> Request<'_, endpoints::IssueDeleteStopWatch<'_>, ()> {
4149 endpoints::IssueDeleteStopWatch { owner, repo, index }
4150 .make_request()
4151 .wrap::<_, _>(self)
4152 }
4153
4154 pub fn issue_start_stop_watch(
4160 &self,
4161 owner: &str,
4162 repo: &str,
4163 index: i64,
4164 ) -> Request<'_, endpoints::IssueStartStopWatch<'_>, ()> {
4165 endpoints::IssueStartStopWatch { owner, repo, index }
4166 .make_request()
4167 .wrap::<_, _>(self)
4168 }
4169
4170 pub fn issue_stop_stop_watch(
4176 &self,
4177 owner: &str,
4178 repo: &str,
4179 index: i64,
4180 ) -> Request<'_, endpoints::IssueStopStopWatch<'_>, ()> {
4181 endpoints::IssueStopStopWatch { owner, repo, index }
4182 .make_request()
4183 .wrap::<_, _>(self)
4184 }
4185
4186 pub fn issue_subscriptions(
4192 &self,
4193 owner: &str,
4194 repo: &str,
4195 index: i64,
4196 ) -> Request<'_, endpoints::IssueSubscriptions<'_>, (UserListHeaders, Vec<User>)> {
4197 endpoints::IssueSubscriptions { owner, repo, index }
4198 .make_request()
4199 .wrap::<_, _>(self)
4200 }
4201
4202 pub fn issue_check_subscription(
4208 &self,
4209 owner: &str,
4210 repo: &str,
4211 index: i64,
4212 ) -> Request<'_, endpoints::IssueCheckSubscription<'_>, WatchInfo> {
4213 endpoints::IssueCheckSubscription { owner, repo, index }
4214 .make_request()
4215 .wrap::<_, _>(self)
4216 }
4217
4218 pub fn issue_add_subscription(
4225 &self,
4226 owner: &str,
4227 repo: &str,
4228 index: i64,
4229 user: &str,
4230 ) -> Request<'_, endpoints::IssueAddSubscription<'_>, ()> {
4231 endpoints::IssueAddSubscription {
4232 owner,
4233 repo,
4234 index,
4235 user,
4236 }
4237 .make_request()
4238 .wrap::<_, _>(self)
4239 }
4240
4241 pub fn issue_delete_subscription(
4248 &self,
4249 owner: &str,
4250 repo: &str,
4251 index: i64,
4252 user: &str,
4253 ) -> Request<'_, endpoints::IssueDeleteSubscription<'_>, ()> {
4254 endpoints::IssueDeleteSubscription {
4255 owner,
4256 repo,
4257 index,
4258 user,
4259 }
4260 .make_request()
4261 .wrap::<_, _>(self)
4262 }
4263
4264 pub fn issue_get_comments_and_timeline(
4270 &self,
4271 owner: &str,
4272 repo: &str,
4273 index: i64,
4274 query: IssueGetCommentsAndTimelineQuery,
4275 ) -> Request<
4276 '_,
4277 endpoints::IssueGetCommentsAndTimeline<'_>,
4278 (TimelineListHeaders, Vec<TimelineComment>),
4279 > {
4280 endpoints::IssueGetCommentsAndTimeline {
4281 owner,
4282 repo,
4283 index,
4284 query,
4285 }
4286 .make_request()
4287 .wrap::<_, _>(self)
4288 }
4289
4290 pub fn issue_tracked_times(
4296 &self,
4297 owner: &str,
4298 repo: &str,
4299 index: i64,
4300 query: IssueTrackedTimesQuery,
4301 ) -> Request<'_, endpoints::IssueTrackedTimes<'_>, (TrackedTimeListHeaders, Vec<TrackedTime>)>
4302 {
4303 endpoints::IssueTrackedTimes {
4304 owner,
4305 repo,
4306 index,
4307 query,
4308 }
4309 .make_request()
4310 .wrap::<_, _>(self)
4311 }
4312
4313 pub fn issue_add_time(
4320 &self,
4321 owner: &str,
4322 repo: &str,
4323 index: i64,
4324 body: AddTimeOption,
4325 ) -> Request<'_, endpoints::IssueAddTime<'_>, TrackedTime> {
4326 endpoints::IssueAddTime {
4327 owner,
4328 repo,
4329 index,
4330 body: body,
4331 }
4332 .make_request()
4333 .wrap::<_, _>(self)
4334 }
4335
4336 pub fn issue_reset_time(
4342 &self,
4343 owner: &str,
4344 repo: &str,
4345 index: i64,
4346 ) -> Request<'_, endpoints::IssueResetTime<'_>, ()> {
4347 endpoints::IssueResetTime { owner, repo, index }
4348 .make_request()
4349 .wrap::<_, _>(self)
4350 }
4351
4352 pub fn issue_delete_time(
4359 &self,
4360 owner: &str,
4361 repo: &str,
4362 index: i64,
4363 id: i64,
4364 ) -> Request<'_, endpoints::IssueDeleteTime<'_>, ()> {
4365 endpoints::IssueDeleteTime {
4366 owner,
4367 repo,
4368 index,
4369 id,
4370 }
4371 .make_request()
4372 .wrap::<_, _>(self)
4373 }
4374
4375 pub fn repo_list_keys(
4380 &self,
4381 owner: &str,
4382 repo: &str,
4383 query: RepoListKeysQuery,
4384 ) -> Request<'_, endpoints::RepoListKeys<'_>, (DeployKeyListHeaders, Vec<DeployKey>)> {
4385 endpoints::RepoListKeys { owner, repo, query }
4386 .make_request()
4387 .wrap::<_, _>(self)
4388 }
4389
4390 pub fn repo_create_key(
4396 &self,
4397 owner: &str,
4398 repo: &str,
4399 body: CreateKeyOption,
4400 ) -> Request<'_, endpoints::RepoCreateKey<'_>, DeployKey> {
4401 endpoints::RepoCreateKey {
4402 owner,
4403 repo,
4404 body: body,
4405 }
4406 .make_request()
4407 .wrap::<_, _>(self)
4408 }
4409
4410 pub fn repo_get_key(
4416 &self,
4417 owner: &str,
4418 repo: &str,
4419 id: i64,
4420 ) -> Request<'_, endpoints::RepoGetKey<'_>, DeployKey> {
4421 endpoints::RepoGetKey { owner, repo, id }
4422 .make_request()
4423 .wrap::<_, _>(self)
4424 }
4425
4426 pub fn repo_delete_key(
4432 &self,
4433 owner: &str,
4434 repo: &str,
4435 id: i64,
4436 ) -> Request<'_, endpoints::RepoDeleteKey<'_>, ()> {
4437 endpoints::RepoDeleteKey { owner, repo, id }
4438 .make_request()
4439 .wrap::<_, _>(self)
4440 }
4441
4442 pub fn issue_list_labels(
4447 &self,
4448 owner: &str,
4449 repo: &str,
4450 query: IssueListLabelsQuery,
4451 ) -> Request<'_, endpoints::IssueListLabels<'_>, (LabelListHeaders, Vec<Label>)> {
4452 endpoints::IssueListLabels { owner, repo, query }
4453 .make_request()
4454 .wrap::<_, _>(self)
4455 }
4456
4457 pub fn issue_create_label(
4463 &self,
4464 owner: &str,
4465 repo: &str,
4466 body: CreateLabelOption,
4467 ) -> Request<'_, endpoints::IssueCreateLabel<'_>, Label> {
4468 endpoints::IssueCreateLabel {
4469 owner,
4470 repo,
4471 body: body,
4472 }
4473 .make_request()
4474 .wrap::<_, _>(self)
4475 }
4476
4477 pub fn issue_get_label(
4483 &self,
4484 owner: &str,
4485 repo: &str,
4486 id: i64,
4487 ) -> Request<'_, endpoints::IssueGetLabel<'_>, Label> {
4488 endpoints::IssueGetLabel { owner, repo, id }
4489 .make_request()
4490 .wrap::<_, _>(self)
4491 }
4492
4493 pub fn issue_delete_label(
4499 &self,
4500 owner: &str,
4501 repo: &str,
4502 id: i64,
4503 ) -> Request<'_, endpoints::IssueDeleteLabel<'_>, ()> {
4504 endpoints::IssueDeleteLabel { owner, repo, id }
4505 .make_request()
4506 .wrap::<_, _>(self)
4507 }
4508
4509 pub fn issue_edit_label(
4516 &self,
4517 owner: &str,
4518 repo: &str,
4519 id: i64,
4520 body: EditLabelOption,
4521 ) -> Request<'_, endpoints::IssueEditLabel<'_>, Label> {
4522 endpoints::IssueEditLabel {
4523 owner,
4524 repo,
4525 id,
4526 body: body,
4527 }
4528 .make_request()
4529 .wrap::<_, _>(self)
4530 }
4531
4532 pub fn repo_get_languages(
4537 &self,
4538 owner: &str,
4539 repo: &str,
4540 ) -> Request<'_, endpoints::RepoGetLanguages<'_>, BTreeMap<String, i64>> {
4541 endpoints::RepoGetLanguages { owner, repo }
4542 .make_request()
4543 .wrap::<_, _>(self)
4544 }
4545
4546 pub fn repo_get_raw_file_or_lfs(
4552 &self,
4553 owner: &str,
4554 repo: &str,
4555 filepath: &str,
4556 query: RepoGetRawFileOrLfsQuery,
4557 ) -> Request<'_, endpoints::RepoGetRawFileOrLfs<'_>, Bytes> {
4558 endpoints::RepoGetRawFileOrLfs {
4559 owner,
4560 repo,
4561 filepath,
4562 query,
4563 }
4564 .make_request()
4565 .wrap::<_, _>(self)
4566 }
4567
4568 pub fn issue_get_milestones_list(
4573 &self,
4574 owner: &str,
4575 repo: &str,
4576 query: IssueGetMilestonesListQuery,
4577 ) -> Request<'_, endpoints::IssueGetMilestonesList<'_>, (MilestoneListHeaders, Vec<Milestone>)>
4578 {
4579 endpoints::IssueGetMilestonesList { owner, repo, query }
4580 .make_request()
4581 .wrap::<_, _>(self)
4582 }
4583
4584 pub fn issue_create_milestone(
4590 &self,
4591 owner: &str,
4592 repo: &str,
4593 body: CreateMilestoneOption,
4594 ) -> Request<'_, endpoints::IssueCreateMilestone<'_>, Milestone> {
4595 endpoints::IssueCreateMilestone {
4596 owner,
4597 repo,
4598 body: body,
4599 }
4600 .make_request()
4601 .wrap::<_, _>(self)
4602 }
4603
4604 pub fn issue_get_milestone(
4610 &self,
4611 owner: &str,
4612 repo: &str,
4613 id: i64,
4614 ) -> Request<'_, endpoints::IssueGetMilestone<'_>, Milestone> {
4615 endpoints::IssueGetMilestone { owner, repo, id }
4616 .make_request()
4617 .wrap::<_, _>(self)
4618 }
4619
4620 pub fn issue_delete_milestone(
4626 &self,
4627 owner: &str,
4628 repo: &str,
4629 id: i64,
4630 ) -> Request<'_, endpoints::IssueDeleteMilestone<'_>, ()> {
4631 endpoints::IssueDeleteMilestone { owner, repo, id }
4632 .make_request()
4633 .wrap::<_, _>(self)
4634 }
4635
4636 pub fn issue_edit_milestone(
4643 &self,
4644 owner: &str,
4645 repo: &str,
4646 id: i64,
4647 body: EditMilestoneOption,
4648 ) -> Request<'_, endpoints::IssueEditMilestone<'_>, Milestone> {
4649 endpoints::IssueEditMilestone {
4650 owner,
4651 repo,
4652 id,
4653 body: body,
4654 }
4655 .make_request()
4656 .wrap::<_, _>(self)
4657 }
4658
4659 pub fn repo_mirror_sync(
4664 &self,
4665 owner: &str,
4666 repo: &str,
4667 ) -> Request<'_, endpoints::RepoMirrorSync<'_>, ()> {
4668 endpoints::RepoMirrorSync { owner, repo }
4669 .make_request()
4670 .wrap::<_, _>(self)
4671 }
4672
4673 pub fn repo_new_pin_allowed(
4678 &self,
4679 owner: &str,
4680 repo: &str,
4681 ) -> Request<'_, endpoints::RepoNewPinAllowed<'_>, NewIssuePinsAllowed> {
4682 endpoints::RepoNewPinAllowed { owner, repo }
4683 .make_request()
4684 .wrap::<_, _>(self)
4685 }
4686
4687 pub fn notify_get_repo_list(
4692 &self,
4693 owner: &str,
4694 repo: &str,
4695 query: NotifyGetRepoListQuery,
4696 ) -> Request<
4697 '_,
4698 endpoints::NotifyGetRepoList<'_>,
4699 (NotificationThreadListHeaders, Vec<NotificationThread>),
4700 > {
4701 endpoints::NotifyGetRepoList { owner, repo, query }
4702 .make_request()
4703 .wrap::<_, _>(self)
4704 }
4705
4706 pub fn notify_read_repo_list(
4711 &self,
4712 owner: &str,
4713 repo: &str,
4714 query: NotifyReadRepoListQuery,
4715 ) -> Request<'_, endpoints::NotifyReadRepoList<'_>, Vec<NotificationThread>> {
4716 endpoints::NotifyReadRepoList { owner, repo, query }
4717 .make_request()
4718 .wrap::<_, _>(self)
4719 }
4720
4721 pub fn repo_list_pull_requests(
4726 &self,
4727 owner: &str,
4728 repo: &str,
4729 query: RepoListPullRequestsQuery,
4730 ) -> Request<'_, endpoints::RepoListPullRequests<'_>, (PullRequestListHeaders, Vec<PullRequest>)>
4731 {
4732 endpoints::RepoListPullRequests { owner, repo, query }
4733 .make_request()
4734 .wrap::<_, _>(self)
4735 }
4736
4737 pub fn repo_create_pull_request(
4743 &self,
4744 owner: &str,
4745 repo: &str,
4746 body: CreatePullRequestOption,
4747 ) -> Request<'_, endpoints::RepoCreatePullRequest<'_>, PullRequest> {
4748 endpoints::RepoCreatePullRequest {
4749 owner,
4750 repo,
4751 body: body,
4752 }
4753 .make_request()
4754 .wrap::<_, _>(self)
4755 }
4756
4757 pub fn repo_list_pinned_pull_requests(
4762 &self,
4763 owner: &str,
4764 repo: &str,
4765 ) -> Request<
4766 '_,
4767 endpoints::RepoListPinnedPullRequests<'_>,
4768 (PullRequestListHeaders, Vec<PullRequest>),
4769 > {
4770 endpoints::RepoListPinnedPullRequests { owner, repo }
4771 .make_request()
4772 .wrap::<_, _>(self)
4773 }
4774
4775 pub fn repo_get_pull_request_by_base_head(
4782 &self,
4783 owner: &str,
4784 repo: &str,
4785 base: &str,
4786 head: &str,
4787 ) -> Request<'_, endpoints::RepoGetPullRequestByBaseHead<'_>, PullRequest> {
4788 endpoints::RepoGetPullRequestByBaseHead {
4789 owner,
4790 repo,
4791 base,
4792 head,
4793 }
4794 .make_request()
4795 .wrap::<_, _>(self)
4796 }
4797
4798 pub fn repo_get_pull_request(
4804 &self,
4805 owner: &str,
4806 repo: &str,
4807 index: i64,
4808 ) -> Request<'_, endpoints::RepoGetPullRequest<'_>, PullRequest> {
4809 endpoints::RepoGetPullRequest { owner, repo, index }
4810 .make_request()
4811 .wrap::<_, _>(self)
4812 }
4813
4814 pub fn repo_edit_pull_request(
4821 &self,
4822 owner: &str,
4823 repo: &str,
4824 index: i64,
4825 body: EditPullRequestOption,
4826 ) -> Request<'_, endpoints::RepoEditPullRequest<'_>, PullRequest> {
4827 endpoints::RepoEditPullRequest {
4828 owner,
4829 repo,
4830 index,
4831 body: body,
4832 }
4833 .make_request()
4834 .wrap::<_, _>(self)
4835 }
4836
4837 pub fn repo_download_pull_diff_or_patch(
4844 &self,
4845 owner: &str,
4846 repo: &str,
4847 index: i64,
4848 diff_type: &str,
4849 query: RepoDownloadPullDiffOrPatchQuery,
4850 ) -> Request<'_, endpoints::RepoDownloadPullDiffOrPatch<'_>, String> {
4851 endpoints::RepoDownloadPullDiffOrPatch {
4852 owner,
4853 repo,
4854 index,
4855 diff_type,
4856 query,
4857 }
4858 .make_request()
4859 .wrap::<_, _>(self)
4860 }
4861
4862 pub fn repo_get_pull_request_commits(
4868 &self,
4869 owner: &str,
4870 repo: &str,
4871 index: i64,
4872 query: RepoGetPullRequestCommitsQuery,
4873 ) -> Request<'_, endpoints::RepoGetPullRequestCommits<'_>, (CommitListHeaders, Vec<Commit>)>
4874 {
4875 endpoints::RepoGetPullRequestCommits {
4876 owner,
4877 repo,
4878 index,
4879 query,
4880 }
4881 .make_request()
4882 .wrap::<_, _>(self)
4883 }
4884
4885 pub fn repo_get_pull_request_files(
4891 &self,
4892 owner: &str,
4893 repo: &str,
4894 index: i64,
4895 query: RepoGetPullRequestFilesQuery,
4896 ) -> Request<
4897 '_,
4898 endpoints::RepoGetPullRequestFiles<'_>,
4899 (ChangedFileListWithPaginationHeaders, Vec<ChangedFile>),
4900 > {
4901 endpoints::RepoGetPullRequestFiles {
4902 owner,
4903 repo,
4904 index,
4905 query,
4906 }
4907 .make_request()
4908 .wrap::<_, _>(self)
4909 }
4910
4911 pub fn repo_pull_request_is_merged(
4917 &self,
4918 owner: &str,
4919 repo: &str,
4920 index: i64,
4921 ) -> Request<'_, endpoints::RepoPullRequestIsMerged<'_>, ()> {
4922 endpoints::RepoPullRequestIsMerged { owner, repo, index }
4923 .make_request()
4924 .wrap::<_, _>(self)
4925 }
4926
4927 pub fn repo_merge_pull_request(
4934 &self,
4935 owner: &str,
4936 repo: &str,
4937 index: i64,
4938 body: MergePullRequestOption,
4939 ) -> Request<'_, endpoints::RepoMergePullRequest<'_>, ()> {
4940 endpoints::RepoMergePullRequest {
4941 owner,
4942 repo,
4943 index,
4944 body: body,
4945 }
4946 .make_request()
4947 .wrap::<_, _>(self)
4948 }
4949
4950 pub fn repo_cancel_scheduled_auto_merge(
4956 &self,
4957 owner: &str,
4958 repo: &str,
4959 index: i64,
4960 ) -> Request<'_, endpoints::RepoCancelScheduledAutoMerge<'_>, ()> {
4961 endpoints::RepoCancelScheduledAutoMerge { owner, repo, index }
4962 .make_request()
4963 .wrap::<_, _>(self)
4964 }
4965
4966 pub fn repo_create_pull_review_requests(
4973 &self,
4974 owner: &str,
4975 repo: &str,
4976 index: i64,
4977 body: PullReviewRequestOptions,
4978 ) -> Request<'_, endpoints::RepoCreatePullReviewRequests<'_>, Vec<PullReview>> {
4979 endpoints::RepoCreatePullReviewRequests {
4980 owner,
4981 repo,
4982 index,
4983 body: body,
4984 }
4985 .make_request()
4986 .wrap::<_, _>(self)
4987 }
4988
4989 pub fn repo_delete_pull_review_requests(
4996 &self,
4997 owner: &str,
4998 repo: &str,
4999 index: i64,
5000 body: PullReviewRequestOptions,
5001 ) -> Request<'_, endpoints::RepoDeletePullReviewRequests<'_>, ()> {
5002 endpoints::RepoDeletePullReviewRequests {
5003 owner,
5004 repo,
5005 index,
5006 body: body,
5007 }
5008 .make_request()
5009 .wrap::<_, _>(self)
5010 }
5011
5012 pub fn repo_list_pull_reviews(
5018 &self,
5019 owner: &str,
5020 repo: &str,
5021 index: i64,
5022 ) -> Request<'_, endpoints::RepoListPullReviews<'_>, (PullReviewListHeaders, Vec<PullReview>)>
5023 {
5024 endpoints::RepoListPullReviews { owner, repo, index }
5025 .make_request()
5026 .wrap::<_, _>(self)
5027 }
5028
5029 pub fn repo_create_pull_review(
5036 &self,
5037 owner: &str,
5038 repo: &str,
5039 index: i64,
5040 body: CreatePullReviewOptions,
5041 ) -> Request<'_, endpoints::RepoCreatePullReview<'_>, PullReview> {
5042 endpoints::RepoCreatePullReview {
5043 owner,
5044 repo,
5045 index,
5046 body: body,
5047 }
5048 .make_request()
5049 .wrap::<_, _>(self)
5050 }
5051
5052 pub fn repo_get_pull_review(
5059 &self,
5060 owner: &str,
5061 repo: &str,
5062 index: i64,
5063 id: i64,
5064 ) -> Request<'_, endpoints::RepoGetPullReview<'_>, PullReview> {
5065 endpoints::RepoGetPullReview {
5066 owner,
5067 repo,
5068 index,
5069 id,
5070 }
5071 .make_request()
5072 .wrap::<_, _>(self)
5073 }
5074
5075 pub fn repo_submit_pull_review(
5083 &self,
5084 owner: &str,
5085 repo: &str,
5086 index: i64,
5087 id: i64,
5088 body: SubmitPullReviewOptions,
5089 ) -> Request<'_, endpoints::RepoSubmitPullReview<'_>, PullReview> {
5090 endpoints::RepoSubmitPullReview {
5091 owner,
5092 repo,
5093 index,
5094 id,
5095 body: body,
5096 }
5097 .make_request()
5098 .wrap::<_, _>(self)
5099 }
5100
5101 pub fn repo_delete_pull_review(
5108 &self,
5109 owner: &str,
5110 repo: &str,
5111 index: i64,
5112 id: i64,
5113 ) -> Request<'_, endpoints::RepoDeletePullReview<'_>, ()> {
5114 endpoints::RepoDeletePullReview {
5115 owner,
5116 repo,
5117 index,
5118 id,
5119 }
5120 .make_request()
5121 .wrap::<_, _>(self)
5122 }
5123
5124 pub fn repo_get_pull_review_comments(
5131 &self,
5132 owner: &str,
5133 repo: &str,
5134 index: i64,
5135 id: i64,
5136 ) -> Request<'_, endpoints::RepoGetPullReviewComments<'_>, Vec<PullReviewComment>> {
5137 endpoints::RepoGetPullReviewComments {
5138 owner,
5139 repo,
5140 index,
5141 id,
5142 }
5143 .make_request()
5144 .wrap::<_, _>(self)
5145 }
5146
5147 pub fn repo_create_pull_review_comment(
5155 &self,
5156 owner: &str,
5157 repo: &str,
5158 index: i64,
5159 id: i64,
5160 body: serde_json::Value,
5161 ) -> Request<'_, endpoints::RepoCreatePullReviewComment<'_>, PullReviewComment> {
5162 endpoints::RepoCreatePullReviewComment {
5163 owner,
5164 repo,
5165 index,
5166 id,
5167 body: body,
5168 }
5169 .make_request()
5170 .wrap::<_, _>(self)
5171 }
5172
5173 pub fn repo_get_pull_review_comment(
5181 &self,
5182 owner: &str,
5183 repo: &str,
5184 index: i64,
5185 id: i64,
5186 comment: i64,
5187 ) -> Request<'_, endpoints::RepoGetPullReviewComment<'_>, PullReviewComment> {
5188 endpoints::RepoGetPullReviewComment {
5189 owner,
5190 repo,
5191 index,
5192 id,
5193 comment,
5194 }
5195 .make_request()
5196 .wrap::<_, _>(self)
5197 }
5198
5199 pub fn repo_delete_pull_review_comment(
5207 &self,
5208 owner: &str,
5209 repo: &str,
5210 index: i64,
5211 id: i64,
5212 comment: i64,
5213 ) -> Request<'_, endpoints::RepoDeletePullReviewComment<'_>, ()> {
5214 endpoints::RepoDeletePullReviewComment {
5215 owner,
5216 repo,
5217 index,
5218 id,
5219 comment,
5220 }
5221 .make_request()
5222 .wrap::<_, _>(self)
5223 }
5224
5225 pub fn repo_dismiss_pull_review(
5233 &self,
5234 owner: &str,
5235 repo: &str,
5236 index: i64,
5237 id: i64,
5238 body: DismissPullReviewOptions,
5239 ) -> Request<'_, endpoints::RepoDismissPullReview<'_>, PullReview> {
5240 endpoints::RepoDismissPullReview {
5241 owner,
5242 repo,
5243 index,
5244 id,
5245 body: body,
5246 }
5247 .make_request()
5248 .wrap::<_, _>(self)
5249 }
5250
5251 pub fn repo_un_dismiss_pull_review(
5258 &self,
5259 owner: &str,
5260 repo: &str,
5261 index: i64,
5262 id: i64,
5263 ) -> Request<'_, endpoints::RepoUnDismissPullReview<'_>, PullReview> {
5264 endpoints::RepoUnDismissPullReview {
5265 owner,
5266 repo,
5267 index,
5268 id,
5269 }
5270 .make_request()
5271 .wrap::<_, _>(self)
5272 }
5273
5274 pub fn repo_update_pull_request(
5280 &self,
5281 owner: &str,
5282 repo: &str,
5283 index: i64,
5284 query: RepoUpdatePullRequestQuery,
5285 ) -> Request<'_, endpoints::RepoUpdatePullRequest<'_>, ()> {
5286 endpoints::RepoUpdatePullRequest {
5287 owner,
5288 repo,
5289 index,
5290 query,
5291 }
5292 .make_request()
5293 .wrap::<_, _>(self)
5294 }
5295
5296 pub fn repo_list_push_mirrors(
5301 &self,
5302 owner: &str,
5303 repo: &str,
5304 ) -> Request<'_, endpoints::RepoListPushMirrors<'_>, (PushMirrorListHeaders, Vec<PushMirror>)>
5305 {
5306 endpoints::RepoListPushMirrors { owner, repo }
5307 .make_request()
5308 .wrap::<_, _>(self)
5309 }
5310
5311 pub fn repo_add_push_mirror(
5317 &self,
5318 owner: &str,
5319 repo: &str,
5320 body: CreatePushMirrorOption,
5321 ) -> Request<'_, endpoints::RepoAddPushMirror<'_>, PushMirror> {
5322 endpoints::RepoAddPushMirror {
5323 owner,
5324 repo,
5325 body: body,
5326 }
5327 .make_request()
5328 .wrap::<_, _>(self)
5329 }
5330
5331 pub fn repo_push_mirror_sync(
5336 &self,
5337 owner: &str,
5338 repo: &str,
5339 ) -> Request<'_, endpoints::RepoPushMirrorSync<'_>, ()> {
5340 endpoints::RepoPushMirrorSync { owner, repo }
5341 .make_request()
5342 .wrap::<_, _>(self)
5343 }
5344
5345 pub fn repo_get_push_mirror_by_remote_name(
5351 &self,
5352 owner: &str,
5353 repo: &str,
5354 name: &str,
5355 ) -> Request<'_, endpoints::RepoGetPushMirrorByRemoteName<'_>, PushMirror> {
5356 endpoints::RepoGetPushMirrorByRemoteName { owner, repo, name }
5357 .make_request()
5358 .wrap::<_, _>(self)
5359 }
5360
5361 pub fn repo_delete_push_mirror(
5367 &self,
5368 owner: &str,
5369 repo: &str,
5370 name: &str,
5371 ) -> Request<'_, endpoints::RepoDeletePushMirror<'_>, ()> {
5372 endpoints::RepoDeletePushMirror { owner, repo, name }
5373 .make_request()
5374 .wrap::<_, _>(self)
5375 }
5376
5377 pub fn repo_get_raw_file(
5383 &self,
5384 owner: &str,
5385 repo: &str,
5386 filepath: &str,
5387 query: RepoGetRawFileQuery,
5388 ) -> Request<'_, endpoints::RepoGetRawFile<'_>, Bytes> {
5389 endpoints::RepoGetRawFile {
5390 owner,
5391 repo,
5392 filepath,
5393 query,
5394 }
5395 .make_request()
5396 .wrap::<_, _>(self)
5397 }
5398
5399 pub fn repo_list_releases(
5404 &self,
5405 owner: &str,
5406 repo: &str,
5407 query: RepoListReleasesQuery,
5408 ) -> Request<'_, endpoints::RepoListReleases<'_>, (ReleaseListHeaders, Vec<Release>)> {
5409 endpoints::RepoListReleases { owner, repo, query }
5410 .make_request()
5411 .wrap::<_, _>(self)
5412 }
5413
5414 pub fn repo_create_release(
5420 &self,
5421 owner: &str,
5422 repo: &str,
5423 body: CreateReleaseOption,
5424 ) -> Request<'_, endpoints::RepoCreateRelease<'_>, Release> {
5425 endpoints::RepoCreateRelease {
5426 owner,
5427 repo,
5428 body: body,
5429 }
5430 .make_request()
5431 .wrap::<_, _>(self)
5432 }
5433
5434 pub fn repo_get_latest_release(
5439 &self,
5440 owner: &str,
5441 repo: &str,
5442 ) -> Request<'_, endpoints::RepoGetLatestRelease<'_>, Release> {
5443 endpoints::RepoGetLatestRelease { owner, repo }
5444 .make_request()
5445 .wrap::<_, _>(self)
5446 }
5447
5448 pub fn repo_get_release_by_tag(
5454 &self,
5455 owner: &str,
5456 repo: &str,
5457 tag: &str,
5458 ) -> Request<'_, endpoints::RepoGetReleaseByTag<'_>, Release> {
5459 endpoints::RepoGetReleaseByTag { owner, repo, tag }
5460 .make_request()
5461 .wrap::<_, _>(self)
5462 }
5463
5464 pub fn repo_delete_release_by_tag(
5470 &self,
5471 owner: &str,
5472 repo: &str,
5473 tag: &str,
5474 ) -> Request<'_, endpoints::RepoDeleteReleaseByTag<'_>, ()> {
5475 endpoints::RepoDeleteReleaseByTag { owner, repo, tag }
5476 .make_request()
5477 .wrap::<_, _>(self)
5478 }
5479
5480 pub fn repo_get_release(
5486 &self,
5487 owner: &str,
5488 repo: &str,
5489 id: i64,
5490 ) -> Request<'_, endpoints::RepoGetRelease<'_>, Release> {
5491 endpoints::RepoGetRelease { owner, repo, id }
5492 .make_request()
5493 .wrap::<_, _>(self)
5494 }
5495
5496 pub fn repo_delete_release(
5502 &self,
5503 owner: &str,
5504 repo: &str,
5505 id: i64,
5506 ) -> Request<'_, endpoints::RepoDeleteRelease<'_>, ()> {
5507 endpoints::RepoDeleteRelease { owner, repo, id }
5508 .make_request()
5509 .wrap::<_, _>(self)
5510 }
5511
5512 pub fn repo_edit_release(
5519 &self,
5520 owner: &str,
5521 repo: &str,
5522 id: i64,
5523 body: EditReleaseOption,
5524 ) -> Request<'_, endpoints::RepoEditRelease<'_>, Release> {
5525 endpoints::RepoEditRelease {
5526 owner,
5527 repo,
5528 id,
5529 body: body,
5530 }
5531 .make_request()
5532 .wrap::<_, _>(self)
5533 }
5534
5535 pub fn repo_list_release_attachments(
5541 &self,
5542 owner: &str,
5543 repo: &str,
5544 id: i64,
5545 ) -> Request<'_, endpoints::RepoListReleaseAttachments<'_>, Vec<Attachment>> {
5546 endpoints::RepoListReleaseAttachments { owner, repo, id }
5547 .make_request()
5548 .wrap::<_, _>(self)
5549 }
5550
5551 pub fn repo_create_release_attachment(
5559 &self,
5560 owner: &str,
5561 repo: &str,
5562 id: i64,
5563 attachment: Option<&[u8]>,
5564 external_url: Option<&str>,
5565 query: RepoCreateReleaseAttachmentQuery,
5566 ) -> Request<'_, endpoints::RepoCreateReleaseAttachment<'_>, Attachment> {
5567 endpoints::RepoCreateReleaseAttachment {
5568 owner,
5569 repo,
5570 id,
5571 attachment: attachment.as_deref(),
5572 external_url: external_url.as_deref(),
5573 query,
5574 }
5575 .make_request()
5576 .wrap::<_, _>(self)
5577 }
5578
5579 pub fn repo_get_release_attachment(
5586 &self,
5587 owner: &str,
5588 repo: &str,
5589 id: i64,
5590 attachment_id: i64,
5591 ) -> Request<'_, endpoints::RepoGetReleaseAttachment<'_>, Attachment> {
5592 endpoints::RepoGetReleaseAttachment {
5593 owner,
5594 repo,
5595 id,
5596 attachment_id,
5597 }
5598 .make_request()
5599 .wrap::<_, _>(self)
5600 }
5601
5602 pub fn repo_delete_release_attachment(
5609 &self,
5610 owner: &str,
5611 repo: &str,
5612 id: i64,
5613 attachment_id: i64,
5614 ) -> Request<'_, endpoints::RepoDeleteReleaseAttachment<'_>, ()> {
5615 endpoints::RepoDeleteReleaseAttachment {
5616 owner,
5617 repo,
5618 id,
5619 attachment_id,
5620 }
5621 .make_request()
5622 .wrap::<_, _>(self)
5623 }
5624
5625 pub fn repo_edit_release_attachment(
5633 &self,
5634 owner: &str,
5635 repo: &str,
5636 id: i64,
5637 attachment_id: i64,
5638 body: EditAttachmentOptions,
5639 ) -> Request<'_, endpoints::RepoEditReleaseAttachment<'_>, Attachment> {
5640 endpoints::RepoEditReleaseAttachment {
5641 owner,
5642 repo,
5643 id,
5644 attachment_id,
5645 body: body,
5646 }
5647 .make_request()
5648 .wrap::<_, _>(self)
5649 }
5650
5651 pub fn repo_get_reviewers(
5656 &self,
5657 owner: &str,
5658 repo: &str,
5659 ) -> Request<'_, endpoints::RepoGetReviewers<'_>, (UserListHeaders, Vec<User>)> {
5660 endpoints::RepoGetReviewers { owner, repo }
5661 .make_request()
5662 .wrap::<_, _>(self)
5663 }
5664
5665 pub fn repo_signing_key(
5670 &self,
5671 owner: &str,
5672 repo: &str,
5673 ) -> Request<'_, endpoints::RepoSigningKey<'_>, String> {
5674 endpoints::RepoSigningKey { owner, repo }
5675 .make_request()
5676 .wrap::<_, _>(self)
5677 }
5678
5679 pub fn repo_list_stargazers(
5684 &self,
5685 owner: &str,
5686 repo: &str,
5687 ) -> Request<'_, endpoints::RepoListStargazers<'_>, (UserListHeaders, Vec<User>)> {
5688 endpoints::RepoListStargazers { owner, repo }
5689 .make_request()
5690 .wrap::<_, _>(self)
5691 }
5692
5693 pub fn repo_list_statuses(
5699 &self,
5700 owner: &str,
5701 repo: &str,
5702 sha: &str,
5703 query: RepoListStatusesQuery,
5704 ) -> Request<'_, endpoints::RepoListStatuses<'_>, (CommitStatusListHeaders, Vec<CommitStatus>)>
5705 {
5706 endpoints::RepoListStatuses {
5707 owner,
5708 repo,
5709 sha,
5710 query,
5711 }
5712 .make_request()
5713 .wrap::<_, _>(self)
5714 }
5715
5716 pub fn repo_create_status(
5723 &self,
5724 owner: &str,
5725 repo: &str,
5726 sha: &str,
5727 body: CreateStatusOption,
5728 ) -> Request<'_, endpoints::RepoCreateStatus<'_>, CommitStatus> {
5729 endpoints::RepoCreateStatus {
5730 owner,
5731 repo,
5732 sha,
5733 body: body,
5734 }
5735 .make_request()
5736 .wrap::<_, _>(self)
5737 }
5738
5739 pub fn repo_list_subscribers(
5744 &self,
5745 owner: &str,
5746 repo: &str,
5747 ) -> Request<'_, endpoints::RepoListSubscribers<'_>, (UserListHeaders, Vec<User>)> {
5748 endpoints::RepoListSubscribers { owner, repo }
5749 .make_request()
5750 .wrap::<_, _>(self)
5751 }
5752
5753 pub fn user_current_check_subscription(
5758 &self,
5759 owner: &str,
5760 repo: &str,
5761 ) -> Request<'_, endpoints::UserCurrentCheckSubscription<'_>, WatchInfo> {
5762 endpoints::UserCurrentCheckSubscription { owner, repo }
5763 .make_request()
5764 .wrap::<_, _>(self)
5765 }
5766
5767 pub fn user_current_put_subscription(
5772 &self,
5773 owner: &str,
5774 repo: &str,
5775 ) -> Request<'_, endpoints::UserCurrentPutSubscription<'_>, WatchInfo> {
5776 endpoints::UserCurrentPutSubscription { owner, repo }
5777 .make_request()
5778 .wrap::<_, _>(self)
5779 }
5780
5781 pub fn user_current_delete_subscription(
5786 &self,
5787 owner: &str,
5788 repo: &str,
5789 ) -> Request<'_, endpoints::UserCurrentDeleteSubscription<'_>, ()> {
5790 endpoints::UserCurrentDeleteSubscription { owner, repo }
5791 .make_request()
5792 .wrap::<_, _>(self)
5793 }
5794
5795 pub fn repo_sync_fork_default_info(
5800 &self,
5801 owner: &str,
5802 repo: &str,
5803 ) -> Request<'_, endpoints::RepoSyncForkDefaultInfo<'_>, SyncForkInfo> {
5804 endpoints::RepoSyncForkDefaultInfo { owner, repo }
5805 .make_request()
5806 .wrap::<_, _>(self)
5807 }
5808
5809 pub fn repo_sync_fork_default(
5814 &self,
5815 owner: &str,
5816 repo: &str,
5817 ) -> Request<'_, endpoints::RepoSyncForkDefault<'_>, ()> {
5818 endpoints::RepoSyncForkDefault { owner, repo }
5819 .make_request()
5820 .wrap::<_, _>(self)
5821 }
5822
5823 pub fn repo_sync_fork_branch_info(
5829 &self,
5830 owner: &str,
5831 repo: &str,
5832 branch: &str,
5833 ) -> Request<'_, endpoints::RepoSyncForkBranchInfo<'_>, SyncForkInfo> {
5834 endpoints::RepoSyncForkBranchInfo {
5835 owner,
5836 repo,
5837 branch,
5838 }
5839 .make_request()
5840 .wrap::<_, _>(self)
5841 }
5842
5843 pub fn repo_sync_fork_branch(
5849 &self,
5850 owner: &str,
5851 repo: &str,
5852 branch: &str,
5853 ) -> Request<'_, endpoints::RepoSyncForkBranch<'_>, ()> {
5854 endpoints::RepoSyncForkBranch {
5855 owner,
5856 repo,
5857 branch,
5858 }
5859 .make_request()
5860 .wrap::<_, _>(self)
5861 }
5862
5863 pub fn repo_list_tag_protection(
5868 &self,
5869 owner: &str,
5870 repo: &str,
5871 ) -> Request<'_, endpoints::RepoListTagProtection<'_>, Vec<TagProtection>> {
5872 endpoints::RepoListTagProtection { owner, repo }
5873 .make_request()
5874 .wrap::<_, _>(self)
5875 }
5876
5877 pub fn repo_create_tag_protection(
5883 &self,
5884 owner: &str,
5885 repo: &str,
5886 body: CreateTagProtectionOption,
5887 ) -> Request<'_, endpoints::RepoCreateTagProtection<'_>, TagProtection> {
5888 endpoints::RepoCreateTagProtection {
5889 owner,
5890 repo,
5891 body: body,
5892 }
5893 .make_request()
5894 .wrap::<_, _>(self)
5895 }
5896
5897 pub fn repo_get_tag_protection(
5903 &self,
5904 owner: &str,
5905 repo: &str,
5906 id: i64,
5907 ) -> Request<'_, endpoints::RepoGetTagProtection<'_>, TagProtection> {
5908 endpoints::RepoGetTagProtection { owner, repo, id }
5909 .make_request()
5910 .wrap::<_, _>(self)
5911 }
5912
5913 pub fn repo_delete_tag_protection(
5919 &self,
5920 owner: &str,
5921 repo: &str,
5922 id: i64,
5923 ) -> Request<'_, endpoints::RepoDeleteTagProtection<'_>, ()> {
5924 endpoints::RepoDeleteTagProtection { owner, repo, id }
5925 .make_request()
5926 .wrap::<_, _>(self)
5927 }
5928
5929 pub fn repo_edit_tag_protection(
5936 &self,
5937 owner: &str,
5938 repo: &str,
5939 id: i64,
5940 body: EditTagProtectionOption,
5941 ) -> Request<'_, endpoints::RepoEditTagProtection<'_>, TagProtection> {
5942 endpoints::RepoEditTagProtection {
5943 owner,
5944 repo,
5945 id,
5946 body: body,
5947 }
5948 .make_request()
5949 .wrap::<_, _>(self)
5950 }
5951
5952 pub fn repo_list_tags(
5957 &self,
5958 owner: &str,
5959 repo: &str,
5960 ) -> Request<'_, endpoints::RepoListTags<'_>, (TagListHeaders, Vec<Tag>)> {
5961 endpoints::RepoListTags { owner, repo }
5962 .make_request()
5963 .wrap::<_, _>(self)
5964 }
5965
5966 pub fn repo_create_tag(
5972 &self,
5973 owner: &str,
5974 repo: &str,
5975 body: CreateTagOption,
5976 ) -> Request<'_, endpoints::RepoCreateTag<'_>, Tag> {
5977 endpoints::RepoCreateTag {
5978 owner,
5979 repo,
5980 body: body,
5981 }
5982 .make_request()
5983 .wrap::<_, _>(self)
5984 }
5985
5986 pub fn repo_get_tag(
5992 &self,
5993 owner: &str,
5994 repo: &str,
5995 tag: &str,
5996 ) -> Request<'_, endpoints::RepoGetTag<'_>, Tag> {
5997 endpoints::RepoGetTag { owner, repo, tag }
5998 .make_request()
5999 .wrap::<_, _>(self)
6000 }
6001
6002 pub fn repo_delete_tag(
6008 &self,
6009 owner: &str,
6010 repo: &str,
6011 tag: &str,
6012 ) -> Request<'_, endpoints::RepoDeleteTag<'_>, ()> {
6013 endpoints::RepoDeleteTag { owner, repo, tag }
6014 .make_request()
6015 .wrap::<_, _>(self)
6016 }
6017
6018 pub fn repo_list_teams(
6023 &self,
6024 owner: &str,
6025 repo: &str,
6026 ) -> Request<'_, endpoints::RepoListTeams<'_>, Vec<Team>> {
6027 endpoints::RepoListTeams { owner, repo }
6028 .make_request()
6029 .wrap::<_, _>(self)
6030 }
6031
6032 pub fn repo_check_team(
6038 &self,
6039 owner: &str,
6040 repo: &str,
6041 team: &str,
6042 ) -> Request<'_, endpoints::RepoCheckTeam<'_>, Team> {
6043 endpoints::RepoCheckTeam { owner, repo, team }
6044 .make_request()
6045 .wrap::<_, _>(self)
6046 }
6047
6048 pub fn repo_add_team(
6054 &self,
6055 owner: &str,
6056 repo: &str,
6057 team: &str,
6058 ) -> Request<'_, endpoints::RepoAddTeam<'_>, ()> {
6059 endpoints::RepoAddTeam { owner, repo, team }
6060 .make_request()
6061 .wrap::<_, _>(self)
6062 }
6063
6064 pub fn repo_delete_team(
6070 &self,
6071 owner: &str,
6072 repo: &str,
6073 team: &str,
6074 ) -> Request<'_, endpoints::RepoDeleteTeam<'_>, ()> {
6075 endpoints::RepoDeleteTeam { owner, repo, team }
6076 .make_request()
6077 .wrap::<_, _>(self)
6078 }
6079
6080 pub fn repo_tracked_times(
6085 &self,
6086 owner: &str,
6087 repo: &str,
6088 query: RepoTrackedTimesQuery,
6089 ) -> Request<'_, endpoints::RepoTrackedTimes<'_>, (TrackedTimeListHeaders, Vec<TrackedTime>)>
6090 {
6091 endpoints::RepoTrackedTimes { owner, repo, query }
6092 .make_request()
6093 .wrap::<_, _>(self)
6094 }
6095
6096 pub fn user_tracked_times(
6102 &self,
6103 owner: &str,
6104 repo: &str,
6105 user: &str,
6106 ) -> Request<'_, endpoints::UserTrackedTimes<'_>, Vec<TrackedTime>> {
6107 endpoints::UserTrackedTimes { owner, repo, user }
6108 .make_request()
6109 .wrap::<_, _>(self)
6110 }
6111
6112 pub fn repo_list_topics(
6117 &self,
6118 owner: &str,
6119 repo: &str,
6120 ) -> Request<'_, endpoints::RepoListTopics<'_>, TopicName> {
6121 endpoints::RepoListTopics { owner, repo }
6122 .make_request()
6123 .wrap::<_, _>(self)
6124 }
6125
6126 pub fn repo_update_topics(
6132 &self,
6133 owner: &str,
6134 repo: &str,
6135 body: RepoTopicOptions,
6136 ) -> Request<'_, endpoints::RepoUpdateTopics<'_>, ()> {
6137 endpoints::RepoUpdateTopics {
6138 owner,
6139 repo,
6140 body: body,
6141 }
6142 .make_request()
6143 .wrap::<_, _>(self)
6144 }
6145
6146 pub fn repo_add_topic(
6152 &self,
6153 owner: &str,
6154 repo: &str,
6155 topic: &str,
6156 ) -> Request<'_, endpoints::RepoAddTopic<'_>, ()> {
6157 endpoints::RepoAddTopic { owner, repo, topic }
6158 .make_request()
6159 .wrap::<_, _>(self)
6160 }
6161
6162 pub fn repo_delete_topic(
6168 &self,
6169 owner: &str,
6170 repo: &str,
6171 topic: &str,
6172 ) -> Request<'_, endpoints::RepoDeleteTopic<'_>, ()> {
6173 endpoints::RepoDeleteTopic { owner, repo, topic }
6174 .make_request()
6175 .wrap::<_, _>(self)
6176 }
6177
6178 pub fn repo_transfer(
6186 &self,
6187 owner: &str,
6188 repo: &str,
6189 body: TransferRepoOption,
6190 ) -> Request<'_, endpoints::RepoTransfer<'_>, Repository> {
6191 endpoints::RepoTransfer {
6192 owner,
6193 repo,
6194 body: body,
6195 }
6196 .make_request()
6197 .wrap::<_, _>(self)
6198 }
6199
6200 pub fn accept_repo_transfer(
6205 &self,
6206 owner: &str,
6207 repo: &str,
6208 ) -> Request<'_, endpoints::AcceptRepoTransfer<'_>, Repository> {
6209 endpoints::AcceptRepoTransfer { owner, repo }
6210 .make_request()
6211 .wrap::<_, _>(self)
6212 }
6213
6214 pub fn reject_repo_transfer(
6219 &self,
6220 owner: &str,
6221 repo: &str,
6222 ) -> Request<'_, endpoints::RejectRepoTransfer<'_>, Repository> {
6223 endpoints::RejectRepoTransfer { owner, repo }
6224 .make_request()
6225 .wrap::<_, _>(self)
6226 }
6227
6228 pub fn repo_create_wiki_page(
6234 &self,
6235 owner: &str,
6236 repo: &str,
6237 body: CreateWikiPageOptions,
6238 ) -> Request<'_, endpoints::RepoCreateWikiPage<'_>, WikiPage> {
6239 endpoints::RepoCreateWikiPage {
6240 owner,
6241 repo,
6242 body: body,
6243 }
6244 .make_request()
6245 .wrap::<_, _>(self)
6246 }
6247
6248 pub fn repo_get_wiki_page(
6254 &self,
6255 owner: &str,
6256 repo: &str,
6257 page_name: &str,
6258 ) -> Request<'_, endpoints::RepoGetWikiPage<'_>, WikiPage> {
6259 endpoints::RepoGetWikiPage {
6260 owner,
6261 repo,
6262 page_name,
6263 }
6264 .make_request()
6265 .wrap::<_, _>(self)
6266 }
6267
6268 pub fn repo_delete_wiki_page(
6274 &self,
6275 owner: &str,
6276 repo: &str,
6277 page_name: &str,
6278 ) -> Request<'_, endpoints::RepoDeleteWikiPage<'_>, ()> {
6279 endpoints::RepoDeleteWikiPage {
6280 owner,
6281 repo,
6282 page_name,
6283 }
6284 .make_request()
6285 .wrap::<_, _>(self)
6286 }
6287
6288 pub fn repo_edit_wiki_page(
6295 &self,
6296 owner: &str,
6297 repo: &str,
6298 page_name: &str,
6299 body: CreateWikiPageOptions,
6300 ) -> Request<'_, endpoints::RepoEditWikiPage<'_>, WikiPage> {
6301 endpoints::RepoEditWikiPage {
6302 owner,
6303 repo,
6304 page_name,
6305 body: body,
6306 }
6307 .make_request()
6308 .wrap::<_, _>(self)
6309 }
6310
6311 pub fn repo_get_wiki_pages(
6316 &self,
6317 owner: &str,
6318 repo: &str,
6319 ) -> Request<'_, endpoints::RepoGetWikiPages<'_>, (WikiPageListHeaders, Vec<WikiPageMetaData>)>
6320 {
6321 endpoints::RepoGetWikiPages { owner, repo }
6322 .make_request()
6323 .wrap::<_, _>(self)
6324 }
6325
6326 pub fn repo_get_wiki_page_revisions(
6332 &self,
6333 owner: &str,
6334 repo: &str,
6335 page_name: &str,
6336 ) -> Request<'_, endpoints::RepoGetWikiPageRevisions<'_>, (WikiCommitListHeaders, WikiCommitList)>
6337 {
6338 endpoints::RepoGetWikiPageRevisions {
6339 owner,
6340 repo,
6341 page_name,
6342 }
6343 .make_request()
6344 .wrap::<_, _>(self)
6345 }
6346
6347 pub fn generate_repo(
6353 &self,
6354 template_owner: &str,
6355 template_repo: &str,
6356 body: GenerateRepoOption,
6357 ) -> Request<'_, endpoints::GenerateRepo<'_>, Repository> {
6358 endpoints::GenerateRepo {
6359 template_owner,
6360 template_repo,
6361 body: body,
6362 }
6363 .make_request()
6364 .wrap::<_, _>(self)
6365 }
6366
6367 pub fn repo_get_by_id(&self, id: i64) -> Request<'_, endpoints::RepoGetById, Repository> {
6371 endpoints::RepoGetById { id }
6372 .make_request()
6373 .wrap::<_, _>(self)
6374 }
6375
6376 pub fn get_general_api_settings(
6378 &self,
6379 ) -> Request<'_, endpoints::GetGeneralApiSettings, GeneralAPISettings> {
6380 endpoints::GetGeneralApiSettings {}
6381 .make_request()
6382 .wrap::<_, _>(self)
6383 }
6384
6385 pub fn get_general_attachment_settings(
6387 &self,
6388 ) -> Request<'_, endpoints::GetGeneralAttachmentSettings, GeneralAttachmentSettings> {
6389 endpoints::GetGeneralAttachmentSettings {}
6390 .make_request()
6391 .wrap::<_, _>(self)
6392 }
6393
6394 pub fn get_general_repository_settings(
6396 &self,
6397 ) -> Request<'_, endpoints::GetGeneralRepositorySettings, GeneralRepoSettings> {
6398 endpoints::GetGeneralRepositorySettings {}
6399 .make_request()
6400 .wrap::<_, _>(self)
6401 }
6402
6403 pub fn get_general_ui_settings(
6405 &self,
6406 ) -> Request<'_, endpoints::GetGeneralUiSettings, GeneralUISettings> {
6407 endpoints::GetGeneralUiSettings {}
6408 .make_request()
6409 .wrap::<_, _>(self)
6410 }
6411
6412 pub fn get_signing_key(&self) -> Request<'_, endpoints::GetSigningKey, String> {
6414 endpoints::GetSigningKey {}
6415 .make_request()
6416 .wrap::<_, _>(self)
6417 }
6418
6419 pub fn get_ssh_signing_key(&self) -> Request<'_, endpoints::GetSshSigningKey, String> {
6421 endpoints::GetSshSigningKey {}
6422 .make_request()
6423 .wrap::<_, _>(self)
6424 }
6425
6426 pub fn org_get_team(&self, id: i64) -> Request<'_, endpoints::OrgGetTeam, Team> {
6430 endpoints::OrgGetTeam { id }
6431 .make_request()
6432 .wrap::<_, _>(self)
6433 }
6434
6435 pub fn org_delete_team(&self, id: i64) -> Request<'_, endpoints::OrgDeleteTeam, ()> {
6439 endpoints::OrgDeleteTeam { id }
6440 .make_request()
6441 .wrap::<_, _>(self)
6442 }
6443
6444 pub fn org_edit_team(
6449 &self,
6450 id: i64,
6451 body: EditTeamOption,
6452 ) -> Request<'_, endpoints::OrgEditTeam, Team> {
6453 endpoints::OrgEditTeam { id, body: body }
6454 .make_request()
6455 .wrap::<_, _>(self)
6456 }
6457
6458 pub fn org_list_team_activity_feeds(
6462 &self,
6463 id: i64,
6464 query: OrgListTeamActivityFeedsQuery,
6465 ) -> Request<'_, endpoints::OrgListTeamActivityFeeds, (ActivityFeedsListHeaders, Vec<Activity>)>
6466 {
6467 endpoints::OrgListTeamActivityFeeds { id, query }
6468 .make_request()
6469 .wrap::<_, _>(self)
6470 }
6471
6472 pub fn org_list_team_members(
6476 &self,
6477 id: i64,
6478 ) -> Request<'_, endpoints::OrgListTeamMembers, (UserListHeaders, Vec<User>)> {
6479 endpoints::OrgListTeamMembers { id }
6480 .make_request()
6481 .wrap::<_, _>(self)
6482 }
6483
6484 pub fn org_list_team_member(
6489 &self,
6490 id: i64,
6491 username: &str,
6492 ) -> Request<'_, endpoints::OrgListTeamMember<'_>, User> {
6493 endpoints::OrgListTeamMember { id, username }
6494 .make_request()
6495 .wrap::<_, _>(self)
6496 }
6497
6498 pub fn org_add_team_member(
6503 &self,
6504 id: i64,
6505 username: &str,
6506 ) -> Request<'_, endpoints::OrgAddTeamMember<'_>, ()> {
6507 endpoints::OrgAddTeamMember { id, username }
6508 .make_request()
6509 .wrap::<_, _>(self)
6510 }
6511
6512 pub fn org_remove_team_member(
6517 &self,
6518 id: i64,
6519 username: &str,
6520 ) -> Request<'_, endpoints::OrgRemoveTeamMember<'_>, ()> {
6521 endpoints::OrgRemoveTeamMember { id, username }
6522 .make_request()
6523 .wrap::<_, _>(self)
6524 }
6525
6526 pub fn org_list_team_repos(
6530 &self,
6531 id: i64,
6532 ) -> Request<'_, endpoints::OrgListTeamRepos, (RepositoryListHeaders, Vec<Repository>)> {
6533 endpoints::OrgListTeamRepos { id }
6534 .make_request()
6535 .wrap::<_, _>(self)
6536 }
6537
6538 pub fn org_list_team_repo(
6544 &self,
6545 id: i64,
6546 org: &str,
6547 repo: &str,
6548 ) -> Request<'_, endpoints::OrgListTeamRepo<'_>, Repository> {
6549 endpoints::OrgListTeamRepo { id, org, repo }
6550 .make_request()
6551 .wrap::<_, _>(self)
6552 }
6553
6554 pub fn org_add_team_repository(
6560 &self,
6561 id: i64,
6562 org: &str,
6563 repo: &str,
6564 ) -> Request<'_, endpoints::OrgAddTeamRepository<'_>, ()> {
6565 endpoints::OrgAddTeamRepository { id, org, repo }
6566 .make_request()
6567 .wrap::<_, _>(self)
6568 }
6569
6570 pub fn org_remove_team_repository(
6576 &self,
6577 id: i64,
6578 org: &str,
6579 repo: &str,
6580 ) -> Request<'_, endpoints::OrgRemoveTeamRepository<'_>, ()> {
6581 endpoints::OrgRemoveTeamRepository { id, org, repo }
6582 .make_request()
6583 .wrap::<_, _>(self)
6584 }
6585
6586 pub fn topic_search(
6589 &self,
6590 query: TopicSearchQuery,
6591 ) -> Request<'_, endpoints::TopicSearch, TopicSearchResults> {
6592 endpoints::TopicSearch { query }
6593 .make_request()
6594 .wrap::<_, _>(self)
6595 }
6596
6597 pub fn user_get_current(&self) -> Request<'_, endpoints::UserGetCurrent, User> {
6599 endpoints::UserGetCurrent {}
6600 .make_request()
6601 .wrap::<_, _>(self)
6602 }
6603
6604 pub fn user_search_run_jobs(
6607 &self,
6608 query: UserSearchRunJobsQuery,
6609 ) -> Request<'_, endpoints::UserSearchRunJobs, Vec<ActionRunJob>> {
6610 endpoints::UserSearchRunJobs { query }
6611 .make_request()
6612 .wrap::<_, _>(self)
6613 }
6614
6615 pub fn user_get_runner_registration_token(
6617 &self,
6618 ) -> Request<'_, endpoints::UserGetRunnerRegistrationToken, RegistrationToken> {
6619 endpoints::UserGetRunnerRegistrationToken {}
6620 .make_request()
6621 .wrap::<_, _>(self)
6622 }
6623
6624 pub fn update_user_secret(
6629 &self,
6630 secretname: &str,
6631 body: CreateOrUpdateSecretOption,
6632 ) -> Request<'_, endpoints::UpdateUserSecret<'_>, ()> {
6633 endpoints::UpdateUserSecret {
6634 secretname,
6635 body: body,
6636 }
6637 .make_request()
6638 .wrap::<_, _>(self)
6639 }
6640
6641 pub fn delete_user_secret(
6645 &self,
6646 secretname: &str,
6647 ) -> Request<'_, endpoints::DeleteUserSecret<'_>, ()> {
6648 endpoints::DeleteUserSecret { secretname }
6649 .make_request()
6650 .wrap::<_, _>(self)
6651 }
6652
6653 pub fn get_user_variables_list(
6656 &self,
6657 ) -> Request<'_, endpoints::GetUserVariablesList, (VariableListHeaders, Vec<ActionVariable>)>
6658 {
6659 endpoints::GetUserVariablesList {}
6660 .make_request()
6661 .wrap::<_, _>(self)
6662 }
6663
6664 pub fn get_user_variable(
6668 &self,
6669 variablename: &str,
6670 ) -> Request<'_, endpoints::GetUserVariable<'_>, ActionVariable> {
6671 endpoints::GetUserVariable { variablename }
6672 .make_request()
6673 .wrap::<_, _>(self)
6674 }
6675
6676 pub fn update_user_variable(
6681 &self,
6682 variablename: &str,
6683 body: UpdateVariableOption,
6684 ) -> Request<'_, endpoints::UpdateUserVariable<'_>, ()> {
6685 endpoints::UpdateUserVariable {
6686 variablename,
6687 body: body,
6688 }
6689 .make_request()
6690 .wrap::<_, _>(self)
6691 }
6692
6693 pub fn create_user_variable(
6698 &self,
6699 variablename: &str,
6700 body: CreateVariableOption,
6701 ) -> Request<'_, endpoints::CreateUserVariable<'_>, ()> {
6702 endpoints::CreateUserVariable {
6703 variablename,
6704 body: body,
6705 }
6706 .make_request()
6707 .wrap::<_, _>(self)
6708 }
6709
6710 pub fn delete_user_variable(
6714 &self,
6715 variablename: &str,
6716 ) -> Request<'_, endpoints::DeleteUserVariable<'_>, ()> {
6717 endpoints::DeleteUserVariable { variablename }
6718 .make_request()
6719 .wrap::<_, _>(self)
6720 }
6721
6722 pub fn user_get_oauth2_applications(
6725 &self,
6726 ) -> Request<
6727 '_,
6728 endpoints::UserGetOAuth2Applications,
6729 (OAuth2ApplicationListHeaders, Vec<OAuth2Application>),
6730 > {
6731 endpoints::UserGetOAuth2Applications {}
6732 .make_request()
6733 .wrap::<_, _>(self)
6734 }
6735
6736 pub fn user_create_oauth2_application(
6740 &self,
6741 body: CreateOAuth2ApplicationOptions,
6742 ) -> Request<'_, endpoints::UserCreateOAuth2Application, OAuth2Application> {
6743 endpoints::UserCreateOAuth2Application { body: body }
6744 .make_request()
6745 .wrap::<_, _>(self)
6746 }
6747
6748 pub fn user_get_oauth2_application(
6752 &self,
6753 id: i64,
6754 ) -> Request<'_, endpoints::UserGetOAuth2Application, OAuth2Application> {
6755 endpoints::UserGetOAuth2Application { id }
6756 .make_request()
6757 .wrap::<_, _>(self)
6758 }
6759
6760 pub fn user_delete_oauth2_application(
6764 &self,
6765 id: i64,
6766 ) -> Request<'_, endpoints::UserDeleteOAuth2Application, ()> {
6767 endpoints::UserDeleteOAuth2Application { id }
6768 .make_request()
6769 .wrap::<_, _>(self)
6770 }
6771
6772 pub fn user_update_oauth2_application(
6777 &self,
6778 id: i64,
6779 body: CreateOAuth2ApplicationOptions,
6780 ) -> Request<'_, endpoints::UserUpdateOAuth2Application, OAuth2Application> {
6781 endpoints::UserUpdateOAuth2Application { id, body: body }
6782 .make_request()
6783 .wrap::<_, _>(self)
6784 }
6785
6786 pub fn user_update_avatar(
6790 &self,
6791 body: UpdateUserAvatarOption,
6792 ) -> Request<'_, endpoints::UserUpdateAvatar, ()> {
6793 endpoints::UserUpdateAvatar { body: body }
6794 .make_request()
6795 .wrap::<_, _>(self)
6796 }
6797
6798 pub fn user_delete_avatar(&self) -> Request<'_, endpoints::UserDeleteAvatar, ()> {
6800 endpoints::UserDeleteAvatar {}
6801 .make_request()
6802 .wrap::<_, _>(self)
6803 }
6804
6805 pub fn user_block_user(&self, username: &str) -> Request<'_, endpoints::UserBlockUser<'_>, ()> {
6809 endpoints::UserBlockUser { username }
6810 .make_request()
6811 .wrap::<_, _>(self)
6812 }
6813
6814 pub fn user_list_emails(&self) -> Request<'_, endpoints::UserListEmails, Vec<Email>> {
6816 endpoints::UserListEmails {}
6817 .make_request()
6818 .wrap::<_, _>(self)
6819 }
6820
6821 pub fn user_add_email(
6825 &self,
6826 body: CreateEmailOption,
6827 ) -> Request<'_, endpoints::UserAddEmail, Vec<Email>> {
6828 endpoints::UserAddEmail { body: body }
6829 .make_request()
6830 .wrap::<_, _>(self)
6831 }
6832
6833 pub fn user_delete_email(
6837 &self,
6838 body: DeleteEmailOption,
6839 ) -> Request<'_, endpoints::UserDeleteEmail, ()> {
6840 endpoints::UserDeleteEmail { body: body }
6841 .make_request()
6842 .wrap::<_, _>(self)
6843 }
6844
6845 pub fn user_current_list_followers(
6848 &self,
6849 ) -> Request<'_, endpoints::UserCurrentListFollowers, (UserListHeaders, Vec<User>)> {
6850 endpoints::UserCurrentListFollowers {}
6851 .make_request()
6852 .wrap::<_, _>(self)
6853 }
6854
6855 pub fn user_current_list_following(
6858 &self,
6859 ) -> Request<'_, endpoints::UserCurrentListFollowing, (UserListHeaders, Vec<User>)> {
6860 endpoints::UserCurrentListFollowing {}
6861 .make_request()
6862 .wrap::<_, _>(self)
6863 }
6864
6865 pub fn user_current_check_following(
6869 &self,
6870 username: &str,
6871 ) -> Request<'_, endpoints::UserCurrentCheckFollowing<'_>, ()> {
6872 endpoints::UserCurrentCheckFollowing { username }
6873 .make_request()
6874 .wrap::<_, _>(self)
6875 }
6876
6877 pub fn user_current_put_follow(
6881 &self,
6882 username: &str,
6883 ) -> Request<'_, endpoints::UserCurrentPutFollow<'_>, ()> {
6884 endpoints::UserCurrentPutFollow { username }
6885 .make_request()
6886 .wrap::<_, _>(self)
6887 }
6888
6889 pub fn user_current_delete_follow(
6893 &self,
6894 username: &str,
6895 ) -> Request<'_, endpoints::UserCurrentDeleteFollow<'_>, ()> {
6896 endpoints::UserCurrentDeleteFollow { username }
6897 .make_request()
6898 .wrap::<_, _>(self)
6899 }
6900
6901 pub fn get_verification_token(&self) -> Request<'_, endpoints::GetVerificationToken, String> {
6903 endpoints::GetVerificationToken {}
6904 .make_request()
6905 .wrap::<_, _>(self)
6906 }
6907
6908 pub fn user_verify_gpg_key(
6912 &self,
6913 body: VerifyGPGKeyOption,
6914 ) -> Request<'_, endpoints::UserVerifyGpgKey, GPGKey> {
6915 endpoints::UserVerifyGpgKey { body: body }
6916 .make_request()
6917 .wrap::<_, _>(self)
6918 }
6919
6920 pub fn user_current_list_gpg_keys(
6923 &self,
6924 ) -> Request<'_, endpoints::UserCurrentListGpgKeys, (GpgKeyListHeaders, Vec<GPGKey>)> {
6925 endpoints::UserCurrentListGpgKeys {}
6926 .make_request()
6927 .wrap::<_, _>(self)
6928 }
6929
6930 pub fn user_current_post_gpg_key(
6934 &self,
6935 form: CreateGPGKeyOption,
6936 ) -> Request<'_, endpoints::UserCurrentPostGpgKey, GPGKey> {
6937 endpoints::UserCurrentPostGpgKey { body: form }
6938 .make_request()
6939 .wrap::<_, _>(self)
6940 }
6941
6942 pub fn user_current_get_gpg_key(
6946 &self,
6947 id: i64,
6948 ) -> Request<'_, endpoints::UserCurrentGetGpgKey, GPGKey> {
6949 endpoints::UserCurrentGetGpgKey { id }
6950 .make_request()
6951 .wrap::<_, _>(self)
6952 }
6953
6954 pub fn user_current_delete_gpg_key(
6958 &self,
6959 id: i64,
6960 ) -> Request<'_, endpoints::UserCurrentDeleteGpgKey, ()> {
6961 endpoints::UserCurrentDeleteGpgKey { id }
6962 .make_request()
6963 .wrap::<_, _>(self)
6964 }
6965
6966 pub fn user_list_hooks(&self) -> Request<'_, endpoints::UserListHooks, Vec<Hook>> {
6969 endpoints::UserListHooks {}
6970 .make_request()
6971 .wrap::<_, _>(self)
6972 }
6973
6974 pub fn user_create_hook(
6978 &self,
6979 body: CreateHookOption,
6980 ) -> Request<'_, endpoints::UserCreateHook, Hook> {
6981 endpoints::UserCreateHook { body: body }
6982 .make_request()
6983 .wrap::<_, _>(self)
6984 }
6985
6986 pub fn user_get_hook(&self, id: i64) -> Request<'_, endpoints::UserGetHook, Hook> {
6990 endpoints::UserGetHook { id }
6991 .make_request()
6992 .wrap::<_, _>(self)
6993 }
6994
6995 pub fn user_delete_hook(&self, id: i64) -> Request<'_, endpoints::UserDeleteHook, ()> {
6999 endpoints::UserDeleteHook { id }
7000 .make_request()
7001 .wrap::<_, _>(self)
7002 }
7003
7004 pub fn user_edit_hook(
7009 &self,
7010 id: i64,
7011 body: EditHookOption,
7012 ) -> Request<'_, endpoints::UserEditHook, Hook> {
7013 endpoints::UserEditHook { id, body: body }
7014 .make_request()
7015 .wrap::<_, _>(self)
7016 }
7017
7018 pub fn user_current_list_keys(
7021 &self,
7022 query: UserCurrentListKeysQuery,
7023 ) -> Request<'_, endpoints::UserCurrentListKeys, (PublicKeyListHeaders, Vec<PublicKey>)> {
7024 endpoints::UserCurrentListKeys { query }
7025 .make_request()
7026 .wrap::<_, _>(self)
7027 }
7028
7029 pub fn user_current_post_key(
7033 &self,
7034 body: CreateKeyOption,
7035 ) -> Request<'_, endpoints::UserCurrentPostKey, PublicKey> {
7036 endpoints::UserCurrentPostKey { body: body }
7037 .make_request()
7038 .wrap::<_, _>(self)
7039 }
7040
7041 pub fn user_current_get_key(
7045 &self,
7046 id: i64,
7047 ) -> Request<'_, endpoints::UserCurrentGetKey, PublicKey> {
7048 endpoints::UserCurrentGetKey { id }
7049 .make_request()
7050 .wrap::<_, _>(self)
7051 }
7052
7053 pub fn user_current_delete_key(
7057 &self,
7058 id: i64,
7059 ) -> Request<'_, endpoints::UserCurrentDeleteKey, ()> {
7060 endpoints::UserCurrentDeleteKey { id }
7061 .make_request()
7062 .wrap::<_, _>(self)
7063 }
7064
7065 pub fn user_list_blocked_users(
7068 &self,
7069 ) -> Request<'_, endpoints::UserListBlockedUsers, (BlockedUserListHeaders, Vec<BlockedUser>)>
7070 {
7071 endpoints::UserListBlockedUsers {}
7072 .make_request()
7073 .wrap::<_, _>(self)
7074 }
7075
7076 pub fn org_list_current_user_orgs(
7079 &self,
7080 ) -> Request<'_, endpoints::OrgListCurrentUserOrgs, Vec<Organization>> {
7081 endpoints::OrgListCurrentUserOrgs {}
7082 .make_request()
7083 .wrap::<_, _>(self)
7084 }
7085
7086 pub fn user_get_quota(&self) -> Request<'_, endpoints::UserGetQuota, QuotaInfo> {
7088 endpoints::UserGetQuota {}.make_request().wrap::<_, _>(self)
7089 }
7090
7091 pub fn user_list_quota_artifacts(
7094 &self,
7095 ) -> Request<
7096 '_,
7097 endpoints::UserListQuotaArtifacts,
7098 (QuotaUsedArtifactListHeaders, Vec<QuotaUsedArtifact>),
7099 > {
7100 endpoints::UserListQuotaArtifacts {}
7101 .make_request()
7102 .wrap::<_, _>(self)
7103 }
7104
7105 pub fn user_list_quota_attachments(
7108 &self,
7109 ) -> Request<
7110 '_,
7111 endpoints::UserListQuotaAttachments,
7112 (QuotaUsedAttachmentListHeaders, Vec<QuotaUsedAttachment>),
7113 > {
7114 endpoints::UserListQuotaAttachments {}
7115 .make_request()
7116 .wrap::<_, _>(self)
7117 }
7118
7119 pub fn user_check_quota(
7122 &self,
7123 query: UserCheckQuotaQuery,
7124 ) -> Request<'_, endpoints::UserCheckQuota, bool> {
7125 endpoints::UserCheckQuota { query }
7126 .make_request()
7127 .wrap::<_, _>(self)
7128 }
7129
7130 pub fn user_list_quota_packages(
7133 &self,
7134 ) -> Request<
7135 '_,
7136 endpoints::UserListQuotaPackages,
7137 (QuotaUsedPackageListHeaders, Vec<QuotaUsedPackage>),
7138 > {
7139 endpoints::UserListQuotaPackages {}
7140 .make_request()
7141 .wrap::<_, _>(self)
7142 }
7143
7144 pub fn user_current_list_repos(
7147 &self,
7148 query: UserCurrentListReposQuery,
7149 ) -> Request<'_, endpoints::UserCurrentListRepos, (RepositoryListHeaders, Vec<Repository>)>
7150 {
7151 endpoints::UserCurrentListRepos { query }
7152 .make_request()
7153 .wrap::<_, _>(self)
7154 }
7155
7156 pub fn create_current_user_repo(
7160 &self,
7161 body: CreateRepoOption,
7162 ) -> Request<'_, endpoints::CreateCurrentUserRepo, Repository> {
7163 endpoints::CreateCurrentUserRepo { body: body }
7164 .make_request()
7165 .wrap::<_, _>(self)
7166 }
7167
7168 pub fn get_user_settings(&self) -> Request<'_, endpoints::GetUserSettings, UserSettings> {
7170 endpoints::GetUserSettings {}
7171 .make_request()
7172 .wrap::<_, _>(self)
7173 }
7174
7175 pub fn update_user_settings(
7179 &self,
7180 body: UserSettingsOptions,
7181 ) -> Request<'_, endpoints::UpdateUserSettings, UserSettings> {
7182 endpoints::UpdateUserSettings { body: body }
7183 .make_request()
7184 .wrap::<_, _>(self)
7185 }
7186
7187 pub fn user_current_list_starred(
7190 &self,
7191 ) -> Request<'_, endpoints::UserCurrentListStarred, (RepositoryListHeaders, Vec<Repository>)>
7192 {
7193 endpoints::UserCurrentListStarred {}
7194 .make_request()
7195 .wrap::<_, _>(self)
7196 }
7197
7198 pub fn user_current_check_starring(
7203 &self,
7204 owner: &str,
7205 repo: &str,
7206 ) -> Request<'_, endpoints::UserCurrentCheckStarring<'_>, ()> {
7207 endpoints::UserCurrentCheckStarring { owner, repo }
7208 .make_request()
7209 .wrap::<_, _>(self)
7210 }
7211
7212 pub fn user_current_put_star(
7217 &self,
7218 owner: &str,
7219 repo: &str,
7220 ) -> Request<'_, endpoints::UserCurrentPutStar<'_>, ()> {
7221 endpoints::UserCurrentPutStar { owner, repo }
7222 .make_request()
7223 .wrap::<_, _>(self)
7224 }
7225
7226 pub fn user_current_delete_star(
7231 &self,
7232 owner: &str,
7233 repo: &str,
7234 ) -> Request<'_, endpoints::UserCurrentDeleteStar<'_>, ()> {
7235 endpoints::UserCurrentDeleteStar { owner, repo }
7236 .make_request()
7237 .wrap::<_, _>(self)
7238 }
7239
7240 pub fn user_get_stop_watches(
7243 &self,
7244 ) -> Request<'_, endpoints::UserGetStopWatches, (StopWatchListHeaders, Vec<StopWatch>)> {
7245 endpoints::UserGetStopWatches {}
7246 .make_request()
7247 .wrap::<_, _>(self)
7248 }
7249
7250 pub fn user_current_list_subscriptions(
7253 &self,
7254 ) -> Request<
7255 '_,
7256 endpoints::UserCurrentListSubscriptions,
7257 (RepositoryListHeaders, Vec<Repository>),
7258 > {
7259 endpoints::UserCurrentListSubscriptions {}
7260 .make_request()
7261 .wrap::<_, _>(self)
7262 }
7263
7264 pub fn user_list_teams(
7267 &self,
7268 ) -> Request<'_, endpoints::UserListTeams, (TeamListHeaders, Vec<Team>)> {
7269 endpoints::UserListTeams {}
7270 .make_request()
7271 .wrap::<_, _>(self)
7272 }
7273
7274 pub fn user_current_tracked_times(
7277 &self,
7278 query: UserCurrentTrackedTimesQuery,
7279 ) -> Request<'_, endpoints::UserCurrentTrackedTimes, (TrackedTimeListHeaders, Vec<TrackedTime>)>
7280 {
7281 endpoints::UserCurrentTrackedTimes { query }
7282 .make_request()
7283 .wrap::<_, _>(self)
7284 }
7285
7286 pub fn user_unblock_user(
7290 &self,
7291 username: &str,
7292 ) -> Request<'_, endpoints::UserUnblockUser<'_>, ()> {
7293 endpoints::UserUnblockUser { username }
7294 .make_request()
7295 .wrap::<_, _>(self)
7296 }
7297
7298 pub fn user_search(
7301 &self,
7302 query: UserSearchQuery,
7303 ) -> Request<'_, endpoints::UserSearch, UserSearchResults> {
7304 endpoints::UserSearch { query }
7305 .make_request()
7306 .wrap::<_, _>(self)
7307 }
7308
7309 pub fn user_get(&self, username: &str) -> Request<'_, endpoints::UserGet<'_>, User> {
7313 endpoints::UserGet { username }
7314 .make_request()
7315 .wrap::<_, _>(self)
7316 }
7317
7318 pub fn user_list_activity_feeds(
7322 &self,
7323 username: &str,
7324 query: UserListActivityFeedsQuery,
7325 ) -> Request<'_, endpoints::UserListActivityFeeds<'_>, (ActivityFeedsListHeaders, Vec<Activity>)>
7326 {
7327 endpoints::UserListActivityFeeds { username, query }
7328 .make_request()
7329 .wrap::<_, _>(self)
7330 }
7331
7332 pub fn user_list_followers(
7336 &self,
7337 username: &str,
7338 ) -> Request<'_, endpoints::UserListFollowers<'_>, (UserListHeaders, Vec<User>)> {
7339 endpoints::UserListFollowers { username }
7340 .make_request()
7341 .wrap::<_, _>(self)
7342 }
7343
7344 pub fn user_list_following(
7348 &self,
7349 username: &str,
7350 ) -> Request<'_, endpoints::UserListFollowing<'_>, (UserListHeaders, Vec<User>)> {
7351 endpoints::UserListFollowing { username }
7352 .make_request()
7353 .wrap::<_, _>(self)
7354 }
7355
7356 pub fn user_check_following(
7361 &self,
7362 username: &str,
7363 target: &str,
7364 ) -> Request<'_, endpoints::UserCheckFollowing<'_>, ()> {
7365 endpoints::UserCheckFollowing { username, target }
7366 .make_request()
7367 .wrap::<_, _>(self)
7368 }
7369
7370 pub fn user_list_gpg_keys(
7374 &self,
7375 username: &str,
7376 ) -> Request<'_, endpoints::UserListGpgKeys<'_>, (GpgKeyListHeaders, Vec<GPGKey>)> {
7377 endpoints::UserListGpgKeys { username }
7378 .make_request()
7379 .wrap::<_, _>(self)
7380 }
7381
7382 pub fn user_get_heatmap_data(
7386 &self,
7387 username: &str,
7388 ) -> Request<'_, endpoints::UserGetHeatmapData<'_>, Vec<UserHeatmapData>> {
7389 endpoints::UserGetHeatmapData { username }
7390 .make_request()
7391 .wrap::<_, _>(self)
7392 }
7393
7394 pub fn user_list_keys(
7398 &self,
7399 username: &str,
7400 query: UserListKeysQuery,
7401 ) -> Request<'_, endpoints::UserListKeys<'_>, (PublicKeyListHeaders, Vec<PublicKey>)> {
7402 endpoints::UserListKeys { username, query }
7403 .make_request()
7404 .wrap::<_, _>(self)
7405 }
7406
7407 pub fn org_list_user_orgs(
7411 &self,
7412 username: &str,
7413 ) -> Request<'_, endpoints::OrgListUserOrgs<'_>, Vec<Organization>> {
7414 endpoints::OrgListUserOrgs { username }
7415 .make_request()
7416 .wrap::<_, _>(self)
7417 }
7418
7419 pub fn org_get_user_permissions(
7424 &self,
7425 username: &str,
7426 org: &str,
7427 ) -> Request<'_, endpoints::OrgGetUserPermissions<'_>, OrganizationPermissions> {
7428 endpoints::OrgGetUserPermissions { username, org }
7429 .make_request()
7430 .wrap::<_, _>(self)
7431 }
7432
7433 pub fn user_list_repos(
7437 &self,
7438 username: &str,
7439 ) -> Request<'_, endpoints::UserListRepos<'_>, (RepositoryListHeaders, Vec<Repository>)> {
7440 endpoints::UserListRepos { username }
7441 .make_request()
7442 .wrap::<_, _>(self)
7443 }
7444
7445 pub fn user_list_starred(
7449 &self,
7450 username: &str,
7451 ) -> Request<'_, endpoints::UserListStarred<'_>, (RepositoryListHeaders, Vec<Repository>)> {
7452 endpoints::UserListStarred { username }
7453 .make_request()
7454 .wrap::<_, _>(self)
7455 }
7456
7457 pub fn user_list_subscriptions(
7461 &self,
7462 username: &str,
7463 ) -> Request<'_, endpoints::UserListSubscriptions<'_>, (RepositoryListHeaders, Vec<Repository>)>
7464 {
7465 endpoints::UserListSubscriptions { username }
7466 .make_request()
7467 .wrap::<_, _>(self)
7468 }
7469
7470 pub fn user_get_tokens(
7474 &self,
7475 username: &str,
7476 ) -> Request<'_, endpoints::UserGetTokens<'_>, (AccessTokenListHeaders, Vec<AccessToken>)> {
7477 endpoints::UserGetTokens { username }
7478 .make_request()
7479 .wrap::<_, _>(self)
7480 }
7481
7482 pub fn user_create_token(
7487 &self,
7488 username: &str,
7489 body: CreateAccessTokenOption,
7490 ) -> Request<'_, endpoints::UserCreateToken<'_>, AccessToken> {
7491 endpoints::UserCreateToken {
7492 username,
7493 body: body,
7494 }
7495 .make_request()
7496 .wrap::<_, _>(self)
7497 }
7498
7499 pub fn user_delete_access_token(
7504 &self,
7505 username: &str,
7506 token: &str,
7507 ) -> Request<'_, endpoints::UserDeleteAccessToken<'_>, ()> {
7508 endpoints::UserDeleteAccessToken { username, token }
7509 .make_request()
7510 .wrap::<_, _>(self)
7511 }
7512
7513 pub fn get_version(&self) -> Request<'_, endpoints::GetVersion, ServerVersion> {
7515 endpoints::GetVersion {}.make_request().wrap::<_, _>(self)
7516 }
7517}