Struct BergClient

Source
pub struct BergClient(/* private fields */);

Implementations§

Source§

impl BergClient

Source

pub fn new(token: &Token, base_url: Url) -> Result<Self>

Methods from Deref<Target = Forgejo>§

Source

pub async fn activitypub_repository( &self, repository_id: u32, ) -> Result<ActivityPub, ForgejoError>

Returns the Repository actor for a repo

  • repository-id: repository ID of the repo
Source

pub async fn activitypub_repository_inbox( &self, repository_id: u32, body: ForgeLike, ) -> Result<(), ForgejoError>

Send to the inbox

  • repository-id: repository ID of the repo
  • body: See ForgeLike
Source

pub async fn activitypub_person( &self, user_id: u32, ) -> Result<ActivityPub, ForgejoError>

Returns the Person actor for a user

  • user-id: user ID of the user
Source

pub async fn activitypub_person_inbox( &self, user_id: u32, ) -> Result<(), ForgejoError>

Send to the inbox

  • user-id: user ID of the user
Source

pub async fn admin_cron_list( &self, query: AdminCronListQuery, ) -> Result<Vec<Cron>, ForgejoError>

List cron tasks

Source

pub async fn admin_cron_run(&self, task: &str) -> Result<(), ForgejoError>

Run cron task

  • task: task to run
Source

pub async fn admin_get_all_emails( &self, query: AdminGetAllEmailsQuery, ) -> Result<Vec<Email>, ForgejoError>

List all emails

Source

pub async fn admin_search_emails( &self, query: AdminSearchEmailsQuery, ) -> Result<Vec<Email>, ForgejoError>

Search all emails

Source

pub async fn admin_list_hooks( &self, query: AdminListHooksQuery, ) -> Result<Vec<Hook>, ForgejoError>

List system’s webhooks

Source

pub async fn admin_create_hook( &self, body: CreateHookOption, ) -> Result<Hook, ForgejoError>

Create a hook

Source

pub async fn admin_get_hook(&self, id: u64) -> Result<Hook, ForgejoError>

Get a hook

  • id: id of the hook to get
Source

pub async fn admin_delete_hook(&self, id: u64) -> Result<(), ForgejoError>

Delete a hook

  • id: id of the hook to delete
Source

pub async fn admin_edit_hook( &self, id: u64, body: EditHookOption, ) -> Result<Hook, ForgejoError>

Update a hook

Source

pub async fn admin_get_all_orgs( &self, query: AdminGetAllOrgsQuery, ) -> Result<Vec<Organization>, ForgejoError>

List all organizations

Source

pub async fn admin_get_runner_registration_token( &self, ) -> Result<RegistrationTokenHeaders, ForgejoError>

Get an global actions runner registration token

Source

pub async fn admin_unadopted_list( &self, query: AdminUnadoptedListQuery, ) -> Result<Vec<String>, ForgejoError>

List unadopted repositories

Source

pub async fn admin_adopt_repository( &self, owner: &str, repo: &str, ) -> Result<(), ForgejoError>

Adopt unadopted files as a repository

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn admin_delete_unadopted_repository( &self, owner: &str, repo: &str, ) -> Result<(), ForgejoError>

Delete unadopted files

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn admin_search_users( &self, query: AdminSearchUsersQuery, ) -> Result<Vec<User>, ForgejoError>

Search users according filter conditions

Source

pub async fn admin_create_user( &self, body: CreateUserOption, ) -> Result<User, ForgejoError>

Create a user

Source

pub async fn admin_delete_user( &self, username: &str, query: AdminDeleteUserQuery, ) -> Result<(), ForgejoError>

Delete a user

  • username: username of user to delete
Source

pub async fn admin_edit_user( &self, username: &str, body: EditUserOption, ) -> Result<User, ForgejoError>

Edit an existing user

Source

pub async fn admin_create_public_key( &self, username: &str, key: CreateKeyOption, ) -> Result<PublicKey, ForgejoError>

Add a public key on behalf of a user

Source

pub async fn admin_delete_user_public_key( &self, username: &str, id: u64, ) -> Result<(), ForgejoError>

Delete a user’s public key

  • username: username of user
  • id: id of the key to delete
Source

pub async fn admin_create_org( &self, username: &str, organization: CreateOrgOption, ) -> Result<Organization, ForgejoError>

Create an organization

  • username: username of the user that will own the created organization
  • organization: See CreateOrgOption
Source

pub async fn admin_rename_user( &self, username: &str, body: RenameUserOption, ) -> Result<(), ForgejoError>

Rename a user

Source

pub async fn admin_create_repo( &self, username: &str, repository: CreateRepoOption, ) -> Result<Repository, ForgejoError>

Create a repository on behalf of a user

  • username: username of the user. This user will own the created repository
  • repository: See CreateRepoOption
Source

pub async fn list_gitignores_templates( &self, ) -> Result<Vec<String>, ForgejoError>

Returns a list of all gitignore templates

Source

pub async fn get_gitignore_template_info( &self, name: &str, ) -> Result<GitignoreTemplateInfo, ForgejoError>

Returns information about a gitignore template

  • name: name of the template
Source

pub async fn list_label_templates(&self) -> Result<Vec<String>, ForgejoError>

Returns a list of all label templates

Source

pub async fn get_label_template_info( &self, name: &str, ) -> Result<Vec<LabelTemplate>, ForgejoError>

Returns all labels in a template

  • name: name of the template
Source

pub async fn list_license_templates( &self, ) -> Result<Vec<LicensesTemplateListEntry>, ForgejoError>

Returns a list of all license templates

Source

pub async fn get_license_template_info( &self, name: &str, ) -> Result<LicenseTemplateInfo, ForgejoError>

Returns information about a license template

  • name: name of the license
Source

pub async fn render_markdown( &self, body: MarkdownOption, ) -> Result<String, ForgejoError>

Render a markdown document as HTML

Source

pub async fn render_markdown_raw( &self, body: String, ) -> Result<String, ForgejoError>

Render raw markdown as HTML

  • body: Request body to render See String
Source

pub async fn render_markup( &self, body: MarkupOption, ) -> Result<String, ForgejoError>

Render a markup document as HTML

Source

pub async fn get_node_info(&self) -> Result<NodeInfo, ForgejoError>

Returns the nodeinfo of the Forgejo application

Source

pub async fn notify_get_list( &self, query: NotifyGetListQuery, ) -> Result<Vec<NotificationThread>, ForgejoError>

List users’s notification threads

Source

pub async fn notify_read_list( &self, query: NotifyReadListQuery, ) -> Result<Vec<NotificationThread>, ForgejoError>

Mark notification threads as read, pinned or unread

Source

pub async fn notify_new_available( &self, ) -> Result<NotificationCount, ForgejoError>

Check if unread notifications exist

Source

pub async fn notify_get_thread( &self, id: &str, ) -> Result<NotificationThread, ForgejoError>

Get notification thread by ID

  • id: id of notification thread
Source

pub async fn notify_read_thread( &self, id: &str, query: NotifyReadThreadQuery, ) -> Result<NotificationThread, ForgejoError>

Mark notification thread as read by ID

  • id: id of notification thread
Source

pub async fn create_org_repo_deprecated( &self, org: &str, body: CreateRepoOption, ) -> Result<Repository, ForgejoError>

Create a repository in an organization

Source

pub async fn org_get_all( &self, query: OrgGetAllQuery, ) -> Result<Vec<Organization>, ForgejoError>

Get list of organizations

Source

pub async fn org_create( &self, organization: CreateOrgOption, ) -> Result<Organization, ForgejoError>

Create an organization

Source

pub async fn org_get(&self, org: &str) -> Result<Organization, ForgejoError>

Get an organization

  • org: name of the organization to get
Source

pub async fn org_delete(&self, org: &str) -> Result<(), ForgejoError>

Delete an organization

  • org: organization that is to be deleted
Source

pub async fn org_edit( &self, org: &str, body: EditOrgOption, ) -> Result<Organization, ForgejoError>

Edit an organization

Source

pub async fn org_get_runner_registration_token( &self, org: &str, ) -> Result<RegistrationTokenHeaders, ForgejoError>

Get an organization’s actions runner registration token

  • org: name of the organization
Source

pub async fn org_list_actions_secrets( &self, org: &str, query: OrgListActionsSecretsQuery, ) -> Result<Vec<Secret>, ForgejoError>

List an organization’s actions secrets

  • org: name of the organization
Source

pub async fn update_org_secret( &self, org: &str, secretname: &str, body: CreateOrUpdateSecretOption, ) -> Result<(), ForgejoError>

Create or Update a secret value in an organization

Source

pub async fn delete_org_secret( &self, org: &str, secretname: &str, ) -> Result<(), ForgejoError>

Delete a secret in an organization

  • org: name of organization
  • secretname: name of the secret
Source

pub async fn get_org_variables_list( &self, org: &str, query: GetOrgVariablesListQuery, ) -> Result<Vec<ActionVariable>, ForgejoError>

Get an org-level variables list

  • org: name of the organization
Source

pub async fn get_org_variable( &self, org: &str, variablename: &str, ) -> Result<ActionVariable, ForgejoError>

Get an org-level variable

  • org: name of the organization
  • variablename: name of the variable
Source

pub async fn update_org_variable( &self, org: &str, variablename: &str, body: UpdateVariableOption, ) -> Result<(), ForgejoError>

Update an org-level variable

Source

pub async fn create_org_variable( &self, org: &str, variablename: &str, body: CreateVariableOption, ) -> Result<(), ForgejoError>

Create an org-level variable

Source

pub async fn delete_org_variable( &self, org: &str, variablename: &str, ) -> Result<Option<ActionVariable>, ForgejoError>

Delete an org-level variable

  • org: name of the organization
  • variablename: name of the variable
Source

pub async fn org_list_activity_feeds( &self, org: &str, query: OrgListActivityFeedsQuery, ) -> Result<Vec<Activity>, ForgejoError>

List an organization’s activity feeds

  • org: name of the org
Source

pub async fn org_update_avatar( &self, org: &str, body: UpdateUserAvatarOption, ) -> Result<(), ForgejoError>

Update Avatar

Source

pub async fn org_delete_avatar(&self, org: &str) -> Result<(), ForgejoError>

Delete Avatar

  • org: name of the organization
Source

pub async fn org_block_user( &self, org: &str, username: &str, ) -> Result<(), ForgejoError>

Blocks a user from the organization

  • org: name of the org
  • username: username of the user
Source

pub async fn org_list_hooks( &self, org: &str, query: OrgListHooksQuery, ) -> Result<Vec<Hook>, ForgejoError>

List an organization’s webhooks

  • org: name of the organization
Source

pub async fn org_create_hook( &self, org: &str, body: CreateHookOption, ) -> Result<Hook, ForgejoError>

Create a hook

