use super::structs::*;
use crate::generated::endpoints;
use crate::Endpoint;
use crate::Request;
use bytes::Bytes;
use std::collections::BTreeMap;
impl crate::sync::Forgejo {
pub fn activitypub_instance_actor(
&self,
) -> crate::sync::Request<'_, endpoints::ActivitypubInstanceActor, ActivityPub> {
endpoints::ActivitypubInstanceActor {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn activitypub_instance_actor_inbox(
&self,
) -> crate::sync::Request<'_, endpoints::ActivitypubInstanceActorInbox, ()> {
endpoints::ActivitypubInstanceActorInbox {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn activitypub_instance_actor_outbox(
&self,
) -> crate::sync::Request<'_, endpoints::ActivitypubInstanceActorOutbox, Bytes> {
endpoints::ActivitypubInstanceActorOutbox {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn activitypub_repository(
&self,
repository_id: i64,
) -> crate::sync::Request<'_, endpoints::ActivitypubRepository, ActivityPub> {
endpoints::ActivitypubRepository { repository_id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn activitypub_repository_inbox(
&self,
repository_id: i64,
body: ForgeLike,
) -> crate::sync::Request<'_, endpoints::ActivitypubRepositoryInbox, ()> {
endpoints::ActivitypubRepositoryInbox {
repository_id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn activitypub_repository_outbox(
&self,
repository_id: i64,
) -> crate::sync::Request<'_, endpoints::ActivitypubRepositoryOutbox, Bytes> {
endpoints::ActivitypubRepositoryOutbox { repository_id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn activitypub_person(
&self,
user_id: i64,
) -> crate::sync::Request<'_, endpoints::ActivitypubPerson, ActivityPub> {
endpoints::ActivitypubPerson { user_id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn activitypub_person_activity_note(
&self,
user_id: u32,
activity_id: u32,
) -> crate::sync::Request<'_, endpoints::ActivitypubPersonActivityNote, ActivityPub> {
endpoints::ActivitypubPersonActivityNote {
user_id,
activity_id,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn activitypub_person_activity(
&self,
user_id: u32,
activity_id: u32,
) -> crate::sync::Request<'_, endpoints::ActivitypubPersonActivity, ActivityPub> {
endpoints::ActivitypubPersonActivity {
user_id,
activity_id,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn activitypub_person_inbox(
&self,
user_id: i64,
) -> crate::sync::Request<'_, endpoints::ActivitypubPersonInbox, ()> {
endpoints::ActivitypubPersonInbox { user_id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn activitypub_person_feed(
&self,
user_id: u32,
) -> crate::sync::Request<'_, endpoints::ActivitypubPersonFeed, ForgeOutbox> {
endpoints::ActivitypubPersonFeed { user_id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_cron_list(
&self,
) -> crate::sync::Request<'_, endpoints::AdminCronList, (CronListHeaders, Vec<Cron>)> {
endpoints::AdminCronList {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_cron_run(
&self,
task: &str,
) -> crate::sync::Request<'_, endpoints::AdminCronRun<'_>, ()> {
endpoints::AdminCronRun { task }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_get_all_emails(
&self,
) -> crate::sync::Request<'_, endpoints::AdminGetAllEmails, Vec<Email>> {
endpoints::AdminGetAllEmails {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_search_emails(
&self,
query: AdminSearchEmailsQuery,
) -> crate::sync::Request<'_, endpoints::AdminSearchEmails, Vec<Email>> {
endpoints::AdminSearchEmails { query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_list_hooks(
&self,
) -> crate::sync::Request<'_, endpoints::AdminListHooks, Vec<Hook>> {
endpoints::AdminListHooks {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_create_hook(
&self,
body: CreateHookOption,
) -> crate::sync::Request<'_, endpoints::AdminCreateHook, Hook> {
endpoints::AdminCreateHook { body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_get_hook(
&self,
id: i64,
) -> crate::sync::Request<'_, endpoints::AdminGetHook, Hook> {
endpoints::AdminGetHook { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_delete_hook(
&self,
id: i64,
) -> crate::sync::Request<'_, endpoints::AdminDeleteHook, ()> {
endpoints::AdminDeleteHook { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_edit_hook(
&self,
id: i64,
body: EditHookOption,
) -> crate::sync::Request<'_, endpoints::AdminEditHook, Hook> {
endpoints::AdminEditHook { id, body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_get_all_orgs(
&self,
) -> crate::sync::Request<
'_,
endpoints::AdminGetAllOrgs,
(OrganizationListHeaders, Vec<Organization>),
> {
endpoints::AdminGetAllOrgs {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_list_quota_groups(
&self,
) -> crate::sync::Request<'_, endpoints::AdminListQuotaGroups, Vec<QuotaGroup>> {
endpoints::AdminListQuotaGroups {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_create_quota_group(
&self,
group: CreateQuotaGroupOptions,
) -> crate::sync::Request<'_, endpoints::AdminCreateQuotaGroup, QuotaGroup> {
endpoints::AdminCreateQuotaGroup { body: group }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_get_quota_group(
&self,
quotagroup: &str,
) -> crate::sync::Request<'_, endpoints::AdminGetQuotaGroup<'_>, QuotaGroup> {
endpoints::AdminGetQuotaGroup { quotagroup }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_delete_quota_group(
&self,
quotagroup: &str,
) -> crate::sync::Request<'_, endpoints::AdminDeleteQuotaGroup<'_>, ()> {
endpoints::AdminDeleteQuotaGroup { quotagroup }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_add_rule_to_quota_group(
&self,
quotagroup: &str,
quotarule: &str,
) -> crate::sync::Request<'_, endpoints::AdminAddRuleToQuotaGroup<'_>, ()> {
endpoints::AdminAddRuleToQuotaGroup {
quotagroup,
quotarule,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_remove_rule_from_quota_group(
&self,
quotagroup: &str,
quotarule: &str,
) -> crate::sync::Request<'_, endpoints::AdminRemoveRuleFromQuotaGroup<'_>, ()> {
endpoints::AdminRemoveRuleFromQuotaGroup {
quotagroup,
quotarule,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_list_users_in_quota_group(
&self,
quotagroup: &str,
) -> crate::sync::Request<
'_,
endpoints::AdminListUsersInQuotaGroup<'_>,
(UserListHeaders, Vec<User>),
> {
endpoints::AdminListUsersInQuotaGroup { quotagroup }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_add_user_to_quota_group(
&self,
quotagroup: &str,
username: &str,
) -> crate::sync::Request<'_, endpoints::AdminAddUserToQuotaGroup<'_>, ()> {
endpoints::AdminAddUserToQuotaGroup {
quotagroup,
username,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_remove_user_from_quota_group(
&self,
quotagroup: &str,
username: &str,
) -> crate::sync::Request<'_, endpoints::AdminRemoveUserFromQuotaGroup<'_>, ()> {
endpoints::AdminRemoveUserFromQuotaGroup {
quotagroup,
username,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_list_quota_rules(
&self,
) -> crate::sync::Request<'_, endpoints::AdminListQuotaRules, Vec<QuotaRuleInfo>> {
endpoints::AdminListQuotaRules {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_create_quota_rule(
&self,
rule: CreateQuotaRuleOptions,
) -> crate::sync::Request<'_, endpoints::AdminCreateQuotaRule, QuotaRuleInfo> {
endpoints::AdminCreateQuotaRule { body: rule }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_get_quota_rule(
&self,
quotarule: &str,
) -> crate::sync::Request<'_, endpoints::AdminGetQuotaRule<'_>, QuotaRuleInfo> {
endpoints::AdminGetQuotaRule { quotarule }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_delete_quota_rule(
&self,
quotarule: &str,
) -> crate::sync::Request<'_, endpoints::AdminDeleteQuotaRule<'_>, ()> {
endpoints::AdminDeleteQuotaRule { quotarule }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_edit_quota_rule(
&self,
quotarule: &str,
rule: EditQuotaRuleOptions,
) -> crate::sync::Request<'_, endpoints::AdminEditQuotaRule<'_>, QuotaRuleInfo> {
endpoints::AdminEditQuotaRule {
quotarule,
body: rule,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_search_run_jobs(
&self,
query: AdminSearchRunJobsQuery,
) -> crate::sync::Request<'_, endpoints::AdminSearchRunJobs, Vec<ActionRunJob>> {
endpoints::AdminSearchRunJobs { query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_get_runner_registration_token(
&self,
) -> crate::sync::Request<'_, endpoints::AdminGetRunnerRegistrationToken, RegistrationToken>
{
endpoints::AdminGetRunnerRegistrationToken {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_unadopted_list(
&self,
query: AdminUnadoptedListQuery,
) -> crate::sync::Request<'_, endpoints::AdminUnadoptedList, Vec<String>> {
endpoints::AdminUnadoptedList { query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_adopt_repository(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::AdminAdoptRepository<'_>, ()> {
endpoints::AdminAdoptRepository { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_delete_unadopted_repository(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::AdminDeleteUnadoptedRepository<'_>, ()> {
endpoints::AdminDeleteUnadoptedRepository { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_search_users(
&self,
query: AdminSearchUsersQuery,
) -> crate::sync::Request<'_, endpoints::AdminSearchUsers, (UserListHeaders, Vec<User>)> {
endpoints::AdminSearchUsers { query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_create_user(
&self,
body: CreateUserOption,
) -> crate::sync::Request<'_, endpoints::AdminCreateUser, User> {
endpoints::AdminCreateUser { body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_delete_user(
&self,
username: &str,
query: AdminDeleteUserQuery,
) -> crate::sync::Request<'_, endpoints::AdminDeleteUser<'_>, ()> {
endpoints::AdminDeleteUser { username, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_edit_user(
&self,
username: &str,
body: EditUserOption,
) -> crate::sync::Request<'_, endpoints::AdminEditUser<'_>, User> {
endpoints::AdminEditUser {
username,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_list_user_emails(
&self,
username: &str,
) -> crate::sync::Request<'_, endpoints::AdminListUserEmails<'_>, Vec<Email>> {
endpoints::AdminListUserEmails { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_delete_user_emails(
&self,
username: &str,
body: DeleteEmailOption,
) -> crate::sync::Request<'_, endpoints::AdminDeleteUserEmails<'_>, ()> {
endpoints::AdminDeleteUserEmails {
username,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_create_public_key(
&self,
username: &str,
key: CreateKeyOption,
) -> crate::sync::Request<'_, endpoints::AdminCreatePublicKey<'_>, PublicKey> {
endpoints::AdminCreatePublicKey {
username,
body: key,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_delete_user_public_key(
&self,
username: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::AdminDeleteUserPublicKey<'_>, ()> {
endpoints::AdminDeleteUserPublicKey { username, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_create_org(
&self,
username: &str,
organization: CreateOrgOption,
) -> crate::sync::Request<'_, endpoints::AdminCreateOrg<'_>, Organization> {
endpoints::AdminCreateOrg {
username,
body: organization,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_get_user_quota(
&self,
username: &str,
) -> crate::sync::Request<'_, endpoints::AdminGetUserQuota<'_>, QuotaInfo> {
endpoints::AdminGetUserQuota { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_set_user_quota_groups(
&self,
username: &str,
groups: SetUserQuotaGroupsOptions,
) -> crate::sync::Request<'_, endpoints::AdminSetUserQuotaGroups<'_>, ()> {
endpoints::AdminSetUserQuotaGroups {
username,
body: groups,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_rename_user(
&self,
username: &str,
body: RenameUserOption,
) -> crate::sync::Request<'_, endpoints::AdminRenameUser<'_>, ()> {
endpoints::AdminRenameUser {
username,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn admin_create_repo(
&self,
username: &str,
repository: CreateRepoOption,
) -> crate::sync::Request<'_, endpoints::AdminCreateRepo<'_>, Repository> {
endpoints::AdminCreateRepo {
username,
body: repository,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn list_gitignores_templates(
&self,
) -> crate::sync::Request<'_, endpoints::ListGitignoresTemplates, Vec<String>> {
endpoints::ListGitignoresTemplates {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_gitignore_template_info(
&self,
name: &str,
) -> crate::sync::Request<'_, endpoints::GetGitignoreTemplateInfo<'_>, GitignoreTemplateInfo>
{
endpoints::GetGitignoreTemplateInfo { name }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn list_label_templates(
&self,
) -> crate::sync::Request<'_, endpoints::ListLabelTemplates, Vec<String>> {
endpoints::ListLabelTemplates {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_label_template_info(
&self,
name: &str,
) -> crate::sync::Request<'_, endpoints::GetLabelTemplateInfo<'_>, Vec<LabelTemplate>> {
endpoints::GetLabelTemplateInfo { name }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn list_license_templates(
&self,
) -> crate::sync::Request<'_, endpoints::ListLicenseTemplates, Vec<LicensesTemplateListEntry>>
{
endpoints::ListLicenseTemplates {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_license_template_info(
&self,
name: &str,
) -> crate::sync::Request<'_, endpoints::GetLicenseTemplateInfo<'_>, LicenseTemplateInfo> {
endpoints::GetLicenseTemplateInfo { name }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn render_markdown(
&self,
body: MarkdownOption,
) -> crate::sync::Request<'_, endpoints::RenderMarkdown, String> {
endpoints::RenderMarkdown { body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn render_markdown_raw(
&self,
body: String,
) -> crate::sync::Request<'_, endpoints::RenderMarkdownRaw, String> {
endpoints::RenderMarkdownRaw { body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn render_markup(
&self,
body: MarkupOption,
) -> crate::sync::Request<'_, endpoints::RenderMarkup, String> {
endpoints::RenderMarkup { body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_node_info(&self) -> crate::sync::Request<'_, endpoints::GetNodeInfo, NodeInfo> {
endpoints::GetNodeInfo {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn notify_get_list(
&self,
query: NotifyGetListQuery,
) -> crate::sync::Request<
'_,
endpoints::NotifyGetList,
(NotificationThreadListHeaders, Vec<NotificationThread>),
> {
endpoints::NotifyGetList { query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn notify_read_list(
&self,
query: NotifyReadListQuery,
) -> crate::sync::Request<'_, endpoints::NotifyReadList, Vec<NotificationThread>> {
endpoints::NotifyReadList { query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn notify_new_available(
&self,
) -> crate::sync::Request<'_, endpoints::NotifyNewAvailable, NotificationCount> {
endpoints::NotifyNewAvailable {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn notify_get_thread(
&self,
id: i64,
) -> crate::sync::Request<'_, endpoints::NotifyGetThread, NotificationThread> {
endpoints::NotifyGetThread { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn notify_read_thread(
&self,
id: i64,
query: NotifyReadThreadQuery,
) -> crate::sync::Request<'_, endpoints::NotifyReadThread, NotificationThread> {
endpoints::NotifyReadThread { id, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn create_org_repo_deprecated(
&self,
org: &str,
body: CreateRepoOption,
) -> crate::sync::Request<'_, endpoints::CreateOrgRepoDeprecated<'_>, Repository> {
endpoints::CreateOrgRepoDeprecated { org, body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_get_all(
&self,
) -> crate::sync::Request<'_, endpoints::OrgGetAll, (OrganizationListHeaders, Vec<Organization>)>
{
endpoints::OrgGetAll {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_create(
&self,
organization: CreateOrgOption,
) -> crate::sync::Request<'_, endpoints::OrgCreate, Organization> {
endpoints::OrgCreate { body: organization }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_get(
&self,
org: &str,
) -> crate::sync::Request<'_, endpoints::OrgGet<'_>, Organization> {
endpoints::OrgGet { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_delete(&self, org: &str) -> crate::sync::Request<'_, endpoints::OrgDelete<'_>, ()> {
endpoints::OrgDelete { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_edit(
&self,
org: &str,
body: EditOrgOption,
) -> crate::sync::Request<'_, endpoints::OrgEdit<'_>, Organization> {
endpoints::OrgEdit { org, body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_search_run_jobs(
&self,
org: &str,
query: OrgSearchRunJobsQuery,
) -> crate::sync::Request<'_, endpoints::OrgSearchRunJobs<'_>, Vec<ActionRunJob>> {
endpoints::OrgSearchRunJobs { org, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_get_runner_registration_token(
&self,
org: &str,
) -> crate::sync::Request<'_, endpoints::OrgGetRunnerRegistrationToken<'_>, RegistrationToken>
{
endpoints::OrgGetRunnerRegistrationToken { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_actions_secrets(
&self,
org: &str,
) -> crate::sync::Request<
'_,
endpoints::OrgListActionsSecrets<'_>,
(SecretListHeaders, Vec<Secret>),
> {
endpoints::OrgListActionsSecrets { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn update_org_secret(
&self,
org: &str,
secretname: &str,
body: CreateOrUpdateSecretOption,
) -> crate::sync::Request<'_, endpoints::UpdateOrgSecret<'_>, ()> {
endpoints::UpdateOrgSecret {
org,
secretname,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn delete_org_secret(
&self,
org: &str,
secretname: &str,
) -> crate::sync::Request<'_, endpoints::DeleteOrgSecret<'_>, ()> {
endpoints::DeleteOrgSecret { org, secretname }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_org_variables_list(
&self,
org: &str,
) -> crate::sync::Request<
'_,
endpoints::GetOrgVariablesList<'_>,
(VariableListHeaders, Vec<ActionVariable>),
> {
endpoints::GetOrgVariablesList { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_org_variable(
&self,
org: &str,
variablename: &str,
) -> crate::sync::Request<'_, endpoints::GetOrgVariable<'_>, ActionVariable> {
endpoints::GetOrgVariable { org, variablename }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn update_org_variable(
&self,
org: &str,
variablename: &str,
body: UpdateVariableOption,
) -> crate::sync::Request<'_, endpoints::UpdateOrgVariable<'_>, ()> {
endpoints::UpdateOrgVariable {
org,
variablename,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn create_org_variable(
&self,
org: &str,
variablename: &str,
body: CreateVariableOption,
) -> crate::sync::Request<'_, endpoints::CreateOrgVariable<'_>, ()> {
endpoints::CreateOrgVariable {
org,
variablename,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn delete_org_variable(
&self,
org: &str,
variablename: &str,
) -> crate::sync::Request<'_, endpoints::DeleteOrgVariable<'_>, ()> {
endpoints::DeleteOrgVariable { org, variablename }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_activity_feeds(
&self,
org: &str,
query: OrgListActivityFeedsQuery,
) -> crate::sync::Request<
'_,
endpoints::OrgListActivityFeeds<'_>,
(ActivityFeedsListHeaders, Vec<Activity>),
> {
endpoints::OrgListActivityFeeds { org, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_update_avatar(
&self,
org: &str,
body: UpdateUserAvatarOption,
) -> crate::sync::Request<'_, endpoints::OrgUpdateAvatar<'_>, ()> {
endpoints::OrgUpdateAvatar { org, body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_delete_avatar(
&self,
org: &str,
) -> crate::sync::Request<'_, endpoints::OrgDeleteAvatar<'_>, ()> {
endpoints::OrgDeleteAvatar { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_block_user(
&self,
org: &str,
username: &str,
) -> crate::sync::Request<'_, endpoints::OrgBlockUser<'_>, ()> {
endpoints::OrgBlockUser { org, username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_hooks(
&self,
org: &str,
) -> crate::sync::Request<'_, endpoints::OrgListHooks<'_>, Vec<Hook>> {
endpoints::OrgListHooks { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_create_hook(
&self,
org: &str,
body: CreateHookOption,
) -> crate::sync::Request<'_, endpoints::OrgCreateHook<'_>, Hook> {
endpoints::OrgCreateHook { org, body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_get_hook(
&self,
org: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::OrgGetHook<'_>, Hook> {
endpoints::OrgGetHook { org, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_delete_hook(
&self,
org: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::OrgDeleteHook<'_>, ()> {
endpoints::OrgDeleteHook { org, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_edit_hook(
&self,
org: &str,
id: i64,
body: EditHookOption,
) -> crate::sync::Request<'_, endpoints::OrgEditHook<'_>, Hook> {
endpoints::OrgEditHook {
org,
id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_labels(
&self,
org: &str,
query: OrgListLabelsQuery,
) -> crate::sync::Request<'_, endpoints::OrgListLabels<'_>, (LabelListHeaders, Vec<Label>)>
{
endpoints::OrgListLabels { org, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_create_label(
&self,
org: &str,
body: CreateLabelOption,
) -> crate::sync::Request<'_, endpoints::OrgCreateLabel<'_>, Label> {
endpoints::OrgCreateLabel { org, body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_get_label(
&self,
org: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::OrgGetLabel<'_>, Label> {
endpoints::OrgGetLabel { org, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_delete_label(
&self,
org: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::OrgDeleteLabel<'_>, ()> {
endpoints::OrgDeleteLabel { org, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_edit_label(
&self,
org: &str,
id: i64,
body: EditLabelOption,
) -> crate::sync::Request<'_, endpoints::OrgEditLabel<'_>, Label> {
endpoints::OrgEditLabel {
org,
id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_blocked_users(
&self,
org: &str,
) -> crate::sync::Request<
'_,
endpoints::OrgListBlockedUsers<'_>,
(BlockedUserListHeaders, Vec<BlockedUser>),
> {
endpoints::OrgListBlockedUsers { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_members(
&self,
org: &str,
) -> crate::sync::Request<'_, endpoints::OrgListMembers<'_>, (UserListHeaders, Vec<User>)> {
endpoints::OrgListMembers { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_is_member(
&self,
org: &str,
username: &str,
) -> crate::sync::Request<'_, endpoints::OrgIsMember<'_>, ()> {
endpoints::OrgIsMember { org, username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_delete_member(
&self,
org: &str,
username: &str,
) -> crate::sync::Request<'_, endpoints::OrgDeleteMember<'_>, ()> {
endpoints::OrgDeleteMember { org, username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_public_members(
&self,
org: &str,
) -> crate::sync::Request<'_, endpoints::OrgListPublicMembers<'_>, (UserListHeaders, Vec<User>)>
{
endpoints::OrgListPublicMembers { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_is_public_member(
&self,
org: &str,
username: &str,
) -> crate::sync::Request<'_, endpoints::OrgIsPublicMember<'_>, ()> {
endpoints::OrgIsPublicMember { org, username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_publicize_member(
&self,
org: &str,
username: &str,
) -> crate::sync::Request<'_, endpoints::OrgPublicizeMember<'_>, ()> {
endpoints::OrgPublicizeMember { org, username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_conceal_member(
&self,
org: &str,
username: &str,
) -> crate::sync::Request<'_, endpoints::OrgConcealMember<'_>, ()> {
endpoints::OrgConcealMember { org, username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_get_quota(
&self,
org: &str,
) -> crate::sync::Request<'_, endpoints::OrgGetQuota<'_>, QuotaInfo> {
endpoints::OrgGetQuota { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_quota_artifacts(
&self,
org: &str,
) -> crate::sync::Request<
'_,
endpoints::OrgListQuotaArtifacts<'_>,
(QuotaUsedArtifactListHeaders, Vec<QuotaUsedArtifact>),
> {
endpoints::OrgListQuotaArtifacts { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_quota_attachments(
&self,
org: &str,
) -> crate::sync::Request<
'_,
endpoints::OrgListQuotaAttachments<'_>,
(QuotaUsedAttachmentListHeaders, Vec<QuotaUsedAttachment>),
> {
endpoints::OrgListQuotaAttachments { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_check_quota(
&self,
org: &str,
query: OrgCheckQuotaQuery,
) -> crate::sync::Request<'_, endpoints::OrgCheckQuota<'_>, bool> {
endpoints::OrgCheckQuota { org, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_quota_packages(
&self,
org: &str,
) -> crate::sync::Request<
'_,
endpoints::OrgListQuotaPackages<'_>,
(QuotaUsedPackageListHeaders, Vec<QuotaUsedPackage>),
> {
endpoints::OrgListQuotaPackages { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn rename_org(
&self,
org: &str,
body: RenameOrgOption,
) -> crate::sync::Request<'_, endpoints::RenameOrg<'_>, ()> {
endpoints::RenameOrg { org, body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_repos(
&self,
org: &str,
) -> crate::sync::Request<
'_,
endpoints::OrgListRepos<'_>,
(RepositoryListHeaders, Vec<Repository>),
> {
endpoints::OrgListRepos { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn create_org_repo(
&self,
org: &str,
body: CreateRepoOption,
) -> crate::sync::Request<'_, endpoints::CreateOrgRepo<'_>, Repository> {
endpoints::CreateOrgRepo { org, body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_teams(
&self,
org: &str,
) -> crate::sync::Request<'_, endpoints::OrgListTeams<'_>, (TeamListHeaders, Vec<Team>)> {
endpoints::OrgListTeams { org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_create_team(
&self,
org: &str,
body: CreateTeamOption,
) -> crate::sync::Request<'_, endpoints::OrgCreateTeam<'_>, Team> {
endpoints::OrgCreateTeam { org, body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn team_search(
&self,
org: &str,
query: TeamSearchQuery,
) -> crate::sync::Request<'_, endpoints::TeamSearch<'_>, TeamSearchResults> {
endpoints::TeamSearch { org, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_unblock_user(
&self,
org: &str,
username: &str,
) -> crate::sync::Request<'_, endpoints::OrgUnblockUser<'_>, ()> {
endpoints::OrgUnblockUser { org, username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn list_packages(
&self,
owner: &str,
query: ListPackagesQuery,
) -> crate::sync::Request<'_, endpoints::ListPackages<'_>, (PackageListHeaders, Vec<Package>)>
{
endpoints::ListPackages { owner, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn link_package(
&self,
owner: &str,
r#type: &str,
name: &str,
repo_name: &str,
) -> crate::sync::Request<'_, endpoints::LinkPackage<'_>, ()> {
endpoints::LinkPackage {
owner,
r#type,
name,
repo_name,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn unlink_package(
&self,
owner: &str,
r#type: &str,
name: &str,
) -> crate::sync::Request<'_, endpoints::UnlinkPackage<'_>, ()> {
endpoints::UnlinkPackage {
owner,
r#type,
name,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_package(
&self,
owner: &str,
r#type: &str,
name: &str,
version: &str,
) -> crate::sync::Request<'_, endpoints::GetPackage<'_>, Package> {
endpoints::GetPackage {
owner,
r#type,
name,
version,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn delete_package(
&self,
owner: &str,
r#type: &str,
name: &str,
version: &str,
) -> crate::sync::Request<'_, endpoints::DeletePackage<'_>, ()> {
endpoints::DeletePackage {
owner,
r#type,
name,
version,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn list_package_files(
&self,
owner: &str,
r#type: &str,
name: &str,
version: &str,
) -> crate::sync::Request<'_, endpoints::ListPackageFiles<'_>, Vec<PackageFile>> {
endpoints::ListPackageFiles {
owner,
r#type,
name,
version,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_search_issues(
&self,
query: IssueSearchIssuesQuery,
) -> crate::sync::Request<'_, endpoints::IssueSearchIssues, (IssueListHeaders, Vec<Issue>)>
{
endpoints::IssueSearchIssues { query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_migrate(
&self,
body: MigrateRepoOptions,
) -> crate::sync::Request<'_, endpoints::RepoMigrate, Repository> {
endpoints::RepoMigrate { body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_search(
&self,
query: RepoSearchQuery,
) -> crate::sync::Request<'_, endpoints::RepoSearch, SearchResults> {
endpoints::RepoSearch { query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoGet<'_>, Repository> {
endpoints::RepoGet { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoDelete<'_>, ()> {
endpoints::RepoDelete { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_edit(
&self,
owner: &str,
repo: &str,
body: EditRepoOption,
) -> crate::sync::Request<'_, endpoints::RepoEdit<'_>, Repository> {
endpoints::RepoEdit {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_search_run_jobs(
&self,
owner: &str,
repo: &str,
query: RepoSearchRunJobsQuery,
) -> crate::sync::Request<'_, endpoints::RepoSearchRunJobs<'_>, Vec<ActionRunJob>> {
endpoints::RepoSearchRunJobs { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_runner_registration_token(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetRunnerRegistrationToken<'_>, RegistrationToken>
{
endpoints::RepoGetRunnerRegistrationToken { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn list_action_runs(
&self,
owner: &str,
repo: &str,
query: ListActionRunsQuery,
) -> crate::sync::Request<'_, endpoints::ListActionRuns<'_>, ListActionRunResponse> {
endpoints::ListActionRuns { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_action_run(
&self,
owner: &str,
repo: &str,
run_id: i64,
) -> crate::sync::Request<'_, endpoints::GetActionRun<'_>, ActionRun> {
endpoints::GetActionRun {
owner,
repo,
run_id,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_actions_secrets(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<
'_,
endpoints::RepoListActionsSecrets<'_>,
(SecretListHeaders, Vec<Secret>),
> {
endpoints::RepoListActionsSecrets { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn update_repo_secret(
&self,
owner: &str,
repo: &str,
secretname: &str,
body: CreateOrUpdateSecretOption,
) -> crate::sync::Request<'_, endpoints::UpdateRepoSecret<'_>, ()> {
endpoints::UpdateRepoSecret {
owner,
repo,
secretname,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn delete_repo_secret(
&self,
owner: &str,
repo: &str,
secretname: &str,
) -> crate::sync::Request<'_, endpoints::DeleteRepoSecret<'_>, ()> {
endpoints::DeleteRepoSecret {
owner,
repo,
secretname,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn list_action_tasks(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::ListActionTasks<'_>, ActionTaskResponse> {
endpoints::ListActionTasks { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_repo_variables_list(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<
'_,
endpoints::GetRepoVariablesList<'_>,
(VariableListHeaders, Vec<ActionVariable>),
> {
endpoints::GetRepoVariablesList { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_repo_variable(
&self,
owner: &str,
repo: &str,
variablename: &str,
) -> crate::sync::Request<'_, endpoints::GetRepoVariable<'_>, ActionVariable> {
endpoints::GetRepoVariable {
owner,
repo,
variablename,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn update_repo_variable(
&self,
owner: &str,
repo: &str,
variablename: &str,
body: UpdateVariableOption,
) -> crate::sync::Request<'_, endpoints::UpdateRepoVariable<'_>, ()> {
endpoints::UpdateRepoVariable {
owner,
repo,
variablename,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn create_repo_variable(
&self,
owner: &str,
repo: &str,
variablename: &str,
body: CreateVariableOption,
) -> crate::sync::Request<'_, endpoints::CreateRepoVariable<'_>, ()> {
endpoints::CreateRepoVariable {
owner,
repo,
variablename,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn delete_repo_variable(
&self,
owner: &str,
repo: &str,
variablename: &str,
) -> crate::sync::Request<'_, endpoints::DeleteRepoVariable<'_>, ()> {
endpoints::DeleteRepoVariable {
owner,
repo,
variablename,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn dispatch_workflow(
&self,
owner: &str,
repo: &str,
workflowfilename: &str,
body: DispatchWorkflowOption,
) -> crate::sync::Request<'_, endpoints::DispatchWorkflow<'_>, Option<DispatchWorkflowRun>>
{
endpoints::DispatchWorkflow {
owner,
repo,
workflowfilename,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_activity_feeds(
&self,
owner: &str,
repo: &str,
query: RepoListActivityFeedsQuery,
) -> crate::sync::Request<
'_,
endpoints::RepoListActivityFeeds<'_>,
(ActivityFeedsListHeaders, Vec<Activity>),
> {
endpoints::RepoListActivityFeeds { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_archive(
&self,
owner: &str,
repo: &str,
archive: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetArchive<'_>, Bytes> {
endpoints::RepoGetArchive {
owner,
repo,
archive,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_assignees(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetAssignees<'_>, (UserListHeaders, Vec<User>)>
{
endpoints::RepoGetAssignees { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_update_avatar(
&self,
owner: &str,
repo: &str,
body: UpdateRepoAvatarOption,
) -> crate::sync::Request<'_, endpoints::RepoUpdateAvatar<'_>, ()> {
endpoints::RepoUpdateAvatar {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_avatar(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoDeleteAvatar<'_>, ()> {
endpoints::RepoDeleteAvatar { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_branch_protection(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoListBranchProtection<'_>, Vec<BranchProtection>>
{
endpoints::RepoListBranchProtection { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_create_branch_protection(
&self,
owner: &str,
repo: &str,
body: CreateBranchProtectionOption,
) -> crate::sync::Request<'_, endpoints::RepoCreateBranchProtection<'_>, BranchProtection> {
endpoints::RepoCreateBranchProtection {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_branch_protection(
&self,
owner: &str,
repo: &str,
name: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetBranchProtection<'_>, BranchProtection> {
endpoints::RepoGetBranchProtection { owner, repo, name }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_branch_protection(
&self,
owner: &str,
repo: &str,
name: &str,
) -> crate::sync::Request<'_, endpoints::RepoDeleteBranchProtection<'_>, ()> {
endpoints::RepoDeleteBranchProtection { owner, repo, name }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_edit_branch_protection(
&self,
owner: &str,
repo: &str,
name: &str,
body: EditBranchProtectionOption,
) -> crate::sync::Request<'_, endpoints::RepoEditBranchProtection<'_>, BranchProtection> {
endpoints::RepoEditBranchProtection {
owner,
repo,
name,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_branches(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoListBranches<'_>, (BranchListHeaders, Vec<Branch>)>
{
endpoints::RepoListBranches { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_create_branch(
&self,
owner: &str,
repo: &str,
body: CreateBranchRepoOption,
) -> crate::sync::Request<'_, endpoints::RepoCreateBranch<'_>, Branch> {
endpoints::RepoCreateBranch {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_branch(
&self,
owner: &str,
repo: &str,
branch: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetBranch<'_>, Branch> {
endpoints::RepoGetBranch {
owner,
repo,
branch,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_branch(
&self,
owner: &str,
repo: &str,
branch: &str,
) -> crate::sync::Request<'_, endpoints::RepoDeleteBranch<'_>, ()> {
endpoints::RepoDeleteBranch {
owner,
repo,
branch,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_update_branch(
&self,
owner: &str,
repo: &str,
branch: &str,
body: UpdateBranchRepoOption,
) -> crate::sync::Request<'_, endpoints::RepoUpdateBranch<'_>, ()> {
endpoints::RepoUpdateBranch {
owner,
repo,
branch,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_collaborators(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoListCollaborators<'_>, (UserListHeaders, Vec<User>)>
{
endpoints::RepoListCollaborators { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_check_collaborator(
&self,
owner: &str,
repo: &str,
collaborator: &str,
) -> crate::sync::Request<'_, endpoints::RepoCheckCollaborator<'_>, ()> {
endpoints::RepoCheckCollaborator {
owner,
repo,
collaborator,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_add_collaborator(
&self,
owner: &str,
repo: &str,
collaborator: &str,
body: AddCollaboratorOption,
) -> crate::sync::Request<'_, endpoints::RepoAddCollaborator<'_>, ()> {
endpoints::RepoAddCollaborator {
owner,
repo,
collaborator,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_collaborator(
&self,
owner: &str,
repo: &str,
collaborator: &str,
) -> crate::sync::Request<'_, endpoints::RepoDeleteCollaborator<'_>, ()> {
endpoints::RepoDeleteCollaborator {
owner,
repo,
collaborator,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_repo_permissions(
&self,
owner: &str,
repo: &str,
collaborator: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetRepoPermissions<'_>, RepoCollaboratorPermission>
{
endpoints::RepoGetRepoPermissions {
owner,
repo,
collaborator,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_all_commits(
&self,
owner: &str,
repo: &str,
query: RepoGetAllCommitsQuery,
) -> crate::sync::Request<'_, endpoints::RepoGetAllCommits<'_>, (CommitListHeaders, Vec<Commit>)>
{
endpoints::RepoGetAllCommits { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_combined_status_by_ref(
&self,
owner: &str,
repo: &str,
r#ref: &str,
) -> crate::sync::Request<
'_,
endpoints::RepoGetCombinedStatusByRef<'_>,
(CombinedStatusHeaders, CombinedStatus),
> {
endpoints::RepoGetCombinedStatusByRef { owner, repo, r#ref }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_statuses_by_ref(
&self,
owner: &str,
repo: &str,
r#ref: &str,
query: RepoListStatusesByRefQuery,
) -> crate::sync::Request<
'_,
endpoints::RepoListStatusesByRef<'_>,
(CommitStatusListHeaders, Vec<CommitStatus>),
> {
endpoints::RepoListStatusesByRef {
owner,
repo,
r#ref,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_commit_pull_request(
&self,
owner: &str,
repo: &str,
sha: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetCommitPullRequest<'_>, PullRequest> {
endpoints::RepoGetCommitPullRequest { owner, repo, sha }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_compare_diff(
&self,
owner: &str,
repo: &str,
basehead: &str,
) -> crate::sync::Request<'_, endpoints::RepoCompareDiff<'_>, Compare> {
endpoints::RepoCompareDiff {
owner,
repo,
basehead,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_contents_list(
&self,
owner: &str,
repo: &str,
query: RepoGetContentsListQuery,
) -> crate::sync::Request<'_, endpoints::RepoGetContentsList<'_>, Vec<ContentsResponse>> {
endpoints::RepoGetContentsList { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_change_files(
&self,
owner: &str,
repo: &str,
body: ChangeFilesOptions,
) -> crate::sync::Request<'_, endpoints::RepoChangeFiles<'_>, FilesResponse> {
endpoints::RepoChangeFiles {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_contents(
&self,
owner: &str,
repo: &str,
filepath: &str,
query: RepoGetContentsQuery,
) -> crate::sync::Request<'_, endpoints::RepoGetContents<'_>, ContentsResponse> {
endpoints::RepoGetContents {
owner,
repo,
filepath,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_update_file(
&self,
owner: &str,
repo: &str,
filepath: &str,
body: UpdateFileOptions,
) -> crate::sync::Request<'_, endpoints::RepoUpdateFile<'_>, FileResponse> {
endpoints::RepoUpdateFile {
owner,
repo,
filepath,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_create_file(
&self,
owner: &str,
repo: &str,
filepath: &str,
body: CreateFileOptions,
) -> crate::sync::Request<'_, endpoints::RepoCreateFile<'_>, FileResponse> {
endpoints::RepoCreateFile {
owner,
repo,
filepath,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_file(
&self,
owner: &str,
repo: &str,
filepath: &str,
body: DeleteFileOptions,
) -> crate::sync::Request<'_, endpoints::RepoDeleteFile<'_>, FileDeleteResponse> {
endpoints::RepoDeleteFile {
owner,
repo,
filepath,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_convert(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoConvert<'_>, Repository> {
endpoints::RepoConvert { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_apply_diff_patch(
&self,
owner: &str,
repo: &str,
body: UpdateFileOptions,
) -> crate::sync::Request<'_, endpoints::RepoApplyDiffPatch<'_>, FileResponse> {
endpoints::RepoApplyDiffPatch {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_editor_config(
&self,
owner: &str,
repo: &str,
filepath: &str,
query: RepoGetEditorConfigQuery,
) -> crate::sync::Request<'_, endpoints::RepoGetEditorConfig<'_>, BTreeMap<String, String>>
{
endpoints::RepoGetEditorConfig {
owner,
repo,
filepath,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_flags(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoListFlags<'_>, Vec<String>> {
endpoints::RepoListFlags { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_replace_all_flags(
&self,
owner: &str,
repo: &str,
body: ReplaceFlagsOption,
) -> crate::sync::Request<'_, endpoints::RepoReplaceAllFlags<'_>, ()> {
endpoints::RepoReplaceAllFlags {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_all_flags(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoDeleteAllFlags<'_>, ()> {
endpoints::RepoDeleteAllFlags { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_check_flag(
&self,
owner: &str,
repo: &str,
flag: &str,
) -> crate::sync::Request<'_, endpoints::RepoCheckFlag<'_>, ()> {
endpoints::RepoCheckFlag { owner, repo, flag }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_add_flag(
&self,
owner: &str,
repo: &str,
flag: &str,
) -> crate::sync::Request<'_, endpoints::RepoAddFlag<'_>, ()> {
endpoints::RepoAddFlag { owner, repo, flag }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_flag(
&self,
owner: &str,
repo: &str,
flag: &str,
) -> crate::sync::Request<'_, endpoints::RepoDeleteFlag<'_>, ()> {
endpoints::RepoDeleteFlag { owner, repo, flag }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn list_forks(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::ListForks<'_>, (RepositoryListHeaders, Vec<Repository>)>
{
endpoints::ListForks { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn create_fork(
&self,
owner: &str,
repo: &str,
body: CreateForkOption,
) -> crate::sync::Request<'_, endpoints::CreateFork<'_>, Repository> {
endpoints::CreateFork {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_blobs(
&self,
owner: &str,
repo: &str,
query: GetBlobsQuery,
) -> crate::sync::Request<'_, endpoints::GetBlobs<'_>, Vec<GitBlob>> {
endpoints::GetBlobs { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_blob(
&self,
owner: &str,
repo: &str,
sha: &str,
) -> crate::sync::Request<'_, endpoints::GetBlob<'_>, GitBlob> {
endpoints::GetBlob { owner, repo, sha }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_single_commit(
&self,
owner: &str,
repo: &str,
sha: &str,
query: RepoGetSingleCommitQuery,
) -> crate::sync::Request<'_, endpoints::RepoGetSingleCommit<'_>, Commit> {
endpoints::RepoGetSingleCommit {
owner,
repo,
sha,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_download_commit_diff_or_patch(
&self,
owner: &str,
repo: &str,
sha: &str,
diff_type: &str,
) -> crate::sync::Request<'_, endpoints::RepoDownloadCommitDiffOrPatch<'_>, String> {
endpoints::RepoDownloadCommitDiffOrPatch {
owner,
repo,
sha,
diff_type,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_note(
&self,
owner: &str,
repo: &str,
sha: &str,
query: RepoGetNoteQuery,
) -> crate::sync::Request<'_, endpoints::RepoGetNote<'_>, Note> {
endpoints::RepoGetNote {
owner,
repo,
sha,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_set_note(
&self,
owner: &str,
repo: &str,
sha: &str,
body: NoteOptions,
) -> crate::sync::Request<'_, endpoints::RepoSetNote<'_>, Note> {
endpoints::RepoSetNote {
owner,
repo,
sha,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_remove_note(
&self,
owner: &str,
repo: &str,
sha: &str,
) -> crate::sync::Request<'_, endpoints::RepoRemoveNote<'_>, ()> {
endpoints::RepoRemoveNote { owner, repo, sha }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_all_git_refs(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoListAllGitRefs<'_>, Vec<Reference>> {
endpoints::RepoListAllGitRefs { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_git_refs(
&self,
owner: &str,
repo: &str,
r#ref: &str,
) -> crate::sync::Request<'_, endpoints::RepoListGitRefs<'_>, Vec<Reference>> {
endpoints::RepoListGitRefs { owner, repo, r#ref }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_annotated_tag(
&self,
owner: &str,
repo: &str,
sha: &str,
) -> crate::sync::Request<'_, endpoints::GetAnnotatedTag<'_>, AnnotatedTag> {
endpoints::GetAnnotatedTag { owner, repo, sha }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_tree(
&self,
owner: &str,
repo: &str,
sha: &str,
query: GetTreeQuery,
) -> crate::sync::Request<'_, endpoints::GetTree<'_>, GitTreeResponse> {
endpoints::GetTree {
owner,
repo,
sha,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_hooks(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoListHooks<'_>, (HookListHeaders, Vec<Hook>)> {
endpoints::RepoListHooks { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_create_hook(
&self,
owner: &str,
repo: &str,
body: CreateHookOption,
) -> crate::sync::Request<'_, endpoints::RepoCreateHook<'_>, Hook> {
endpoints::RepoCreateHook {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_git_hooks(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoListGitHooks<'_>, Vec<GitHook>> {
endpoints::RepoListGitHooks { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_git_hook(
&self,
owner: &str,
repo: &str,
id: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetGitHook<'_>, GitHook> {
endpoints::RepoGetGitHook { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_git_hook(
&self,
owner: &str,
repo: &str,
id: &str,
) -> crate::sync::Request<'_, endpoints::RepoDeleteGitHook<'_>, ()> {
endpoints::RepoDeleteGitHook { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_edit_git_hook(
&self,
owner: &str,
repo: &str,
id: &str,
body: EditGitHookOption,
) -> crate::sync::Request<'_, endpoints::RepoEditGitHook<'_>, GitHook> {
endpoints::RepoEditGitHook {
owner,
repo,
id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_hook(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::RepoGetHook<'_>, Hook> {
endpoints::RepoGetHook { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_hook(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::RepoDeleteHook<'_>, ()> {
endpoints::RepoDeleteHook { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_edit_hook(
&self,
owner: &str,
repo: &str,
id: i64,
body: EditHookOption,
) -> crate::sync::Request<'_, endpoints::RepoEditHook<'_>, Hook> {
endpoints::RepoEditHook {
owner,
repo,
id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_test_hook(
&self,
owner: &str,
repo: &str,
id: i64,
query: RepoTestHookQuery,
) -> crate::sync::Request<'_, endpoints::RepoTestHook<'_>, ()> {
endpoints::RepoTestHook {
owner,
repo,
id,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_issue_config(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetIssueConfig<'_>, IssueConfig> {
endpoints::RepoGetIssueConfig { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_validate_issue_config(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoValidateIssueConfig<'_>, IssueConfigValidation>
{
endpoints::RepoValidateIssueConfig { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_issue_templates(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetIssueTemplates<'_>, Vec<IssueTemplate>> {
endpoints::RepoGetIssueTemplates { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_list_issues(
&self,
owner: &str,
repo: &str,
query: IssueListIssuesQuery,
) -> crate::sync::Request<'_, endpoints::IssueListIssues<'_>, (IssueListHeaders, Vec<Issue>)>
{
endpoints::IssueListIssues { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_create_issue(
&self,
owner: &str,
repo: &str,
body: CreateIssueOption,
) -> crate::sync::Request<'_, endpoints::IssueCreateIssue<'_>, Issue> {
endpoints::IssueCreateIssue {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_get_repo_comments(
&self,
owner: &str,
repo: &str,
query: IssueGetRepoCommentsQuery,
) -> crate::sync::Request<
'_,
endpoints::IssueGetRepoComments<'_>,
(CommentListHeaders, Vec<Comment>),
> {
endpoints::IssueGetRepoComments { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_get_comment(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::IssueGetComment<'_>, Option<Comment>> {
endpoints::IssueGetComment { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_delete_comment(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::IssueDeleteComment<'_>, ()> {
endpoints::IssueDeleteComment { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_edit_comment(
&self,
owner: &str,
repo: &str,
id: i64,
body: EditIssueCommentOption,
) -> crate::sync::Request<'_, endpoints::IssueEditComment<'_>, Option<Comment>> {
endpoints::IssueEditComment {
owner,
repo,
id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_list_issue_comment_attachments(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::IssueListIssueCommentAttachments<'_>, Vec<Attachment>>
{
endpoints::IssueListIssueCommentAttachments { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_create_issue_comment_attachment(
&self,
owner: &str,
repo: &str,
id: i64,
attachment: &[u8],
query: IssueCreateIssueCommentAttachmentQuery,
) -> crate::sync::Request<'_, endpoints::IssueCreateIssueCommentAttachment<'_>, Attachment>
{
endpoints::IssueCreateIssueCommentAttachment {
owner,
repo,
id,
attachment: &attachment,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_get_issue_comment_attachment(
&self,
owner: &str,
repo: &str,
id: i64,
attachment_id: i64,
) -> crate::sync::Request<'_, endpoints::IssueGetIssueCommentAttachment<'_>, Attachment> {
endpoints::IssueGetIssueCommentAttachment {
owner,
repo,
id,
attachment_id,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_delete_issue_comment_attachment(
&self,
owner: &str,
repo: &str,
id: i64,
attachment_id: i64,
) -> crate::sync::Request<'_, endpoints::IssueDeleteIssueCommentAttachment<'_>, ()> {
endpoints::IssueDeleteIssueCommentAttachment {
owner,
repo,
id,
attachment_id,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_edit_issue_comment_attachment(
&self,
owner: &str,
repo: &str,
id: i64,
attachment_id: i64,
body: EditAttachmentOptions,
) -> crate::sync::Request<'_, endpoints::IssueEditIssueCommentAttachment<'_>, Attachment> {
endpoints::IssueEditIssueCommentAttachment {
owner,
repo,
id,
attachment_id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_get_comment_reactions(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::IssueGetCommentReactions<'_>, Vec<Reaction>> {
endpoints::IssueGetCommentReactions { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_post_comment_reaction(
&self,
owner: &str,
repo: &str,
id: i64,
content: EditReactionOption,
) -> crate::sync::Request<'_, endpoints::IssuePostCommentReaction<'_>, Reaction> {
endpoints::IssuePostCommentReaction {
owner,
repo,
id,
body: content,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_delete_comment_reaction(
&self,
owner: &str,
repo: &str,
id: i64,
content: EditReactionOption,
) -> crate::sync::Request<'_, endpoints::IssueDeleteCommentReaction<'_>, ()> {
endpoints::IssueDeleteCommentReaction {
owner,
repo,
id,
body: content,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_pinned_issues(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoListPinnedIssues<'_>, Vec<Issue>> {
endpoints::RepoListPinnedIssues { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_get_issue(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::IssueGetIssue<'_>, Issue> {
endpoints::IssueGetIssue { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_delete(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::IssueDelete<'_>, ()> {
endpoints::IssueDelete { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_edit_issue(
&self,
owner: &str,
repo: &str,
index: i64,
body: EditIssueOption,
) -> crate::sync::Request<'_, endpoints::IssueEditIssue<'_>, Issue> {
endpoints::IssueEditIssue {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_list_issue_attachments(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::IssueListIssueAttachments<'_>, Vec<Attachment>> {
endpoints::IssueListIssueAttachments { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_create_issue_attachment(
&self,
owner: &str,
repo: &str,
index: i64,
attachment: &[u8],
query: IssueCreateIssueAttachmentQuery,
) -> crate::sync::Request<'_, endpoints::IssueCreateIssueAttachment<'_>, Attachment> {
endpoints::IssueCreateIssueAttachment {
owner,
repo,
index,
attachment: &attachment,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_get_issue_attachment(
&self,
owner: &str,
repo: &str,
index: i64,
attachment_id: i64,
) -> crate::sync::Request<'_, endpoints::IssueGetIssueAttachment<'_>, Attachment> {
endpoints::IssueGetIssueAttachment {
owner,
repo,
index,
attachment_id,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_delete_issue_attachment(
&self,
owner: &str,
repo: &str,
index: i64,
attachment_id: i64,
) -> crate::sync::Request<'_, endpoints::IssueDeleteIssueAttachment<'_>, ()> {
endpoints::IssueDeleteIssueAttachment {
owner,
repo,
index,
attachment_id,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_edit_issue_attachment(
&self,
owner: &str,
repo: &str,
index: i64,
attachment_id: i64,
body: EditAttachmentOptions,
) -> crate::sync::Request<'_, endpoints::IssueEditIssueAttachment<'_>, Attachment> {
endpoints::IssueEditIssueAttachment {
owner,
repo,
index,
attachment_id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_list_blocks(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::IssueListBlocks<'_>, Vec<Issue>> {
endpoints::IssueListBlocks { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_create_issue_blocking(
&self,
owner: &str,
repo: &str,
index: i64,
body: IssueMeta,
) -> crate::sync::Request<'_, endpoints::IssueCreateIssueBlocking<'_>, Issue> {
endpoints::IssueCreateIssueBlocking {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_remove_issue_blocking(
&self,
owner: &str,
repo: &str,
index: i64,
body: IssueMeta,
) -> crate::sync::Request<'_, endpoints::IssueRemoveIssueBlocking<'_>, Issue> {
endpoints::IssueRemoveIssueBlocking {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_get_comments(
&self,
owner: &str,
repo: &str,
index: i64,
query: IssueGetCommentsQuery,
) -> crate::sync::Request<'_, endpoints::IssueGetComments<'_>, (CommentListHeaders, Vec<Comment>)>
{
endpoints::IssueGetComments {
owner,
repo,
index,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_create_comment(
&self,
owner: &str,
repo: &str,
index: i64,
body: CreateIssueCommentOption,
) -> crate::sync::Request<'_, endpoints::IssueCreateComment<'_>, Comment> {
endpoints::IssueCreateComment {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_delete_comment_deprecated(
&self,
owner: &str,
repo: &str,
index: u32,
id: i64,
) -> crate::sync::Request<'_, endpoints::IssueDeleteCommentDeprecated<'_>, ()> {
endpoints::IssueDeleteCommentDeprecated {
owner,
repo,
index,
id,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_edit_comment_deprecated(
&self,
owner: &str,
repo: &str,
index: u32,
id: i64,
body: EditIssueCommentOption,
) -> crate::sync::Request<'_, endpoints::IssueEditCommentDeprecated<'_>, Option<Comment>> {
endpoints::IssueEditCommentDeprecated {
owner,
repo,
index,
id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_edit_issue_deadline(
&self,
owner: &str,
repo: &str,
index: i64,
body: EditDeadlineOption,
) -> crate::sync::Request<'_, endpoints::IssueEditIssueDeadline<'_>, IssueDeadline> {
endpoints::IssueEditIssueDeadline {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_list_issue_dependencies(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::IssueListIssueDependencies<'_>, Vec<Issue>> {
endpoints::IssueListIssueDependencies { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_create_issue_dependencies(
&self,
owner: &str,
repo: &str,
index: i64,
body: IssueMeta,
) -> crate::sync::Request<'_, endpoints::IssueCreateIssueDependencies<'_>, Issue> {
endpoints::IssueCreateIssueDependencies {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_remove_issue_dependencies(
&self,
owner: &str,
repo: &str,
index: i64,
body: IssueMeta,
) -> crate::sync::Request<'_, endpoints::IssueRemoveIssueDependencies<'_>, Issue> {
endpoints::IssueRemoveIssueDependencies {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_get_labels(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::IssueGetLabels<'_>, Vec<Label>> {
endpoints::IssueGetLabels { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_replace_labels(
&self,
owner: &str,
repo: &str,
index: i64,
body: IssueLabelsOption,
) -> crate::sync::Request<'_, endpoints::IssueReplaceLabels<'_>, Vec<Label>> {
endpoints::IssueReplaceLabels {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_add_label(
&self,
owner: &str,
repo: &str,
index: i64,
body: IssueLabelsOption,
) -> crate::sync::Request<'_, endpoints::IssueAddLabel<'_>, Vec<Label>> {
endpoints::IssueAddLabel {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_clear_labels(
&self,
owner: &str,
repo: &str,
index: i64,
body: DeleteLabelsOption,
) -> crate::sync::Request<'_, endpoints::IssueClearLabels<'_>, ()> {
endpoints::IssueClearLabels {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_remove_label(
&self,
owner: &str,
repo: &str,
index: i64,
identifier: &str,
body: DeleteLabelsOption,
) -> crate::sync::Request<'_, endpoints::IssueRemoveLabel<'_>, ()> {
endpoints::IssueRemoveLabel {
owner,
repo,
index,
identifier,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn pin_issue(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::PinIssue<'_>, ()> {
endpoints::PinIssue { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn unpin_issue(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::UnpinIssue<'_>, ()> {
endpoints::UnpinIssue { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn move_issue_pin(
&self,
owner: &str,
repo: &str,
index: i64,
position: i64,
) -> crate::sync::Request<'_, endpoints::MoveIssuePin<'_>, ()> {
endpoints::MoveIssuePin {
owner,
repo,
index,
position,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_get_issue_reactions(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<
'_,
endpoints::IssueGetIssueReactions<'_>,
(ReactionListHeaders, Vec<Reaction>),
> {
endpoints::IssueGetIssueReactions { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_post_issue_reaction(
&self,
owner: &str,
repo: &str,
index: i64,
content: EditReactionOption,
) -> crate::sync::Request<'_, endpoints::IssuePostIssueReaction<'_>, Reaction> {
endpoints::IssuePostIssueReaction {
owner,
repo,
index,
body: content,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_delete_issue_reaction(
&self,
owner: &str,
repo: &str,
index: i64,
content: EditReactionOption,
) -> crate::sync::Request<'_, endpoints::IssueDeleteIssueReaction<'_>, ()> {
endpoints::IssueDeleteIssueReaction {
owner,
repo,
index,
body: content,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_delete_stop_watch(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::IssueDeleteStopWatch<'_>, ()> {
endpoints::IssueDeleteStopWatch { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_start_stop_watch(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::IssueStartStopWatch<'_>, ()> {
endpoints::IssueStartStopWatch { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_stop_stop_watch(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::IssueStopStopWatch<'_>, ()> {
endpoints::IssueStopStopWatch { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_subscriptions(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::IssueSubscriptions<'_>, (UserListHeaders, Vec<User>)>
{
endpoints::IssueSubscriptions { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_check_subscription(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::IssueCheckSubscription<'_>, WatchInfo> {
endpoints::IssueCheckSubscription { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_add_subscription(
&self,
owner: &str,
repo: &str,
index: i64,
user: &str,
) -> crate::sync::Request<'_, endpoints::IssueAddSubscription<'_>, ()> {
endpoints::IssueAddSubscription {
owner,
repo,
index,
user,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_delete_subscription(
&self,
owner: &str,
repo: &str,
index: i64,
user: &str,
) -> crate::sync::Request<'_, endpoints::IssueDeleteSubscription<'_>, ()> {
endpoints::IssueDeleteSubscription {
owner,
repo,
index,
user,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_get_comments_and_timeline(
&self,
owner: &str,
repo: &str,
index: i64,
query: IssueGetCommentsAndTimelineQuery,
) -> crate::sync::Request<
'_,
endpoints::IssueGetCommentsAndTimeline<'_>,
(TimelineListHeaders, Vec<TimelineComment>),
> {
endpoints::IssueGetCommentsAndTimeline {
owner,
repo,
index,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_tracked_times(
&self,
owner: &str,
repo: &str,
index: i64,
query: IssueTrackedTimesQuery,
) -> crate::sync::Request<
'_,
endpoints::IssueTrackedTimes<'_>,
(TrackedTimeListHeaders, Vec<TrackedTime>),
> {
endpoints::IssueTrackedTimes {
owner,
repo,
index,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_add_time(
&self,
owner: &str,
repo: &str,
index: i64,
body: AddTimeOption,
) -> crate::sync::Request<'_, endpoints::IssueAddTime<'_>, TrackedTime> {
endpoints::IssueAddTime {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_reset_time(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::IssueResetTime<'_>, ()> {
endpoints::IssueResetTime { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_delete_time(
&self,
owner: &str,
repo: &str,
index: i64,
id: i64,
) -> crate::sync::Request<'_, endpoints::IssueDeleteTime<'_>, ()> {
endpoints::IssueDeleteTime {
owner,
repo,
index,
id,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_keys(
&self,
owner: &str,
repo: &str,
query: RepoListKeysQuery,
) -> crate::sync::Request<'_, endpoints::RepoListKeys<'_>, (DeployKeyListHeaders, Vec<DeployKey>)>
{
endpoints::RepoListKeys { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_create_key(
&self,
owner: &str,
repo: &str,
body: CreateKeyOption,
) -> crate::sync::Request<'_, endpoints::RepoCreateKey<'_>, DeployKey> {
endpoints::RepoCreateKey {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_key(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::RepoGetKey<'_>, DeployKey> {
endpoints::RepoGetKey { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_key(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::RepoDeleteKey<'_>, ()> {
endpoints::RepoDeleteKey { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_list_labels(
&self,
owner: &str,
repo: &str,
query: IssueListLabelsQuery,
) -> crate::sync::Request<'_, endpoints::IssueListLabels<'_>, (LabelListHeaders, Vec<Label>)>
{
endpoints::IssueListLabels { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_create_label(
&self,
owner: &str,
repo: &str,
body: CreateLabelOption,
) -> crate::sync::Request<'_, endpoints::IssueCreateLabel<'_>, Label> {
endpoints::IssueCreateLabel {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_get_label(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::IssueGetLabel<'_>, Label> {
endpoints::IssueGetLabel { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_delete_label(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::IssueDeleteLabel<'_>, ()> {
endpoints::IssueDeleteLabel { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_edit_label(
&self,
owner: &str,
repo: &str,
id: i64,
body: EditLabelOption,
) -> crate::sync::Request<'_, endpoints::IssueEditLabel<'_>, Label> {
endpoints::IssueEditLabel {
owner,
repo,
id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_languages(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetLanguages<'_>, BTreeMap<String, i64>> {
endpoints::RepoGetLanguages { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_raw_file_or_lfs(
&self,
owner: &str,
repo: &str,
filepath: &str,
query: RepoGetRawFileOrLfsQuery,
) -> crate::sync::Request<'_, endpoints::RepoGetRawFileOrLfs<'_>, Bytes> {
endpoints::RepoGetRawFileOrLfs {
owner,
repo,
filepath,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_get_milestones_list(
&self,
owner: &str,
repo: &str,
query: IssueGetMilestonesListQuery,
) -> crate::sync::Request<
'_,
endpoints::IssueGetMilestonesList<'_>,
(MilestoneListHeaders, Vec<Milestone>),
> {
endpoints::IssueGetMilestonesList { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_create_milestone(
&self,
owner: &str,
repo: &str,
body: CreateMilestoneOption,
) -> crate::sync::Request<'_, endpoints::IssueCreateMilestone<'_>, Milestone> {
endpoints::IssueCreateMilestone {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_get_milestone(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::IssueGetMilestone<'_>, Milestone> {
endpoints::IssueGetMilestone { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_delete_milestone(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::IssueDeleteMilestone<'_>, ()> {
endpoints::IssueDeleteMilestone { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn issue_edit_milestone(
&self,
owner: &str,
repo: &str,
id: i64,
body: EditMilestoneOption,
) -> crate::sync::Request<'_, endpoints::IssueEditMilestone<'_>, Milestone> {
endpoints::IssueEditMilestone {
owner,
repo,
id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_mirror_sync(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoMirrorSync<'_>, ()> {
endpoints::RepoMirrorSync { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_new_pin_allowed(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoNewPinAllowed<'_>, NewIssuePinsAllowed> {
endpoints::RepoNewPinAllowed { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn notify_get_repo_list(
&self,
owner: &str,
repo: &str,
query: NotifyGetRepoListQuery,
) -> crate::sync::Request<
'_,
endpoints::NotifyGetRepoList<'_>,
(NotificationThreadListHeaders, Vec<NotificationThread>),
> {
endpoints::NotifyGetRepoList { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn notify_read_repo_list(
&self,
owner: &str,
repo: &str,
query: NotifyReadRepoListQuery,
) -> crate::sync::Request<'_, endpoints::NotifyReadRepoList<'_>, Vec<NotificationThread>> {
endpoints::NotifyReadRepoList { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_pull_requests(
&self,
owner: &str,
repo: &str,
query: RepoListPullRequestsQuery,
) -> crate::sync::Request<
'_,
endpoints::RepoListPullRequests<'_>,
(PullRequestListHeaders, Vec<PullRequest>),
> {
endpoints::RepoListPullRequests { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_create_pull_request(
&self,
owner: &str,
repo: &str,
body: CreatePullRequestOption,
) -> crate::sync::Request<'_, endpoints::RepoCreatePullRequest<'_>, PullRequest> {
endpoints::RepoCreatePullRequest {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_pinned_pull_requests(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<
'_,
endpoints::RepoListPinnedPullRequests<'_>,
(PullRequestListHeaders, Vec<PullRequest>),
> {
endpoints::RepoListPinnedPullRequests { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_pull_request_by_base_head(
&self,
owner: &str,
repo: &str,
base: &str,
head: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetPullRequestByBaseHead<'_>, PullRequest> {
endpoints::RepoGetPullRequestByBaseHead {
owner,
repo,
base,
head,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_pull_request(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::RepoGetPullRequest<'_>, PullRequest> {
endpoints::RepoGetPullRequest { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_edit_pull_request(
&self,
owner: &str,
repo: &str,
index: i64,
body: EditPullRequestOption,
) -> crate::sync::Request<'_, endpoints::RepoEditPullRequest<'_>, PullRequest> {
endpoints::RepoEditPullRequest {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_download_pull_diff_or_patch(
&self,
owner: &str,
repo: &str,
index: i64,
diff_type: &str,
query: RepoDownloadPullDiffOrPatchQuery,
) -> crate::sync::Request<'_, endpoints::RepoDownloadPullDiffOrPatch<'_>, String> {
endpoints::RepoDownloadPullDiffOrPatch {
owner,
repo,
index,
diff_type,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_pull_request_commits(
&self,
owner: &str,
repo: &str,
index: i64,
query: RepoGetPullRequestCommitsQuery,
) -> crate::sync::Request<
'_,
endpoints::RepoGetPullRequestCommits<'_>,
(CommitListHeaders, Vec<Commit>),
> {
endpoints::RepoGetPullRequestCommits {
owner,
repo,
index,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_pull_request_files(
&self,
owner: &str,
repo: &str,
index: i64,
query: RepoGetPullRequestFilesQuery,
) -> crate::sync::Request<
'_,
endpoints::RepoGetPullRequestFiles<'_>,
(ChangedFileListWithPaginationHeaders, Vec<ChangedFile>),
> {
endpoints::RepoGetPullRequestFiles {
owner,
repo,
index,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_pull_request_is_merged(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::RepoPullRequestIsMerged<'_>, ()> {
endpoints::RepoPullRequestIsMerged { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_merge_pull_request(
&self,
owner: &str,
repo: &str,
index: i64,
body: MergePullRequestOption,
) -> crate::sync::Request<'_, endpoints::RepoMergePullRequest<'_>, ()> {
endpoints::RepoMergePullRequest {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_cancel_scheduled_auto_merge(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<'_, endpoints::RepoCancelScheduledAutoMerge<'_>, ()> {
endpoints::RepoCancelScheduledAutoMerge { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_create_pull_review_requests(
&self,
owner: &str,
repo: &str,
index: i64,
body: PullReviewRequestOptions,
) -> crate::sync::Request<'_, endpoints::RepoCreatePullReviewRequests<'_>, Vec<PullReview>>
{
endpoints::RepoCreatePullReviewRequests {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_pull_review_requests(
&self,
owner: &str,
repo: &str,
index: i64,
body: PullReviewRequestOptions,
) -> crate::sync::Request<'_, endpoints::RepoDeletePullReviewRequests<'_>, ()> {
endpoints::RepoDeletePullReviewRequests {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_pull_reviews(
&self,
owner: &str,
repo: &str,
index: i64,
) -> crate::sync::Request<
'_,
endpoints::RepoListPullReviews<'_>,
(PullReviewListHeaders, Vec<PullReview>),
> {
endpoints::RepoListPullReviews { owner, repo, index }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_create_pull_review(
&self,
owner: &str,
repo: &str,
index: i64,
body: CreatePullReviewOptions,
) -> crate::sync::Request<'_, endpoints::RepoCreatePullReview<'_>, PullReview> {
endpoints::RepoCreatePullReview {
owner,
repo,
index,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_pull_review(
&self,
owner: &str,
repo: &str,
index: i64,
id: i64,
) -> crate::sync::Request<'_, endpoints::RepoGetPullReview<'_>, PullReview> {
endpoints::RepoGetPullReview {
owner,
repo,
index,
id,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_submit_pull_review(
&self,
owner: &str,
repo: &str,
index: i64,
id: i64,
body: SubmitPullReviewOptions,
) -> crate::sync::Request<'_, endpoints::RepoSubmitPullReview<'_>, PullReview> {
endpoints::RepoSubmitPullReview {
owner,
repo,
index,
id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_pull_review(
&self,
owner: &str,
repo: &str,
index: i64,
id: i64,
) -> crate::sync::Request<'_, endpoints::RepoDeletePullReview<'_>, ()> {
endpoints::RepoDeletePullReview {
owner,
repo,
index,
id,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_pull_review_comments(
&self,
owner: &str,
repo: &str,
index: i64,
id: i64,
) -> crate::sync::Request<'_, endpoints::RepoGetPullReviewComments<'_>, Vec<PullReviewComment>>
{
endpoints::RepoGetPullReviewComments {
owner,
repo,
index,
id,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_create_pull_review_comment(
&self,
owner: &str,
repo: &str,
index: i64,
id: i64,
body: serde_json::Value,
) -> crate::sync::Request<'_, endpoints::RepoCreatePullReviewComment<'_>, PullReviewComment>
{
endpoints::RepoCreatePullReviewComment {
owner,
repo,
index,
id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_pull_review_comment(
&self,
owner: &str,
repo: &str,
index: i64,
id: i64,
comment: i64,
) -> crate::sync::Request<'_, endpoints::RepoGetPullReviewComment<'_>, PullReviewComment> {
endpoints::RepoGetPullReviewComment {
owner,
repo,
index,
id,
comment,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_pull_review_comment(
&self,
owner: &str,
repo: &str,
index: i64,
id: i64,
comment: i64,
) -> crate::sync::Request<'_, endpoints::RepoDeletePullReviewComment<'_>, ()> {
endpoints::RepoDeletePullReviewComment {
owner,
repo,
index,
id,
comment,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_dismiss_pull_review(
&self,
owner: &str,
repo: &str,
index: i64,
id: i64,
body: DismissPullReviewOptions,
) -> crate::sync::Request<'_, endpoints::RepoDismissPullReview<'_>, PullReview> {
endpoints::RepoDismissPullReview {
owner,
repo,
index,
id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_un_dismiss_pull_review(
&self,
owner: &str,
repo: &str,
index: i64,
id: i64,
) -> crate::sync::Request<'_, endpoints::RepoUnDismissPullReview<'_>, PullReview> {
endpoints::RepoUnDismissPullReview {
owner,
repo,
index,
id,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_update_pull_request(
&self,
owner: &str,
repo: &str,
index: i64,
query: RepoUpdatePullRequestQuery,
) -> crate::sync::Request<'_, endpoints::RepoUpdatePullRequest<'_>, ()> {
endpoints::RepoUpdatePullRequest {
owner,
repo,
index,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_push_mirrors(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<
'_,
endpoints::RepoListPushMirrors<'_>,
(PushMirrorListHeaders, Vec<PushMirror>),
> {
endpoints::RepoListPushMirrors { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_add_push_mirror(
&self,
owner: &str,
repo: &str,
body: CreatePushMirrorOption,
) -> crate::sync::Request<'_, endpoints::RepoAddPushMirror<'_>, PushMirror> {
endpoints::RepoAddPushMirror {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_push_mirror_sync(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoPushMirrorSync<'_>, ()> {
endpoints::RepoPushMirrorSync { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_push_mirror_by_remote_name(
&self,
owner: &str,
repo: &str,
name: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetPushMirrorByRemoteName<'_>, PushMirror> {
endpoints::RepoGetPushMirrorByRemoteName { owner, repo, name }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_push_mirror(
&self,
owner: &str,
repo: &str,
name: &str,
) -> crate::sync::Request<'_, endpoints::RepoDeletePushMirror<'_>, ()> {
endpoints::RepoDeletePushMirror { owner, repo, name }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_raw_file(
&self,
owner: &str,
repo: &str,
filepath: &str,
query: RepoGetRawFileQuery,
) -> crate::sync::Request<'_, endpoints::RepoGetRawFile<'_>, Bytes> {
endpoints::RepoGetRawFile {
owner,
repo,
filepath,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_releases(
&self,
owner: &str,
repo: &str,
query: RepoListReleasesQuery,
) -> crate::sync::Request<'_, endpoints::RepoListReleases<'_>, (ReleaseListHeaders, Vec<Release>)>
{
endpoints::RepoListReleases { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_create_release(
&self,
owner: &str,
repo: &str,
body: CreateReleaseOption,
) -> crate::sync::Request<'_, endpoints::RepoCreateRelease<'_>, Release> {
endpoints::RepoCreateRelease {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_latest_release(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetLatestRelease<'_>, Release> {
endpoints::RepoGetLatestRelease { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_release_by_tag(
&self,
owner: &str,
repo: &str,
tag: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetReleaseByTag<'_>, Release> {
endpoints::RepoGetReleaseByTag { owner, repo, tag }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_release_by_tag(
&self,
owner: &str,
repo: &str,
tag: &str,
) -> crate::sync::Request<'_, endpoints::RepoDeleteReleaseByTag<'_>, ()> {
endpoints::RepoDeleteReleaseByTag { owner, repo, tag }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_release(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::RepoGetRelease<'_>, Release> {
endpoints::RepoGetRelease { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_release(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::RepoDeleteRelease<'_>, ()> {
endpoints::RepoDeleteRelease { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_edit_release(
&self,
owner: &str,
repo: &str,
id: i64,
body: EditReleaseOption,
) -> crate::sync::Request<'_, endpoints::RepoEditRelease<'_>, Release> {
endpoints::RepoEditRelease {
owner,
repo,
id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_release_attachments(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::RepoListReleaseAttachments<'_>, Vec<Attachment>> {
endpoints::RepoListReleaseAttachments { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_create_release_attachment(
&self,
owner: &str,
repo: &str,
id: i64,
attachment: Option<&[u8]>,
external_url: Option<&str>,
query: RepoCreateReleaseAttachmentQuery,
) -> crate::sync::Request<'_, endpoints::RepoCreateReleaseAttachment<'_>, Attachment> {
endpoints::RepoCreateReleaseAttachment {
owner,
repo,
id,
attachment: attachment.as_deref(),
external_url: external_url.as_deref(),
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_release_attachment(
&self,
owner: &str,
repo: &str,
id: i64,
attachment_id: i64,
) -> crate::sync::Request<'_, endpoints::RepoGetReleaseAttachment<'_>, Attachment> {
endpoints::RepoGetReleaseAttachment {
owner,
repo,
id,
attachment_id,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_release_attachment(
&self,
owner: &str,
repo: &str,
id: i64,
attachment_id: i64,
) -> crate::sync::Request<'_, endpoints::RepoDeleteReleaseAttachment<'_>, ()> {
endpoints::RepoDeleteReleaseAttachment {
owner,
repo,
id,
attachment_id,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_edit_release_attachment(
&self,
owner: &str,
repo: &str,
id: i64,
attachment_id: i64,
body: EditAttachmentOptions,
) -> crate::sync::Request<'_, endpoints::RepoEditReleaseAttachment<'_>, Attachment> {
endpoints::RepoEditReleaseAttachment {
owner,
repo,
id,
attachment_id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_reviewers(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetReviewers<'_>, (UserListHeaders, Vec<User>)>
{
endpoints::RepoGetReviewers { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_signing_key(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoSigningKey<'_>, String> {
endpoints::RepoSigningKey { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_stargazers(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoListStargazers<'_>, (UserListHeaders, Vec<User>)>
{
endpoints::RepoListStargazers { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_statuses(
&self,
owner: &str,
repo: &str,
sha: &str,
query: RepoListStatusesQuery,
) -> crate::sync::Request<
'_,
endpoints::RepoListStatuses<'_>,
(CommitStatusListHeaders, Vec<CommitStatus>),
> {
endpoints::RepoListStatuses {
owner,
repo,
sha,
query,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_create_status(
&self,
owner: &str,
repo: &str,
sha: &str,
body: CreateStatusOption,
) -> crate::sync::Request<'_, endpoints::RepoCreateStatus<'_>, CommitStatus> {
endpoints::RepoCreateStatus {
owner,
repo,
sha,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_subscribers(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoListSubscribers<'_>, (UserListHeaders, Vec<User>)>
{
endpoints::RepoListSubscribers { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_check_subscription(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::UserCurrentCheckSubscription<'_>, WatchInfo> {
endpoints::UserCurrentCheckSubscription { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_put_subscription(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::UserCurrentPutSubscription<'_>, WatchInfo> {
endpoints::UserCurrentPutSubscription { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_delete_subscription(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::UserCurrentDeleteSubscription<'_>, ()> {
endpoints::UserCurrentDeleteSubscription { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_sync_fork_default_info(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoSyncForkDefaultInfo<'_>, SyncForkInfo> {
endpoints::RepoSyncForkDefaultInfo { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_sync_fork_default(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoSyncForkDefault<'_>, ()> {
endpoints::RepoSyncForkDefault { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_sync_fork_branch_info(
&self,
owner: &str,
repo: &str,
branch: &str,
) -> crate::sync::Request<'_, endpoints::RepoSyncForkBranchInfo<'_>, SyncForkInfo> {
endpoints::RepoSyncForkBranchInfo {
owner,
repo,
branch,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_sync_fork_branch(
&self,
owner: &str,
repo: &str,
branch: &str,
) -> crate::sync::Request<'_, endpoints::RepoSyncForkBranch<'_>, ()> {
endpoints::RepoSyncForkBranch {
owner,
repo,
branch,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_tag_protection(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoListTagProtection<'_>, Vec<TagProtection>> {
endpoints::RepoListTagProtection { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_create_tag_protection(
&self,
owner: &str,
repo: &str,
body: CreateTagProtectionOption,
) -> crate::sync::Request<'_, endpoints::RepoCreateTagProtection<'_>, TagProtection> {
endpoints::RepoCreateTagProtection {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_tag_protection(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::RepoGetTagProtection<'_>, TagProtection> {
endpoints::RepoGetTagProtection { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_tag_protection(
&self,
owner: &str,
repo: &str,
id: i64,
) -> crate::sync::Request<'_, endpoints::RepoDeleteTagProtection<'_>, ()> {
endpoints::RepoDeleteTagProtection { owner, repo, id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_edit_tag_protection(
&self,
owner: &str,
repo: &str,
id: i64,
body: EditTagProtectionOption,
) -> crate::sync::Request<'_, endpoints::RepoEditTagProtection<'_>, TagProtection> {
endpoints::RepoEditTagProtection {
owner,
repo,
id,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_tags(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoListTags<'_>, (TagListHeaders, Vec<Tag>)> {
endpoints::RepoListTags { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_create_tag(
&self,
owner: &str,
repo: &str,
body: CreateTagOption,
) -> crate::sync::Request<'_, endpoints::RepoCreateTag<'_>, Tag> {
endpoints::RepoCreateTag {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_tag(
&self,
owner: &str,
repo: &str,
tag: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetTag<'_>, Tag> {
endpoints::RepoGetTag { owner, repo, tag }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_tag(
&self,
owner: &str,
repo: &str,
tag: &str,
) -> crate::sync::Request<'_, endpoints::RepoDeleteTag<'_>, ()> {
endpoints::RepoDeleteTag { owner, repo, tag }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_teams(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoListTeams<'_>, Vec<Team>> {
endpoints::RepoListTeams { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_check_team(
&self,
owner: &str,
repo: &str,
team: &str,
) -> crate::sync::Request<'_, endpoints::RepoCheckTeam<'_>, Team> {
endpoints::RepoCheckTeam { owner, repo, team }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_add_team(
&self,
owner: &str,
repo: &str,
team: &str,
) -> crate::sync::Request<'_, endpoints::RepoAddTeam<'_>, ()> {
endpoints::RepoAddTeam { owner, repo, team }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_team(
&self,
owner: &str,
repo: &str,
team: &str,
) -> crate::sync::Request<'_, endpoints::RepoDeleteTeam<'_>, ()> {
endpoints::RepoDeleteTeam { owner, repo, team }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_tracked_times(
&self,
owner: &str,
repo: &str,
query: RepoTrackedTimesQuery,
) -> crate::sync::Request<
'_,
endpoints::RepoTrackedTimes<'_>,
(TrackedTimeListHeaders, Vec<TrackedTime>),
> {
endpoints::RepoTrackedTimes { owner, repo, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_tracked_times(
&self,
owner: &str,
repo: &str,
user: &str,
) -> crate::sync::Request<'_, endpoints::UserTrackedTimes<'_>, Vec<TrackedTime>> {
endpoints::UserTrackedTimes { owner, repo, user }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_list_topics(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RepoListTopics<'_>, TopicName> {
endpoints::RepoListTopics { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_update_topics(
&self,
owner: &str,
repo: &str,
body: RepoTopicOptions,
) -> crate::sync::Request<'_, endpoints::RepoUpdateTopics<'_>, ()> {
endpoints::RepoUpdateTopics {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_add_topic(
&self,
owner: &str,
repo: &str,
topic: &str,
) -> crate::sync::Request<'_, endpoints::RepoAddTopic<'_>, ()> {
endpoints::RepoAddTopic { owner, repo, topic }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_topic(
&self,
owner: &str,
repo: &str,
topic: &str,
) -> crate::sync::Request<'_, endpoints::RepoDeleteTopic<'_>, ()> {
endpoints::RepoDeleteTopic { owner, repo, topic }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_transfer(
&self,
owner: &str,
repo: &str,
body: TransferRepoOption,
) -> crate::sync::Request<'_, endpoints::RepoTransfer<'_>, Repository> {
endpoints::RepoTransfer {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn accept_repo_transfer(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::AcceptRepoTransfer<'_>, Repository> {
endpoints::AcceptRepoTransfer { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn reject_repo_transfer(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::RejectRepoTransfer<'_>, Repository> {
endpoints::RejectRepoTransfer { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_create_wiki_page(
&self,
owner: &str,
repo: &str,
body: CreateWikiPageOptions,
) -> crate::sync::Request<'_, endpoints::RepoCreateWikiPage<'_>, WikiPage> {
endpoints::RepoCreateWikiPage {
owner,
repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_wiki_page(
&self,
owner: &str,
repo: &str,
page_name: &str,
) -> crate::sync::Request<'_, endpoints::RepoGetWikiPage<'_>, WikiPage> {
endpoints::RepoGetWikiPage {
owner,
repo,
page_name,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_delete_wiki_page(
&self,
owner: &str,
repo: &str,
page_name: &str,
) -> crate::sync::Request<'_, endpoints::RepoDeleteWikiPage<'_>, ()> {
endpoints::RepoDeleteWikiPage {
owner,
repo,
page_name,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_edit_wiki_page(
&self,
owner: &str,
repo: &str,
page_name: &str,
body: CreateWikiPageOptions,
) -> crate::sync::Request<'_, endpoints::RepoEditWikiPage<'_>, WikiPage> {
endpoints::RepoEditWikiPage {
owner,
repo,
page_name,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_wiki_pages(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<
'_,
endpoints::RepoGetWikiPages<'_>,
(WikiPageListHeaders, Vec<WikiPageMetaData>),
> {
endpoints::RepoGetWikiPages { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_wiki_page_revisions(
&self,
owner: &str,
repo: &str,
page_name: &str,
) -> crate::sync::Request<
'_,
endpoints::RepoGetWikiPageRevisions<'_>,
(WikiCommitListHeaders, WikiCommitList),
> {
endpoints::RepoGetWikiPageRevisions {
owner,
repo,
page_name,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn generate_repo(
&self,
template_owner: &str,
template_repo: &str,
body: GenerateRepoOption,
) -> crate::sync::Request<'_, endpoints::GenerateRepo<'_>, Repository> {
endpoints::GenerateRepo {
template_owner,
template_repo,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn repo_get_by_id(
&self,
id: i64,
) -> crate::sync::Request<'_, endpoints::RepoGetById, Repository> {
endpoints::RepoGetById { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_general_api_settings(
&self,
) -> crate::sync::Request<'_, endpoints::GetGeneralApiSettings, GeneralAPISettings> {
endpoints::GetGeneralApiSettings {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_general_attachment_settings(
&self,
) -> crate::sync::Request<'_, endpoints::GetGeneralAttachmentSettings, GeneralAttachmentSettings>
{
endpoints::GetGeneralAttachmentSettings {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_general_repository_settings(
&self,
) -> crate::sync::Request<'_, endpoints::GetGeneralRepositorySettings, GeneralRepoSettings>
{
endpoints::GetGeneralRepositorySettings {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_general_ui_settings(
&self,
) -> crate::sync::Request<'_, endpoints::GetGeneralUiSettings, GeneralUISettings> {
endpoints::GetGeneralUiSettings {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_signing_key(&self) -> crate::sync::Request<'_, endpoints::GetSigningKey, String> {
endpoints::GetSigningKey {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_ssh_signing_key(
&self,
) -> crate::sync::Request<'_, endpoints::GetSshSigningKey, String> {
endpoints::GetSshSigningKey {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_get_team(&self, id: i64) -> crate::sync::Request<'_, endpoints::OrgGetTeam, Team> {
endpoints::OrgGetTeam { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_delete_team(
&self,
id: i64,
) -> crate::sync::Request<'_, endpoints::OrgDeleteTeam, ()> {
endpoints::OrgDeleteTeam { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_edit_team(
&self,
id: i64,
body: EditTeamOption,
) -> crate::sync::Request<'_, endpoints::OrgEditTeam, Team> {
endpoints::OrgEditTeam { id, body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_team_activity_feeds(
&self,
id: i64,
query: OrgListTeamActivityFeedsQuery,
) -> crate::sync::Request<
'_,
endpoints::OrgListTeamActivityFeeds,
(ActivityFeedsListHeaders, Vec<Activity>),
> {
endpoints::OrgListTeamActivityFeeds { id, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_team_members(
&self,
id: i64,
) -> crate::sync::Request<'_, endpoints::OrgListTeamMembers, (UserListHeaders, Vec<User>)> {
endpoints::OrgListTeamMembers { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_team_member(
&self,
id: i64,
username: &str,
) -> crate::sync::Request<'_, endpoints::OrgListTeamMember<'_>, User> {
endpoints::OrgListTeamMember { id, username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_add_team_member(
&self,
id: i64,
username: &str,
) -> crate::sync::Request<'_, endpoints::OrgAddTeamMember<'_>, ()> {
endpoints::OrgAddTeamMember { id, username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_remove_team_member(
&self,
id: i64,
username: &str,
) -> crate::sync::Request<'_, endpoints::OrgRemoveTeamMember<'_>, ()> {
endpoints::OrgRemoveTeamMember { id, username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_team_repos(
&self,
id: i64,
) -> crate::sync::Request<
'_,
endpoints::OrgListTeamRepos,
(RepositoryListHeaders, Vec<Repository>),
> {
endpoints::OrgListTeamRepos { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_team_repo(
&self,
id: i64,
org: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::OrgListTeamRepo<'_>, Repository> {
endpoints::OrgListTeamRepo { id, org, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_add_team_repository(
&self,
id: i64,
org: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::OrgAddTeamRepository<'_>, ()> {
endpoints::OrgAddTeamRepository { id, org, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_remove_team_repository(
&self,
id: i64,
org: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::OrgRemoveTeamRepository<'_>, ()> {
endpoints::OrgRemoveTeamRepository { id, org, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn topic_search(
&self,
query: TopicSearchQuery,
) -> crate::sync::Request<'_, endpoints::TopicSearch, TopicSearchResults> {
endpoints::TopicSearch { query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_get_current(&self) -> crate::sync::Request<'_, endpoints::UserGetCurrent, User> {
endpoints::UserGetCurrent {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_search_run_jobs(
&self,
query: UserSearchRunJobsQuery,
) -> crate::sync::Request<'_, endpoints::UserSearchRunJobs, Vec<ActionRunJob>> {
endpoints::UserSearchRunJobs { query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_get_runner_registration_token(
&self,
) -> crate::sync::Request<'_, endpoints::UserGetRunnerRegistrationToken, RegistrationToken>
{
endpoints::UserGetRunnerRegistrationToken {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn update_user_secret(
&self,
secretname: &str,
body: CreateOrUpdateSecretOption,
) -> crate::sync::Request<'_, endpoints::UpdateUserSecret<'_>, ()> {
endpoints::UpdateUserSecret {
secretname,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn delete_user_secret(
&self,
secretname: &str,
) -> crate::sync::Request<'_, endpoints::DeleteUserSecret<'_>, ()> {
endpoints::DeleteUserSecret { secretname }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_user_variables_list(
&self,
) -> crate::sync::Request<
'_,
endpoints::GetUserVariablesList,
(VariableListHeaders, Vec<ActionVariable>),
> {
endpoints::GetUserVariablesList {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_user_variable(
&self,
variablename: &str,
) -> crate::sync::Request<'_, endpoints::GetUserVariable<'_>, ActionVariable> {
endpoints::GetUserVariable { variablename }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn update_user_variable(
&self,
variablename: &str,
body: UpdateVariableOption,
) -> crate::sync::Request<'_, endpoints::UpdateUserVariable<'_>, ()> {
endpoints::UpdateUserVariable {
variablename,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn create_user_variable(
&self,
variablename: &str,
body: CreateVariableOption,
) -> crate::sync::Request<'_, endpoints::CreateUserVariable<'_>, ()> {
endpoints::CreateUserVariable {
variablename,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn delete_user_variable(
&self,
variablename: &str,
) -> crate::sync::Request<'_, endpoints::DeleteUserVariable<'_>, ()> {
endpoints::DeleteUserVariable { variablename }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_get_oauth2_applications(
&self,
) -> crate::sync::Request<
'_,
endpoints::UserGetOAuth2Applications,
(OAuth2ApplicationListHeaders, Vec<OAuth2Application>),
> {
endpoints::UserGetOAuth2Applications {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_create_oauth2_application(
&self,
body: CreateOAuth2ApplicationOptions,
) -> crate::sync::Request<'_, endpoints::UserCreateOAuth2Application, OAuth2Application> {
endpoints::UserCreateOAuth2Application { body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_get_oauth2_application(
&self,
id: i64,
) -> crate::sync::Request<'_, endpoints::UserGetOAuth2Application, OAuth2Application> {
endpoints::UserGetOAuth2Application { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_delete_oauth2_application(
&self,
id: i64,
) -> crate::sync::Request<'_, endpoints::UserDeleteOAuth2Application, ()> {
endpoints::UserDeleteOAuth2Application { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_update_oauth2_application(
&self,
id: i64,
body: CreateOAuth2ApplicationOptions,
) -> crate::sync::Request<'_, endpoints::UserUpdateOAuth2Application, OAuth2Application> {
endpoints::UserUpdateOAuth2Application { id, body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_update_avatar(
&self,
body: UpdateUserAvatarOption,
) -> crate::sync::Request<'_, endpoints::UserUpdateAvatar, ()> {
endpoints::UserUpdateAvatar { body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_delete_avatar(&self) -> crate::sync::Request<'_, endpoints::UserDeleteAvatar, ()> {
endpoints::UserDeleteAvatar {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_block_user(
&self,
username: &str,
) -> crate::sync::Request<'_, endpoints::UserBlockUser<'_>, ()> {
endpoints::UserBlockUser { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_list_emails(
&self,
) -> crate::sync::Request<'_, endpoints::UserListEmails, Vec<Email>> {
endpoints::UserListEmails {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_add_email(
&self,
body: CreateEmailOption,
) -> crate::sync::Request<'_, endpoints::UserAddEmail, Vec<Email>> {
endpoints::UserAddEmail { body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_delete_email(
&self,
body: DeleteEmailOption,
) -> crate::sync::Request<'_, endpoints::UserDeleteEmail, ()> {
endpoints::UserDeleteEmail { body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_list_followers(
&self,
) -> crate::sync::Request<'_, endpoints::UserCurrentListFollowers, (UserListHeaders, Vec<User>)>
{
endpoints::UserCurrentListFollowers {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_list_following(
&self,
) -> crate::sync::Request<'_, endpoints::UserCurrentListFollowing, (UserListHeaders, Vec<User>)>
{
endpoints::UserCurrentListFollowing {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_check_following(
&self,
username: &str,
) -> crate::sync::Request<'_, endpoints::UserCurrentCheckFollowing<'_>, ()> {
endpoints::UserCurrentCheckFollowing { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_put_follow(
&self,
username: &str,
) -> crate::sync::Request<'_, endpoints::UserCurrentPutFollow<'_>, ()> {
endpoints::UserCurrentPutFollow { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_delete_follow(
&self,
username: &str,
) -> crate::sync::Request<'_, endpoints::UserCurrentDeleteFollow<'_>, ()> {
endpoints::UserCurrentDeleteFollow { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_verification_token(
&self,
) -> crate::sync::Request<'_, endpoints::GetVerificationToken, String> {
endpoints::GetVerificationToken {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_verify_gpg_key(
&self,
body: VerifyGPGKeyOption,
) -> crate::sync::Request<'_, endpoints::UserVerifyGpgKey, GPGKey> {
endpoints::UserVerifyGpgKey { body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_list_gpg_keys(
&self,
) -> crate::sync::Request<'_, endpoints::UserCurrentListGpgKeys, (GpgKeyListHeaders, Vec<GPGKey>)>
{
endpoints::UserCurrentListGpgKeys {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_post_gpg_key(
&self,
form: CreateGPGKeyOption,
) -> crate::sync::Request<'_, endpoints::UserCurrentPostGpgKey, GPGKey> {
endpoints::UserCurrentPostGpgKey { body: form }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_get_gpg_key(
&self,
id: i64,
) -> crate::sync::Request<'_, endpoints::UserCurrentGetGpgKey, GPGKey> {
endpoints::UserCurrentGetGpgKey { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_delete_gpg_key(
&self,
id: i64,
) -> crate::sync::Request<'_, endpoints::UserCurrentDeleteGpgKey, ()> {
endpoints::UserCurrentDeleteGpgKey { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_list_hooks(&self) -> crate::sync::Request<'_, endpoints::UserListHooks, Vec<Hook>> {
endpoints::UserListHooks {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_create_hook(
&self,
body: CreateHookOption,
) -> crate::sync::Request<'_, endpoints::UserCreateHook, Hook> {
endpoints::UserCreateHook { body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_get_hook(&self, id: i64) -> crate::sync::Request<'_, endpoints::UserGetHook, Hook> {
endpoints::UserGetHook { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_delete_hook(
&self,
id: i64,
) -> crate::sync::Request<'_, endpoints::UserDeleteHook, ()> {
endpoints::UserDeleteHook { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_edit_hook(
&self,
id: i64,
body: EditHookOption,
) -> crate::sync::Request<'_, endpoints::UserEditHook, Hook> {
endpoints::UserEditHook { id, body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_list_keys(
&self,
query: UserCurrentListKeysQuery,
) -> crate::sync::Request<
'_,
endpoints::UserCurrentListKeys,
(PublicKeyListHeaders, Vec<PublicKey>),
> {
endpoints::UserCurrentListKeys { query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_post_key(
&self,
body: CreateKeyOption,
) -> crate::sync::Request<'_, endpoints::UserCurrentPostKey, PublicKey> {
endpoints::UserCurrentPostKey { body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_get_key(
&self,
id: i64,
) -> crate::sync::Request<'_, endpoints::UserCurrentGetKey, PublicKey> {
endpoints::UserCurrentGetKey { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_delete_key(
&self,
id: i64,
) -> crate::sync::Request<'_, endpoints::UserCurrentDeleteKey, ()> {
endpoints::UserCurrentDeleteKey { id }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_list_blocked_users(
&self,
) -> crate::sync::Request<
'_,
endpoints::UserListBlockedUsers,
(BlockedUserListHeaders, Vec<BlockedUser>),
> {
endpoints::UserListBlockedUsers {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_current_user_orgs(
&self,
) -> crate::sync::Request<'_, endpoints::OrgListCurrentUserOrgs, Vec<Organization>> {
endpoints::OrgListCurrentUserOrgs {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_get_quota(&self) -> crate::sync::Request<'_, endpoints::UserGetQuota, QuotaInfo> {
endpoints::UserGetQuota {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_list_quota_artifacts(
&self,
) -> crate::sync::Request<
'_,
endpoints::UserListQuotaArtifacts,
(QuotaUsedArtifactListHeaders, Vec<QuotaUsedArtifact>),
> {
endpoints::UserListQuotaArtifacts {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_list_quota_attachments(
&self,
) -> crate::sync::Request<
'_,
endpoints::UserListQuotaAttachments,
(QuotaUsedAttachmentListHeaders, Vec<QuotaUsedAttachment>),
> {
endpoints::UserListQuotaAttachments {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_check_quota(
&self,
query: UserCheckQuotaQuery,
) -> crate::sync::Request<'_, endpoints::UserCheckQuota, bool> {
endpoints::UserCheckQuota { query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_list_quota_packages(
&self,
) -> crate::sync::Request<
'_,
endpoints::UserListQuotaPackages,
(QuotaUsedPackageListHeaders, Vec<QuotaUsedPackage>),
> {
endpoints::UserListQuotaPackages {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_list_repos(
&self,
query: UserCurrentListReposQuery,
) -> crate::sync::Request<
'_,
endpoints::UserCurrentListRepos,
(RepositoryListHeaders, Vec<Repository>),
> {
endpoints::UserCurrentListRepos { query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn create_current_user_repo(
&self,
body: CreateRepoOption,
) -> crate::sync::Request<'_, endpoints::CreateCurrentUserRepo, Repository> {
endpoints::CreateCurrentUserRepo { body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_user_settings(
&self,
) -> crate::sync::Request<'_, endpoints::GetUserSettings, UserSettings> {
endpoints::GetUserSettings {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn update_user_settings(
&self,
body: UserSettingsOptions,
) -> crate::sync::Request<'_, endpoints::UpdateUserSettings, UserSettings> {
endpoints::UpdateUserSettings { body: body }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_list_starred(
&self,
) -> crate::sync::Request<
'_,
endpoints::UserCurrentListStarred,
(RepositoryListHeaders, Vec<Repository>),
> {
endpoints::UserCurrentListStarred {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_check_starring(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::UserCurrentCheckStarring<'_>, ()> {
endpoints::UserCurrentCheckStarring { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_put_star(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::UserCurrentPutStar<'_>, ()> {
endpoints::UserCurrentPutStar { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_delete_star(
&self,
owner: &str,
repo: &str,
) -> crate::sync::Request<'_, endpoints::UserCurrentDeleteStar<'_>, ()> {
endpoints::UserCurrentDeleteStar { owner, repo }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_get_stop_watches(
&self,
) -> crate::sync::Request<
'_,
endpoints::UserGetStopWatches,
(StopWatchListHeaders, Vec<StopWatch>),
> {
endpoints::UserGetStopWatches {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_list_subscriptions(
&self,
) -> crate::sync::Request<
'_,
endpoints::UserCurrentListSubscriptions,
(RepositoryListHeaders, Vec<Repository>),
> {
endpoints::UserCurrentListSubscriptions {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_list_teams(
&self,
) -> crate::sync::Request<'_, endpoints::UserListTeams, (TeamListHeaders, Vec<Team>)> {
endpoints::UserListTeams {}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_current_tracked_times(
&self,
query: UserCurrentTrackedTimesQuery,
) -> crate::sync::Request<
'_,
endpoints::UserCurrentTrackedTimes,
(TrackedTimeListHeaders, Vec<TrackedTime>),
> {
endpoints::UserCurrentTrackedTimes { query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_unblock_user(
&self,
username: &str,
) -> crate::sync::Request<'_, endpoints::UserUnblockUser<'_>, ()> {
endpoints::UserUnblockUser { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_search(
&self,
query: UserSearchQuery,
) -> crate::sync::Request<'_, endpoints::UserSearch, UserSearchResults> {
endpoints::UserSearch { query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_get(
&self,
username: &str,
) -> crate::sync::Request<'_, endpoints::UserGet<'_>, User> {
endpoints::UserGet { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_list_activity_feeds(
&self,
username: &str,
query: UserListActivityFeedsQuery,
) -> crate::sync::Request<
'_,
endpoints::UserListActivityFeeds<'_>,
(ActivityFeedsListHeaders, Vec<Activity>),
> {
endpoints::UserListActivityFeeds { username, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_list_followers(
&self,
username: &str,
) -> crate::sync::Request<'_, endpoints::UserListFollowers<'_>, (UserListHeaders, Vec<User>)>
{
endpoints::UserListFollowers { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_list_following(
&self,
username: &str,
) -> crate::sync::Request<'_, endpoints::UserListFollowing<'_>, (UserListHeaders, Vec<User>)>
{
endpoints::UserListFollowing { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_check_following(
&self,
username: &str,
target: &str,
) -> crate::sync::Request<'_, endpoints::UserCheckFollowing<'_>, ()> {
endpoints::UserCheckFollowing { username, target }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_list_gpg_keys(
&self,
username: &str,
) -> crate::sync::Request<'_, endpoints::UserListGpgKeys<'_>, (GpgKeyListHeaders, Vec<GPGKey>)>
{
endpoints::UserListGpgKeys { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_get_heatmap_data(
&self,
username: &str,
) -> crate::sync::Request<'_, endpoints::UserGetHeatmapData<'_>, Vec<UserHeatmapData>> {
endpoints::UserGetHeatmapData { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_list_keys(
&self,
username: &str,
query: UserListKeysQuery,
) -> crate::sync::Request<'_, endpoints::UserListKeys<'_>, (PublicKeyListHeaders, Vec<PublicKey>)>
{
endpoints::UserListKeys { username, query }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_list_user_orgs(
&self,
username: &str,
) -> crate::sync::Request<'_, endpoints::OrgListUserOrgs<'_>, Vec<Organization>> {
endpoints::OrgListUserOrgs { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn org_get_user_permissions(
&self,
username: &str,
org: &str,
) -> crate::sync::Request<'_, endpoints::OrgGetUserPermissions<'_>, OrganizationPermissions>
{
endpoints::OrgGetUserPermissions { username, org }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_list_repos(
&self,
username: &str,
) -> crate::sync::Request<
'_,
endpoints::UserListRepos<'_>,
(RepositoryListHeaders, Vec<Repository>),
> {
endpoints::UserListRepos { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_list_starred(
&self,
username: &str,
) -> crate::sync::Request<
'_,
endpoints::UserListStarred<'_>,
(RepositoryListHeaders, Vec<Repository>),
> {
endpoints::UserListStarred { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_list_subscriptions(
&self,
username: &str,
) -> crate::sync::Request<
'_,
endpoints::UserListSubscriptions<'_>,
(RepositoryListHeaders, Vec<Repository>),
> {
endpoints::UserListSubscriptions { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_get_tokens(
&self,
username: &str,
) -> crate::sync::Request<
'_,
endpoints::UserGetTokens<'_>,
(AccessTokenListHeaders, Vec<AccessToken>),
> {
endpoints::UserGetTokens { username }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_create_token(
&self,
username: &str,
body: CreateAccessTokenOption,
) -> crate::sync::Request<'_, endpoints::UserCreateToken<'_>, AccessToken> {
endpoints::UserCreateToken {
username,
body: body,
}
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn user_delete_access_token(
&self,
username: &str,
token: &str,
) -> crate::sync::Request<'_, endpoints::UserDeleteAccessToken<'_>, ()> {
endpoints::UserDeleteAccessToken { username, token }
.make_request()
.wrap_sync::<_, _>(self)
}
pub fn get_version(&self) -> crate::sync::Request<'_, endpoints::GetVersion, ServerVersion> {
endpoints::GetVersion {}
.make_request()
.wrap_sync::<_, _>(self)
}
}