forgejo 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/CHANGELOG.md~ +3 -0
- data/Makefile +16 -16
- data/README.md +68 -12
- data/config.yaml +21 -0
- data/config.yaml~ +13 -0
- data/docs/APIForbiddenError.md +20 -0
- data/docs/APIInvalidTopicsError.md +20 -0
- data/docs/APINotFound.md +22 -0
- data/docs/APIRepoArchivedError.md +20 -0
- data/docs/APIUnauthorizedError.md +20 -0
- data/docs/APIValidationError.md +20 -0
- data/docs/ActivitypubApi.md +133 -0
- data/docs/AdminApi.md +1305 -184
- data/docs/Attachment.md +2 -0
- data/docs/CreatePushMirrorOption.md +3 -1
- data/docs/CreateQuotaGroupOptions.md +20 -0
- data/docs/CreateQuotaRuleOptions.md +22 -0
- data/docs/EditAttachmentOptions.md +2 -0
- data/docs/EditQuotaRuleOptions.md +20 -0
- data/docs/EditRepoOption.md +2 -0
- data/docs/IssueApi.md +55 -55
- data/docs/MarkupOption.md +2 -0
- data/docs/NoteOptions.md +18 -0
- data/docs/OrganizationApi.md +386 -19
- data/docs/PackageApi.md +1 -1
- data/docs/PullRequest.md +2 -0
- data/docs/PushMirror.md +2 -0
- data/docs/QuotaGroup.md +20 -0
- data/docs/QuotaInfo.md +20 -0
- data/docs/QuotaRuleInfo.md +22 -0
- data/docs/QuotaUsed.md +18 -0
- data/docs/QuotaUsedArtifact.md +22 -0
- data/docs/QuotaUsedAttachment.md +24 -0
- data/docs/QuotaUsedAttachmentContainedIn.md +20 -0
- data/docs/QuotaUsedPackage.md +26 -0
- data/docs/QuotaUsedSize.md +22 -0
- data/docs/QuotaUsedSizeAssets.md +22 -0
- data/docs/QuotaUsedSizeAssetsAttachments.md +20 -0
- data/docs/QuotaUsedSizeAssetsPackages.md +18 -0
- data/docs/QuotaUsedSizeGit.md +18 -0
- data/docs/QuotaUsedSizeRepos.md +20 -0
- data/docs/RepoCreateReleaseAttachmentRequest.md +4 -2
- data/docs/Repository.md +2 -0
- data/docs/RepositoryApi.md +308 -72
- data/docs/SetUserQuotaGroupsOptions.md +18 -0
- data/docs/UpdateBranchRepoOption.md +18 -0
- data/docs/UserApi.md +390 -33
- data/forgejo.gemspec +12 -13
- data/lib/forgejo/api/activitypub_api.rb +110 -2
- data/lib/forgejo/api/admin_api.rb +1148 -109
- data/lib/forgejo/api/issue_api.rb +94 -36
- data/lib/forgejo/api/miscellaneous_api.rb +2 -2
- data/lib/forgejo/api/notification_api.rb +2 -2
- data/lib/forgejo/api/organization_api.rb +363 -2
- data/lib/forgejo/api/package_api.rb +4 -2
- data/lib/forgejo/api/repository_api.rb +370 -26
- data/lib/forgejo/api/settings_api.rb +2 -2
- data/lib/forgejo/api/user_api.rb +350 -8
- data/lib/forgejo/api_client.rb +2 -2
- data/lib/forgejo/api_error.rb +2 -2
- data/lib/forgejo/configuration.rb +2 -2
- data/lib/forgejo/models/access_token.rb +11 -5
- data/lib/forgejo/models/action_task.rb +11 -5
- data/lib/forgejo/models/action_task_response.rb +11 -5
- data/lib/forgejo/models/action_variable.rb +11 -5
- data/lib/forgejo/models/activity.rb +11 -5
- data/lib/forgejo/models/activity_pub.rb +11 -5
- data/lib/forgejo/models/add_collaborator_option.rb +45 -5
- data/lib/forgejo/models/add_time_option.rb +21 -5
- data/lib/forgejo/models/annotated_tag.rb +11 -5
- data/lib/forgejo/models/annotated_tag_object.rb +11 -5
- data/lib/forgejo/models/api_error.rb +11 -5
- data/lib/forgejo/models/api_forbidden_error.rb +229 -0
- data/lib/forgejo/models/api_invalid_topics_error.rb +231 -0
- data/lib/forgejo/models/api_not_found.rb +240 -0
- data/lib/forgejo/models/api_repo_archived_error.rb +229 -0
- data/lib/forgejo/models/api_unauthorized_error.rb +229 -0
- data/lib/forgejo/models/api_validation_error.rb +229 -0
- data/lib/forgejo/models/attachment.rb +55 -6
- data/lib/forgejo/models/blocked_user.rb +11 -5
- data/lib/forgejo/models/branch.rb +11 -5
- data/lib/forgejo/models/branch_protection.rb +11 -5
- data/lib/forgejo/models/change_file_operation.rb +21 -5
- data/lib/forgejo/models/change_files_options.rb +21 -5
- data/lib/forgejo/models/changed_file.rb +11 -5
- data/lib/forgejo/models/combined_status.rb +11 -5
- data/lib/forgejo/models/comment.rb +11 -5
- data/lib/forgejo/models/commit.rb +11 -5
- data/lib/forgejo/models/commit_affected_files.rb +11 -5
- data/lib/forgejo/models/commit_date_options.rb +11 -5
- data/lib/forgejo/models/commit_meta.rb +11 -5
- data/lib/forgejo/models/commit_stats.rb +11 -5
- data/lib/forgejo/models/commit_status.rb +11 -5
- data/lib/forgejo/models/commit_user.rb +11 -5
- data/lib/forgejo/models/compare.rb +11 -5
- data/lib/forgejo/models/contents_response.rb +11 -5
- data/lib/forgejo/models/create_access_token_option.rb +21 -5
- data/lib/forgejo/models/create_branch_protection_option.rb +11 -5
- data/lib/forgejo/models/create_branch_repo_option.rb +21 -5
- data/lib/forgejo/models/create_email_option.rb +11 -5
- data/lib/forgejo/models/create_file_options.rb +21 -5
- data/lib/forgejo/models/create_fork_option.rb +11 -5
- data/lib/forgejo/models/create_gpg_key_option.rb +21 -5
- data/lib/forgejo/models/create_hook_option.rb +21 -5
- data/lib/forgejo/models/create_issue_comment_option.rb +21 -5
- data/lib/forgejo/models/create_issue_option.rb +21 -5
- data/lib/forgejo/models/create_key_option.rb +31 -5
- data/lib/forgejo/models/create_label_option.rb +31 -5
- data/lib/forgejo/models/create_milestone_option.rb +11 -5
- data/lib/forgejo/models/create_o_auth2_application_options.rb +11 -5
- data/lib/forgejo/models/create_or_update_secret_option.rb +21 -5
- data/lib/forgejo/models/create_org_option.rb +21 -5
- data/lib/forgejo/models/create_pull_request_option.rb +11 -5
- data/lib/forgejo/models/create_pull_review_comment.rb +11 -5
- data/lib/forgejo/models/create_pull_review_options.rb +11 -5
- data/lib/forgejo/models/create_push_mirror_option.rb +24 -9
- data/lib/forgejo/models/create_quota_group_options.rb +234 -0
- data/lib/forgejo/models/create_quota_rule_options.rb +244 -0
- data/lib/forgejo/models/create_release_option.rb +21 -5
- data/lib/forgejo/models/create_repo_option.rb +21 -5
- data/lib/forgejo/models/create_status_option.rb +11 -5
- data/lib/forgejo/models/create_tag_option.rb +21 -5
- data/lib/forgejo/models/create_tag_protection_option.rb +11 -5
- data/lib/forgejo/models/create_team_option.rb +21 -5
- data/lib/forgejo/models/create_user_option.rb +31 -5
- data/lib/forgejo/models/create_variable_option.rb +21 -5
- data/lib/forgejo/models/create_wiki_page_options.rb +11 -5
- data/lib/forgejo/models/cron.rb +11 -5
- data/lib/forgejo/models/delete_email_option.rb +11 -5
- data/lib/forgejo/models/delete_file_options.rb +21 -5
- data/lib/forgejo/models/delete_labels_option.rb +11 -5
- data/lib/forgejo/models/deploy_key.rb +11 -5
- data/lib/forgejo/models/dismiss_pull_review_options.rb +11 -5
- data/lib/forgejo/models/dispatch_workflow_option.rb +21 -5
- data/lib/forgejo/models/edit_attachment_options.rb +22 -6
- data/lib/forgejo/models/edit_branch_protection_option.rb +11 -5
- data/lib/forgejo/models/edit_deadline_option.rb +21 -5
- data/lib/forgejo/models/edit_git_hook_option.rb +11 -5
- data/lib/forgejo/models/edit_hook_option.rb +11 -5
- data/lib/forgejo/models/edit_issue_comment_option.rb +21 -5
- data/lib/forgejo/models/edit_issue_option.rb +11 -5
- data/lib/forgejo/models/edit_label_option.rb +11 -5
- data/lib/forgejo/models/edit_milestone_option.rb +11 -5
- data/lib/forgejo/models/edit_org_option.rb +11 -5
- data/lib/forgejo/models/edit_pull_request_option.rb +11 -5
- data/lib/forgejo/models/edit_quota_rule_options.rb +234 -0
- data/lib/forgejo/models/edit_reaction_option.rb +11 -5
- data/lib/forgejo/models/edit_release_option.rb +11 -5
- data/lib/forgejo/models/edit_repo_option.rb +22 -6
- data/lib/forgejo/models/edit_tag_protection_option.rb +11 -5
- data/lib/forgejo/models/edit_team_option.rb +21 -5
- data/lib/forgejo/models/edit_user_option.rb +11 -5
- data/lib/forgejo/models/email.rb +11 -5
- data/lib/forgejo/models/external_tracker.rb +11 -5
- data/lib/forgejo/models/external_wiki.rb +11 -5
- data/lib/forgejo/models/file_commit_response.rb +11 -5
- data/lib/forgejo/models/file_delete_response.rb +11 -5
- data/lib/forgejo/models/file_links_response.rb +11 -5
- data/lib/forgejo/models/file_response.rb +11 -5
- data/lib/forgejo/models/files_response.rb +11 -5
- data/lib/forgejo/models/general_api_settings.rb +11 -5
- data/lib/forgejo/models/general_attachment_settings.rb +11 -5
- data/lib/forgejo/models/general_repo_settings.rb +11 -5
- data/lib/forgejo/models/general_ui_settings.rb +11 -5
- data/lib/forgejo/models/generate_repo_option.rb +31 -5
- data/lib/forgejo/models/git_blob_response.rb +11 -5
- data/lib/forgejo/models/git_entry.rb +11 -5
- data/lib/forgejo/models/git_hook.rb +11 -5
- data/lib/forgejo/models/git_object.rb +11 -5
- data/lib/forgejo/models/git_tree_response.rb +11 -5
- data/lib/forgejo/models/gitignore_template_info.rb +11 -5
- data/lib/forgejo/models/gpg_key.rb +11 -5
- data/lib/forgejo/models/gpg_key_email.rb +11 -5
- data/lib/forgejo/models/hook.rb +11 -5
- data/lib/forgejo/models/identity.rb +11 -5
- data/lib/forgejo/models/internal_tracker.rb +11 -5
- data/lib/forgejo/models/issue.rb +11 -5
- data/lib/forgejo/models/issue_config.rb +11 -5
- data/lib/forgejo/models/issue_config_contact_link.rb +11 -5
- data/lib/forgejo/models/issue_config_validation.rb +11 -5
- data/lib/forgejo/models/issue_deadline.rb +11 -5
- data/lib/forgejo/models/issue_form_field.rb +11 -5
- data/lib/forgejo/models/issue_labels_option.rb +11 -5
- data/lib/forgejo/models/issue_meta.rb +11 -5
- data/lib/forgejo/models/issue_template.rb +11 -5
- data/lib/forgejo/models/label.rb +11 -5
- data/lib/forgejo/models/label_template.rb +11 -5
- data/lib/forgejo/models/license_template_info.rb +11 -5
- data/lib/forgejo/models/licenses_template_list_entry.rb +11 -5
- data/lib/forgejo/models/markdown_option.rb +11 -5
- data/lib/forgejo/models/markup_option.rb +22 -6
- data/lib/forgejo/models/merge_pull_request_option.rb +11 -5
- data/lib/forgejo/models/migrate_repo_options.rb +31 -5
- data/lib/forgejo/models/milestone.rb +11 -5
- data/lib/forgejo/models/new_issue_pins_allowed.rb +11 -5
- data/lib/forgejo/models/node_info.rb +11 -5
- data/lib/forgejo/models/node_info_services.rb +11 -5
- data/lib/forgejo/models/node_info_software.rb +11 -5
- data/lib/forgejo/models/node_info_usage.rb +11 -5
- data/lib/forgejo/models/node_info_usage_users.rb +11 -5
- data/lib/forgejo/models/note.rb +11 -5
- data/lib/forgejo/models/note_options.rb +220 -0
- data/lib/forgejo/models/notification_count.rb +11 -5
- data/lib/forgejo/models/notification_subject.rb +11 -5
- data/lib/forgejo/models/notification_thread.rb +11 -5
- data/lib/forgejo/models/o_auth2_application.rb +11 -5
- data/lib/forgejo/models/organization.rb +11 -5
- data/lib/forgejo/models/organization_permissions.rb +11 -5
- data/lib/forgejo/models/package.rb +11 -5
- data/lib/forgejo/models/package_file.rb +11 -5
- data/lib/forgejo/models/payload_commit.rb +11 -5
- data/lib/forgejo/models/payload_commit_verification.rb +11 -5
- data/lib/forgejo/models/payload_user.rb +11 -5
- data/lib/forgejo/models/permission.rb +11 -5
- data/lib/forgejo/models/pr_branch_info.rb +11 -5
- data/lib/forgejo/models/public_key.rb +11 -5
- data/lib/forgejo/models/pull_request.rb +23 -6
- data/lib/forgejo/models/pull_request_meta.rb +11 -5
- data/lib/forgejo/models/pull_review.rb +11 -5
- data/lib/forgejo/models/pull_review_comment.rb +11 -5
- data/lib/forgejo/models/pull_review_request_options.rb +11 -5
- data/lib/forgejo/models/push_mirror.rb +21 -6
- data/lib/forgejo/models/quota_group.rb +234 -0
- data/lib/forgejo/models/quota_info.rb +233 -0
- data/lib/forgejo/models/quota_rule_info.rb +244 -0
- data/lib/forgejo/models/quota_used.rb +221 -0
- data/lib/forgejo/models/quota_used_artifact.rb +242 -0
- data/lib/forgejo/models/quota_used_attachment.rb +251 -0
- data/lib/forgejo/models/quota_used_attachment_contained_in.rb +232 -0
- data/lib/forgejo/models/quota_used_package.rb +262 -0
- data/lib/forgejo/models/quota_used_size.rb +239 -0
- data/lib/forgejo/models/quota_used_size_assets.rb +240 -0
- data/lib/forgejo/models/quota_used_size_assets_attachments.rb +232 -0
- data/lib/forgejo/models/quota_used_size_assets_packages.rb +222 -0
- data/lib/forgejo/models/quota_used_size_git.rb +222 -0
- data/lib/forgejo/models/quota_used_size_repos.rb +232 -0
- data/lib/forgejo/models/reaction.rb +11 -5
- data/lib/forgejo/models/reference.rb +11 -5
- data/lib/forgejo/models/release.rb +11 -5
- data/lib/forgejo/models/rename_user_option.rb +21 -5
- data/lib/forgejo/models/replace_flags_option.rb +11 -5
- data/lib/forgejo/models/repo_collaborator_permission.rb +11 -5
- data/lib/forgejo/models/repo_commit.rb +11 -5
- data/lib/forgejo/models/repo_create_release_attachment_request.rb +26 -10
- data/lib/forgejo/models/repo_topic_options.rb +11 -5
- data/lib/forgejo/models/repo_transfer.rb +11 -5
- data/lib/forgejo/models/repository.rb +21 -6
- data/lib/forgejo/models/repository_meta.rb +11 -5
- data/lib/forgejo/models/search_results.rb +11 -5
- data/lib/forgejo/models/secret.rb +11 -5
- data/lib/forgejo/models/server_version.rb +11 -5
- data/lib/forgejo/models/set_user_quota_groups_options.rb +241 -0
- data/lib/forgejo/models/stop_watch.rb +11 -5
- data/lib/forgejo/models/submit_pull_review_options.rb +11 -5
- data/lib/forgejo/models/tag.rb +11 -5
- data/lib/forgejo/models/tag_archive_download_count.rb +11 -5
- data/lib/forgejo/models/tag_protection.rb +11 -5
- data/lib/forgejo/models/team.rb +11 -5
- data/lib/forgejo/models/team_search200_response.rb +11 -5
- data/lib/forgejo/models/timeline_comment.rb +11 -5
- data/lib/forgejo/models/topic_name.rb +11 -5
- data/lib/forgejo/models/topic_response.rb +11 -5
- data/lib/forgejo/models/tracked_time.rb +11 -5
- data/lib/forgejo/models/transfer_repo_option.rb +21 -5
- data/lib/forgejo/models/update_branch_repo_option.rb +239 -0
- data/lib/forgejo/models/update_file_options.rb +31 -5
- data/lib/forgejo/models/update_repo_avatar_option.rb +11 -5
- data/lib/forgejo/models/update_user_avatar_option.rb +11 -5
- data/lib/forgejo/models/update_variable_option.rb +21 -5
- data/lib/forgejo/models/user.rb +11 -5
- data/lib/forgejo/models/user_heatmap_data.rb +11 -5
- data/lib/forgejo/models/user_search200_response.rb +11 -5
- data/lib/forgejo/models/user_settings.rb +11 -5
- data/lib/forgejo/models/user_settings_options.rb +11 -5
- data/lib/forgejo/models/watch_info.rb +11 -5
- data/lib/forgejo/models/wiki_commit.rb +11 -5
- data/lib/forgejo/models/wiki_commit_list.rb +11 -5
- data/lib/forgejo/models/wiki_page.rb +11 -5
- data/lib/forgejo/models/wiki_page_meta_data.rb +11 -5
- data/lib/forgejo/version.rb +3 -3
- data/lib/forgejo.rb +28 -2
- data/manifest.scm +6 -2
- data/openapi-generator-cli.jar +0 -0
- data/pom.xml~ +22 -0
- data/smoke +1 -1
- data/spec/models/api_forbidden_error_spec.rb +42 -0
- data/spec/models/api_invalid_topics_error_spec.rb +42 -0
- data/spec/models/api_not_found_spec.rb +48 -0
- data/spec/models/api_repo_archived_error_spec.rb +42 -0
- data/spec/models/api_unauthorized_error_spec.rb +42 -0
- data/spec/models/api_validation_error_spec.rb +42 -0
- data/spec/models/create_quota_group_options_spec.rb +42 -0
- data/spec/models/create_quota_rule_options_spec.rb +48 -0
- data/spec/models/edit_quota_rule_options_spec.rb +42 -0
- data/spec/models/note_options_spec.rb +36 -0
- data/spec/models/quota_group_spec.rb +42 -0
- data/spec/models/quota_info_spec.rb +42 -0
- data/spec/models/quota_rule_info_spec.rb +48 -0
- data/spec/models/quota_used_artifact_spec.rb +48 -0
- data/spec/models/quota_used_attachment_contained_in_spec.rb +42 -0
- data/spec/models/quota_used_attachment_spec.rb +54 -0
- data/spec/models/quota_used_package_spec.rb +60 -0
- data/spec/models/quota_used_size_assets_attachments_spec.rb +42 -0
- data/spec/models/quota_used_size_assets_packages_spec.rb +36 -0
- data/spec/models/quota_used_size_assets_spec.rb +48 -0
- data/spec/models/quota_used_size_git_spec.rb +36 -0
- data/spec/models/quota_used_size_repos_spec.rb +42 -0
- data/spec/models/quota_used_size_spec.rb +48 -0
- data/spec/models/quota_used_spec.rb +36 -0
- data/spec/models/set_user_quota_groups_options_spec.rb +36 -0
- data/spec/models/update_branch_repo_option_spec.rb +36 -0
- data/spec/spec_helper.rb +2 -2
- data/swagger.v1.json +2563 -338
- data/swagger.v1.patched.json +1 -1
- metadata +291 -182
- data/LICENSE~ +0 -9
- data/Makefile~ +0 -2
- data/patch~ +0 -1
- data/smoke~ +0 -1
data/docs/AdminApi.md
CHANGED
@@ -4,31 +4,187 @@ All URIs are relative to */api/v1*
|
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
|
+
| [**admin_add_rule_to_quota_group**](AdminApi.md#admin_add_rule_to_quota_group) | **PUT** /admin/quota/groups/{quotagroup}/rules/{quotarule} | Adds a rule to a quota group |
|
8
|
+
| [**admin_add_user_to_quota_group**](AdminApi.md#admin_add_user_to_quota_group) | **PUT** /admin/quota/groups/{quotagroup}/users/{username} | Add a user to a quota group |
|
7
9
|
| [**admin_adopt_repository**](AdminApi.md#admin_adopt_repository) | **POST** /admin/unadopted/{owner}/{repo} | Adopt unadopted files as a repository |
|
8
10
|
| [**admin_create_hook**](AdminApi.md#admin_create_hook) | **POST** /admin/hooks | Create a hook |
|
9
11
|
| [**admin_create_org**](AdminApi.md#admin_create_org) | **POST** /admin/users/{username}/orgs | Create an organization |
|
10
12
|
| [**admin_create_public_key**](AdminApi.md#admin_create_public_key) | **POST** /admin/users/{username}/keys | Add a public key on behalf of a user |
|
13
|
+
| [**admin_create_quota_group**](AdminApi.md#admin_create_quota_group) | **POST** /admin/quota/groups | Create a new quota group |
|
14
|
+
| [**admin_create_quota_rule**](AdminApi.md#admin_create_quota_rule) | **POST** /admin/quota/rules | Create a new quota rule |
|
11
15
|
| [**admin_create_repo**](AdminApi.md#admin_create_repo) | **POST** /admin/users/{username}/repos | Create a repository on behalf of a user |
|
12
16
|
| [**admin_create_user**](AdminApi.md#admin_create_user) | **POST** /admin/users | Create a user |
|
13
17
|
| [**admin_cron_list**](AdminApi.md#admin_cron_list) | **GET** /admin/cron | List cron tasks |
|
14
18
|
| [**admin_cron_run**](AdminApi.md#admin_cron_run) | **POST** /admin/cron/{task} | Run cron task |
|
19
|
+
| [**admin_d_elete_quota_rule**](AdminApi.md#admin_d_elete_quota_rule) | **DELETE** /admin/quota/rules/{quotarule} | Deletes a quota rule |
|
15
20
|
| [**admin_delete_hook**](AdminApi.md#admin_delete_hook) | **DELETE** /admin/hooks/{id} | Delete a hook |
|
21
|
+
| [**admin_delete_quota_group**](AdminApi.md#admin_delete_quota_group) | **DELETE** /admin/quota/groups/{quotagroup} | Delete a quota group |
|
16
22
|
| [**admin_delete_unadopted_repository**](AdminApi.md#admin_delete_unadopted_repository) | **DELETE** /admin/unadopted/{owner}/{repo} | Delete unadopted files |
|
17
23
|
| [**admin_delete_user**](AdminApi.md#admin_delete_user) | **DELETE** /admin/users/{username} | Delete a user |
|
18
24
|
| [**admin_delete_user_public_key**](AdminApi.md#admin_delete_user_public_key) | **DELETE** /admin/users/{username}/keys/{id} | Delete a user's public key |
|
19
25
|
| [**admin_edit_hook**](AdminApi.md#admin_edit_hook) | **PATCH** /admin/hooks/{id} | Update a hook |
|
26
|
+
| [**admin_edit_quota_rule**](AdminApi.md#admin_edit_quota_rule) | **PATCH** /admin/quota/rules/{quotarule} | Change an existing quota rule |
|
20
27
|
| [**admin_edit_user**](AdminApi.md#admin_edit_user) | **PATCH** /admin/users/{username} | Edit an existing user |
|
21
28
|
| [**admin_get_all_emails**](AdminApi.md#admin_get_all_emails) | **GET** /admin/emails | List all emails |
|
22
29
|
| [**admin_get_all_orgs**](AdminApi.md#admin_get_all_orgs) | **GET** /admin/orgs | List all organizations |
|
23
30
|
| [**admin_get_hook**](AdminApi.md#admin_get_hook) | **GET** /admin/hooks/{id} | Get a hook |
|
31
|
+
| [**admin_get_quota_group**](AdminApi.md#admin_get_quota_group) | **GET** /admin/quota/groups/{quotagroup} | Get information about the quota group |
|
32
|
+
| [**admin_get_quota_rule**](AdminApi.md#admin_get_quota_rule) | **GET** /admin/quota/rules/{quotarule} | Get information about a quota rule |
|
24
33
|
| [**admin_get_runner_registration_token**](AdminApi.md#admin_get_runner_registration_token) | **GET** /admin/runners/registration-token | Get an global actions runner registration token |
|
34
|
+
| [**admin_get_user_quota**](AdminApi.md#admin_get_user_quota) | **GET** /admin/users/{username}/quota | Get the user's quota info |
|
25
35
|
| [**admin_list_hooks**](AdminApi.md#admin_list_hooks) | **GET** /admin/hooks | List system's webhooks |
|
36
|
+
| [**admin_list_quota_groups**](AdminApi.md#admin_list_quota_groups) | **GET** /admin/quota/groups | List the available quota groups |
|
37
|
+
| [**admin_list_quota_rules**](AdminApi.md#admin_list_quota_rules) | **GET** /admin/quota/rules | List the available quota rules |
|
38
|
+
| [**admin_list_users_in_quota_group**](AdminApi.md#admin_list_users_in_quota_group) | **GET** /admin/quota/groups/{quotagroup}/users | List users in a quota group |
|
39
|
+
| [**admin_remove_rule_from_quota_group**](AdminApi.md#admin_remove_rule_from_quota_group) | **DELETE** /admin/quota/groups/{quotagroup}/rules/{quotarule} | Removes a rule from a quota group |
|
40
|
+
| [**admin_remove_user_from_quota_group**](AdminApi.md#admin_remove_user_from_quota_group) | **DELETE** /admin/quota/groups/{quotagroup}/users/{username} | Remove a user from a quota group |
|
26
41
|
| [**admin_rename_user**](AdminApi.md#admin_rename_user) | **POST** /admin/users/{username}/rename | Rename a user |
|
27
42
|
| [**admin_search_emails**](AdminApi.md#admin_search_emails) | **GET** /admin/emails/search | Search all emails |
|
28
43
|
| [**admin_search_users**](AdminApi.md#admin_search_users) | **GET** /admin/users | Search users according filter conditions |
|
44
|
+
| [**admin_set_user_quota_groups**](AdminApi.md#admin_set_user_quota_groups) | **POST** /admin/users/{username}/quota/groups | Set the user's quota groups to a given list. |
|
29
45
|
| [**admin_unadopted_list**](AdminApi.md#admin_unadopted_list) | **GET** /admin/unadopted | List unadopted repositories |
|
30
46
|
|
31
47
|
|
48
|
+
## admin_add_rule_to_quota_group
|
49
|
+
|
50
|
+
> admin_add_rule_to_quota_group(quotagroup, quotarule)
|
51
|
+
|
52
|
+
Adds a rule to a quota group
|
53
|
+
|
54
|
+
### Examples
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
require 'time'
|
58
|
+
require 'forgejo'
|
59
|
+
# setup authorization
|
60
|
+
Forgejo.configure do |config|
|
61
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
62
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
63
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
64
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
65
|
+
end
|
66
|
+
|
67
|
+
api_instance = Forgejo::AdminApi.new
|
68
|
+
quotagroup = 'quotagroup_example' # String | quota group to add a rule to
|
69
|
+
quotarule = 'quotarule_example' # String | the name of the quota rule to add to the group
|
70
|
+
|
71
|
+
begin
|
72
|
+
# Adds a rule to a quota group
|
73
|
+
api_instance.admin_add_rule_to_quota_group(quotagroup, quotarule)
|
74
|
+
rescue Forgejo::ApiError => e
|
75
|
+
puts "Error when calling AdminApi->admin_add_rule_to_quota_group: #{e}"
|
76
|
+
end
|
77
|
+
```
|
78
|
+
|
79
|
+
#### Using the admin_add_rule_to_quota_group_with_http_info variant
|
80
|
+
|
81
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
82
|
+
|
83
|
+
> <Array(nil, Integer, Hash)> admin_add_rule_to_quota_group_with_http_info(quotagroup, quotarule)
|
84
|
+
|
85
|
+
```ruby
|
86
|
+
begin
|
87
|
+
# Adds a rule to a quota group
|
88
|
+
data, status_code, headers = api_instance.admin_add_rule_to_quota_group_with_http_info(quotagroup, quotarule)
|
89
|
+
p status_code # => 2xx
|
90
|
+
p headers # => { ... }
|
91
|
+
p data # => nil
|
92
|
+
rescue Forgejo::ApiError => e
|
93
|
+
puts "Error when calling AdminApi->admin_add_rule_to_quota_group_with_http_info: #{e}"
|
94
|
+
end
|
95
|
+
```
|
96
|
+
|
97
|
+
### Parameters
|
98
|
+
|
99
|
+
| Name | Type | Description | Notes |
|
100
|
+
| ---- | ---- | ----------- | ----- |
|
101
|
+
| **quotagroup** | **String** | quota group to add a rule to | |
|
102
|
+
| **quotarule** | **String** | the name of the quota rule to add to the group | |
|
103
|
+
|
104
|
+
### Return type
|
105
|
+
|
106
|
+
nil (empty response body)
|
107
|
+
|
108
|
+
### Authorization
|
109
|
+
|
110
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
111
|
+
|
112
|
+
### HTTP request headers
|
113
|
+
|
114
|
+
- **Content-Type**: Not defined
|
115
|
+
- **Accept**: application/json
|
116
|
+
|
117
|
+
|
118
|
+
## admin_add_user_to_quota_group
|
119
|
+
|
120
|
+
> admin_add_user_to_quota_group(quotagroup, username)
|
121
|
+
|
122
|
+
Add a user to a quota group
|
123
|
+
|
124
|
+
### Examples
|
125
|
+
|
126
|
+
```ruby
|
127
|
+
require 'time'
|
128
|
+
require 'forgejo'
|
129
|
+
# setup authorization
|
130
|
+
Forgejo.configure do |config|
|
131
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
132
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
133
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
134
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
135
|
+
end
|
136
|
+
|
137
|
+
api_instance = Forgejo::AdminApi.new
|
138
|
+
quotagroup = 'quotagroup_example' # String | quota group to add the user to
|
139
|
+
username = 'username_example' # String | username of the user to add to the quota group
|
140
|
+
|
141
|
+
begin
|
142
|
+
# Add a user to a quota group
|
143
|
+
api_instance.admin_add_user_to_quota_group(quotagroup, username)
|
144
|
+
rescue Forgejo::ApiError => e
|
145
|
+
puts "Error when calling AdminApi->admin_add_user_to_quota_group: #{e}"
|
146
|
+
end
|
147
|
+
```
|
148
|
+
|
149
|
+
#### Using the admin_add_user_to_quota_group_with_http_info variant
|
150
|
+
|
151
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
152
|
+
|
153
|
+
> <Array(nil, Integer, Hash)> admin_add_user_to_quota_group_with_http_info(quotagroup, username)
|
154
|
+
|
155
|
+
```ruby
|
156
|
+
begin
|
157
|
+
# Add a user to a quota group
|
158
|
+
data, status_code, headers = api_instance.admin_add_user_to_quota_group_with_http_info(quotagroup, username)
|
159
|
+
p status_code # => 2xx
|
160
|
+
p headers # => { ... }
|
161
|
+
p data # => nil
|
162
|
+
rescue Forgejo::ApiError => e
|
163
|
+
puts "Error when calling AdminApi->admin_add_user_to_quota_group_with_http_info: #{e}"
|
164
|
+
end
|
165
|
+
```
|
166
|
+
|
167
|
+
### Parameters
|
168
|
+
|
169
|
+
| Name | Type | Description | Notes |
|
170
|
+
| ---- | ---- | ----------- | ----- |
|
171
|
+
| **quotagroup** | **String** | quota group to add the user to | |
|
172
|
+
| **username** | **String** | username of the user to add to the quota group | |
|
173
|
+
|
174
|
+
### Return type
|
175
|
+
|
176
|
+
nil (empty response body)
|
177
|
+
|
178
|
+
### Authorization
|
179
|
+
|
180
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
181
|
+
|
182
|
+
### HTTP request headers
|
183
|
+
|
184
|
+
- **Content-Type**: Not defined
|
185
|
+
- **Accept**: application/json
|
186
|
+
|
187
|
+
|
32
188
|
## admin_adopt_repository
|
33
189
|
|
34
190
|
> admin_adopt_repository(owner, repo)
|
@@ -96,7 +252,7 @@ nil (empty response body)
|
|
96
252
|
### HTTP request headers
|
97
253
|
|
98
254
|
- **Content-Type**: Not defined
|
99
|
-
- **Accept**:
|
255
|
+
- **Accept**: application/json
|
100
256
|
|
101
257
|
|
102
258
|
## admin_create_hook
|
@@ -312,6 +468,144 @@ end
|
|
312
468
|
- **Accept**: application/json
|
313
469
|
|
314
470
|
|
471
|
+
## admin_create_quota_group
|
472
|
+
|
473
|
+
> <QuotaGroup> admin_create_quota_group(group)
|
474
|
+
|
475
|
+
Create a new quota group
|
476
|
+
|
477
|
+
### Examples
|
478
|
+
|
479
|
+
```ruby
|
480
|
+
require 'time'
|
481
|
+
require 'forgejo'
|
482
|
+
# setup authorization
|
483
|
+
Forgejo.configure do |config|
|
484
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
485
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
486
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
487
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
488
|
+
end
|
489
|
+
|
490
|
+
api_instance = Forgejo::AdminApi.new
|
491
|
+
group = Forgejo::CreateQuotaGroupOptions.new # CreateQuotaGroupOptions | Definition of the quota group
|
492
|
+
|
493
|
+
begin
|
494
|
+
# Create a new quota group
|
495
|
+
result = api_instance.admin_create_quota_group(group)
|
496
|
+
p result
|
497
|
+
rescue Forgejo::ApiError => e
|
498
|
+
puts "Error when calling AdminApi->admin_create_quota_group: #{e}"
|
499
|
+
end
|
500
|
+
```
|
501
|
+
|
502
|
+
#### Using the admin_create_quota_group_with_http_info variant
|
503
|
+
|
504
|
+
This returns an Array which contains the response data, status code and headers.
|
505
|
+
|
506
|
+
> <Array(<QuotaGroup>, Integer, Hash)> admin_create_quota_group_with_http_info(group)
|
507
|
+
|
508
|
+
```ruby
|
509
|
+
begin
|
510
|
+
# Create a new quota group
|
511
|
+
data, status_code, headers = api_instance.admin_create_quota_group_with_http_info(group)
|
512
|
+
p status_code # => 2xx
|
513
|
+
p headers # => { ... }
|
514
|
+
p data # => <QuotaGroup>
|
515
|
+
rescue Forgejo::ApiError => e
|
516
|
+
puts "Error when calling AdminApi->admin_create_quota_group_with_http_info: #{e}"
|
517
|
+
end
|
518
|
+
```
|
519
|
+
|
520
|
+
### Parameters
|
521
|
+
|
522
|
+
| Name | Type | Description | Notes |
|
523
|
+
| ---- | ---- | ----------- | ----- |
|
524
|
+
| **group** | [**CreateQuotaGroupOptions**](CreateQuotaGroupOptions.md) | Definition of the quota group | |
|
525
|
+
|
526
|
+
### Return type
|
527
|
+
|
528
|
+
[**QuotaGroup**](QuotaGroup.md)
|
529
|
+
|
530
|
+
### Authorization
|
531
|
+
|
532
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
533
|
+
|
534
|
+
### HTTP request headers
|
535
|
+
|
536
|
+
- **Content-Type**: application/json, text/plain
|
537
|
+
- **Accept**: application/json
|
538
|
+
|
539
|
+
|
540
|
+
## admin_create_quota_rule
|
541
|
+
|
542
|
+
> <QuotaRuleInfo> admin_create_quota_rule(rule)
|
543
|
+
|
544
|
+
Create a new quota rule
|
545
|
+
|
546
|
+
### Examples
|
547
|
+
|
548
|
+
```ruby
|
549
|
+
require 'time'
|
550
|
+
require 'forgejo'
|
551
|
+
# setup authorization
|
552
|
+
Forgejo.configure do |config|
|
553
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
554
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
555
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
556
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
557
|
+
end
|
558
|
+
|
559
|
+
api_instance = Forgejo::AdminApi.new
|
560
|
+
rule = Forgejo::CreateQuotaRuleOptions.new # CreateQuotaRuleOptions | Definition of the quota rule
|
561
|
+
|
562
|
+
begin
|
563
|
+
# Create a new quota rule
|
564
|
+
result = api_instance.admin_create_quota_rule(rule)
|
565
|
+
p result
|
566
|
+
rescue Forgejo::ApiError => e
|
567
|
+
puts "Error when calling AdminApi->admin_create_quota_rule: #{e}"
|
568
|
+
end
|
569
|
+
```
|
570
|
+
|
571
|
+
#### Using the admin_create_quota_rule_with_http_info variant
|
572
|
+
|
573
|
+
This returns an Array which contains the response data, status code and headers.
|
574
|
+
|
575
|
+
> <Array(<QuotaRuleInfo>, Integer, Hash)> admin_create_quota_rule_with_http_info(rule)
|
576
|
+
|
577
|
+
```ruby
|
578
|
+
begin
|
579
|
+
# Create a new quota rule
|
580
|
+
data, status_code, headers = api_instance.admin_create_quota_rule_with_http_info(rule)
|
581
|
+
p status_code # => 2xx
|
582
|
+
p headers # => { ... }
|
583
|
+
p data # => <QuotaRuleInfo>
|
584
|
+
rescue Forgejo::ApiError => e
|
585
|
+
puts "Error when calling AdminApi->admin_create_quota_rule_with_http_info: #{e}"
|
586
|
+
end
|
587
|
+
```
|
588
|
+
|
589
|
+
### Parameters
|
590
|
+
|
591
|
+
| Name | Type | Description | Notes |
|
592
|
+
| ---- | ---- | ----------- | ----- |
|
593
|
+
| **rule** | [**CreateQuotaRuleOptions**](CreateQuotaRuleOptions.md) | Definition of the quota rule | |
|
594
|
+
|
595
|
+
### Return type
|
596
|
+
|
597
|
+
[**QuotaRuleInfo**](QuotaRuleInfo.md)
|
598
|
+
|
599
|
+
### Authorization
|
600
|
+
|
601
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
602
|
+
|
603
|
+
### HTTP request headers
|
604
|
+
|
605
|
+
- **Content-Type**: application/json, text/plain
|
606
|
+
- **Accept**: application/json
|
607
|
+
|
608
|
+
|
315
609
|
## admin_create_repo
|
316
610
|
|
317
611
|
> <Repository> admin_create_repo(username, repository)
|
@@ -592,14 +886,14 @@ nil (empty response body)
|
|
592
886
|
### HTTP request headers
|
593
887
|
|
594
888
|
- **Content-Type**: Not defined
|
595
|
-
- **Accept**:
|
889
|
+
- **Accept**: application/json
|
596
890
|
|
597
891
|
|
598
|
-
##
|
892
|
+
## admin_d_elete_quota_rule
|
599
893
|
|
600
|
-
>
|
894
|
+
> admin_d_elete_quota_rule(quotarule)
|
601
895
|
|
602
|
-
|
896
|
+
Deletes a quota rule
|
603
897
|
|
604
898
|
### Examples
|
605
899
|
|
@@ -615,31 +909,31 @@ Forgejo.configure do |config|
|
|
615
909
|
end
|
616
910
|
|
617
911
|
api_instance = Forgejo::AdminApi.new
|
618
|
-
|
912
|
+
quotarule = 'quotarule_example' # String | quota rule to delete
|
619
913
|
|
620
914
|
begin
|
621
|
-
#
|
622
|
-
api_instance.
|
915
|
+
# Deletes a quota rule
|
916
|
+
api_instance.admin_d_elete_quota_rule(quotarule)
|
623
917
|
rescue Forgejo::ApiError => e
|
624
|
-
puts "Error when calling AdminApi->
|
918
|
+
puts "Error when calling AdminApi->admin_d_elete_quota_rule: #{e}"
|
625
919
|
end
|
626
920
|
```
|
627
921
|
|
628
|
-
#### Using the
|
922
|
+
#### Using the admin_d_elete_quota_rule_with_http_info variant
|
629
923
|
|
630
924
|
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
631
925
|
|
632
|
-
> <Array(nil, Integer, Hash)>
|
926
|
+
> <Array(nil, Integer, Hash)> admin_d_elete_quota_rule_with_http_info(quotarule)
|
633
927
|
|
634
928
|
```ruby
|
635
929
|
begin
|
636
|
-
#
|
637
|
-
data, status_code, headers = api_instance.
|
930
|
+
# Deletes a quota rule
|
931
|
+
data, status_code, headers = api_instance.admin_d_elete_quota_rule_with_http_info(quotarule)
|
638
932
|
p status_code # => 2xx
|
639
933
|
p headers # => { ... }
|
640
934
|
p data # => nil
|
641
935
|
rescue Forgejo::ApiError => e
|
642
|
-
puts "Error when calling AdminApi->
|
936
|
+
puts "Error when calling AdminApi->admin_d_elete_quota_rule_with_http_info: #{e}"
|
643
937
|
end
|
644
938
|
```
|
645
939
|
|
@@ -647,7 +941,7 @@ end
|
|
647
941
|
|
648
942
|
| Name | Type | Description | Notes |
|
649
943
|
| ---- | ---- | ----------- | ----- |
|
650
|
-
| **
|
944
|
+
| **quotarule** | **String** | quota rule to delete | |
|
651
945
|
|
652
946
|
### Return type
|
653
947
|
|
@@ -660,14 +954,14 @@ nil (empty response body)
|
|
660
954
|
### HTTP request headers
|
661
955
|
|
662
956
|
- **Content-Type**: Not defined
|
663
|
-
- **Accept**:
|
957
|
+
- **Accept**: application/json
|
664
958
|
|
665
959
|
|
666
|
-
##
|
960
|
+
## admin_delete_hook
|
667
961
|
|
668
|
-
>
|
962
|
+
> admin_delete_hook(id)
|
669
963
|
|
670
|
-
Delete
|
964
|
+
Delete a hook
|
671
965
|
|
672
966
|
### Examples
|
673
967
|
|
@@ -683,22 +977,158 @@ Forgejo.configure do |config|
|
|
683
977
|
end
|
684
978
|
|
685
979
|
api_instance = Forgejo::AdminApi.new
|
686
|
-
|
687
|
-
repo = 'repo_example' # String | name of the repo
|
980
|
+
id = 789 # Integer | id of the hook to delete
|
688
981
|
|
689
982
|
begin
|
690
|
-
# Delete
|
691
|
-
api_instance.
|
983
|
+
# Delete a hook
|
984
|
+
api_instance.admin_delete_hook(id)
|
692
985
|
rescue Forgejo::ApiError => e
|
693
|
-
puts "Error when calling AdminApi->
|
986
|
+
puts "Error when calling AdminApi->admin_delete_hook: #{e}"
|
694
987
|
end
|
695
988
|
```
|
696
989
|
|
697
|
-
#### Using the
|
990
|
+
#### Using the admin_delete_hook_with_http_info variant
|
698
991
|
|
699
992
|
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
700
993
|
|
701
|
-
> <Array(nil, Integer, Hash)>
|
994
|
+
> <Array(nil, Integer, Hash)> admin_delete_hook_with_http_info(id)
|
995
|
+
|
996
|
+
```ruby
|
997
|
+
begin
|
998
|
+
# Delete a hook
|
999
|
+
data, status_code, headers = api_instance.admin_delete_hook_with_http_info(id)
|
1000
|
+
p status_code # => 2xx
|
1001
|
+
p headers # => { ... }
|
1002
|
+
p data # => nil
|
1003
|
+
rescue Forgejo::ApiError => e
|
1004
|
+
puts "Error when calling AdminApi->admin_delete_hook_with_http_info: #{e}"
|
1005
|
+
end
|
1006
|
+
```
|
1007
|
+
|
1008
|
+
### Parameters
|
1009
|
+
|
1010
|
+
| Name | Type | Description | Notes |
|
1011
|
+
| ---- | ---- | ----------- | ----- |
|
1012
|
+
| **id** | **Integer** | id of the hook to delete | |
|
1013
|
+
|
1014
|
+
### Return type
|
1015
|
+
|
1016
|
+
nil (empty response body)
|
1017
|
+
|
1018
|
+
### Authorization
|
1019
|
+
|
1020
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1021
|
+
|
1022
|
+
### HTTP request headers
|
1023
|
+
|
1024
|
+
- **Content-Type**: Not defined
|
1025
|
+
- **Accept**: Not defined
|
1026
|
+
|
1027
|
+
|
1028
|
+
## admin_delete_quota_group
|
1029
|
+
|
1030
|
+
> admin_delete_quota_group(quotagroup)
|
1031
|
+
|
1032
|
+
Delete a quota group
|
1033
|
+
|
1034
|
+
### Examples
|
1035
|
+
|
1036
|
+
```ruby
|
1037
|
+
require 'time'
|
1038
|
+
require 'forgejo'
|
1039
|
+
# setup authorization
|
1040
|
+
Forgejo.configure do |config|
|
1041
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1042
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1043
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1044
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1045
|
+
end
|
1046
|
+
|
1047
|
+
api_instance = Forgejo::AdminApi.new
|
1048
|
+
quotagroup = 'quotagroup_example' # String | quota group to delete
|
1049
|
+
|
1050
|
+
begin
|
1051
|
+
# Delete a quota group
|
1052
|
+
api_instance.admin_delete_quota_group(quotagroup)
|
1053
|
+
rescue Forgejo::ApiError => e
|
1054
|
+
puts "Error when calling AdminApi->admin_delete_quota_group: #{e}"
|
1055
|
+
end
|
1056
|
+
```
|
1057
|
+
|
1058
|
+
#### Using the admin_delete_quota_group_with_http_info variant
|
1059
|
+
|
1060
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1061
|
+
|
1062
|
+
> <Array(nil, Integer, Hash)> admin_delete_quota_group_with_http_info(quotagroup)
|
1063
|
+
|
1064
|
+
```ruby
|
1065
|
+
begin
|
1066
|
+
# Delete a quota group
|
1067
|
+
data, status_code, headers = api_instance.admin_delete_quota_group_with_http_info(quotagroup)
|
1068
|
+
p status_code # => 2xx
|
1069
|
+
p headers # => { ... }
|
1070
|
+
p data # => nil
|
1071
|
+
rescue Forgejo::ApiError => e
|
1072
|
+
puts "Error when calling AdminApi->admin_delete_quota_group_with_http_info: #{e}"
|
1073
|
+
end
|
1074
|
+
```
|
1075
|
+
|
1076
|
+
### Parameters
|
1077
|
+
|
1078
|
+
| Name | Type | Description | Notes |
|
1079
|
+
| ---- | ---- | ----------- | ----- |
|
1080
|
+
| **quotagroup** | **String** | quota group to delete | |
|
1081
|
+
|
1082
|
+
### Return type
|
1083
|
+
|
1084
|
+
nil (empty response body)
|
1085
|
+
|
1086
|
+
### Authorization
|
1087
|
+
|
1088
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1089
|
+
|
1090
|
+
### HTTP request headers
|
1091
|
+
|
1092
|
+
- **Content-Type**: Not defined
|
1093
|
+
- **Accept**: application/json
|
1094
|
+
|
1095
|
+
|
1096
|
+
## admin_delete_unadopted_repository
|
1097
|
+
|
1098
|
+
> admin_delete_unadopted_repository(owner, repo)
|
1099
|
+
|
1100
|
+
Delete unadopted files
|
1101
|
+
|
1102
|
+
### Examples
|
1103
|
+
|
1104
|
+
```ruby
|
1105
|
+
require 'time'
|
1106
|
+
require 'forgejo'
|
1107
|
+
# setup authorization
|
1108
|
+
Forgejo.configure do |config|
|
1109
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1110
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1111
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1112
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1113
|
+
end
|
1114
|
+
|
1115
|
+
api_instance = Forgejo::AdminApi.new
|
1116
|
+
owner = 'owner_example' # String | owner of the repo
|
1117
|
+
repo = 'repo_example' # String | name of the repo
|
1118
|
+
|
1119
|
+
begin
|
1120
|
+
# Delete unadopted files
|
1121
|
+
api_instance.admin_delete_unadopted_repository(owner, repo)
|
1122
|
+
rescue Forgejo::ApiError => e
|
1123
|
+
puts "Error when calling AdminApi->admin_delete_unadopted_repository: #{e}"
|
1124
|
+
end
|
1125
|
+
```
|
1126
|
+
|
1127
|
+
#### Using the admin_delete_unadopted_repository_with_http_info variant
|
1128
|
+
|
1129
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1130
|
+
|
1131
|
+
> <Array(nil, Integer, Hash)> admin_delete_unadopted_repository_with_http_info(owner, repo)
|
702
1132
|
|
703
1133
|
```ruby
|
704
1134
|
begin
|
@@ -730,7 +1160,7 @@ nil (empty response body)
|
|
730
1160
|
### HTTP request headers
|
731
1161
|
|
732
1162
|
- **Content-Type**: Not defined
|
733
|
-
- **Accept**:
|
1163
|
+
- **Accept**: application/json
|
734
1164
|
|
735
1165
|
|
736
1166
|
## admin_delete_user
|
@@ -768,19 +1198,660 @@ end
|
|
768
1198
|
|
769
1199
|
#### Using the admin_delete_user_with_http_info variant
|
770
1200
|
|
771
|
-
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1201
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1202
|
+
|
1203
|
+
> <Array(nil, Integer, Hash)> admin_delete_user_with_http_info(username, opts)
|
1204
|
+
|
1205
|
+
```ruby
|
1206
|
+
begin
|
1207
|
+
# Delete a user
|
1208
|
+
data, status_code, headers = api_instance.admin_delete_user_with_http_info(username, opts)
|
1209
|
+
p status_code # => 2xx
|
1210
|
+
p headers # => { ... }
|
1211
|
+
p data # => nil
|
1212
|
+
rescue Forgejo::ApiError => e
|
1213
|
+
puts "Error when calling AdminApi->admin_delete_user_with_http_info: #{e}"
|
1214
|
+
end
|
1215
|
+
```
|
1216
|
+
|
1217
|
+
### Parameters
|
1218
|
+
|
1219
|
+
| Name | Type | Description | Notes |
|
1220
|
+
| ---- | ---- | ----------- | ----- |
|
1221
|
+
| **username** | **String** | username of user to delete | |
|
1222
|
+
| **purge** | **Boolean** | purge the user from the system completely | [optional] |
|
1223
|
+
|
1224
|
+
### Return type
|
1225
|
+
|
1226
|
+
nil (empty response body)
|
1227
|
+
|
1228
|
+
### Authorization
|
1229
|
+
|
1230
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1231
|
+
|
1232
|
+
### HTTP request headers
|
1233
|
+
|
1234
|
+
- **Content-Type**: Not defined
|
1235
|
+
- **Accept**: application/json
|
1236
|
+
|
1237
|
+
|
1238
|
+
## admin_delete_user_public_key
|
1239
|
+
|
1240
|
+
> admin_delete_user_public_key(username, id)
|
1241
|
+
|
1242
|
+
Delete a user's public key
|
1243
|
+
|
1244
|
+
### Examples
|
1245
|
+
|
1246
|
+
```ruby
|
1247
|
+
require 'time'
|
1248
|
+
require 'forgejo'
|
1249
|
+
# setup authorization
|
1250
|
+
Forgejo.configure do |config|
|
1251
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1252
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1253
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1254
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1255
|
+
end
|
1256
|
+
|
1257
|
+
api_instance = Forgejo::AdminApi.new
|
1258
|
+
username = 'username_example' # String | username of user
|
1259
|
+
id = 789 # Integer | id of the key to delete
|
1260
|
+
|
1261
|
+
begin
|
1262
|
+
# Delete a user's public key
|
1263
|
+
api_instance.admin_delete_user_public_key(username, id)
|
1264
|
+
rescue Forgejo::ApiError => e
|
1265
|
+
puts "Error when calling AdminApi->admin_delete_user_public_key: #{e}"
|
1266
|
+
end
|
1267
|
+
```
|
1268
|
+
|
1269
|
+
#### Using the admin_delete_user_public_key_with_http_info variant
|
1270
|
+
|
1271
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1272
|
+
|
1273
|
+
> <Array(nil, Integer, Hash)> admin_delete_user_public_key_with_http_info(username, id)
|
1274
|
+
|
1275
|
+
```ruby
|
1276
|
+
begin
|
1277
|
+
# Delete a user's public key
|
1278
|
+
data, status_code, headers = api_instance.admin_delete_user_public_key_with_http_info(username, id)
|
1279
|
+
p status_code # => 2xx
|
1280
|
+
p headers # => { ... }
|
1281
|
+
p data # => nil
|
1282
|
+
rescue Forgejo::ApiError => e
|
1283
|
+
puts "Error when calling AdminApi->admin_delete_user_public_key_with_http_info: #{e}"
|
1284
|
+
end
|
1285
|
+
```
|
1286
|
+
|
1287
|
+
### Parameters
|
1288
|
+
|
1289
|
+
| Name | Type | Description | Notes |
|
1290
|
+
| ---- | ---- | ----------- | ----- |
|
1291
|
+
| **username** | **String** | username of user | |
|
1292
|
+
| **id** | **Integer** | id of the key to delete | |
|
1293
|
+
|
1294
|
+
### Return type
|
1295
|
+
|
1296
|
+
nil (empty response body)
|
1297
|
+
|
1298
|
+
### Authorization
|
1299
|
+
|
1300
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1301
|
+
|
1302
|
+
### HTTP request headers
|
1303
|
+
|
1304
|
+
- **Content-Type**: Not defined
|
1305
|
+
- **Accept**: application/json
|
1306
|
+
|
1307
|
+
|
1308
|
+
## admin_edit_hook
|
1309
|
+
|
1310
|
+
> <Hook> admin_edit_hook(id, opts)
|
1311
|
+
|
1312
|
+
Update a hook
|
1313
|
+
|
1314
|
+
### Examples
|
1315
|
+
|
1316
|
+
```ruby
|
1317
|
+
require 'time'
|
1318
|
+
require 'forgejo'
|
1319
|
+
# setup authorization
|
1320
|
+
Forgejo.configure do |config|
|
1321
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1322
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1323
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1324
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1325
|
+
end
|
1326
|
+
|
1327
|
+
api_instance = Forgejo::AdminApi.new
|
1328
|
+
id = 789 # Integer | id of the hook to update
|
1329
|
+
opts = {
|
1330
|
+
body: Forgejo::EditHookOption.new # EditHookOption |
|
1331
|
+
}
|
1332
|
+
|
1333
|
+
begin
|
1334
|
+
# Update a hook
|
1335
|
+
result = api_instance.admin_edit_hook(id, opts)
|
1336
|
+
p result
|
1337
|
+
rescue Forgejo::ApiError => e
|
1338
|
+
puts "Error when calling AdminApi->admin_edit_hook: #{e}"
|
1339
|
+
end
|
1340
|
+
```
|
1341
|
+
|
1342
|
+
#### Using the admin_edit_hook_with_http_info variant
|
1343
|
+
|
1344
|
+
This returns an Array which contains the response data, status code and headers.
|
1345
|
+
|
1346
|
+
> <Array(<Hook>, Integer, Hash)> admin_edit_hook_with_http_info(id, opts)
|
1347
|
+
|
1348
|
+
```ruby
|
1349
|
+
begin
|
1350
|
+
# Update a hook
|
1351
|
+
data, status_code, headers = api_instance.admin_edit_hook_with_http_info(id, opts)
|
1352
|
+
p status_code # => 2xx
|
1353
|
+
p headers # => { ... }
|
1354
|
+
p data # => <Hook>
|
1355
|
+
rescue Forgejo::ApiError => e
|
1356
|
+
puts "Error when calling AdminApi->admin_edit_hook_with_http_info: #{e}"
|
1357
|
+
end
|
1358
|
+
```
|
1359
|
+
|
1360
|
+
### Parameters
|
1361
|
+
|
1362
|
+
| Name | Type | Description | Notes |
|
1363
|
+
| ---- | ---- | ----------- | ----- |
|
1364
|
+
| **id** | **Integer** | id of the hook to update | |
|
1365
|
+
| **body** | [**EditHookOption**](EditHookOption.md) | | [optional] |
|
1366
|
+
|
1367
|
+
### Return type
|
1368
|
+
|
1369
|
+
[**Hook**](Hook.md)
|
1370
|
+
|
1371
|
+
### Authorization
|
1372
|
+
|
1373
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1374
|
+
|
1375
|
+
### HTTP request headers
|
1376
|
+
|
1377
|
+
- **Content-Type**: application/json
|
1378
|
+
- **Accept**: application/json
|
1379
|
+
|
1380
|
+
|
1381
|
+
## admin_edit_quota_rule
|
1382
|
+
|
1383
|
+
> <QuotaRuleInfo> admin_edit_quota_rule(quotarule, rule)
|
1384
|
+
|
1385
|
+
Change an existing quota rule
|
1386
|
+
|
1387
|
+
### Examples
|
1388
|
+
|
1389
|
+
```ruby
|
1390
|
+
require 'time'
|
1391
|
+
require 'forgejo'
|
1392
|
+
# setup authorization
|
1393
|
+
Forgejo.configure do |config|
|
1394
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1395
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1396
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1397
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1398
|
+
end
|
1399
|
+
|
1400
|
+
api_instance = Forgejo::AdminApi.new
|
1401
|
+
quotarule = 'quotarule_example' # String | Quota rule to change
|
1402
|
+
rule = Forgejo::EditQuotaRuleOptions.new # EditQuotaRuleOptions |
|
1403
|
+
|
1404
|
+
begin
|
1405
|
+
# Change an existing quota rule
|
1406
|
+
result = api_instance.admin_edit_quota_rule(quotarule, rule)
|
1407
|
+
p result
|
1408
|
+
rescue Forgejo::ApiError => e
|
1409
|
+
puts "Error when calling AdminApi->admin_edit_quota_rule: #{e}"
|
1410
|
+
end
|
1411
|
+
```
|
1412
|
+
|
1413
|
+
#### Using the admin_edit_quota_rule_with_http_info variant
|
1414
|
+
|
1415
|
+
This returns an Array which contains the response data, status code and headers.
|
1416
|
+
|
1417
|
+
> <Array(<QuotaRuleInfo>, Integer, Hash)> admin_edit_quota_rule_with_http_info(quotarule, rule)
|
1418
|
+
|
1419
|
+
```ruby
|
1420
|
+
begin
|
1421
|
+
# Change an existing quota rule
|
1422
|
+
data, status_code, headers = api_instance.admin_edit_quota_rule_with_http_info(quotarule, rule)
|
1423
|
+
p status_code # => 2xx
|
1424
|
+
p headers # => { ... }
|
1425
|
+
p data # => <QuotaRuleInfo>
|
1426
|
+
rescue Forgejo::ApiError => e
|
1427
|
+
puts "Error when calling AdminApi->admin_edit_quota_rule_with_http_info: #{e}"
|
1428
|
+
end
|
1429
|
+
```
|
1430
|
+
|
1431
|
+
### Parameters
|
1432
|
+
|
1433
|
+
| Name | Type | Description | Notes |
|
1434
|
+
| ---- | ---- | ----------- | ----- |
|
1435
|
+
| **quotarule** | **String** | Quota rule to change | |
|
1436
|
+
| **rule** | [**EditQuotaRuleOptions**](EditQuotaRuleOptions.md) | | |
|
1437
|
+
|
1438
|
+
### Return type
|
1439
|
+
|
1440
|
+
[**QuotaRuleInfo**](QuotaRuleInfo.md)
|
1441
|
+
|
1442
|
+
### Authorization
|
1443
|
+
|
1444
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1445
|
+
|
1446
|
+
### HTTP request headers
|
1447
|
+
|
1448
|
+
- **Content-Type**: application/json, text/plain
|
1449
|
+
- **Accept**: application/json
|
1450
|
+
|
1451
|
+
|
1452
|
+
## admin_edit_user
|
1453
|
+
|
1454
|
+
> <User> admin_edit_user(username, opts)
|
1455
|
+
|
1456
|
+
Edit an existing user
|
1457
|
+
|
1458
|
+
### Examples
|
1459
|
+
|
1460
|
+
```ruby
|
1461
|
+
require 'time'
|
1462
|
+
require 'forgejo'
|
1463
|
+
# setup authorization
|
1464
|
+
Forgejo.configure do |config|
|
1465
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1466
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1467
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1468
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1469
|
+
end
|
1470
|
+
|
1471
|
+
api_instance = Forgejo::AdminApi.new
|
1472
|
+
username = 'username_example' # String | username of user to edit
|
1473
|
+
opts = {
|
1474
|
+
body: Forgejo::EditUserOption.new # EditUserOption |
|
1475
|
+
}
|
1476
|
+
|
1477
|
+
begin
|
1478
|
+
# Edit an existing user
|
1479
|
+
result = api_instance.admin_edit_user(username, opts)
|
1480
|
+
p result
|
1481
|
+
rescue Forgejo::ApiError => e
|
1482
|
+
puts "Error when calling AdminApi->admin_edit_user: #{e}"
|
1483
|
+
end
|
1484
|
+
```
|
1485
|
+
|
1486
|
+
#### Using the admin_edit_user_with_http_info variant
|
1487
|
+
|
1488
|
+
This returns an Array which contains the response data, status code and headers.
|
1489
|
+
|
1490
|
+
> <Array(<User>, Integer, Hash)> admin_edit_user_with_http_info(username, opts)
|
1491
|
+
|
1492
|
+
```ruby
|
1493
|
+
begin
|
1494
|
+
# Edit an existing user
|
1495
|
+
data, status_code, headers = api_instance.admin_edit_user_with_http_info(username, opts)
|
1496
|
+
p status_code # => 2xx
|
1497
|
+
p headers # => { ... }
|
1498
|
+
p data # => <User>
|
1499
|
+
rescue Forgejo::ApiError => e
|
1500
|
+
puts "Error when calling AdminApi->admin_edit_user_with_http_info: #{e}"
|
1501
|
+
end
|
1502
|
+
```
|
1503
|
+
|
1504
|
+
### Parameters
|
1505
|
+
|
1506
|
+
| Name | Type | Description | Notes |
|
1507
|
+
| ---- | ---- | ----------- | ----- |
|
1508
|
+
| **username** | **String** | username of user to edit | |
|
1509
|
+
| **body** | [**EditUserOption**](EditUserOption.md) | | [optional] |
|
1510
|
+
|
1511
|
+
### Return type
|
1512
|
+
|
1513
|
+
[**User**](User.md)
|
1514
|
+
|
1515
|
+
### Authorization
|
1516
|
+
|
1517
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1518
|
+
|
1519
|
+
### HTTP request headers
|
1520
|
+
|
1521
|
+
- **Content-Type**: application/json
|
1522
|
+
- **Accept**: application/json
|
1523
|
+
|
1524
|
+
|
1525
|
+
## admin_get_all_emails
|
1526
|
+
|
1527
|
+
> <Array<Email>> admin_get_all_emails(opts)
|
1528
|
+
|
1529
|
+
List all emails
|
1530
|
+
|
1531
|
+
### Examples
|
1532
|
+
|
1533
|
+
```ruby
|
1534
|
+
require 'time'
|
1535
|
+
require 'forgejo'
|
1536
|
+
# setup authorization
|
1537
|
+
Forgejo.configure do |config|
|
1538
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1539
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1540
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1541
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1542
|
+
end
|
1543
|
+
|
1544
|
+
api_instance = Forgejo::AdminApi.new
|
1545
|
+
opts = {
|
1546
|
+
page: 56, # Integer | page number of results to return (1-based)
|
1547
|
+
limit: 56 # Integer | page size of results
|
1548
|
+
}
|
1549
|
+
|
1550
|
+
begin
|
1551
|
+
# List all emails
|
1552
|
+
result = api_instance.admin_get_all_emails(opts)
|
1553
|
+
p result
|
1554
|
+
rescue Forgejo::ApiError => e
|
1555
|
+
puts "Error when calling AdminApi->admin_get_all_emails: #{e}"
|
1556
|
+
end
|
1557
|
+
```
|
1558
|
+
|
1559
|
+
#### Using the admin_get_all_emails_with_http_info variant
|
1560
|
+
|
1561
|
+
This returns an Array which contains the response data, status code and headers.
|
1562
|
+
|
1563
|
+
> <Array(<Array<Email>>, Integer, Hash)> admin_get_all_emails_with_http_info(opts)
|
1564
|
+
|
1565
|
+
```ruby
|
1566
|
+
begin
|
1567
|
+
# List all emails
|
1568
|
+
data, status_code, headers = api_instance.admin_get_all_emails_with_http_info(opts)
|
1569
|
+
p status_code # => 2xx
|
1570
|
+
p headers # => { ... }
|
1571
|
+
p data # => <Array<Email>>
|
1572
|
+
rescue Forgejo::ApiError => e
|
1573
|
+
puts "Error when calling AdminApi->admin_get_all_emails_with_http_info: #{e}"
|
1574
|
+
end
|
1575
|
+
```
|
1576
|
+
|
1577
|
+
### Parameters
|
1578
|
+
|
1579
|
+
| Name | Type | Description | Notes |
|
1580
|
+
| ---- | ---- | ----------- | ----- |
|
1581
|
+
| **page** | **Integer** | page number of results to return (1-based) | [optional] |
|
1582
|
+
| **limit** | **Integer** | page size of results | [optional] |
|
1583
|
+
|
1584
|
+
### Return type
|
1585
|
+
|
1586
|
+
[**Array<Email>**](Email.md)
|
1587
|
+
|
1588
|
+
### Authorization
|
1589
|
+
|
1590
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1591
|
+
|
1592
|
+
### HTTP request headers
|
1593
|
+
|
1594
|
+
- **Content-Type**: Not defined
|
1595
|
+
- **Accept**: application/json
|
1596
|
+
|
1597
|
+
|
1598
|
+
## admin_get_all_orgs
|
1599
|
+
|
1600
|
+
> <Array<Organization>> admin_get_all_orgs(opts)
|
1601
|
+
|
1602
|
+
List all organizations
|
1603
|
+
|
1604
|
+
### Examples
|
1605
|
+
|
1606
|
+
```ruby
|
1607
|
+
require 'time'
|
1608
|
+
require 'forgejo'
|
1609
|
+
# setup authorization
|
1610
|
+
Forgejo.configure do |config|
|
1611
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1612
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1613
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1614
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1615
|
+
end
|
1616
|
+
|
1617
|
+
api_instance = Forgejo::AdminApi.new
|
1618
|
+
opts = {
|
1619
|
+
page: 56, # Integer | page number of results to return (1-based)
|
1620
|
+
limit: 56 # Integer | page size of results
|
1621
|
+
}
|
1622
|
+
|
1623
|
+
begin
|
1624
|
+
# List all organizations
|
1625
|
+
result = api_instance.admin_get_all_orgs(opts)
|
1626
|
+
p result
|
1627
|
+
rescue Forgejo::ApiError => e
|
1628
|
+
puts "Error when calling AdminApi->admin_get_all_orgs: #{e}"
|
1629
|
+
end
|
1630
|
+
```
|
1631
|
+
|
1632
|
+
#### Using the admin_get_all_orgs_with_http_info variant
|
1633
|
+
|
1634
|
+
This returns an Array which contains the response data, status code and headers.
|
1635
|
+
|
1636
|
+
> <Array(<Array<Organization>>, Integer, Hash)> admin_get_all_orgs_with_http_info(opts)
|
1637
|
+
|
1638
|
+
```ruby
|
1639
|
+
begin
|
1640
|
+
# List all organizations
|
1641
|
+
data, status_code, headers = api_instance.admin_get_all_orgs_with_http_info(opts)
|
1642
|
+
p status_code # => 2xx
|
1643
|
+
p headers # => { ... }
|
1644
|
+
p data # => <Array<Organization>>
|
1645
|
+
rescue Forgejo::ApiError => e
|
1646
|
+
puts "Error when calling AdminApi->admin_get_all_orgs_with_http_info: #{e}"
|
1647
|
+
end
|
1648
|
+
```
|
1649
|
+
|
1650
|
+
### Parameters
|
1651
|
+
|
1652
|
+
| Name | Type | Description | Notes |
|
1653
|
+
| ---- | ---- | ----------- | ----- |
|
1654
|
+
| **page** | **Integer** | page number of results to return (1-based) | [optional] |
|
1655
|
+
| **limit** | **Integer** | page size of results | [optional] |
|
1656
|
+
|
1657
|
+
### Return type
|
1658
|
+
|
1659
|
+
[**Array<Organization>**](Organization.md)
|
1660
|
+
|
1661
|
+
### Authorization
|
1662
|
+
|
1663
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1664
|
+
|
1665
|
+
### HTTP request headers
|
1666
|
+
|
1667
|
+
- **Content-Type**: Not defined
|
1668
|
+
- **Accept**: application/json
|
1669
|
+
|
1670
|
+
|
1671
|
+
## admin_get_hook
|
1672
|
+
|
1673
|
+
> <Hook> admin_get_hook(id)
|
1674
|
+
|
1675
|
+
Get a hook
|
1676
|
+
|
1677
|
+
### Examples
|
1678
|
+
|
1679
|
+
```ruby
|
1680
|
+
require 'time'
|
1681
|
+
require 'forgejo'
|
1682
|
+
# setup authorization
|
1683
|
+
Forgejo.configure do |config|
|
1684
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1685
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1686
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1687
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1688
|
+
end
|
1689
|
+
|
1690
|
+
api_instance = Forgejo::AdminApi.new
|
1691
|
+
id = 789 # Integer | id of the hook to get
|
1692
|
+
|
1693
|
+
begin
|
1694
|
+
# Get a hook
|
1695
|
+
result = api_instance.admin_get_hook(id)
|
1696
|
+
p result
|
1697
|
+
rescue Forgejo::ApiError => e
|
1698
|
+
puts "Error when calling AdminApi->admin_get_hook: #{e}"
|
1699
|
+
end
|
1700
|
+
```
|
1701
|
+
|
1702
|
+
#### Using the admin_get_hook_with_http_info variant
|
1703
|
+
|
1704
|
+
This returns an Array which contains the response data, status code and headers.
|
1705
|
+
|
1706
|
+
> <Array(<Hook>, Integer, Hash)> admin_get_hook_with_http_info(id)
|
1707
|
+
|
1708
|
+
```ruby
|
1709
|
+
begin
|
1710
|
+
# Get a hook
|
1711
|
+
data, status_code, headers = api_instance.admin_get_hook_with_http_info(id)
|
1712
|
+
p status_code # => 2xx
|
1713
|
+
p headers # => { ... }
|
1714
|
+
p data # => <Hook>
|
1715
|
+
rescue Forgejo::ApiError => e
|
1716
|
+
puts "Error when calling AdminApi->admin_get_hook_with_http_info: #{e}"
|
1717
|
+
end
|
1718
|
+
```
|
1719
|
+
|
1720
|
+
### Parameters
|
1721
|
+
|
1722
|
+
| Name | Type | Description | Notes |
|
1723
|
+
| ---- | ---- | ----------- | ----- |
|
1724
|
+
| **id** | **Integer** | id of the hook to get | |
|
1725
|
+
|
1726
|
+
### Return type
|
1727
|
+
|
1728
|
+
[**Hook**](Hook.md)
|
1729
|
+
|
1730
|
+
### Authorization
|
1731
|
+
|
1732
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1733
|
+
|
1734
|
+
### HTTP request headers
|
1735
|
+
|
1736
|
+
- **Content-Type**: Not defined
|
1737
|
+
- **Accept**: application/json
|
1738
|
+
|
1739
|
+
|
1740
|
+
## admin_get_quota_group
|
1741
|
+
|
1742
|
+
> <QuotaGroup> admin_get_quota_group(quotagroup)
|
1743
|
+
|
1744
|
+
Get information about the quota group
|
1745
|
+
|
1746
|
+
### Examples
|
1747
|
+
|
1748
|
+
```ruby
|
1749
|
+
require 'time'
|
1750
|
+
require 'forgejo'
|
1751
|
+
# setup authorization
|
1752
|
+
Forgejo.configure do |config|
|
1753
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1754
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1755
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1756
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1757
|
+
end
|
1758
|
+
|
1759
|
+
api_instance = Forgejo::AdminApi.new
|
1760
|
+
quotagroup = 'quotagroup_example' # String | quota group to query
|
1761
|
+
|
1762
|
+
begin
|
1763
|
+
# Get information about the quota group
|
1764
|
+
result = api_instance.admin_get_quota_group(quotagroup)
|
1765
|
+
p result
|
1766
|
+
rescue Forgejo::ApiError => e
|
1767
|
+
puts "Error when calling AdminApi->admin_get_quota_group: #{e}"
|
1768
|
+
end
|
1769
|
+
```
|
1770
|
+
|
1771
|
+
#### Using the admin_get_quota_group_with_http_info variant
|
1772
|
+
|
1773
|
+
This returns an Array which contains the response data, status code and headers.
|
1774
|
+
|
1775
|
+
> <Array(<QuotaGroup>, Integer, Hash)> admin_get_quota_group_with_http_info(quotagroup)
|
1776
|
+
|
1777
|
+
```ruby
|
1778
|
+
begin
|
1779
|
+
# Get information about the quota group
|
1780
|
+
data, status_code, headers = api_instance.admin_get_quota_group_with_http_info(quotagroup)
|
1781
|
+
p status_code # => 2xx
|
1782
|
+
p headers # => { ... }
|
1783
|
+
p data # => <QuotaGroup>
|
1784
|
+
rescue Forgejo::ApiError => e
|
1785
|
+
puts "Error when calling AdminApi->admin_get_quota_group_with_http_info: #{e}"
|
1786
|
+
end
|
1787
|
+
```
|
1788
|
+
|
1789
|
+
### Parameters
|
1790
|
+
|
1791
|
+
| Name | Type | Description | Notes |
|
1792
|
+
| ---- | ---- | ----------- | ----- |
|
1793
|
+
| **quotagroup** | **String** | quota group to query | |
|
1794
|
+
|
1795
|
+
### Return type
|
1796
|
+
|
1797
|
+
[**QuotaGroup**](QuotaGroup.md)
|
1798
|
+
|
1799
|
+
### Authorization
|
1800
|
+
|
1801
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1802
|
+
|
1803
|
+
### HTTP request headers
|
1804
|
+
|
1805
|
+
- **Content-Type**: Not defined
|
1806
|
+
- **Accept**: application/json
|
1807
|
+
|
1808
|
+
|
1809
|
+
## admin_get_quota_rule
|
1810
|
+
|
1811
|
+
> <QuotaRuleInfo> admin_get_quota_rule(quotarule)
|
1812
|
+
|
1813
|
+
Get information about a quota rule
|
1814
|
+
|
1815
|
+
### Examples
|
1816
|
+
|
1817
|
+
```ruby
|
1818
|
+
require 'time'
|
1819
|
+
require 'forgejo'
|
1820
|
+
# setup authorization
|
1821
|
+
Forgejo.configure do |config|
|
1822
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1823
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1824
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1825
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1826
|
+
end
|
1827
|
+
|
1828
|
+
api_instance = Forgejo::AdminApi.new
|
1829
|
+
quotarule = 'quotarule_example' # String | quota rule to query
|
1830
|
+
|
1831
|
+
begin
|
1832
|
+
# Get information about a quota rule
|
1833
|
+
result = api_instance.admin_get_quota_rule(quotarule)
|
1834
|
+
p result
|
1835
|
+
rescue Forgejo::ApiError => e
|
1836
|
+
puts "Error when calling AdminApi->admin_get_quota_rule: #{e}"
|
1837
|
+
end
|
1838
|
+
```
|
1839
|
+
|
1840
|
+
#### Using the admin_get_quota_rule_with_http_info variant
|
1841
|
+
|
1842
|
+
This returns an Array which contains the response data, status code and headers.
|
772
1843
|
|
773
|
-
> <Array(
|
1844
|
+
> <Array(<QuotaRuleInfo>, Integer, Hash)> admin_get_quota_rule_with_http_info(quotarule)
|
774
1845
|
|
775
1846
|
```ruby
|
776
1847
|
begin
|
777
|
-
#
|
778
|
-
data, status_code, headers = api_instance.
|
1848
|
+
# Get information about a quota rule
|
1849
|
+
data, status_code, headers = api_instance.admin_get_quota_rule_with_http_info(quotarule)
|
779
1850
|
p status_code # => 2xx
|
780
1851
|
p headers # => { ... }
|
781
|
-
p data # =>
|
1852
|
+
p data # => <QuotaRuleInfo>
|
782
1853
|
rescue Forgejo::ApiError => e
|
783
|
-
puts "Error when calling AdminApi->
|
1854
|
+
puts "Error when calling AdminApi->admin_get_quota_rule_with_http_info: #{e}"
|
784
1855
|
end
|
785
1856
|
```
|
786
1857
|
|
@@ -788,12 +1859,11 @@ end
|
|
788
1859
|
|
789
1860
|
| Name | Type | Description | Notes |
|
790
1861
|
| ---- | ---- | ----------- | ----- |
|
791
|
-
| **
|
792
|
-
| **purge** | **Boolean** | purge the user from the system completely | [optional] |
|
1862
|
+
| **quotarule** | **String** | quota rule to query | |
|
793
1863
|
|
794
1864
|
### Return type
|
795
1865
|
|
796
|
-
|
1866
|
+
[**QuotaRuleInfo**](QuotaRuleInfo.md)
|
797
1867
|
|
798
1868
|
### Authorization
|
799
1869
|
|
@@ -802,14 +1872,14 @@ nil (empty response body)
|
|
802
1872
|
### HTTP request headers
|
803
1873
|
|
804
1874
|
- **Content-Type**: Not defined
|
805
|
-
- **Accept**:
|
1875
|
+
- **Accept**: application/json
|
806
1876
|
|
807
1877
|
|
808
|
-
##
|
1878
|
+
## admin_get_runner_registration_token
|
809
1879
|
|
810
|
-
>
|
1880
|
+
> admin_get_runner_registration_token
|
811
1881
|
|
812
|
-
|
1882
|
+
Get an global actions runner registration token
|
813
1883
|
|
814
1884
|
### Examples
|
815
1885
|
|
@@ -825,41 +1895,36 @@ Forgejo.configure do |config|
|
|
825
1895
|
end
|
826
1896
|
|
827
1897
|
api_instance = Forgejo::AdminApi.new
|
828
|
-
username = 'username_example' # String | username of user
|
829
|
-
id = 789 # Integer | id of the key to delete
|
830
1898
|
|
831
1899
|
begin
|
832
|
-
#
|
833
|
-
api_instance.
|
1900
|
+
# Get an global actions runner registration token
|
1901
|
+
api_instance.admin_get_runner_registration_token
|
834
1902
|
rescue Forgejo::ApiError => e
|
835
|
-
puts "Error when calling AdminApi->
|
1903
|
+
puts "Error when calling AdminApi->admin_get_runner_registration_token: #{e}"
|
836
1904
|
end
|
837
1905
|
```
|
838
1906
|
|
839
|
-
#### Using the
|
1907
|
+
#### Using the admin_get_runner_registration_token_with_http_info variant
|
840
1908
|
|
841
1909
|
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
842
1910
|
|
843
|
-
> <Array(nil, Integer, Hash)>
|
1911
|
+
> <Array(nil, Integer, Hash)> admin_get_runner_registration_token_with_http_info
|
844
1912
|
|
845
1913
|
```ruby
|
846
1914
|
begin
|
847
|
-
#
|
848
|
-
data, status_code, headers = api_instance.
|
1915
|
+
# Get an global actions runner registration token
|
1916
|
+
data, status_code, headers = api_instance.admin_get_runner_registration_token_with_http_info
|
849
1917
|
p status_code # => 2xx
|
850
1918
|
p headers # => { ... }
|
851
1919
|
p data # => nil
|
852
1920
|
rescue Forgejo::ApiError => e
|
853
|
-
puts "Error when calling AdminApi->
|
1921
|
+
puts "Error when calling AdminApi->admin_get_runner_registration_token_with_http_info: #{e}"
|
854
1922
|
end
|
855
1923
|
```
|
856
1924
|
|
857
1925
|
### Parameters
|
858
1926
|
|
859
|
-
|
860
|
-
| ---- | ---- | ----------- | ----- |
|
861
|
-
| **username** | **String** | username of user | |
|
862
|
-
| **id** | **Integer** | id of the key to delete | |
|
1927
|
+
This endpoint does not need any parameter.
|
863
1928
|
|
864
1929
|
### Return type
|
865
1930
|
|
@@ -875,11 +1940,11 @@ nil (empty response body)
|
|
875
1940
|
- **Accept**: Not defined
|
876
1941
|
|
877
1942
|
|
878
|
-
##
|
1943
|
+
## admin_get_user_quota
|
879
1944
|
|
880
|
-
> <
|
1945
|
+
> <QuotaInfo> admin_get_user_quota(username)
|
881
1946
|
|
882
|
-
|
1947
|
+
Get the user's quota info
|
883
1948
|
|
884
1949
|
### Examples
|
885
1950
|
|
@@ -895,35 +1960,32 @@ Forgejo.configure do |config|
|
|
895
1960
|
end
|
896
1961
|
|
897
1962
|
api_instance = Forgejo::AdminApi.new
|
898
|
-
|
899
|
-
opts = {
|
900
|
-
body: Forgejo::EditHookOption.new # EditHookOption |
|
901
|
-
}
|
1963
|
+
username = 'username_example' # String | username of user to query
|
902
1964
|
|
903
1965
|
begin
|
904
|
-
#
|
905
|
-
result = api_instance.
|
1966
|
+
# Get the user's quota info
|
1967
|
+
result = api_instance.admin_get_user_quota(username)
|
906
1968
|
p result
|
907
1969
|
rescue Forgejo::ApiError => e
|
908
|
-
puts "Error when calling AdminApi->
|
1970
|
+
puts "Error when calling AdminApi->admin_get_user_quota: #{e}"
|
909
1971
|
end
|
910
1972
|
```
|
911
1973
|
|
912
|
-
#### Using the
|
1974
|
+
#### Using the admin_get_user_quota_with_http_info variant
|
913
1975
|
|
914
1976
|
This returns an Array which contains the response data, status code and headers.
|
915
1977
|
|
916
|
-
> <Array(<
|
1978
|
+
> <Array(<QuotaInfo>, Integer, Hash)> admin_get_user_quota_with_http_info(username)
|
917
1979
|
|
918
1980
|
```ruby
|
919
1981
|
begin
|
920
|
-
#
|
921
|
-
data, status_code, headers = api_instance.
|
1982
|
+
# Get the user's quota info
|
1983
|
+
data, status_code, headers = api_instance.admin_get_user_quota_with_http_info(username)
|
922
1984
|
p status_code # => 2xx
|
923
1985
|
p headers # => { ... }
|
924
|
-
p data # => <
|
1986
|
+
p data # => <QuotaInfo>
|
925
1987
|
rescue Forgejo::ApiError => e
|
926
|
-
puts "Error when calling AdminApi->
|
1988
|
+
puts "Error when calling AdminApi->admin_get_user_quota_with_http_info: #{e}"
|
927
1989
|
end
|
928
1990
|
```
|
929
1991
|
|
@@ -931,12 +1993,11 @@ end
|
|
931
1993
|
|
932
1994
|
| Name | Type | Description | Notes |
|
933
1995
|
| ---- | ---- | ----------- | ----- |
|
934
|
-
| **
|
935
|
-
| **body** | [**EditHookOption**](EditHookOption.md) | | [optional] |
|
1996
|
+
| **username** | **String** | username of user to query | |
|
936
1997
|
|
937
1998
|
### Return type
|
938
1999
|
|
939
|
-
[**
|
2000
|
+
[**QuotaInfo**](QuotaInfo.md)
|
940
2001
|
|
941
2002
|
### Authorization
|
942
2003
|
|
@@ -944,15 +2005,15 @@ end
|
|
944
2005
|
|
945
2006
|
### HTTP request headers
|
946
2007
|
|
947
|
-
- **Content-Type**:
|
2008
|
+
- **Content-Type**: Not defined
|
948
2009
|
- **Accept**: application/json
|
949
2010
|
|
950
2011
|
|
951
|
-
##
|
2012
|
+
## admin_list_hooks
|
952
2013
|
|
953
|
-
> <
|
2014
|
+
> <Array<Hook>> admin_list_hooks(opts)
|
954
2015
|
|
955
|
-
|
2016
|
+
List system's webhooks
|
956
2017
|
|
957
2018
|
### Examples
|
958
2019
|
|
@@ -968,35 +2029,35 @@ Forgejo.configure do |config|
|
|
968
2029
|
end
|
969
2030
|
|
970
2031
|
api_instance = Forgejo::AdminApi.new
|
971
|
-
username = 'username_example' # String | username of user to edit
|
972
2032
|
opts = {
|
973
|
-
|
2033
|
+
page: 56, # Integer | page number of results to return (1-based)
|
2034
|
+
limit: 56 # Integer | page size of results
|
974
2035
|
}
|
975
2036
|
|
976
2037
|
begin
|
977
|
-
#
|
978
|
-
result = api_instance.
|
2038
|
+
# List system's webhooks
|
2039
|
+
result = api_instance.admin_list_hooks(opts)
|
979
2040
|
p result
|
980
2041
|
rescue Forgejo::ApiError => e
|
981
|
-
puts "Error when calling AdminApi->
|
2042
|
+
puts "Error when calling AdminApi->admin_list_hooks: #{e}"
|
982
2043
|
end
|
983
2044
|
```
|
984
2045
|
|
985
|
-
#### Using the
|
2046
|
+
#### Using the admin_list_hooks_with_http_info variant
|
986
2047
|
|
987
2048
|
This returns an Array which contains the response data, status code and headers.
|
988
2049
|
|
989
|
-
> <Array(<
|
2050
|
+
> <Array(<Array<Hook>>, Integer, Hash)> admin_list_hooks_with_http_info(opts)
|
990
2051
|
|
991
2052
|
```ruby
|
992
2053
|
begin
|
993
|
-
#
|
994
|
-
data, status_code, headers = api_instance.
|
2054
|
+
# List system's webhooks
|
2055
|
+
data, status_code, headers = api_instance.admin_list_hooks_with_http_info(opts)
|
995
2056
|
p status_code # => 2xx
|
996
2057
|
p headers # => { ... }
|
997
|
-
p data # => <
|
2058
|
+
p data # => <Array<Hook>>
|
998
2059
|
rescue Forgejo::ApiError => e
|
999
|
-
puts "Error when calling AdminApi->
|
2060
|
+
puts "Error when calling AdminApi->admin_list_hooks_with_http_info: #{e}"
|
1000
2061
|
end
|
1001
2062
|
```
|
1002
2063
|
|
@@ -1004,12 +2065,12 @@ end
|
|
1004
2065
|
|
1005
2066
|
| Name | Type | Description | Notes |
|
1006
2067
|
| ---- | ---- | ----------- | ----- |
|
1007
|
-
| **
|
1008
|
-
| **
|
2068
|
+
| **page** | **Integer** | page number of results to return (1-based) | [optional] |
|
2069
|
+
| **limit** | **Integer** | page size of results | [optional] |
|
1009
2070
|
|
1010
2071
|
### Return type
|
1011
2072
|
|
1012
|
-
[**
|
2073
|
+
[**Array<Hook>**](Hook.md)
|
1013
2074
|
|
1014
2075
|
### Authorization
|
1015
2076
|
|
@@ -1017,15 +2078,15 @@ end
|
|
1017
2078
|
|
1018
2079
|
### HTTP request headers
|
1019
2080
|
|
1020
|
-
- **Content-Type**:
|
2081
|
+
- **Content-Type**: Not defined
|
1021
2082
|
- **Accept**: application/json
|
1022
2083
|
|
1023
2084
|
|
1024
|
-
##
|
2085
|
+
## admin_list_quota_groups
|
1025
2086
|
|
1026
|
-
> <Array<
|
2087
|
+
> <Array<QuotaGroup>> admin_list_quota_groups
|
1027
2088
|
|
1028
|
-
List
|
2089
|
+
List the available quota groups
|
1029
2090
|
|
1030
2091
|
### Examples
|
1031
2092
|
|
@@ -1041,48 +2102,41 @@ Forgejo.configure do |config|
|
|
1041
2102
|
end
|
1042
2103
|
|
1043
2104
|
api_instance = Forgejo::AdminApi.new
|
1044
|
-
opts = {
|
1045
|
-
page: 56, # Integer | page number of results to return (1-based)
|
1046
|
-
limit: 56 # Integer | page size of results
|
1047
|
-
}
|
1048
2105
|
|
1049
2106
|
begin
|
1050
|
-
# List
|
1051
|
-
result = api_instance.
|
2107
|
+
# List the available quota groups
|
2108
|
+
result = api_instance.admin_list_quota_groups
|
1052
2109
|
p result
|
1053
2110
|
rescue Forgejo::ApiError => e
|
1054
|
-
puts "Error when calling AdminApi->
|
2111
|
+
puts "Error when calling AdminApi->admin_list_quota_groups: #{e}"
|
1055
2112
|
end
|
1056
2113
|
```
|
1057
2114
|
|
1058
|
-
#### Using the
|
2115
|
+
#### Using the admin_list_quota_groups_with_http_info variant
|
1059
2116
|
|
1060
2117
|
This returns an Array which contains the response data, status code and headers.
|
1061
2118
|
|
1062
|
-
> <Array(<Array<
|
2119
|
+
> <Array(<Array<QuotaGroup>>, Integer, Hash)> admin_list_quota_groups_with_http_info
|
1063
2120
|
|
1064
2121
|
```ruby
|
1065
2122
|
begin
|
1066
|
-
# List
|
1067
|
-
data, status_code, headers = api_instance.
|
2123
|
+
# List the available quota groups
|
2124
|
+
data, status_code, headers = api_instance.admin_list_quota_groups_with_http_info
|
1068
2125
|
p status_code # => 2xx
|
1069
2126
|
p headers # => { ... }
|
1070
|
-
p data # => <Array<
|
2127
|
+
p data # => <Array<QuotaGroup>>
|
1071
2128
|
rescue Forgejo::ApiError => e
|
1072
|
-
puts "Error when calling AdminApi->
|
2129
|
+
puts "Error when calling AdminApi->admin_list_quota_groups_with_http_info: #{e}"
|
1073
2130
|
end
|
1074
2131
|
```
|
1075
2132
|
|
1076
2133
|
### Parameters
|
1077
2134
|
|
1078
|
-
|
1079
|
-
| ---- | ---- | ----------- | ----- |
|
1080
|
-
| **page** | **Integer** | page number of results to return (1-based) | [optional] |
|
1081
|
-
| **limit** | **Integer** | page size of results | [optional] |
|
2135
|
+
This endpoint does not need any parameter.
|
1082
2136
|
|
1083
2137
|
### Return type
|
1084
2138
|
|
1085
|
-
[**Array<
|
2139
|
+
[**Array<QuotaGroup>**](QuotaGroup.md)
|
1086
2140
|
|
1087
2141
|
### Authorization
|
1088
2142
|
|
@@ -1094,11 +2148,11 @@ end
|
|
1094
2148
|
- **Accept**: application/json
|
1095
2149
|
|
1096
2150
|
|
1097
|
-
##
|
2151
|
+
## admin_list_quota_rules
|
1098
2152
|
|
1099
|
-
> <Array<
|
2153
|
+
> <Array<QuotaRuleInfo>> admin_list_quota_rules
|
1100
2154
|
|
1101
|
-
List
|
2155
|
+
List the available quota rules
|
1102
2156
|
|
1103
2157
|
### Examples
|
1104
2158
|
|
@@ -1114,48 +2168,41 @@ Forgejo.configure do |config|
|
|
1114
2168
|
end
|
1115
2169
|
|
1116
2170
|
api_instance = Forgejo::AdminApi.new
|
1117
|
-
opts = {
|
1118
|
-
page: 56, # Integer | page number of results to return (1-based)
|
1119
|
-
limit: 56 # Integer | page size of results
|
1120
|
-
}
|
1121
2171
|
|
1122
2172
|
begin
|
1123
|
-
# List
|
1124
|
-
result = api_instance.
|
2173
|
+
# List the available quota rules
|
2174
|
+
result = api_instance.admin_list_quota_rules
|
1125
2175
|
p result
|
1126
2176
|
rescue Forgejo::ApiError => e
|
1127
|
-
puts "Error when calling AdminApi->
|
2177
|
+
puts "Error when calling AdminApi->admin_list_quota_rules: #{e}"
|
1128
2178
|
end
|
1129
2179
|
```
|
1130
2180
|
|
1131
|
-
#### Using the
|
2181
|
+
#### Using the admin_list_quota_rules_with_http_info variant
|
1132
2182
|
|
1133
2183
|
This returns an Array which contains the response data, status code and headers.
|
1134
2184
|
|
1135
|
-
> <Array(<Array<
|
2185
|
+
> <Array(<Array<QuotaRuleInfo>>, Integer, Hash)> admin_list_quota_rules_with_http_info
|
1136
2186
|
|
1137
2187
|
```ruby
|
1138
2188
|
begin
|
1139
|
-
# List
|
1140
|
-
data, status_code, headers = api_instance.
|
2189
|
+
# List the available quota rules
|
2190
|
+
data, status_code, headers = api_instance.admin_list_quota_rules_with_http_info
|
1141
2191
|
p status_code # => 2xx
|
1142
2192
|
p headers # => { ... }
|
1143
|
-
p data # => <Array<
|
2193
|
+
p data # => <Array<QuotaRuleInfo>>
|
1144
2194
|
rescue Forgejo::ApiError => e
|
1145
|
-
puts "Error when calling AdminApi->
|
2195
|
+
puts "Error when calling AdminApi->admin_list_quota_rules_with_http_info: #{e}"
|
1146
2196
|
end
|
1147
2197
|
```
|
1148
2198
|
|
1149
2199
|
### Parameters
|
1150
2200
|
|
1151
|
-
|
1152
|
-
| ---- | ---- | ----------- | ----- |
|
1153
|
-
| **page** | **Integer** | page number of results to return (1-based) | [optional] |
|
1154
|
-
| **limit** | **Integer** | page size of results | [optional] |
|
2201
|
+
This endpoint does not need any parameter.
|
1155
2202
|
|
1156
2203
|
### Return type
|
1157
2204
|
|
1158
|
-
[**Array<
|
2205
|
+
[**Array<QuotaRuleInfo>**](QuotaRuleInfo.md)
|
1159
2206
|
|
1160
2207
|
### Authorization
|
1161
2208
|
|
@@ -1167,11 +2214,11 @@ end
|
|
1167
2214
|
- **Accept**: application/json
|
1168
2215
|
|
1169
2216
|
|
1170
|
-
##
|
2217
|
+
## admin_list_users_in_quota_group
|
1171
2218
|
|
1172
|
-
> <
|
2219
|
+
> <Array<User>> admin_list_users_in_quota_group(quotagroup)
|
1173
2220
|
|
1174
|
-
|
2221
|
+
List users in a quota group
|
1175
2222
|
|
1176
2223
|
### Examples
|
1177
2224
|
|
@@ -1187,32 +2234,32 @@ Forgejo.configure do |config|
|
|
1187
2234
|
end
|
1188
2235
|
|
1189
2236
|
api_instance = Forgejo::AdminApi.new
|
1190
|
-
|
2237
|
+
quotagroup = 'quotagroup_example' # String | quota group to list members of
|
1191
2238
|
|
1192
2239
|
begin
|
1193
|
-
#
|
1194
|
-
result = api_instance.
|
2240
|
+
# List users in a quota group
|
2241
|
+
result = api_instance.admin_list_users_in_quota_group(quotagroup)
|
1195
2242
|
p result
|
1196
2243
|
rescue Forgejo::ApiError => e
|
1197
|
-
puts "Error when calling AdminApi->
|
2244
|
+
puts "Error when calling AdminApi->admin_list_users_in_quota_group: #{e}"
|
1198
2245
|
end
|
1199
2246
|
```
|
1200
2247
|
|
1201
|
-
#### Using the
|
2248
|
+
#### Using the admin_list_users_in_quota_group_with_http_info variant
|
1202
2249
|
|
1203
2250
|
This returns an Array which contains the response data, status code and headers.
|
1204
2251
|
|
1205
|
-
> <Array(<
|
2252
|
+
> <Array(<Array<User>>, Integer, Hash)> admin_list_users_in_quota_group_with_http_info(quotagroup)
|
1206
2253
|
|
1207
2254
|
```ruby
|
1208
2255
|
begin
|
1209
|
-
#
|
1210
|
-
data, status_code, headers = api_instance.
|
2256
|
+
# List users in a quota group
|
2257
|
+
data, status_code, headers = api_instance.admin_list_users_in_quota_group_with_http_info(quotagroup)
|
1211
2258
|
p status_code # => 2xx
|
1212
2259
|
p headers # => { ... }
|
1213
|
-
p data # => <
|
2260
|
+
p data # => <Array<User>>
|
1214
2261
|
rescue Forgejo::ApiError => e
|
1215
|
-
puts "Error when calling AdminApi->
|
2262
|
+
puts "Error when calling AdminApi->admin_list_users_in_quota_group_with_http_info: #{e}"
|
1216
2263
|
end
|
1217
2264
|
```
|
1218
2265
|
|
@@ -1220,11 +2267,11 @@ end
|
|
1220
2267
|
|
1221
2268
|
| Name | Type | Description | Notes |
|
1222
2269
|
| ---- | ---- | ----------- | ----- |
|
1223
|
-
| **
|
2270
|
+
| **quotagroup** | **String** | quota group to list members of | |
|
1224
2271
|
|
1225
2272
|
### Return type
|
1226
2273
|
|
1227
|
-
[**
|
2274
|
+
[**Array<User>**](User.md)
|
1228
2275
|
|
1229
2276
|
### Authorization
|
1230
2277
|
|
@@ -1236,11 +2283,11 @@ end
|
|
1236
2283
|
- **Accept**: application/json
|
1237
2284
|
|
1238
2285
|
|
1239
|
-
##
|
2286
|
+
## admin_remove_rule_from_quota_group
|
1240
2287
|
|
1241
|
-
>
|
2288
|
+
> admin_remove_rule_from_quota_group(quotagroup, quotarule)
|
1242
2289
|
|
1243
|
-
|
2290
|
+
Removes a rule from a quota group
|
1244
2291
|
|
1245
2292
|
### Examples
|
1246
2293
|
|
@@ -1256,36 +2303,41 @@ Forgejo.configure do |config|
|
|
1256
2303
|
end
|
1257
2304
|
|
1258
2305
|
api_instance = Forgejo::AdminApi.new
|
2306
|
+
quotagroup = 'quotagroup_example' # String | quota group to remove a rule from
|
2307
|
+
quotarule = 'quotarule_example' # String | the name of the quota rule to remove from the group
|
1259
2308
|
|
1260
2309
|
begin
|
1261
|
-
#
|
1262
|
-
api_instance.
|
2310
|
+
# Removes a rule from a quota group
|
2311
|
+
api_instance.admin_remove_rule_from_quota_group(quotagroup, quotarule)
|
1263
2312
|
rescue Forgejo::ApiError => e
|
1264
|
-
puts "Error when calling AdminApi->
|
2313
|
+
puts "Error when calling AdminApi->admin_remove_rule_from_quota_group: #{e}"
|
1265
2314
|
end
|
1266
2315
|
```
|
1267
2316
|
|
1268
|
-
#### Using the
|
2317
|
+
#### Using the admin_remove_rule_from_quota_group_with_http_info variant
|
1269
2318
|
|
1270
2319
|
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1271
2320
|
|
1272
|
-
> <Array(nil, Integer, Hash)>
|
2321
|
+
> <Array(nil, Integer, Hash)> admin_remove_rule_from_quota_group_with_http_info(quotagroup, quotarule)
|
1273
2322
|
|
1274
2323
|
```ruby
|
1275
2324
|
begin
|
1276
|
-
#
|
1277
|
-
data, status_code, headers = api_instance.
|
2325
|
+
# Removes a rule from a quota group
|
2326
|
+
data, status_code, headers = api_instance.admin_remove_rule_from_quota_group_with_http_info(quotagroup, quotarule)
|
1278
2327
|
p status_code # => 2xx
|
1279
2328
|
p headers # => { ... }
|
1280
2329
|
p data # => nil
|
1281
2330
|
rescue Forgejo::ApiError => e
|
1282
|
-
puts "Error when calling AdminApi->
|
2331
|
+
puts "Error when calling AdminApi->admin_remove_rule_from_quota_group_with_http_info: #{e}"
|
1283
2332
|
end
|
1284
2333
|
```
|
1285
2334
|
|
1286
2335
|
### Parameters
|
1287
2336
|
|
1288
|
-
|
2337
|
+
| Name | Type | Description | Notes |
|
2338
|
+
| ---- | ---- | ----------- | ----- |
|
2339
|
+
| **quotagroup** | **String** | quota group to remove a rule from | |
|
2340
|
+
| **quotarule** | **String** | the name of the quota rule to remove from the group | |
|
1289
2341
|
|
1290
2342
|
### Return type
|
1291
2343
|
|
@@ -1298,14 +2350,14 @@ nil (empty response body)
|
|
1298
2350
|
### HTTP request headers
|
1299
2351
|
|
1300
2352
|
- **Content-Type**: Not defined
|
1301
|
-
- **Accept**:
|
2353
|
+
- **Accept**: application/json
|
1302
2354
|
|
1303
2355
|
|
1304
|
-
##
|
2356
|
+
## admin_remove_user_from_quota_group
|
1305
2357
|
|
1306
|
-
>
|
2358
|
+
> admin_remove_user_from_quota_group(quotagroup, username)
|
1307
2359
|
|
1308
|
-
|
2360
|
+
Remove a user from a quota group
|
1309
2361
|
|
1310
2362
|
### Examples
|
1311
2363
|
|
@@ -1321,35 +2373,32 @@ Forgejo.configure do |config|
|
|
1321
2373
|
end
|
1322
2374
|
|
1323
2375
|
api_instance = Forgejo::AdminApi.new
|
1324
|
-
|
1325
|
-
|
1326
|
-
limit: 56 # Integer | page size of results
|
1327
|
-
}
|
2376
|
+
quotagroup = 'quotagroup_example' # String | quota group to remove a user from
|
2377
|
+
username = 'username_example' # String | username of the user to remove from the quota group
|
1328
2378
|
|
1329
2379
|
begin
|
1330
|
-
#
|
1331
|
-
|
1332
|
-
p result
|
2380
|
+
# Remove a user from a quota group
|
2381
|
+
api_instance.admin_remove_user_from_quota_group(quotagroup, username)
|
1333
2382
|
rescue Forgejo::ApiError => e
|
1334
|
-
puts "Error when calling AdminApi->
|
2383
|
+
puts "Error when calling AdminApi->admin_remove_user_from_quota_group: #{e}"
|
1335
2384
|
end
|
1336
2385
|
```
|
1337
2386
|
|
1338
|
-
#### Using the
|
2387
|
+
#### Using the admin_remove_user_from_quota_group_with_http_info variant
|
1339
2388
|
|
1340
|
-
This returns an Array which contains the response data, status code and headers.
|
2389
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1341
2390
|
|
1342
|
-
> <Array(
|
2391
|
+
> <Array(nil, Integer, Hash)> admin_remove_user_from_quota_group_with_http_info(quotagroup, username)
|
1343
2392
|
|
1344
2393
|
```ruby
|
1345
2394
|
begin
|
1346
|
-
#
|
1347
|
-
data, status_code, headers = api_instance.
|
2395
|
+
# Remove a user from a quota group
|
2396
|
+
data, status_code, headers = api_instance.admin_remove_user_from_quota_group_with_http_info(quotagroup, username)
|
1348
2397
|
p status_code # => 2xx
|
1349
2398
|
p headers # => { ... }
|
1350
|
-
p data # =>
|
2399
|
+
p data # => nil
|
1351
2400
|
rescue Forgejo::ApiError => e
|
1352
|
-
puts "Error when calling AdminApi->
|
2401
|
+
puts "Error when calling AdminApi->admin_remove_user_from_quota_group_with_http_info: #{e}"
|
1353
2402
|
end
|
1354
2403
|
```
|
1355
2404
|
|
@@ -1357,12 +2406,12 @@ end
|
|
1357
2406
|
|
1358
2407
|
| Name | Type | Description | Notes |
|
1359
2408
|
| ---- | ---- | ----------- | ----- |
|
1360
|
-
| **
|
1361
|
-
| **
|
2409
|
+
| **quotagroup** | **String** | quota group to remove a user from | |
|
2410
|
+
| **username** | **String** | username of the user to remove from the quota group | |
|
1362
2411
|
|
1363
2412
|
### Return type
|
1364
2413
|
|
1365
|
-
|
2414
|
+
nil (empty response body)
|
1366
2415
|
|
1367
2416
|
### Authorization
|
1368
2417
|
|
@@ -1441,7 +2490,7 @@ nil (empty response body)
|
|
1441
2490
|
### HTTP request headers
|
1442
2491
|
|
1443
2492
|
- **Content-Type**: application/json, text/plain
|
1444
|
-
- **Accept**:
|
2493
|
+
- **Accept**: application/json
|
1445
2494
|
|
1446
2495
|
|
1447
2496
|
## admin_search_emails
|
@@ -1542,6 +2591,7 @@ api_instance = Forgejo::AdminApi.new
|
|
1542
2591
|
opts = {
|
1543
2592
|
source_id: 789, # Integer | ID of the user's login source to search for
|
1544
2593
|
login_name: 'login_name_example', # String | user's login name to search for
|
2594
|
+
sort: 'oldest', # String | sort order of results
|
1545
2595
|
page: 56, # Integer | page number of results to return (1-based)
|
1546
2596
|
limit: 56 # Integer | page size of results
|
1547
2597
|
}
|
@@ -1579,6 +2629,7 @@ end
|
|
1579
2629
|
| ---- | ---- | ----------- | ----- |
|
1580
2630
|
| **source_id** | **Integer** | ID of the user's login source to search for | [optional] |
|
1581
2631
|
| **login_name** | **String** | user's login name to search for | [optional] |
|
2632
|
+
| **sort** | **String** | sort order of results | [optional] |
|
1582
2633
|
| **page** | **Integer** | page number of results to return (1-based) | [optional] |
|
1583
2634
|
| **limit** | **Integer** | page size of results | [optional] |
|
1584
2635
|
|
@@ -1596,6 +2647,76 @@ end
|
|
1596
2647
|
- **Accept**: application/json
|
1597
2648
|
|
1598
2649
|
|
2650
|
+
## admin_set_user_quota_groups
|
2651
|
+
|
2652
|
+
> admin_set_user_quota_groups(username, groups)
|
2653
|
+
|
2654
|
+
Set the user's quota groups to a given list.
|
2655
|
+
|
2656
|
+
### Examples
|
2657
|
+
|
2658
|
+
```ruby
|
2659
|
+
require 'time'
|
2660
|
+
require 'forgejo'
|
2661
|
+
# setup authorization
|
2662
|
+
Forgejo.configure do |config|
|
2663
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
2664
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
2665
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
2666
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
2667
|
+
end
|
2668
|
+
|
2669
|
+
api_instance = Forgejo::AdminApi.new
|
2670
|
+
username = 'username_example' # String | username of the user to modify the quota groups from
|
2671
|
+
groups = Forgejo::SetUserQuotaGroupsOptions.new({groups: ['groups_example']}) # SetUserQuotaGroupsOptions | list of groups that the user should be a member of
|
2672
|
+
|
2673
|
+
begin
|
2674
|
+
# Set the user's quota groups to a given list.
|
2675
|
+
api_instance.admin_set_user_quota_groups(username, groups)
|
2676
|
+
rescue Forgejo::ApiError => e
|
2677
|
+
puts "Error when calling AdminApi->admin_set_user_quota_groups: #{e}"
|
2678
|
+
end
|
2679
|
+
```
|
2680
|
+
|
2681
|
+
#### Using the admin_set_user_quota_groups_with_http_info variant
|
2682
|
+
|
2683
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
2684
|
+
|
2685
|
+
> <Array(nil, Integer, Hash)> admin_set_user_quota_groups_with_http_info(username, groups)
|
2686
|
+
|
2687
|
+
```ruby
|
2688
|
+
begin
|
2689
|
+
# Set the user's quota groups to a given list.
|
2690
|
+
data, status_code, headers = api_instance.admin_set_user_quota_groups_with_http_info(username, groups)
|
2691
|
+
p status_code # => 2xx
|
2692
|
+
p headers # => { ... }
|
2693
|
+
p data # => nil
|
2694
|
+
rescue Forgejo::ApiError => e
|
2695
|
+
puts "Error when calling AdminApi->admin_set_user_quota_groups_with_http_info: #{e}"
|
2696
|
+
end
|
2697
|
+
```
|
2698
|
+
|
2699
|
+
### Parameters
|
2700
|
+
|
2701
|
+
| Name | Type | Description | Notes |
|
2702
|
+
| ---- | ---- | ----------- | ----- |
|
2703
|
+
| **username** | **String** | username of the user to modify the quota groups from | |
|
2704
|
+
| **groups** | [**SetUserQuotaGroupsOptions**](SetUserQuotaGroupsOptions.md) | list of groups that the user should be a member of | |
|
2705
|
+
|
2706
|
+
### Return type
|
2707
|
+
|
2708
|
+
nil (empty response body)
|
2709
|
+
|
2710
|
+
### Authorization
|
2711
|
+
|
2712
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
2713
|
+
|
2714
|
+
### HTTP request headers
|
2715
|
+
|
2716
|
+
- **Content-Type**: application/json, text/plain
|
2717
|
+
- **Accept**: application/json
|
2718
|
+
|
2719
|
+
|
1599
2720
|
## admin_unadopted_list
|
1600
2721
|
|
1601
2722
|
> Array<String> admin_unadopted_list(opts)
|