Source

pub async fn org_get_hook( &self, org: &str, id: u64, ) -> Result<Hook, ForgejoError>

Get a hook

  • org: name of the organization
  • id: id of the hook to get
Source

pub async fn org_delete_hook( &self, org: &str, id: u64, ) -> Result<(), ForgejoError>

Delete a hook

  • org: name of the organization
  • id: id of the hook to delete
Source

pub async fn org_edit_hook( &self, org: &str, id: u64, body: EditHookOption, ) -> Result<Hook, ForgejoError>

Update a hook

  • org: name of the organization
  • id: id of the hook to update
  • body: See EditHookOption
Source

pub async fn org_list_labels( &self, org: &str, query: OrgListLabelsQuery, ) -> Result<Vec<Label>, ForgejoError>

List an organization’s labels

  • org: name of the organization
Source

pub async fn org_create_label( &self, org: &str, body: CreateLabelOption, ) -> Result<Label, ForgejoError>

Create a label for an organization

Source

pub async fn org_get_label( &self, org: &str, id: u64, ) -> Result<Label, ForgejoError>

Get a single label

  • org: name of the organization
  • id: id of the label to get
Source

pub async fn org_delete_label( &self, org: &str, id: u64, ) -> Result<(), ForgejoError>

Delete a label

  • org: name of the organization
  • id: id of the label to delete
Source

pub async fn org_edit_label( &self, org: &str, id: u64, body: EditLabelOption, ) -> Result<Label, ForgejoError>

Update a label

  • org: name of the organization
  • id: id of the label to edit
  • body: See EditLabelOption
Source

pub async fn org_list_blocked_users( &self, org: &str, query: OrgListBlockedUsersQuery, ) -> Result<Vec<BlockedUser>, ForgejoError>

List the organization’s blocked users

  • org: name of the org
Source

pub async fn org_list_members( &self, org: &str, query: OrgListMembersQuery, ) -> Result<Vec<User>, ForgejoError>

List an organization’s members

  • org: name of the organization
Source

pub async fn org_is_member( &self, org: &str, username: &str, ) -> Result<(), ForgejoError>

Check if a user is a member of an organization

  • org: name of the organization
  • username: username of the user
Source

pub async fn org_delete_member( &self, org: &str, username: &str, ) -> Result<(), ForgejoError>

Remove a member from an organization

  • org: name of the organization
  • username: username of the user
Source

pub async fn org_list_public_members( &self, org: &str, query: OrgListPublicMembersQuery, ) -> Result<Vec<User>, ForgejoError>

List an organization’s public members

  • org: name of the organization
Source

pub async fn org_is_public_member( &self, org: &str, username: &str, ) -> Result<(), ForgejoError>

Check if a user is a public member of an organization

  • org: name of the organization
  • username: username of the user
Source

pub async fn org_publicize_member( &self, org: &str, username: &str, ) -> Result<(), ForgejoError>

Publicize a user’s membership

  • org: name of the organization
  • username: username of the user
Source

pub async fn org_conceal_member( &self, org: &str, username: &str, ) -> Result<(), ForgejoError>

Conceal a user’s membership

  • org: name of the organization
  • username: username of the user
Source

pub async fn org_list_repos( &self, org: &str, query: OrgListReposQuery, ) -> Result<Vec<Repository>, ForgejoError>

List an organization’s repos

  • org: name of the organization
Source

pub async fn create_org_repo( &self, org: &str, body: CreateRepoOption, ) -> Result<Repository, ForgejoError>

Create a repository in an organization

Source

pub async fn org_list_teams( &self, org: &str, query: OrgListTeamsQuery, ) -> Result<Vec<Team>, ForgejoError>

List an organization’s teams

  • org: name of the organization
Source

pub async fn org_create_team( &self, org: &str, body: CreateTeamOption, ) -> Result<Team, ForgejoError>

Create a team

Search for teams within an organization

  • org: name of the organization
Source

pub async fn org_unblock_user( &self, org: &str, username: &str, ) -> Result<(), ForgejoError>

Unblock a user from the organization

  • org: name of the org
  • username: username of the user
Source

pub async fn list_packages( &self, owner: &str, query: ListPackagesQuery, ) -> Result<Vec<Package>, ForgejoError>

Gets all packages of an owner

  • owner: owner of the packages
Source

pub async fn get_package( &self, owner: &str, type: &str, name: &str, version: &str, ) -> Result<Package, ForgejoError>

Gets a package

  • owner: owner of the package
  • type: type of the package
  • name: name of the package
  • version: version of the package
Source

pub async fn delete_package( &self, owner: &str, type: &str, name: &str, version: &str, ) -> Result<(), ForgejoError>

Delete a package

  • owner: owner of the package
  • type: type of the package
  • name: name of the package
  • version: version of the package
Source

pub async fn list_package_files( &self, owner: &str, type: &str, name: &str, version: &str, ) -> Result<Vec<PackageFile>, ForgejoError>

Gets all files of a package

  • owner: owner of the package
  • type: type of the package
  • name: name of the package
  • version: version of the package
Source

pub async fn issue_search_issues( &self, query: IssueSearchIssuesQuery, ) -> Result<Vec<Issue>, ForgejoError>

Search for issues across the repositories that the user has access to

Source

pub async fn repo_migrate( &self, body: MigrateRepoOptions, ) -> Result<Repository, ForgejoError>

Migrate a remote git repository

Search for repositories

Source

pub async fn repo_get( &self, owner: &str, repo: &str, ) -> Result<Repository, ForgejoError>

Get a repository

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_delete( &self, owner: &str, repo: &str, ) -> Result<(), ForgejoError>

Delete a repository

  • owner: owner of the repo to delete
  • repo: name of the repo to delete
Source

pub async fn repo_edit( &self, owner: &str, repo: &str, body: EditRepoOption, ) -> Result<Repository, ForgejoError>

Edit a repository’s properties. Only fields that are set will be changed.

  • owner: owner of the repo to edit
  • repo: name of the repo to edit
  • body: Properties of a repo that you can edit See EditRepoOption
Source

pub async fn repo_list_actions_secrets( &self, owner: &str, repo: &str, query: RepoListActionsSecretsQuery, ) -> Result<Vec<Secret>, ForgejoError>

List an repo’s actions secrets

  • owner: owner of the repository
  • repo: name of the repository
Source

pub async fn update_repo_secret( &self, owner: &str, repo: &str, secretname: &str, body: CreateOrUpdateSecretOption, ) -> Result<(), ForgejoError>

Create or Update a secret value in a repository

Source

pub async fn delete_repo_secret( &self, owner: &str, repo: &str, secretname: &str, ) -> Result<(), ForgejoError>

Delete a secret in a repository

  • owner: owner of the repository
  • repo: name of the repository
  • secretname: name of the secret
Source

pub async fn list_action_tasks( &self, owner: &str, repo: &str, query: ListActionTasksQuery, ) -> Result<ActionTaskResponse, ForgejoError>

List a repository’s action tasks

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn get_repo_variables_list( &self, owner: &str, repo: &str, query: GetRepoVariablesListQuery, ) -> Result<Vec<ActionVariable>, ForgejoError>

Get repo-level variables list

  • owner: name of the owner
  • repo: name of the repository
Source

pub async fn get_repo_variable( &self, owner: &str, repo: &str, variablename: &str, ) -> Result<ActionVariable, ForgejoError>

Get a repo-level variable

  • owner: name of the owner
  • repo: name of the repository
  • variablename: name of the variable
Source

pub async fn update_repo_variable( &self, owner: &str, repo: &str, variablename: &str, body: UpdateVariableOption, ) -> Result<(), ForgejoError>

Update a repo-level variable

  • owner: name of the owner
  • repo: name of the repository
  • variablename: name of the variable
  • body: See UpdateVariableOption
Source

pub async fn create_repo_variable( &self, owner: &str, repo: &str, variablename: &str, body: CreateVariableOption, ) -> Result<(), ForgejoError>

Create a repo-level variable

  • owner: name of the owner
  • repo: name of the repository
  • variablename: name of the variable
  • body: See CreateVariableOption
Source

pub async fn delete_repo_variable( &self, owner: &str, repo: &str, variablename: &str, ) -> Result<Option<ActionVariable>, ForgejoError>

Delete a repo-level variable

  • owner: name of the owner
  • repo: name of the repository
  • variablename: name of the variable
Source

pub async fn dispatch_workflow( &self, owner: &str, repo: &str, workflowname: &str, body: DispatchWorkflowOption, ) -> Result<(), ForgejoError>

Dispatches a workflow

  • owner: owner of the repo
  • repo: name of the repo
  • workflowname: name of the workflow
  • body: See DispatchWorkflowOption
Source

pub async fn repo_list_activity_feeds( &self, owner: &str, repo: &str, query: RepoListActivityFeedsQuery, ) -> Result<Vec<Activity>, ForgejoError>

List a repository’s activity feeds

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_get_archive( &self, owner: &str, repo: &str, archive: &str, ) -> Result<Vec<u8>, ForgejoError>

Get an archive of a repository

  • owner: owner of the repo
  • repo: name of the repo
  • archive: the git reference for download with attached archive format (e.g. master.zip)
Source

pub async fn repo_get_assignees( &self, owner: &str, repo: &str, ) -> Result<Vec<User>, ForgejoError>

Return all users that have write access and can be assigned to issues

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_update_avatar( &self, owner: &str, repo: &str, body: UpdateRepoAvatarOption, ) -> Result<(), ForgejoError>

Update avatar

Source

pub async fn repo_delete_avatar( &self, owner: &str, repo: &str, ) -> Result<(), ForgejoError>

Delete avatar

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_list_branch_protection( &self, owner: &str, repo: &str, ) -> Result<Vec<BranchProtection>, ForgejoError>

List branch protections for a repository

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_create_branch_protection( &self, owner: &str, repo: &str, body: CreateBranchProtectionOption, ) -> Result<BranchProtection, ForgejoError>

Create a branch protections for a repository

Source

pub async fn repo_get_branch_protection( &self, owner: &str, repo: &str, name: &str, ) -> Result<BranchProtection, ForgejoError>

Get a specific branch protection for the repository

  • owner: owner of the repo
  • repo: name of the repo
  • name: name of protected branch
Source

pub async fn repo_delete_branch_protection( &self, owner: &str, repo: &str, name: &str, ) -> Result<(), ForgejoError>

Delete a specific branch protection for the repository

  • owner: owner of the repo
  • repo: name of the repo
  • name: name of protected branch
Source

pub async fn repo_edit_branch_protection( &self, owner: &str, repo: &str, name: &str, body: EditBranchProtectionOption, ) -> Result<BranchProtection, ForgejoError>

Edit a branch protections for a repository. Only fields that are set will be changed

Source

pub async fn repo_list_branches( &self, owner: &str, repo: &str, query: RepoListBranchesQuery, ) -> Result<Vec<Branch>, ForgejoError>

List a repository’s branches

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_create_branch( &self, owner: &str, repo: &str, body: CreateBranchRepoOption, ) -> Result<Branch, ForgejoError>

Create a branch

Source

pub async fn repo_get_branch( &self, owner: &str, repo: &str, branch: &str, ) -> Result<Branch, ForgejoError>

Retrieve a specific branch from a repository, including its effective branch protection

  • owner: owner of the repo
  • repo: name of the repo
  • branch: branch to get
Source

pub async fn repo_delete_branch( &self, owner: &str, repo: &str, branch: &str, ) -> Result<(), ForgejoError>

Delete a specific branch from a repository

  • owner: owner of the repo
  • repo: name of the repo
  • branch: branch to delete
Source

pub async fn repo_list_collaborators( &self, owner: &str, repo: &str, query: RepoListCollaboratorsQuery, ) -> Result<Vec<User>, ForgejoError>

List a repository’s collaborators

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_check_collaborator( &self, owner: &str, repo: &str, collaborator: &str, ) -> Result<(), ForgejoError>

Check if a user is a collaborator of a repository

  • owner: owner of the repo
  • repo: name of the repo
  • collaborator: username of the collaborator
Source

pub async fn repo_add_collaborator( &self, owner: &str, repo: &str, collaborator: &str, body: AddCollaboratorOption, ) -> Result<(), ForgejoError>

Add a collaborator to a repository

  • owner: owner of the repo
  • repo: name of the repo
  • collaborator: username of the collaborator to add
  • body: See AddCollaboratorOption
Source

pub async fn repo_delete_collaborator( &self, owner: &str, repo: &str, collaborator: &str, ) -> Result<(), ForgejoError>

Delete a collaborator from a repository

  • owner: owner of the repo
  • repo: name of the repo
  • collaborator: username of the collaborator to delete
Source

pub async fn repo_get_repo_permissions( &self, owner: &str, repo: &str, collaborator: &str, ) -> Result<RepoCollaboratorPermission, ForgejoError>

Get repository permissions for a user

  • owner: owner of the repo
  • repo: name of the repo
  • collaborator: username of the collaborator
Source

pub async fn repo_get_all_commits( &self, owner: &str, repo: &str, query: RepoGetAllCommitsQuery, ) -> Result<(CommitListHeaders, Vec<Commit>), ForgejoError>

Get a list of all commits from a repository

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_get_combined_status_by_ref( &self, owner: &str, repo: &str, ref: &str, query: RepoGetCombinedStatusByRefQuery, ) -> Result<CombinedStatus, ForgejoError>

Get a commit’s combined status, by branch/tag/commit reference

  • owner: owner of the repo
  • repo: name of the repo
  • ref: name of branch/tag/commit
Source

pub async fn repo_list_statuses_by_ref( &self, owner: &str, repo: &str, ref: &str, query: RepoListStatusesByRefQuery, ) -> Result<Vec<CommitStatus>, ForgejoError>

Get a commit’s statuses, by branch/tag/commit reference

  • owner: owner of the repo
  • repo: name of the repo
  • ref: name of branch/tag/commit
Source

pub async fn repo_get_commit_pull_request( &self, owner: &str, repo: &str, sha: &str, ) -> Result<PullRequest, ForgejoError>

Get the pull request of the commit

  • owner: owner of the repo
  • repo: name of the repo
  • sha: SHA of the commit to get
Source

pub async fn repo_compare_diff( &self, owner: &str, repo: &str, basehead: &str, ) -> Result<Compare, ForgejoError>

Get commit comparison information

  • owner: owner of the repo
  • repo: name of the repo
  • basehead: compare two branches or commits
Source

pub async fn repo_get_contents_list( &self, owner: &str, repo: &str, query: RepoGetContentsListQuery, ) -> Result<Vec<ContentsResponse>, ForgejoError>

Gets the metadata of all the entries of the root dir

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_change_files( &self, owner: &str, repo: &str, body: ChangeFilesOptions, ) -> Result<FilesResponse, ForgejoError>

Modify multiple files in a repository

Source

pub async fn repo_get_contents( &self, owner: &str, repo: &str, filepath: &str, query: RepoGetContentsQuery, ) -> Result<ContentsResponse, ForgejoError>

Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir

  • owner: owner of the repo
  • repo: name of the repo
  • filepath: path of the dir, file, symlink or submodule in the repo
Source

pub async fn repo_update_file( &self, owner: &str, repo: &str, filepath: &str, body: UpdateFileOptions, ) -> Result<FileResponse, ForgejoError>

Update a file in a repository

  • owner: owner of the repo
  • repo: name of the repo
  • filepath: path of the file to update
  • body: See UpdateFileOptions
Source

pub async fn repo_create_file( &self, owner: &str, repo: &str, filepath: &str, body: CreateFileOptions, ) -> Result<FileResponse, ForgejoError>

Create a file in a repository

  • owner: owner of the repo
  • repo: name of the repo
  • filepath: path of the file to create
  • body: See CreateFileOptions
Source

pub async fn repo_delete_file( &self, owner: &str, repo: &str, filepath: &str, body: DeleteFileOptions, ) -> Result<FileDeleteResponse, ForgejoError>

Delete a file in a repository

  • owner: owner of the repo
  • repo: name of the repo
  • filepath: path of the file to delete
  • body: See DeleteFileOptions
Source

pub async fn repo_apply_diff_patch( &self, owner: &str, repo: &str, body: UpdateFileOptions, ) -> Result<FileResponse, ForgejoError>

Apply diff patch to repository

Source

pub async fn repo_get_editor_config( &self, owner: &str, repo: &str, filepath: &str, query: RepoGetEditorConfigQuery, ) -> Result<(), ForgejoError>

Get the EditorConfig definitions of a file in a repository

  • owner: owner of the repo
  • repo: name of the repo
  • filepath: filepath of file to get
Source

pub async fn repo_list_flags( &self, owner: &str, repo: &str, ) -> Result<Vec<String>, ForgejoError>

List a repository’s flags

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_replace_all_flags( &self, owner: &str, repo: &str, body: ReplaceFlagsOption, ) -> Result<(), ForgejoError>

Replace all flags of a repository

Source

pub async fn repo_delete_all_flags( &self, owner: &str, repo: &str, ) -> Result<(), ForgejoError>

Remove all flags from a repository

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_check_flag( &self, owner: &str, repo: &str, flag: &str, ) -> Result<(), ForgejoError>

Check if a repository has a given flag

  • owner: owner of the repo
  • repo: name of the repo
  • flag: name of the flag
Source

pub async fn repo_add_flag( &self, owner: &str, repo: &str, flag: &str, ) -> Result<(), ForgejoError>

Add a flag to a repository

  • owner: owner of the repo
  • repo: name of the repo
  • flag: name of the flag
Source

pub async fn repo_delete_flag( &self, owner: &str, repo: &str, flag: &str, ) -> Result<(), ForgejoError>

Remove a flag from a repository

  • owner: owner of the repo
  • repo: name of the repo
  • flag: name of the flag
Source

pub async fn list_forks( &self, owner: &str, repo: &str, query: ListForksQuery, ) -> Result<Vec<Repository>, ForgejoError>

List a repository’s forks

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn create_fork( &self, owner: &str, repo: &str, body: CreateForkOption, ) -> Result<Repository, ForgejoError>

Fork a repository

  • owner: owner of the repo to fork
  • repo: name of the repo to fork
  • body: See CreateForkOption
Source

pub async fn get_blob( &self, owner: &str, repo: &str, sha: &str, ) -> Result<GitBlobResponse, ForgejoError>

Gets the blob of a repository.

  • owner: owner of the repo
  • repo: name of the repo
  • sha: sha of the commit
Source

pub async fn repo_get_single_commit( &self, owner: &str, repo: &str, sha: &str, query: RepoGetSingleCommitQuery, ) -> Result<Commit, ForgejoError>

Get a single commit from a repository

  • owner: owner of the repo
  • repo: name of the repo
  • sha: a git ref or commit sha
Source

pub async fn repo_download_commit_diff_or_patch( &self, owner: &str, repo: &str, sha: &str, diff_type: &str, ) -> Result<String, ForgejoError>

Get a commit’s diff or patch

  • owner: owner of the repo
  • repo: name of the repo
  • sha: SHA of the commit to get
  • diffType: whether the output is diff or patch
Source

pub async fn repo_get_note( &self, owner: &str, repo: &str, sha: &str, query: RepoGetNoteQuery, ) -> Result<Note, ForgejoError>

Get a note corresponding to a single commit from a repository

  • owner: owner of the repo
  • repo: name of the repo
  • sha: a git ref or commit sha
Source

pub async fn repo_list_all_git_refs( &self, owner: &str, repo: &str, ) -> Result<Vec<Reference>, ForgejoError>

Get specified ref or filtered repository’s refs

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_list_git_refs( &self, owner: &str, repo: &str, ref: &str, ) -> Result<Vec<Reference>, ForgejoError>

Get specified ref or filtered repository’s refs

  • owner: owner of the repo
  • repo: name of the repo
  • ref: part or full name of the ref
Source

pub async fn get_annotated_tag( &self, owner: &str, repo: &str, sha: &str, ) -> Result<AnnotatedTag, ForgejoError>

Gets the tag object of an annotated tag (not lightweight tags)

  • owner: owner of the repo
  • repo: name of the repo
  • sha: sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.
Source

pub async fn get_tree( &self, owner: &str, repo: &str, sha: &str, query: GetTreeQuery, ) -> Result<GitTreeResponse, ForgejoError>

Gets the tree of a repository.

  • owner: owner of the repo
  • repo: name of the repo
  • sha: sha of the commit
Source

pub async fn repo_list_hooks( &self, owner: &str, repo: &str, query: RepoListHooksQuery, ) -> Result<Vec<Hook>, ForgejoError>

List the hooks in a repository

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_create_hook( &self, owner: &str, repo: &str, body: CreateHookOption, ) -> Result<Hook, ForgejoError>

Create a hook

Source

pub async fn repo_list_git_hooks( &self, owner: &str, repo: &str, ) -> Result<Vec<GitHook>, ForgejoError>

List the Git hooks in a repository

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_get_git_hook( &self, owner: &str, repo: &str, id: &str, ) -> Result<GitHook, ForgejoError>

Get a Git hook

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the hook to get
Source

pub async fn repo_delete_git_hook( &self, owner: &str, repo: &str, id: &str, ) -> Result<(), ForgejoError>

Delete a Git hook in a repository

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the hook to get
Source

pub async fn repo_edit_git_hook( &self, owner: &str, repo: &str, id: &str, body: EditGitHookOption, ) -> Result<GitHook, ForgejoError>

Edit a Git hook in a repository

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the hook to get
  • body: See EditGitHookOption
Source

pub async fn repo_get_hook( &self, owner: &str, repo: &str, id: u64, ) -> Result<Hook, ForgejoError>

Get a hook

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the hook to get
Source

pub async fn repo_delete_hook( &self, owner: &str, repo: &str, id: u64, ) -> Result<(), ForgejoError>

Delete a hook in a repository

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the hook to delete
Source

pub async fn repo_edit_hook( &self, owner: &str, repo: &str, id: u64, body: EditHookOption, ) -> Result<Hook, ForgejoError>

Edit a hook in a repository

  • owner: owner of the repo
  • repo: name of the repo
  • id: index of the hook
  • body: See EditHookOption
Source

pub async fn repo_test_hook( &self, owner: &str, repo: &str, id: u64, query: RepoTestHookQuery, ) -> Result<(), ForgejoError>

Test a push webhook

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the hook to test
Source

pub async fn repo_get_issue_config( &self, owner: &str, repo: &str, ) -> Result<IssueConfig, ForgejoError>

Returns the issue config for a repo

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_validate_issue_config( &self, owner: &str, repo: &str, ) -> Result<IssueConfigValidation, ForgejoError>

Returns the validation information for a issue config

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_get_issue_templates( &self, owner: &str, repo: &str, ) -> Result<Vec<IssueTemplate>, ForgejoError>

Get available issue templates for a repository

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn issue_list_issues( &self, owner: &str, repo: &str, query: IssueListIssuesQuery, ) -> Result<Vec<Issue>, ForgejoError>

List a repository’s issues

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn issue_create_issue( &self, owner: &str, repo: &str, body: CreateIssueOption, ) -> Result<Issue, ForgejoError>

Create an issue. If using deadline only the date will be taken into account, and time of day ignored.

Source

pub async fn issue_get_repo_comments( &self, owner: &str, repo: &str, query: IssueGetRepoCommentsQuery, ) -> Result<Vec<Comment>, ForgejoError>

List all comments in a repository

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn issue_get_comment( &self, owner: &str, repo: &str, id: u64, ) -> Result<Option<Comment>, ForgejoError>

Get a comment

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the comment
Source

pub async fn issue_delete_comment( &self, owner: &str, repo: &str, id: u64, ) -> Result<(), ForgejoError>

Delete a comment

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of comment to delete
Source

pub async fn issue_edit_comment( &self, owner: &str, repo: &str, id: u64, body: EditIssueCommentOption, ) -> Result<Option<Comment>, ForgejoError>

Edit a comment

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the comment to edit
  • body: See EditIssueCommentOption
Source

pub async fn issue_list_issue_comment_attachments( &self, owner: &str, repo: &str, id: u64, ) -> Result<Vec<Attachment>, ForgejoError>

List comment’s attachments

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the comment
Source

pub async fn issue_create_issue_comment_attachment( &self, owner: &str, repo: &str, id: u64, attachment: Vec<u8>, query: IssueCreateIssueCommentAttachmentQuery, ) -> Result<Attachment, ForgejoError>

Create a comment attachment

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the comment
  • attachment: attachment to upload
Source

pub async fn issue_get_issue_comment_attachment( &self, owner: &str, repo: &str, id: u64, attachment_id: u64, ) -> Result<Attachment, ForgejoError>

Get a comment attachment

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the comment
  • attachment_id: id of the attachment to get
Source

pub async fn issue_delete_issue_comment_attachment( &self, owner: &str, repo: &str, id: u64, attachment_id: u64, ) -> Result<(), ForgejoError>

Delete a comment attachment

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the comment
  • attachment_id: id of the attachment to delete
Source

pub async fn issue_edit_issue_comment_attachment( &self, owner: &str, repo: &str, id: u64, attachment_id: u64, body: EditAttachmentOptions, ) -> Result<Attachment, ForgejoError>

Edit a comment attachment

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the comment
  • attachment_id: id of the attachment to edit
  • body: See EditAttachmentOptions
Source

pub async fn issue_get_comment_reactions( &self, owner: &str, repo: &str, id: u64, ) -> Result<Vec<Reaction>, ForgejoError>

Get a list of reactions from a comment of an issue

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the comment to edit
Source

pub async fn issue_post_comment_reaction( &self, owner: &str, repo: &str, id: u64, content: EditReactionOption, ) -> Result<Reaction, ForgejoError>

Add a reaction to a comment of an issue

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the comment to edit
  • content: See EditReactionOption
Source

pub async fn issue_delete_comment_reaction( &self, owner: &str, repo: &str, id: u64, content: EditReactionOption, ) -> Result<(), ForgejoError>

Remove a reaction from a comment of an issue

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the comment to edit
  • content: See EditReactionOption
Source

pub async fn repo_list_pinned_issues( &self, owner: &str, repo: &str, ) -> Result<Vec<Issue>, ForgejoError>

List a repo’s pinned issues

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn issue_get_issue( &self, owner: &str, repo: &str, index: u64, ) -> Result<Issue, ForgejoError>

Get an issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue to get
Source

pub async fn issue_delete( &self, owner: &str, repo: &str, index: u64, ) -> Result<(), ForgejoError>

Delete an issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of issue to delete
Source

pub async fn issue_edit_issue( &self, owner: &str, repo: &str, index: u64, body: EditIssueOption, ) -> Result<Issue, ForgejoError>

Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue to edit
  • body: See EditIssueOption
Source

pub async fn issue_list_issue_attachments( &self, owner: &str, repo: &str, index: u64, ) -> Result<Vec<Attachment>, ForgejoError>

List issue’s attachments

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
Source

pub async fn issue_create_issue_attachment( &self, owner: &str, repo: &str, index: u64, attachment: Vec<u8>, query: IssueCreateIssueAttachmentQuery, ) -> Result<Attachment, ForgejoError>

Create an issue attachment

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • attachment: attachment to upload
Source

pub async fn issue_get_issue_attachment( &self, owner: &str, repo: &str, index: u64, attachment_id: u64, ) -> Result<Attachment, ForgejoError>

Get an issue attachment

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • attachment_id: id of the attachment to get
Source

pub async fn issue_delete_issue_attachment( &self, owner: &str, repo: &str, index: u64, attachment_id: u64, ) -> Result<(), ForgejoError>

Delete an issue attachment

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • attachment_id: id of the attachment to delete
Source

pub async fn issue_edit_issue_attachment( &self, owner: &str, repo: &str, index: u64, attachment_id: u64, body: EditAttachmentOptions, ) -> Result<Attachment, ForgejoError>

Edit an issue attachment

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • attachment_id: id of the attachment to edit
  • body: See EditAttachmentOptions
Source

pub async fn issue_list_blocks( &self, owner: &str, repo: &str, index: &str, query: IssueListBlocksQuery, ) -> Result<Vec<Issue>, ForgejoError>

List issues that are blocked by this issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
Source

pub async fn issue_create_issue_blocking( &self, owner: &str, repo: &str, index: &str, body: IssueMeta, ) -> Result<Issue, ForgejoError>

Block the issue given in the body by the issue in path

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • body: See IssueMeta
Source

pub async fn issue_remove_issue_blocking( &self, owner: &str, repo: &str, index: &str, body: IssueMeta, ) -> Result<Issue, ForgejoError>

Unblock the issue given in the body by the issue in path

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • body: See IssueMeta
Source

pub async fn issue_get_comments( &self, owner: &str, repo: &str, index: u64, query: IssueGetCommentsQuery, ) -> Result<Vec<Comment>, ForgejoError>

List all comments on an issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
Source

pub async fn issue_create_comment( &self, owner: &str, repo: &str, index: u64, body: CreateIssueCommentOption, ) -> Result<Comment, ForgejoError>

Add a comment to an issue

Source

pub async fn issue_delete_comment_deprecated( &self, owner: &str, repo: &str, index: u32, id: u64, ) -> Result<(), ForgejoError>

Delete a comment

  • owner: owner of the repo
  • repo: name of the repo
  • index: this parameter is ignored
  • id: id of comment to delete
Source

pub async fn issue_edit_comment_deprecated( &self, owner: &str, repo: &str, index: u32, id: u64, body: EditIssueCommentOption, ) -> Result<Option<Comment>, ForgejoError>

Edit a comment

  • owner: owner of the repo
  • repo: name of the repo
  • index: this parameter is ignored
  • id: id of the comment to edit
  • body: See EditIssueCommentOption
Source

pub async fn issue_edit_issue_deadline( &self, owner: &str, repo: &str, index: u64, body: EditDeadlineOption, ) -> Result<IssueDeadline, ForgejoError>

Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue to create or update a deadline on
  • body: See EditDeadlineOption
Source

pub async fn issue_list_issue_dependencies( &self, owner: &str, repo: &str, index: &str, query: IssueListIssueDependenciesQuery, ) -> Result<Vec<Issue>, ForgejoError>

List an issue’s dependencies, i.e all issues that block this issue.

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
Source

pub async fn issue_create_issue_dependencies( &self, owner: &str, repo: &str, index: &str, body: IssueMeta, ) -> Result<Issue, ForgejoError>

Make the issue in the url depend on the issue in the form.

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • body: See IssueMeta
Source

pub async fn issue_remove_issue_dependencies( &self, owner: &str, repo: &str, index: &str, body: IssueMeta, ) -> Result<Issue, ForgejoError>

Remove an issue dependency

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • body: See IssueMeta
Source

pub async fn issue_get_labels( &self, owner: &str, repo: &str, index: u64, ) -> Result<Vec<Label>, ForgejoError>

Get an issue’s labels

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
Source

pub async fn issue_replace_labels( &self, owner: &str, repo: &str, index: u64, body: IssueLabelsOption, ) -> Result<Vec<Label>, ForgejoError>

Replace an issue’s labels

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • body: See IssueLabelsOption
Source

pub async fn issue_add_label( &self, owner: &str, repo: &str, index: u64, body: IssueLabelsOption, ) -> Result<Vec<Label>, ForgejoError>

Add a label to an issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • body: See IssueLabelsOption
Source

pub async fn issue_clear_labels( &self, owner: &str, repo: &str, index: u64, body: DeleteLabelsOption, ) -> Result<(), ForgejoError>

Remove all labels from an issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • body: See DeleteLabelsOption
Source

pub async fn issue_remove_label( &self, owner: &str, repo: &str, index: u64, id: u64, body: DeleteLabelsOption, ) -> Result<(), ForgejoError>

Remove a label from an issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • id: id of the label to remove
  • body: See DeleteLabelsOption
Source

pub async fn pin_issue( &self, owner: &str, repo: &str, index: u64, ) -> Result<(), ForgejoError>

Pin an Issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of issue to pin
Source

pub async fn unpin_issue( &self, owner: &str, repo: &str, index: u64, ) -> Result<(), ForgejoError>

Unpin an Issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of issue to unpin
Source

pub async fn move_issue_pin( &self, owner: &str, repo: &str, index: u64, position: u64, ) -> Result<(), ForgejoError>

Moves the Pin to the given Position

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of issue
  • position: the new position
Source

pub async fn issue_get_issue_reactions( &self, owner: &str, repo: &str, index: u64, query: IssueGetIssueReactionsQuery, ) -> Result<Vec<Reaction>, ForgejoError>

Get a list reactions of an issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
Source

pub async fn issue_post_issue_reaction( &self, owner: &str, repo: &str, index: u64, content: EditReactionOption, ) -> Result<Reaction, ForgejoError>

Add a reaction to an issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • content: See EditReactionOption
Source

pub async fn issue_delete_issue_reaction( &self, owner: &str, repo: &str, index: u64, content: EditReactionOption, ) -> Result<(), ForgejoError>

Remove a reaction from an issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • content: See EditReactionOption
Source

pub async fn issue_delete_stop_watch( &self, owner: &str, repo: &str, index: u64, ) -> Result<(), ForgejoError>

Delete an issue’s existing stopwatch.

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue to stop the stopwatch on
Source

pub async fn issue_start_stop_watch( &self, owner: &str, repo: &str, index: u64, ) -> Result<(), ForgejoError>

Start stopwatch on an issue.

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue to create the stopwatch on
Source

pub async fn issue_stop_stop_watch( &self, owner: &str, repo: &str, index: u64, ) -> Result<(), ForgejoError>

Stop an issue’s existing stopwatch.

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue to stop the stopwatch on
Source

pub async fn issue_subscriptions( &self, owner: &str, repo: &str, index: u64, query: IssueSubscriptionsQuery, ) -> Result<Vec<User>, ForgejoError>

Get users who subscribed on an issue.

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
Source

pub async fn issue_check_subscription( &self, owner: &str, repo: &str, index: u64, ) -> Result<WatchInfo, ForgejoError>

Check if user is subscribed to an issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
Source

pub async fn issue_add_subscription( &self, owner: &str, repo: &str, index: u64, user: &str, ) -> Result<(), ForgejoError>

Subscribe user to issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • user: user to subscribe
Source

pub async fn issue_delete_subscription( &self, owner: &str, repo: &str, index: u64, user: &str, ) -> Result<(), ForgejoError>

Unsubscribe user from issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • user: user witch unsubscribe
Source

pub async fn issue_get_comments_and_timeline( &self, owner: &str, repo: &str, index: u64, query: IssueGetCommentsAndTimelineQuery, ) -> Result<Vec<TimelineComment>, ForgejoError>

List all comments and events on an issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
Source

pub async fn issue_tracked_times( &self, owner: &str, repo: &str, index: u64, query: IssueTrackedTimesQuery, ) -> Result<Vec<TrackedTime>, ForgejoError>

List an issue’s tracked times

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
Source

pub async fn issue_add_time( &self, owner: &str, repo: &str, index: u64, body: AddTimeOption, ) -> Result<TrackedTime, ForgejoError>

Add tracked time to a issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • body: See AddTimeOption
Source

pub async fn issue_reset_time( &self, owner: &str, repo: &str, index: u64, ) -> Result<(), ForgejoError>

Reset a tracked time of an issue

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue to add tracked time to
Source

pub async fn issue_delete_time( &self, owner: &str, repo: &str, index: u64, id: u64, ) -> Result<(), ForgejoError>

Delete specific tracked time

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the issue
  • id: id of time to delete
Source

pub async fn repo_list_keys( &self, owner: &str, repo: &str, query: RepoListKeysQuery, ) -> Result<Vec<DeployKey>, ForgejoError>

List a repository’s keys

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_create_key( &self, owner: &str, repo: &str, body: CreateKeyOption, ) -> Result<DeployKey, ForgejoError>

Add a key to a repository

  • owner: owner of the repo
  • repo: name of the repo
  • body: See CreateKeyOption
Source

pub async fn repo_get_key( &self, owner: &str, repo: &str, id: u64, ) -> Result<DeployKey, ForgejoError>

Get a repository’s key by id

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the key to get
Source

pub async fn repo_delete_key( &self, owner: &str, repo: &str, id: u64, ) -> Result<(), ForgejoError>

Delete a key from a repository

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the key to delete
Source

pub async fn issue_list_labels( &self, owner: &str, repo: &str, query: IssueListLabelsQuery, ) -> Result<Vec<Label>, ForgejoError>

Get all of a repository’s labels

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn issue_create_label( &self, owner: &str, repo: &str, body: CreateLabelOption, ) -> Result<Label, ForgejoError>

Create a label

Source

pub async fn issue_get_label( &self, owner: &str, repo: &str, id: u64, ) -> Result<Label, ForgejoError>

Get a single label

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the label to get
Source

pub async fn issue_delete_label( &self, owner: &str, repo: &str, id: u64, ) -> Result<(), ForgejoError>

Delete a label

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the label to delete
Source

pub async fn issue_edit_label( &self, owner: &str, repo: &str, id: u64, body: EditLabelOption, ) -> Result<Label, ForgejoError>

Update a label

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the label to edit
  • body: See EditLabelOption
Source

pub async fn repo_get_languages( &self, owner: &str, repo: &str, ) -> Result<BTreeMap<String, i64>, ForgejoError>

Get languages and number of bytes of code written

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_get_raw_file_or_lfs( &self, owner: &str, repo: &str, filepath: &str, query: RepoGetRawFileOrLfsQuery, ) -> Result<Vec<u8>, ForgejoError>

Get a file or it’s LFS object from a repository

  • owner: owner of the repo
  • repo: name of the repo
  • filepath: filepath of the file to get
Source

pub async fn issue_get_milestones_list( &self, owner: &str, repo: &str, query: IssueGetMilestonesListQuery, ) -> Result<Vec<Milestone>, ForgejoError>

Get all of a repository’s opened milestones

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn issue_create_milestone( &self, owner: &str, repo: &str, body: CreateMilestoneOption, ) -> Result<Milestone, ForgejoError>

Create a milestone

Source

pub async fn issue_get_milestone( &self, owner: &str, repo: &str, id: &str, ) -> Result<Milestone, ForgejoError>

Get a milestone

  • owner: owner of the repo
  • repo: name of the repo
  • id: the milestone to get, identified by ID and if not available by name
Source

pub async fn issue_delete_milestone( &self, owner: &str, repo: &str, id: &str, ) -> Result<(), ForgejoError>

Delete a milestone

  • owner: owner of the repo
  • repo: name of the repo
  • id: the milestone to delete, identified by ID and if not available by name
Source

pub async fn issue_edit_milestone( &self, owner: &str, repo: &str, id: &str, body: EditMilestoneOption, ) -> Result<Milestone, ForgejoError>

Update a milestone

  • owner: owner of the repo
  • repo: name of the repo
  • id: the milestone to edit, identified by ID and if not available by name
  • body: See EditMilestoneOption
Source

pub async fn repo_mirror_sync( &self, owner: &str, repo: &str, ) -> Result<(), ForgejoError>

Sync a mirrored repository

  • owner: owner of the repo to sync
  • repo: name of the repo to sync
Source

pub async fn repo_new_pin_allowed( &self, owner: &str, repo: &str, ) -> Result<NewIssuePinsAllowed, ForgejoError>

Returns if new Issue Pins are allowed

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn notify_get_repo_list( &self, owner: &str, repo: &str, query: NotifyGetRepoListQuery, ) -> Result<Vec<NotificationThread>, ForgejoError>

List users’s notification threads on a specific repo

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn notify_read_repo_list( &self, owner: &str, repo: &str, query: NotifyReadRepoListQuery, ) -> Result<Vec<NotificationThread>, ForgejoError>

Mark notification threads as read, pinned or unread on a specific repo

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_list_pull_requests( &self, owner: &str, repo: &str, query: RepoListPullRequestsQuery, ) -> Result<Vec<PullRequest>, ForgejoError>

List a repo’s pull requests

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_create_pull_request( &self, owner: &str, repo: &str, body: CreatePullRequestOption, ) -> Result<PullRequest, ForgejoError>

Create a pull request

Source

pub async fn repo_list_pinned_pull_requests( &self, owner: &str, repo: &str, ) -> Result<Vec<PullRequest>, ForgejoError>

List a repo’s pinned pull requests

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_get_pull_request_by_base_head( &self, owner: &str, repo: &str, base: &str, head: &str, ) -> Result<PullRequest, ForgejoError>

Get a pull request by base and head

  • owner: owner of the repo
  • repo: name of the repo
  • base: base of the pull request to get
  • head: head of the pull request to get
Source

pub async fn repo_get_pull_request( &self, owner: &str, repo: &str, index: u64, ) -> Result<PullRequest, ForgejoError>

Get a pull request

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request to get
Source

pub async fn repo_edit_pull_request( &self, owner: &str, repo: &str, index: u64, body: EditPullRequestOption, ) -> Result<PullRequest, ForgejoError>

Update a pull request. If using deadline only the date will be taken into account, and time of day ignored.

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request to edit
  • body: See EditPullRequestOption
Source

pub async fn repo_download_pull_diff_or_patch( &self, owner: &str, repo: &str, index: u64, diff_type: &str, query: RepoDownloadPullDiffOrPatchQuery, ) -> Result<String, ForgejoError>

Get a pull request diff or patch

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request to get
  • diffType: whether the output is diff or patch
Source

pub async fn repo_get_pull_request_commits( &self, owner: &str, repo: &str, index: u64, query: RepoGetPullRequestCommitsQuery, ) -> Result<(CommitListHeaders, Vec<Commit>), ForgejoError>

Get commits for a pull request

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request to get
Source

pub async fn repo_get_pull_request_files( &self, owner: &str, repo: &str, index: u64, query: RepoGetPullRequestFilesQuery, ) -> Result<(ChangedFileListHeaders, Vec<ChangedFile>), ForgejoError>

Get changed files for a pull request

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request to get
Source

pub async fn repo_pull_request_is_merged( &self, owner: &str, repo: &str, index: u64, ) -> Result<(), ForgejoError>

Check if a pull request has been merged

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request
Source

pub async fn repo_merge_pull_request( &self, owner: &str, repo: &str, index: u64, body: MergePullRequestOption, ) -> Result<(), ForgejoError>

Merge a pull request

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request to merge
  • body: See MergePullRequestOption
Source

pub async fn repo_cancel_scheduled_auto_merge( &self, owner: &str, repo: &str, index: u64, ) -> Result<(), ForgejoError>

Cancel the scheduled auto merge for the given pull request

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request to merge
Source

pub async fn repo_create_pull_review_requests( &self, owner: &str, repo: &str, index: u64, body: PullReviewRequestOptions, ) -> Result<Vec<PullReview>, ForgejoError>

create review requests for a pull request

Source

pub async fn repo_delete_pull_review_requests( &self, owner: &str, repo: &str, index: u64, body: PullReviewRequestOptions, ) -> Result<(), ForgejoError>

cancel review requests for a pull request

Source

pub async fn repo_list_pull_reviews( &self, owner: &str, repo: &str, index: u64, query: RepoListPullReviewsQuery, ) -> Result<Vec<PullReview>, ForgejoError>

List all reviews for a pull request

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request
Source

pub async fn repo_create_pull_review( &self, owner: &str, repo: &str, index: u64, body: CreatePullReviewOptions, ) -> Result<PullReview, ForgejoError>

Create a review to an pull request

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request
  • body: See CreatePullReviewOptions
Source

pub async fn repo_get_pull_review( &self, owner: &str, repo: &str, index: u64, id: u64, ) -> Result<PullReview, ForgejoError>

Get a specific review for a pull request

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request
  • id: id of the review
Source

pub async fn repo_submit_pull_review( &self, owner: &str, repo: &str, index: u64, id: u64, body: SubmitPullReviewOptions, ) -> Result<PullReview, ForgejoError>

Submit a pending review to an pull request

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request
  • id: id of the review
  • body: See SubmitPullReviewOptions
Source

pub async fn repo_delete_pull_review( &self, owner: &str, repo: &str, index: u64, id: u64, ) -> Result<(), ForgejoError>

Delete a specific review from a pull request

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request
  • id: id of the review
Source

pub async fn repo_get_pull_review_comments( &self, owner: &str, repo: &str, index: u64, id: u64, ) -> Result<Vec<PullReviewComment>, ForgejoError>

Get a specific review for a pull request

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request
  • id: id of the review
Source

pub async fn repo_create_pull_review_comment( &self, owner: &str, repo: &str, index: u64, id: u64, body: Value, ) -> Result<PullReviewComment, ForgejoError>

Add a new comment to a pull request review

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request
  • id: id of the review
  • body: See serde_json::Value
Source

pub async fn repo_get_pull_review_comment( &self, owner: &str, repo: &str, index: u64, id: u64, comment: u64, ) -> Result<PullReviewComment, ForgejoError>

Get a pull review comment

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request
  • id: id of the review
  • comment: id of the comment
Source

pub async fn repo_delete_pull_review_comment( &self, owner: &str, repo: &str, index: u64, id: u64, comment: u64, ) -> Result<(), ForgejoError>

Delete a pull review comment

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request
  • id: id of the review
  • comment: id of the comment
Source

pub async fn repo_dismiss_pull_review( &self, owner: &str, repo: &str, index: u64, id: u64, body: DismissPullReviewOptions, ) -> Result<PullReview, ForgejoError>

Dismiss a review for a pull request

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request
  • id: id of the review
  • body: See DismissPullReviewOptions
Source

pub async fn repo_un_dismiss_pull_review( &self, owner: &str, repo: &str, index: u64, id: u64, ) -> Result<PullReview, ForgejoError>

Cancel to dismiss a review for a pull request

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request
  • id: id of the review
Source

pub async fn repo_update_pull_request( &self, owner: &str, repo: &str, index: u64, query: RepoUpdatePullRequestQuery, ) -> Result<(), ForgejoError>

Merge PR’s baseBranch into headBranch

  • owner: owner of the repo
  • repo: name of the repo
  • index: index of the pull request to get
Source

pub async fn repo_list_push_mirrors( &self, owner: &str, repo: &str, query: RepoListPushMirrorsQuery, ) -> Result<Vec<PushMirror>, ForgejoError>

Get all push mirrors of the repository

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_add_push_mirror( &self, owner: &str, repo: &str, body: CreatePushMirrorOption, ) -> Result<PushMirror, ForgejoError>

add a push mirror to the repository

Source

pub async fn repo_push_mirror_sync( &self, owner: &str, repo: &str, ) -> Result<(), ForgejoError>

Sync all push mirrored repository

  • owner: owner of the repo to sync
  • repo: name of the repo to sync
Source

pub async fn repo_get_push_mirror_by_remote_name( &self, owner: &str, repo: &str, name: &str, ) -> Result<PushMirror, ForgejoError>

Get push mirror of the repository by remoteName

  • owner: owner of the repo
  • repo: name of the repo
  • name: remote name of push mirror
Source

pub async fn repo_delete_push_mirror( &self, owner: &str, repo: &str, name: &str, ) -> Result<(), ForgejoError>

deletes a push mirror from a repository by remoteName

  • owner: owner of the repo
  • repo: name of the repo
  • name: remote name of the pushMirror
Source

pub async fn repo_get_raw_file( &self, owner: &str, repo: &str, filepath: &str, query: RepoGetRawFileQuery, ) -> Result<Vec<u8>, ForgejoError>

Get a file from a repository

  • owner: owner of the repo
  • repo: name of the repo
  • filepath: filepath of the file to get
Source

pub async fn repo_list_releases( &self, owner: &str, repo: &str, query: RepoListReleasesQuery, ) -> Result<Vec<Release>, ForgejoError>

List a repo’s releases

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_create_release( &self, owner: &str, repo: &str, body: CreateReleaseOption, ) -> Result<Release, ForgejoError>

Create a release

Source

pub async fn repo_get_latest_release( &self, owner: &str, repo: &str, ) -> Result<Release, ForgejoError>

Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_get_release_by_tag( &self, owner: &str, repo: &str, tag: &str, ) -> Result<Release, ForgejoError>

Get a release by tag name

  • owner: owner of the repo
  • repo: name of the repo
  • tag: tag name of the release to get
Source

pub async fn repo_delete_release_by_tag( &self, owner: &str, repo: &str, tag: &str, ) -> Result<(), ForgejoError>

Delete a release by tag name

  • owner: owner of the repo
  • repo: name of the repo
  • tag: tag name of the release to delete
Source

pub async fn repo_get_release( &self, owner: &str, repo: &str, id: u64, ) -> Result<Release, ForgejoError>

Get a release

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the release to get
Source

pub async fn repo_delete_release( &self, owner: &str, repo: &str, id: u64, ) -> Result<(), ForgejoError>

Delete a release

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the release to delete
Source

pub async fn repo_edit_release( &self, owner: &str, repo: &str, id: u64, body: EditReleaseOption, ) -> Result<Release, ForgejoError>

Update a release

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the release to edit
  • body: See EditReleaseOption
Source

pub async fn repo_list_release_attachments( &self, owner: &str, repo: &str, id: u64, ) -> Result<Vec<Attachment>, ForgejoError>

List release’s attachments

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the release
Source

pub async fn repo_create_release_attachment( &self, owner: &str, repo: &str, id: u64, attachment: Vec<u8>, query: RepoCreateReleaseAttachmentQuery, ) -> Result<Attachment, ForgejoError>

Create a release attachment

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the release
  • attachment: attachment to upload
Source

pub async fn repo_get_release_attachment( &self, owner: &str, repo: &str, id: u64, attachment_id: u64, ) -> Result<Attachment, ForgejoError>

Get a release attachment

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the release
  • attachment_id: id of the attachment to get
Source

pub async fn repo_delete_release_attachment( &self, owner: &str, repo: &str, id: u64, attachment_id: u64, ) -> Result<(), ForgejoError>

Delete a release attachment

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the release
  • attachment_id: id of the attachment to delete
Source

pub async fn repo_edit_release_attachment( &self, owner: &str, repo: &str, id: u64, attachment_id: u64, body: EditAttachmentOptions, ) -> Result<Attachment, ForgejoError>

Edit a release attachment

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the release
  • attachment_id: id of the attachment to edit
  • body: See EditAttachmentOptions
Source

pub async fn repo_get_reviewers( &self, owner: &str, repo: &str, ) -> Result<Vec<User>, ForgejoError>

Return all users that can be requested to review in this repo

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_get_runner_registration_token( &self, owner: &str, repo: &str, ) -> Result<RegistrationTokenHeaders, ForgejoError>

Get a repository’s actions runner registration token

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_signing_key( &self, owner: &str, repo: &str, ) -> Result<String, ForgejoError>

Get signing-key.gpg for given repository

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_list_stargazers( &self, owner: &str, repo: &str, query: RepoListStargazersQuery, ) -> Result<Vec<User>, ForgejoError>

List a repo’s stargazers

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_list_statuses( &self, owner: &str, repo: &str, sha: &str, query: RepoListStatusesQuery, ) -> Result<Vec<CommitStatus>, ForgejoError>

Get a commit’s statuses

  • owner: owner of the repo
  • repo: name of the repo
  • sha: sha of the commit
Source

pub async fn repo_create_status( &self, owner: &str, repo: &str, sha: &str, body: CreateStatusOption, ) -> Result<CommitStatus, ForgejoError>

Create a commit status

  • owner: owner of the repo
  • repo: name of the repo
  • sha: sha of the commit
  • body: See CreateStatusOption
Source

pub async fn repo_list_subscribers( &self, owner: &str, repo: &str, query: RepoListSubscribersQuery, ) -> Result<Vec<User>, ForgejoError>

List a repo’s watchers

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn user_current_check_subscription( &self, owner: &str, repo: &str, ) -> Result<WatchInfo, ForgejoError>

Check if the current user is watching a repo

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn user_current_put_subscription( &self, owner: &str, repo: &str, ) -> Result<WatchInfo, ForgejoError>

Watch a repo

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn user_current_delete_subscription( &self, owner: &str, repo: &str, ) -> Result<(), ForgejoError>

Unwatch a repo

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_list_tag_protection( &self, owner: &str, repo: &str, ) -> Result<Vec<TagProtection>, ForgejoError>

List tag protections for a repository

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_create_tag_protection( &self, owner: &str, repo: &str, body: CreateTagProtectionOption, ) -> Result<TagProtection, ForgejoError>

Create a tag protections for a repository

Source

pub async fn repo_get_tag_protection( &self, owner: &str, repo: &str, id: u32, ) -> Result<TagProtection, ForgejoError>

Get a specific tag protection for the repository

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of the tag protect to get
Source

pub async fn repo_delete_tag_protection( &self, owner: &str, repo: &str, id: u32, ) -> Result<(), ForgejoError>

Delete a specific tag protection for the repository

  • owner: owner of the repo
  • repo: name of the repo
  • id: id of protected tag
Source

pub async fn repo_edit_tag_protection( &self, owner: &str, repo: &str, id: u32, body: EditTagProtectionOption, ) -> Result<TagProtection, ForgejoError>

Edit a tag protections for a repository. Only fields that are set will be changed

Source

pub async fn repo_list_tags( &self, owner: &str, repo: &str, query: RepoListTagsQuery, ) -> Result<Vec<Tag>, ForgejoError>

List a repository’s tags

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_create_tag( &self, owner: &str, repo: &str, body: CreateTagOption, ) -> Result<Tag, ForgejoError>

Create a new git tag in a repository

  • owner: owner of the repo
  • repo: name of the repo
  • body: See CreateTagOption
Source

pub async fn repo_get_tag( &self, owner: &str, repo: &str, tag: &str, ) -> Result<Tag, ForgejoError>

Get the tag of a repository by tag name

  • owner: owner of the repo
  • repo: name of the repo
  • tag: name of tag
Source

pub async fn repo_delete_tag( &self, owner: &str, repo: &str, tag: &str, ) -> Result<(), ForgejoError>

Delete a repository’s tag by name

  • owner: owner of the repo
  • repo: name of the repo
  • tag: name of tag to delete
Source

pub async fn repo_list_teams( &self, owner: &str, repo: &str, ) -> Result<Vec<Team>, ForgejoError>

List a repository’s teams

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_check_team( &self, owner: &str, repo: &str, team: &str, ) -> Result<Team, ForgejoError>

Check if a team is assigned to a repository

  • owner: owner of the repo
  • repo: name of the repo
  • team: team name
Source

pub async fn repo_add_team( &self, owner: &str, repo: &str, team: &str, ) -> Result<(), ForgejoError>

Add a team to a repository

  • owner: owner of the repo
  • repo: name of the repo
  • team: team name
Source

pub async fn repo_delete_team( &self, owner: &str, repo: &str, team: &str, ) -> Result<(), ForgejoError>

Delete a team from a repository

  • owner: owner of the repo
  • repo: name of the repo
  • team: team name
Source

pub async fn repo_tracked_times( &self, owner: &str, repo: &str, query: RepoTrackedTimesQuery, ) -> Result<Vec<TrackedTime>, ForgejoError>

List a repo’s tracked times

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn user_tracked_times( &self, owner: &str, repo: &str, user: &str, ) -> Result<Vec<TrackedTime>, ForgejoError>

List a user’s tracked times in a repo

  • owner: owner of the repo
  • repo: name of the repo
  • user: username of user
Source

pub async fn repo_list_topics( &self, owner: &str, repo: &str, query: RepoListTopicsQuery, ) -> Result<TopicName, ForgejoError>

Get list of topics that a repository has

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_update_topics( &self, owner: &str, repo: &str, body: RepoTopicOptions, ) -> Result<(), ForgejoError>

Replace list of topics for a repository

Source

pub async fn repo_add_topic( &self, owner: &str, repo: &str, topic: &str, ) -> Result<(), ForgejoError>

Add a topic to a repository

  • owner: owner of the repo
  • repo: name of the repo
  • topic: name of the topic to add
Source

pub async fn repo_delete_topic( &self, owner: &str, repo: &str, topic: &str, ) -> Result<(), ForgejoError>

Delete a topic from a repository

  • owner: owner of the repo
  • repo: name of the repo
  • topic: name of the topic to delete
Source

pub async fn repo_transfer( &self, owner: &str, repo: &str, body: TransferRepoOption, ) -> Result<Repository, ForgejoError>

Transfer a repo ownership

  • owner: owner of the repo to transfer
  • repo: name of the repo to transfer
  • body: Transfer Options See TransferRepoOption
Source

pub async fn accept_repo_transfer( &self, owner: &str, repo: &str, ) -> Result<Repository, ForgejoError>

Accept a repo transfer

  • owner: owner of the repo to transfer
  • repo: name of the repo to transfer
Source

pub async fn reject_repo_transfer( &self, owner: &str, repo: &str, ) -> Result<Repository, ForgejoError>

Reject a repo transfer

  • owner: owner of the repo to transfer
  • repo: name of the repo to transfer
Source

pub async fn repo_create_wiki_page( &self, owner: &str, repo: &str, body: CreateWikiPageOptions, ) -> Result<WikiPage, ForgejoError>

Create a wiki page

Source

pub async fn repo_get_wiki_page( &self, owner: &str, repo: &str, page_name: &str, ) -> Result<WikiPage, ForgejoError>

Get a wiki page

  • owner: owner of the repo
  • repo: name of the repo
  • pageName: name of the page
Source

pub async fn repo_delete_wiki_page( &self, owner: &str, repo: &str, page_name: &str, ) -> Result<(), ForgejoError>

Delete a wiki page

  • owner: owner of the repo
  • repo: name of the repo
  • pageName: name of the page
Source

pub async fn repo_edit_wiki_page( &self, owner: &str, repo: &str, page_name: &str, body: CreateWikiPageOptions, ) -> Result<WikiPage, ForgejoError>

Edit a wiki page

  • owner: owner of the repo
  • repo: name of the repo
  • pageName: name of the page
  • body: See CreateWikiPageOptions
Source

pub async fn repo_get_wiki_pages( &self, owner: &str, repo: &str, query: RepoGetWikiPagesQuery, ) -> Result<Vec<WikiPageMetaData>, ForgejoError>

Get all wiki pages

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn repo_get_wiki_page_revisions( &self, owner: &str, repo: &str, page_name: &str, query: RepoGetWikiPageRevisionsQuery, ) -> Result<WikiCommitList, ForgejoError>

Get revisions of a wiki page

  • owner: owner of the repo
  • repo: name of the repo
  • pageName: name of the page
Source

pub async fn generate_repo( &self, template_owner: &str, template_repo: &str, body: GenerateRepoOption, ) -> Result<Repository, ForgejoError>

Create a repository using a template

  • template_owner: name of the template repository owner
  • template_repo: name of the template repository
  • body: See GenerateRepoOption
Source

pub async fn repo_get_by_id(&self, id: u64) -> Result<Repository, ForgejoError>

Get a repository by id

  • id: id of the repo to get
Source

pub async fn get_general_api_settings( &self, ) -> Result<GeneralAPISettings, ForgejoError>

Get instance’s global settings for api

Source

pub async fn get_general_attachment_settings( &self, ) -> Result<GeneralAttachmentSettings, ForgejoError>

Get instance’s global settings for Attachment

Source

pub async fn get_general_repository_settings( &self, ) -> Result<GeneralRepoSettings, ForgejoError>

Get instance’s global settings for repositories

Source

pub async fn get_general_ui_settings( &self, ) -> Result<GeneralUISettings, ForgejoError>

Get instance’s global settings for ui

Source

pub async fn get_signing_key(&self) -> Result<String, ForgejoError>

Get default signing-key.gpg

Source

pub async fn org_get_team(&self, id: u64) -> Result<Team, ForgejoError>

Get a team

  • id: id of the team to get
Source

pub async fn org_delete_team(&self, id: u64) -> Result<(), ForgejoError>

Delete a team

  • id: id of the team to delete
Source

pub async fn org_edit_team( &self, id: u32, body: EditTeamOption, ) -> Result<Team, ForgejoError>

Edit a team

Source

pub async fn org_list_team_activity_feeds( &self, id: u64, query: OrgListTeamActivityFeedsQuery, ) -> Result<Vec<Activity>, ForgejoError>

List a team’s activity feeds

  • id: id of the team
Source

pub async fn org_list_team_members( &self, id: u64, query: OrgListTeamMembersQuery, ) -> Result<Vec<User>, ForgejoError>

List a team’s members

  • id: id of the team
Source

pub async fn org_list_team_member( &self, id: u64, username: &str, ) -> Result<User, ForgejoError>

List a particular member of team

  • id: id of the team
  • username: username of the member to list
Source

pub async fn org_add_team_member( &self, id: u64, username: &str, ) -> Result<(), ForgejoError>

Add a team member

  • id: id of the team
  • username: username of the user to add
Source

pub async fn org_remove_team_member( &self, id: u64, username: &str, ) -> Result<(), ForgejoError>

Remove a team member

  • id: id of the team
  • username: username of the user to remove
Source

pub async fn org_list_team_repos( &self, id: u64, query: OrgListTeamReposQuery, ) -> Result<Vec<Repository>, ForgejoError>

List a team’s repos

  • id: id of the team
Source

pub async fn org_list_team_repo( &self, id: u64, org: &str, repo: &str, ) -> Result<Repository, ForgejoError>

List a particular repo of team

  • id: id of the team
  • org: organization that owns the repo to list
  • repo: name of the repo to list
Source

pub async fn org_add_team_repository( &self, id: u64, org: &str, repo: &str, ) -> Result<(), ForgejoError>

Add a repository to a team

  • id: id of the team
  • org: organization that owns the repo to add
  • repo: name of the repo to add
Source

pub async fn org_remove_team_repository( &self, id: u64, org: &str, repo: &str, ) -> Result<(), ForgejoError>

Remove a repository from a team

  • id: id of the team
  • org: organization that owns the repo to remove
  • repo: name of the repo to remove

search topics via keyword

Source

pub async fn user_get_current(&self) -> Result<User, ForgejoError>

Get the authenticated user

Source

pub async fn user_get_runner_registration_token( &self, ) -> Result<RegistrationTokenHeaders, ForgejoError>

Get an user’s actions runner registration token

Source

pub async fn update_user_secret( &self, secretname: &str, body: CreateOrUpdateSecretOption, ) -> Result<(), ForgejoError>

Create or Update a secret value in a user scope

Source

pub async fn delete_user_secret( &self, secretname: &str, ) -> Result<(), ForgejoError>

Delete a secret in a user scope

  • secretname: name of the secret
Source

pub async fn get_user_variables_list( &self, query: GetUserVariablesListQuery, ) -> Result<Vec<ActionVariable>, ForgejoError>

Get the user-level list of variables which is created by current doer

Source

pub async fn get_user_variable( &self, variablename: &str, ) -> Result<ActionVariable, ForgejoError>

Get a user-level variable which is created by current doer

  • variablename: name of the variable
Source

pub async fn update_user_variable( &self, variablename: &str, body: UpdateVariableOption, ) -> Result<(), ForgejoError>

Update a user-level variable which is created by current doer

Source

pub async fn create_user_variable( &self, variablename: &str, body: CreateVariableOption, ) -> Result<(), ForgejoError>

Create a user-level variable

Source

pub async fn delete_user_variable( &self, variablename: &str, ) -> Result<(), ForgejoError>

Delete a user-level variable which is created by current doer

  • variablename: name of the variable
Source

pub async fn user_get_oauth2_applications( &self, query: UserGetOAuth2ApplicationsQuery, ) -> Result<Vec<OAuth2Application>, ForgejoError>

List the authenticated user’s oauth2 applications

Source

pub async fn user_create_oauth2_application( &self, body: CreateOAuth2ApplicationOptions, ) -> Result<OAuth2Application, ForgejoError>

creates a new OAuth2 application

Source

pub async fn user_get_oauth2_application( &self, id: u64, ) -> Result<OAuth2Application, ForgejoError>

get an OAuth2 Application

  • id: Application ID to be found
Source

pub async fn user_delete_oauth2_application( &self, id: u64, ) -> Result<(), ForgejoError>

delete an OAuth2 Application

  • id: token to be deleted
Source

pub async fn user_update_oauth2_application( &self, id: u64, body: CreateOAuth2ApplicationOptions, ) -> Result<OAuth2Application, ForgejoError>

update an OAuth2 Application, this includes regenerating the client secret

Source

pub async fn user_update_avatar( &self, body: UpdateUserAvatarOption, ) -> Result<(), ForgejoError>

Update Avatar

Source

pub async fn user_delete_avatar(&self) -> Result<(), ForgejoError>

Delete Avatar

Source

pub async fn user_block_user(&self, username: &str) -> Result<(), ForgejoError>

Blocks a user from the doer.

  • username: username of the user
Source

pub async fn user_list_emails(&self) -> Result<Vec<Email>, ForgejoError>

List the authenticated user’s email addresses

Source

pub async fn user_add_email( &self, body: CreateEmailOption, ) -> Result<Vec<Email>, ForgejoError>

Add email addresses

Source

pub async fn user_delete_email( &self, body: DeleteEmailOption, ) -> Result<(), ForgejoError>

Delete email addresses

Source

pub async fn user_current_list_followers( &self, query: UserCurrentListFollowersQuery, ) -> Result<Vec<User>, ForgejoError>

List the authenticated user’s followers

Source

pub async fn user_current_list_following( &self, query: UserCurrentListFollowingQuery, ) -> Result<Vec<User>, ForgejoError>

List the users that the authenticated user is following

Source

pub async fn user_current_check_following( &self, username: &str, ) -> Result<(), ForgejoError>

Check whether a user is followed by the authenticated user

  • username: username of followed user
Source

pub async fn user_current_put_follow( &self, username: &str, ) -> Result<(), ForgejoError>

Follow a user

  • username: username of user to follow
Source

pub async fn user_current_delete_follow( &self, username: &str, ) -> Result<(), ForgejoError>

Unfollow a user

  • username: username of user to unfollow
Source

pub async fn get_verification_token(&self) -> Result<String, ForgejoError>

Get a Token to verify

Source

pub async fn user_verify_gpg_key(&self) -> Result<GPGKey, ForgejoError>

Verify a GPG key

Source

pub async fn user_current_list_gpg_keys( &self, query: UserCurrentListGpgKeysQuery, ) -> Result<Vec<GPGKey>, ForgejoError>

List the authenticated user’s GPG keys

Source

pub async fn user_current_post_gpg_key( &self, form: CreateGPGKeyOption, ) -> Result<GPGKey, ForgejoError>

Create a GPG key

Source

pub async fn user_current_get_gpg_key( &self, id: u64, ) -> Result<GPGKey, ForgejoError>

Get a GPG key

  • id: id of key to get
Source

pub async fn user_current_delete_gpg_key( &self, id: u64, ) -> Result<(), ForgejoError>

Remove a GPG key

  • id: id of key to delete
Source

pub async fn user_list_hooks( &self, query: UserListHooksQuery, ) -> Result<Vec<Hook>, ForgejoError>

List the authenticated user’s webhooks

Source

pub async fn user_create_hook( &self, body: CreateHookOption, ) -> Result<Hook, ForgejoError>

Create a hook

Source

pub async fn user_get_hook(&self, id: u64) -> Result<Hook, ForgejoError>

Get a hook

  • id: id of the hook to get
Source

pub async fn user_delete_hook(&self, id: u64) -> Result<(), ForgejoError>

Delete a hook

  • id: id of the hook to delete
Source

pub async fn user_edit_hook( &self, id: u64, body: EditHookOption, ) -> Result<Hook, ForgejoError>

Update a hook

Source

pub async fn user_current_list_keys( &self, query: UserCurrentListKeysQuery, ) -> Result<Vec<PublicKey>, ForgejoError>

List the authenticated user’s public keys

Source

pub async fn user_current_post_key( &self, body: CreateKeyOption, ) -> Result<PublicKey, ForgejoError>

Create a public key

Source

pub async fn user_current_get_key( &self, id: u64, ) -> Result<PublicKey, ForgejoError>

Get a public key

  • id: id of key to get
Source

pub async fn user_current_delete_key(&self, id: u64) -> Result<(), ForgejoError>

Delete a public key

  • id: id of key to delete
Source

pub async fn user_list_blocked_users( &self, query: UserListBlockedUsersQuery, ) -> Result<Vec<BlockedUser>, ForgejoError>

List the authenticated user’s blocked users

Source

pub async fn org_list_current_user_orgs( &self, query: OrgListCurrentUserOrgsQuery, ) -> Result<Vec<Organization>, ForgejoError>

List the current user’s organizations

Source

pub async fn user_current_list_repos( &self, query: UserCurrentListReposQuery, ) -> Result<Vec<Repository>, ForgejoError>

List the repos that the authenticated user owns

Source

pub async fn create_current_user_repo( &self, body: CreateRepoOption, ) -> Result<Repository, ForgejoError>

Create a repository

Source

pub async fn get_user_settings(&self) -> Result<UserSettings, ForgejoError>

Get user settings

Source

pub async fn update_user_settings( &self, body: UserSettingsOptions, ) -> Result<UserSettings, ForgejoError>

Update user settings

Source

pub async fn user_current_list_starred( &self, query: UserCurrentListStarredQuery, ) -> Result<Vec<Repository>, ForgejoError>

The repos that the authenticated user has starred

Source

pub async fn user_current_check_starring( &self, owner: &str, repo: &str, ) -> Result<(), ForgejoError>

Whether the authenticated is starring the repo

  • owner: owner of the repo
  • repo: name of the repo
Source

pub async fn user_current_put_star( &self, owner: &str, repo: &str, ) -> Result<(), ForgejoError>

Star the given repo

  • owner: owner of the repo to star
  • repo: name of the repo to star
Source

pub async fn user_current_delete_star( &self, owner: &str, repo: &str, ) -> Result<(), ForgejoError>

Unstar the given repo

  • owner: owner of the repo to unstar
  • repo: name of the repo to unstar
Source

pub async fn user_get_stop_watches( &self, query: UserGetStopWatchesQuery, ) -> Result<Vec<StopWatch>, ForgejoError>

Get list of all existing stopwatches

Source

pub async fn user_current_list_subscriptions( &self, query: UserCurrentListSubscriptionsQuery, ) -> Result<Vec<Repository>, ForgejoError>

List repositories watched by the authenticated user

Source

pub async fn user_list_teams( &self, query: UserListTeamsQuery, ) -> Result<Vec<Team>, ForgejoError>

List all the teams a user belongs to

Source

pub async fn user_current_tracked_times( &self, query: UserCurrentTrackedTimesQuery, ) -> Result<Vec<TrackedTime>, ForgejoError>

List the current user’s tracked times

Source

pub async fn user_unblock_user( &self, username: &str, ) -> Result<(), ForgejoError>

Unblocks a user from the doer.

  • username: username of the user

Search for users

Source

pub async fn user_get(&self, username: &str) -> Result<User, ForgejoError>

Get a user

  • username: username of user to get
Source

pub async fn user_list_activity_feeds( &self, username: &str, query: UserListActivityFeedsQuery, ) -> Result<Vec<Activity>, ForgejoError>

List a user’s activity feeds

  • username: username of user
Source

pub async fn user_list_followers( &self, username: &str, query: UserListFollowersQuery, ) -> Result<Vec<User>, ForgejoError>

List the given user’s followers

  • username: username of user
Source

pub async fn user_list_following( &self, username: &str, query: UserListFollowingQuery, ) -> Result<Vec<User>, ForgejoError>

List the users that the given user is following

  • username: username of user
Source

pub async fn user_check_following( &self, username: &str, target: &str, ) -> Result<(), ForgejoError>

Check if one user is following another user

  • username: username of following user
  • target: username of followed user
Source

pub async fn user_list_gpg_keys( &self, username: &str, query: UserListGpgKeysQuery, ) -> Result<Vec<GPGKey>, ForgejoError>

List the given user’s GPG keys

  • username: username of user
Source

pub async fn user_get_heatmap_data( &self, username: &str, ) -> Result<Vec<UserHeatmapData>, ForgejoError>

Get a user’s heatmap

  • username: username of user to get
Source

pub async fn user_list_keys( &self, username: &str, query: UserListKeysQuery, ) -> Result<Vec<PublicKey>, ForgejoError>

List the given user’s public keys

  • username: username of user
Source

pub async fn org_list_user_orgs( &self, username: &str, query: OrgListUserOrgsQuery, ) -> Result<Vec<Organization>, ForgejoError>

List a user’s organizations

  • username: username of user
Source

pub async fn org_get_user_permissions( &self, username: &str, org: &str, ) -> Result<OrganizationPermissions, ForgejoError>

Get user permissions in organization

  • username: username of user
  • org: name of the organization
Source

pub async fn user_list_repos( &self, username: &str, query: UserListReposQuery, ) -> Result<Vec<Repository>, ForgejoError>

List the repos owned by the given user

  • username: username of user
Source

pub async fn user_list_starred( &self, username: &str, query: UserListStarredQuery, ) -> Result<Vec<Repository>, ForgejoError>

The repos that the given user has starred

  • username: username of user
Source

pub async fn user_list_subscriptions( &self, username: &str, query: UserListSubscriptionsQuery, ) -> Result<Vec<Repository>, ForgejoError>

List the repositories watched by a user

  • username: username of the user
Source

pub async fn user_get_tokens( &self, username: &str, query: UserGetTokensQuery, ) -> Result<Vec<AccessToken>, ForgejoError>

List the authenticated user’s access tokens

  • username: username of user
Source

pub async fn user_create_token( &self, username: &str, body: CreateAccessTokenOption, ) -> Result<AccessToken, ForgejoError>

Create an access token

Source

pub async fn user_delete_access_token( &self, username: &str, token: &str, ) -> Result<(), ForgejoError>

delete an access token

  • username: username of user
  • token: token to be deleted, identified by ID and if not available by name
Source

pub async fn get_version(&self) -> Result<ServerVersion, ForgejoError>

Returns the version of the Forgejo application

Source

pub async fn download_release_attachment( &self, owner: &str, repo: &str, release: u64, attach: u64, ) -> Result<Bytes, ForgejoError>

Source

pub async fn oauth_get_access_token( &self, body: OAuthTokenRequest<'_>, ) -> Result<OAuthToken, ForgejoError>

Requests a new OAuth2 access token

More info at Forgejo’s docs.

Trait Implementations§

Source§

impl Deref for BergClient

Source§

type Target = Forgejo

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for BergClient

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,