forgejo 0.1.0
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 +7 -0
- data/Gemfile +9 -0
- data/LICENSE +9 -0
- data/LICENSE~ +9 -0
- data/Makefile +23 -0
- data/Makefile~ +2 -0
- data/README.md +717 -0
- data/Rakefile +10 -0
- data/docs/APIError.md +20 -0
- data/docs/AccessToken.md +26 -0
- data/docs/ActionTask.md +42 -0
- data/docs/ActionTaskResponse.md +20 -0
- data/docs/ActionVariable.md +24 -0
- data/docs/Activity.md +42 -0
- data/docs/ActivityPub.md +18 -0
- data/docs/ActivitypubApi.md +289 -0
- data/docs/AddCollaboratorOption.md +18 -0
- data/docs/AddTimeOption.md +22 -0
- data/docs/AdminApi.md +1672 -0
- data/docs/AnnotatedTag.md +32 -0
- data/docs/AnnotatedTagObject.md +22 -0
- data/docs/Attachment.md +30 -0
- data/docs/BlockedUser.md +20 -0
- data/docs/Branch.md +34 -0
- data/docs/BranchProtection.md +70 -0
- data/docs/ChangeFileOperation.md +26 -0
- data/docs/ChangeFilesOptions.md +32 -0
- data/docs/ChangedFile.md +34 -0
- data/docs/CombinedStatus.md +30 -0
- data/docs/Comment.md +38 -0
- data/docs/Commit.md +36 -0
- data/docs/CommitAffectedFiles.md +20 -0
- data/docs/CommitDateOptions.md +20 -0
- data/docs/CommitMeta.md +22 -0
- data/docs/CommitStats.md +22 -0
- data/docs/CommitStatus.md +34 -0
- data/docs/CommitUser.md +22 -0
- data/docs/Compare.md +20 -0
- data/docs/ContentsResponse.md +46 -0
- data/docs/CreateAccessTokenOption.md +20 -0
- data/docs/CreateBranchProtectionOption.md +66 -0
- data/docs/CreateBranchRepoOption.md +22 -0
- data/docs/CreateEmailOption.md +18 -0
- data/docs/CreateFileOptions.md +32 -0
- data/docs/CreateForkOption.md +20 -0
- data/docs/CreateGPGKeyOption.md +20 -0
- data/docs/CreateHookOption.md +28 -0
- data/docs/CreateIssueCommentOption.md +20 -0
- data/docs/CreateIssueOption.md +34 -0
- data/docs/CreateKeyOption.md +22 -0
- data/docs/CreateLabelOption.md +26 -0
- data/docs/CreateMilestoneOption.md +24 -0
- data/docs/CreateOAuth2ApplicationOptions.md +22 -0
- data/docs/CreateOrUpdateSecretOption.md +18 -0
- data/docs/CreateOrgOption.md +32 -0
- data/docs/CreatePullRequestOption.md +34 -0
- data/docs/CreatePullReviewComment.md +24 -0
- data/docs/CreatePullReviewOptions.md +24 -0
- data/docs/CreatePushMirrorOption.md +26 -0
- data/docs/CreateReleaseOption.md +30 -0
- data/docs/CreateRepoOption.md +40 -0
- data/docs/CreateStatusOption.md +24 -0
- data/docs/CreateTagOption.md +22 -0
- data/docs/CreateTagProtectionOption.md +22 -0
- data/docs/CreateTeamOption.md +30 -0
- data/docs/CreateUserOption.md +38 -0
- data/docs/CreateVariableOption.md +18 -0
- data/docs/CreateWikiPageOptions.md +22 -0
- data/docs/Cron.md +26 -0
- data/docs/DeleteEmailOption.md +18 -0
- data/docs/DeleteFileOptions.md +32 -0
- data/docs/DeleteLabelsOption.md +18 -0
- data/docs/DeployKey.md +34 -0
- data/docs/DismissPullReviewOptions.md +20 -0
- data/docs/DispatchWorkflowOption.md +20 -0
- data/docs/EditAttachmentOptions.md +18 -0
- data/docs/EditBranchProtectionOption.md +62 -0
- data/docs/EditDeadlineOption.md +18 -0
- data/docs/EditGitHookOption.md +18 -0
- data/docs/EditHookOption.md +26 -0
- data/docs/EditIssueCommentOption.md +20 -0
- data/docs/EditIssueOption.md +36 -0
- data/docs/EditLabelOption.md +26 -0
- data/docs/EditMilestoneOption.md +24 -0
- data/docs/EditOrgOption.md +30 -0
- data/docs/EditPullRequestOption.md +38 -0
- data/docs/EditReactionOption.md +18 -0
- data/docs/EditReleaseOption.md +30 -0
- data/docs/EditRepoOption.md +82 -0
- data/docs/EditTagProtectionOption.md +22 -0
- data/docs/EditTeamOption.md +30 -0
- data/docs/EditUserOption.md +54 -0
- data/docs/Email.md +26 -0
- data/docs/ExternalTracker.md +24 -0
- data/docs/ExternalWiki.md +18 -0
- data/docs/FileCommitResponse.md +34 -0
- data/docs/FileDeleteResponse.md +22 -0
- data/docs/FileLinksResponse.md +22 -0
- data/docs/FileResponse.md +22 -0
- data/docs/FilesResponse.md +22 -0
- data/docs/GPGKey.md +42 -0
- data/docs/GPGKeyEmail.md +20 -0
- data/docs/GeneralAPISettings.md +24 -0
- data/docs/GeneralAttachmentSettings.md +24 -0
- data/docs/GeneralRepoSettings.md +30 -0
- data/docs/GeneralUISettings.md +22 -0
- data/docs/GenerateRepoOption.md +40 -0
- data/docs/GitBlobResponse.md +26 -0
- data/docs/GitEntry.md +28 -0
- data/docs/GitHook.md +22 -0
- data/docs/GitObject.md +22 -0
- data/docs/GitTreeResponse.md +28 -0
- data/docs/GitignoreTemplateInfo.md +20 -0
- data/docs/Hook.md +40 -0
- data/docs/Identity.md +20 -0
- data/docs/InternalTracker.md +22 -0
- data/docs/Issue.md +66 -0
- data/docs/IssueApi.md +5206 -0
- data/docs/IssueConfig.md +20 -0
- data/docs/IssueConfigContactLink.md +22 -0
- data/docs/IssueConfigValidation.md +20 -0
- data/docs/IssueDeadline.md +18 -0
- data/docs/IssueFormField.md +26 -0
- data/docs/IssueLabelsOption.md +20 -0
- data/docs/IssueMeta.md +22 -0
- data/docs/IssueTemplate.md +32 -0
- data/docs/Label.md +30 -0
- data/docs/LabelTemplate.md +24 -0
- data/docs/LicenseTemplateInfo.md +26 -0
- data/docs/LicensesTemplateListEntry.md +22 -0
- data/docs/MarkdownOption.md +24 -0
- data/docs/MarkupOption.md +26 -0
- data/docs/MergePullRequestOption.md +32 -0
- data/docs/MigrateRepoOptions.md +56 -0
- data/docs/Milestone.md +36 -0
- data/docs/MiscellaneousApi.md +833 -0
- data/docs/NewIssuePinsAllowed.md +20 -0
- data/docs/NodeInfo.md +30 -0
- data/docs/NodeInfoServices.md +20 -0
- data/docs/NodeInfoSoftware.md +24 -0
- data/docs/NodeInfoUsage.md +22 -0
- data/docs/NodeInfoUsageUsers.md +22 -0
- data/docs/Note.md +20 -0
- data/docs/NotificationApi.md +550 -0
- data/docs/NotificationCount.md +18 -0
- data/docs/NotificationSubject.md +30 -0
- data/docs/NotificationThread.md +30 -0
- data/docs/OAuth2Application.md +30 -0
- data/docs/Organization.md +38 -0
- data/docs/OrganizationApi.md +4259 -0
- data/docs/OrganizationPermissions.md +26 -0
- data/docs/PRBranchInfo.md +26 -0
- data/docs/Package.md +34 -0
- data/docs/PackageApi.md +314 -0
- data/docs/PackageFile.md +30 -0
- data/docs/PayloadCommit.md +36 -0
- data/docs/PayloadCommitVerification.md +26 -0
- data/docs/PayloadUser.md +22 -0
- data/docs/Permission.md +22 -0
- data/docs/PublicKey.md +34 -0
- data/docs/PullRequest.md +88 -0
- data/docs/PullRequestMeta.md +24 -0
- data/docs/PullReview.md +44 -0
- data/docs/PullReviewComment.md +46 -0
- data/docs/PullReviewRequestOptions.md +20 -0
- data/docs/PushMirror.md +32 -0
- data/docs/Reaction.md +22 -0
- data/docs/Reference.md +22 -0
- data/docs/Release.md +52 -0
- data/docs/RenameUserOption.md +18 -0
- data/docs/ReplaceFlagsOption.md +18 -0
- data/docs/RepoCollaboratorPermission.md +22 -0
- data/docs/RepoCommit.md +28 -0
- data/docs/RepoCreateReleaseAttachmentRequest.md +18 -0
- data/docs/RepoTopicOptions.md +18 -0
- data/docs/RepoTransfer.md +22 -0
- data/docs/Repository.md +140 -0
- data/docs/RepositoryApi.md +13022 -0
- data/docs/RepositoryMeta.md +24 -0
- data/docs/SearchResults.md +20 -0
- data/docs/Secret.md +20 -0
- data/docs/ServerVersion.md +18 -0
- data/docs/SettingsApi.md +275 -0
- data/docs/StopWatch.md +30 -0
- data/docs/SubmitPullReviewOptions.md +20 -0
- data/docs/Tag.md +30 -0
- data/docs/TagArchiveDownloadCount.md +20 -0
- data/docs/TagProtection.md +28 -0
- data/docs/Team.md +34 -0
- data/docs/TeamSearch200Response.md +20 -0
- data/docs/TimelineComment.md +74 -0
- data/docs/TopicName.md +18 -0
- data/docs/TopicResponse.md +26 -0
- data/docs/TrackedTime.md +30 -0
- data/docs/TransferRepoOption.md +20 -0
- data/docs/UpdateFileOptions.md +36 -0
- data/docs/UpdateRepoAvatarOption.md +18 -0
- data/docs/UpdateUserAvatarOption.md +18 -0
- data/docs/UpdateVariableOption.md +20 -0
- data/docs/User.md +62 -0
- data/docs/UserApi.md +4969 -0
- data/docs/UserHeatmapData.md +20 -0
- data/docs/UserSearch200Response.md +20 -0
- data/docs/UserSettings.md +38 -0
- data/docs/UserSettingsOptions.md +38 -0
- data/docs/WatchInfo.md +28 -0
- data/docs/WikiCommit.md +24 -0
- data/docs/WikiCommitList.md +20 -0
- data/docs/WikiPage.md +32 -0
- data/docs/WikiPageMetaData.md +24 -0
- data/forgejo.gemspec +49 -0
- data/git_push.sh +57 -0
- data/lib/forgejo/api/activitypub_api.rb +269 -0
- data/lib/forgejo/api/admin_api.rb +1496 -0
- data/lib/forgejo/api/issue_api.rb +5282 -0
- data/lib/forgejo/api/miscellaneous_api.rb +725 -0
- data/lib/forgejo/api/notification_api.rb +520 -0
- data/lib/forgejo/api/organization_api.rb +3898 -0
- data/lib/forgejo/api/package_api.rb +334 -0
- data/lib/forgejo/api/repository_api.rb +12849 -0
- data/lib/forgejo/api/settings_api.rb +242 -0
- data/lib/forgejo/api/user_api.rb +4314 -0
- data/lib/forgejo/api_client.rb +437 -0
- data/lib/forgejo/api_error.rb +58 -0
- data/lib/forgejo/configuration.rb +392 -0
- data/lib/forgejo/models/access_token.rb +252 -0
- data/lib/forgejo/models/action_task.rb +323 -0
- data/lib/forgejo/models/action_task_response.rb +226 -0
- data/lib/forgejo/models/action_variable.rb +246 -0
- data/lib/forgejo/models/activity.rb +357 -0
- data/lib/forgejo/models/activity_pub.rb +215 -0
- data/lib/forgejo/models/add_collaborator_option.rb +215 -0
- data/lib/forgejo/models/add_time_option.rb +242 -0
- data/lib/forgejo/models/annotated_tag.rb +278 -0
- data/lib/forgejo/models/annotated_tag_object.rb +233 -0
- data/lib/forgejo/models/api_error.rb +224 -0
- data/lib/forgejo/models/attachment.rb +269 -0
- data/lib/forgejo/models/blocked_user.rb +223 -0
- data/lib/forgejo/models/branch.rb +289 -0
- data/lib/forgejo/models/branch_protection.rb +464 -0
- data/lib/forgejo/models/change_file_operation.rb +304 -0
- data/lib/forgejo/models/change_files_options.rb +292 -0
- data/lib/forgejo/models/changed_file.rb +287 -0
- data/lib/forgejo/models/combined_status.rb +272 -0
- data/lib/forgejo/models/comment.rb +307 -0
- data/lib/forgejo/models/commit.rb +299 -0
- data/lib/forgejo/models/commit_affected_files.rb +224 -0
- data/lib/forgejo/models/commit_date_options.rb +224 -0
- data/lib/forgejo/models/commit_meta.rb +232 -0
- data/lib/forgejo/models/commit_stats.rb +233 -0
- data/lib/forgejo/models/commit_status.rb +288 -0
- data/lib/forgejo/models/commit_user.rb +232 -0
- data/lib/forgejo/models/compare.rb +225 -0
- data/lib/forgejo/models/contents_response.rb +346 -0
- data/lib/forgejo/models/create_access_token_option.rb +233 -0
- data/lib/forgejo/models/create_branch_protection_option.rb +446 -0
- data/lib/forgejo/models/create_branch_repo_option.rb +243 -0
- data/lib/forgejo/models/create_email_option.rb +218 -0
- data/lib/forgejo/models/create_file_options.rb +290 -0
- data/lib/forgejo/models/create_fork_option.rb +226 -0
- data/lib/forgejo/models/create_gpg_key_option.rb +232 -0
- data/lib/forgejo/models/create_hook_option.rb +315 -0
- data/lib/forgejo/models/create_issue_comment_option.rb +231 -0
- data/lib/forgejo/models/create_issue_option.rb +301 -0
- data/lib/forgejo/models/create_key_option.rb +250 -0
- data/lib/forgejo/models/create_label_option.rb +265 -0
- data/lib/forgejo/models/create_milestone_option.rb +276 -0
- data/lib/forgejo/models/create_o_auth2_application_options.rb +235 -0
- data/lib/forgejo/models/create_or_update_secret_option.rb +223 -0
- data/lib/forgejo/models/create_org_option.rb +320 -0
- data/lib/forgejo/models/create_pull_request_option.rb +291 -0
- data/lib/forgejo/models/create_pull_review_comment.rb +245 -0
- data/lib/forgejo/models/create_pull_review_options.rb +245 -0
- data/lib/forgejo/models/create_push_mirror_option.rb +250 -0
- data/lib/forgejo/models/create_release_option.rb +276 -0
- data/lib/forgejo/models/create_repo_option.rb +379 -0
- data/lib/forgejo/models/create_status_option.rb +243 -0
- data/lib/forgejo/models/create_tag_option.rb +240 -0
- data/lib/forgejo/models/create_tag_protection_option.rb +237 -0
- data/lib/forgejo/models/create_team_option.rb +314 -0
- data/lib/forgejo/models/create_user_option.rb +320 -0
- data/lib/forgejo/models/create_variable_option.rb +223 -0
- data/lib/forgejo/models/create_wiki_page_options.rb +236 -0
- data/lib/forgejo/models/cron.rb +251 -0
- data/lib/forgejo/models/delete_email_option.rb +218 -0
- data/lib/forgejo/models/delete_file_options.rb +290 -0
- data/lib/forgejo/models/delete_labels_option.rb +215 -0
- data/lib/forgejo/models/deploy_key.rb +287 -0
- data/lib/forgejo/models/dismiss_pull_review_options.rb +224 -0
- data/lib/forgejo/models/dispatch_workflow_option.rb +235 -0
- data/lib/forgejo/models/edit_attachment_options.rb +215 -0
- data/lib/forgejo/models/edit_branch_protection_option.rb +427 -0
- data/lib/forgejo/models/edit_deadline_option.rb +222 -0
- data/lib/forgejo/models/edit_git_hook_option.rb +215 -0
- data/lib/forgejo/models/edit_hook_option.rb +255 -0
- data/lib/forgejo/models/edit_issue_comment_option.rb +231 -0
- data/lib/forgejo/models/edit_issue_option.rb +299 -0
- data/lib/forgejo/models/edit_label_option.rb +251 -0
- data/lib/forgejo/models/edit_milestone_option.rb +242 -0
- data/lib/forgejo/models/edit_org_option.rb +304 -0
- data/lib/forgejo/models/edit_pull_request_option.rb +309 -0
- data/lib/forgejo/models/edit_reaction_option.rb +215 -0
- data/lib/forgejo/models/edit_release_option.rb +269 -0
- data/lib/forgejo/models/edit_repo_option.rb +533 -0
- data/lib/forgejo/models/edit_tag_protection_option.rb +237 -0
- data/lib/forgejo/models/edit_team_option.rb +314 -0
- data/lib/forgejo/models/edit_user_option.rb +377 -0
- data/lib/forgejo/models/email.rb +251 -0
- data/lib/forgejo/models/external_tracker.rb +246 -0
- data/lib/forgejo/models/external_wiki.rb +216 -0
- data/lib/forgejo/models/file_commit_response.rb +288 -0
- data/lib/forgejo/models/file_delete_response.rb +233 -0
- data/lib/forgejo/models/file_links_response.rb +233 -0
- data/lib/forgejo/models/file_response.rb +233 -0
- data/lib/forgejo/models/files_response.rb +235 -0
- data/lib/forgejo/models/general_api_settings.rb +242 -0
- data/lib/forgejo/models/general_attachment_settings.rb +242 -0
- data/lib/forgejo/models/general_repo_settings.rb +269 -0
- data/lib/forgejo/models/general_ui_settings.rb +237 -0
- data/lib/forgejo/models/generate_repo_option.rb +340 -0
- data/lib/forgejo/models/git_blob_response.rb +251 -0
- data/lib/forgejo/models/git_entry.rb +260 -0
- data/lib/forgejo/models/git_hook.rb +233 -0
- data/lib/forgejo/models/git_object.rb +232 -0
- data/lib/forgejo/models/git_tree_response.rb +262 -0
- data/lib/forgejo/models/gitignore_template_info.rb +224 -0
- data/lib/forgejo/models/gpg_key.rb +327 -0
- data/lib/forgejo/models/gpg_key_email.rb +224 -0
- data/lib/forgejo/models/hook.rb +319 -0
- data/lib/forgejo/models/identity.rb +224 -0
- data/lib/forgejo/models/internal_tracker.rb +236 -0
- data/lib/forgejo/models/issue.rb +438 -0
- data/lib/forgejo/models/issue_config.rb +225 -0
- data/lib/forgejo/models/issue_config_contact_link.rb +232 -0
- data/lib/forgejo/models/issue_config_validation.rb +223 -0
- data/lib/forgejo/models/issue_deadline.rb +215 -0
- data/lib/forgejo/models/issue_form_field.rb +257 -0
- data/lib/forgejo/models/issue_labels_option.rb +227 -0
- data/lib/forgejo/models/issue_meta.rb +233 -0
- data/lib/forgejo/models/issue_template.rb +282 -0
- data/lib/forgejo/models/label.rb +269 -0
- data/lib/forgejo/models/label_template.rb +242 -0
- data/lib/forgejo/models/license_template_info.rb +251 -0
- data/lib/forgejo/models/licenses_template_list_entry.rb +233 -0
- data/lib/forgejo/models/markdown_option.rb +246 -0
- data/lib/forgejo/models/markup_option.rb +256 -0
- data/lib/forgejo/models/merge_pull_request_option.rb +319 -0
- data/lib/forgejo/models/migrate_repo_options.rb +436 -0
- data/lib/forgejo/models/milestone.rb +297 -0
- data/lib/forgejo/models/new_issue_pins_allowed.rb +224 -0
- data/lib/forgejo/models/node_info.rb +271 -0
- data/lib/forgejo/models/node_info_services.rb +228 -0
- data/lib/forgejo/models/node_info_software.rb +242 -0
- data/lib/forgejo/models/node_info_usage.rb +233 -0
- data/lib/forgejo/models/node_info_usage_users.rb +233 -0
- data/lib/forgejo/models/note.rb +224 -0
- data/lib/forgejo/models/notification_count.rb +215 -0
- data/lib/forgejo/models/notification_subject.rb +271 -0
- data/lib/forgejo/models/notification_thread.rb +269 -0
- data/lib/forgejo/models/o_auth2_application.rb +270 -0
- data/lib/forgejo/models/organization.rb +306 -0
- data/lib/forgejo/models/organization_permissions.rb +251 -0
- data/lib/forgejo/models/package.rb +287 -0
- data/lib/forgejo/models/package_file.rb +269 -0
- data/lib/forgejo/models/payload_commit.rb +303 -0
- data/lib/forgejo/models/payload_commit_verification.rb +251 -0
- data/lib/forgejo/models/payload_user.rb +234 -0
- data/lib/forgejo/models/permission.rb +233 -0
- data/lib/forgejo/models/pr_branch_info.rb +251 -0
- data/lib/forgejo/models/public_key.rb +287 -0
- data/lib/forgejo/models/pull_request.rb +538 -0
- data/lib/forgejo/models/pull_request_meta.rb +242 -0
- data/lib/forgejo/models/pull_review.rb +333 -0
- data/lib/forgejo/models/pull_review_comment.rb +341 -0
- data/lib/forgejo/models/pull_review_request_options.rb +228 -0
- data/lib/forgejo/models/push_mirror.rb +278 -0
- data/lib/forgejo/models/reaction.rb +233 -0
- data/lib/forgejo/models/reference.rb +232 -0
- data/lib/forgejo/models/release.rb +370 -0
- data/lib/forgejo/models/rename_user_option.rb +223 -0
- data/lib/forgejo/models/replace_flags_option.rb +217 -0
- data/lib/forgejo/models/repo_collaborator_permission.rb +233 -0
- data/lib/forgejo/models/repo_commit.rb +259 -0
- data/lib/forgejo/models/repo_create_release_attachment_request.rb +215 -0
- data/lib/forgejo/models/repo_topic_options.rb +218 -0
- data/lib/forgejo/models/repo_transfer.rb +235 -0
- data/lib/forgejo/models/repository.rb +801 -0
- data/lib/forgejo/models/repository_meta.rb +242 -0
- data/lib/forgejo/models/search_results.rb +226 -0
- data/lib/forgejo/models/secret.rb +225 -0
- data/lib/forgejo/models/server_version.rb +215 -0
- data/lib/forgejo/models/stop_watch.rb +269 -0
- data/lib/forgejo/models/submit_pull_review_options.rb +225 -0
- data/lib/forgejo/models/tag.rb +269 -0
- data/lib/forgejo/models/tag_archive_download_count.rb +224 -0
- data/lib/forgejo/models/tag_protection.rb +264 -0
- data/lib/forgejo/models/team.rb +325 -0
- data/lib/forgejo/models/team_search200_response.rb +225 -0
- data/lib/forgejo/models/timeline_comment.rb +469 -0
- data/lib/forgejo/models/topic_name.rb +217 -0
- data/lib/forgejo/models/topic_response.rb +251 -0
- data/lib/forgejo/models/tracked_time.rb +272 -0
- data/lib/forgejo/models/transfer_repo_option.rb +234 -0
- data/lib/forgejo/models/update_file_options.rb +317 -0
- data/lib/forgejo/models/update_repo_avatar_option.rb +216 -0
- data/lib/forgejo/models/update_user_avatar_option.rb +216 -0
- data/lib/forgejo/models/update_variable_option.rb +233 -0
- data/lib/forgejo/models/user.rb +433 -0
- data/lib/forgejo/models/user_heatmap_data.rb +225 -0
- data/lib/forgejo/models/user_search200_response.rb +225 -0
- data/lib/forgejo/models/user_settings.rb +306 -0
- data/lib/forgejo/models/user_settings_options.rb +306 -0
- data/lib/forgejo/models/watch_info.rb +260 -0
- data/lib/forgejo/models/wiki_commit.rb +242 -0
- data/lib/forgejo/models/wiki_commit_list.rb +226 -0
- data/lib/forgejo/models/wiki_page.rb +279 -0
- data/lib/forgejo/models/wiki_page_meta_data.rb +242 -0
- data/lib/forgejo/version.rb +15 -0
- data/lib/forgejo.rb +241 -0
- data/manifest.scm +2 -0
- data/patch +7 -0
- data/patch~ +1 -0
- data/smoke +16 -0
- data/smoke~ +1 -0
- data/spec/api/activitypub_api_spec.rb +80 -0
- data/spec/api/admin_api_spec.rb +308 -0
- data/spec/api/issue_api_spec.rb +998 -0
- data/spec/api/miscellaneous_api_spec.rb +161 -0
- data/spec/api/notification_api_spec.rb +134 -0
- data/spec/api/organization_api_spec.rb +752 -0
- data/spec/api/package_api_spec.rb +92 -0
- data/spec/api/repository_api_spec.rb +2366 -0
- data/spec/api/settings_api_spec.rb +75 -0
- data/spec/api/user_api_spec.rb +839 -0
- data/spec/models/access_token_spec.rb +60 -0
- data/spec/models/action_task_response_spec.rb +42 -0
- data/spec/models/action_task_spec.rb +108 -0
- data/spec/models/action_variable_spec.rb +54 -0
- data/spec/models/activity_pub_spec.rb +36 -0
- data/spec/models/activity_spec.rb +112 -0
- data/spec/models/add_collaborator_option_spec.rb +36 -0
- data/spec/models/add_time_option_spec.rb +48 -0
- data/spec/models/annotated_tag_object_spec.rb +48 -0
- data/spec/models/annotated_tag_spec.rb +78 -0
- data/spec/models/api_error_spec.rb +42 -0
- data/spec/models/attachment_spec.rb +72 -0
- data/spec/models/blocked_user_spec.rb +42 -0
- data/spec/models/branch_protection_spec.rb +192 -0
- data/spec/models/branch_spec.rb +84 -0
- data/spec/models/change_file_operation_spec.rb +64 -0
- data/spec/models/change_files_options_spec.rb +78 -0
- data/spec/models/changed_file_spec.rb +84 -0
- data/spec/models/combined_status_spec.rb +72 -0
- data/spec/models/comment_spec.rb +96 -0
- data/spec/models/commit_affected_files_spec.rb +42 -0
- data/spec/models/commit_date_options_spec.rb +42 -0
- data/spec/models/commit_meta_spec.rb +48 -0
- data/spec/models/commit_spec.rb +90 -0
- data/spec/models/commit_stats_spec.rb +48 -0
- data/spec/models/commit_status_spec.rb +84 -0
- data/spec/models/commit_user_spec.rb +48 -0
- data/spec/models/compare_spec.rb +42 -0
- data/spec/models/contents_response_spec.rb +120 -0
- data/spec/models/create_access_token_option_spec.rb +42 -0
- data/spec/models/create_branch_protection_option_spec.rb +180 -0
- data/spec/models/create_branch_repo_option_spec.rb +48 -0
- data/spec/models/create_email_option_spec.rb +36 -0
- data/spec/models/create_file_options_spec.rb +78 -0
- data/spec/models/create_fork_option_spec.rb +42 -0
- data/spec/models/create_gpg_key_option_spec.rb +42 -0
- data/spec/models/create_hook_option_spec.rb +70 -0
- data/spec/models/create_issue_comment_option_spec.rb +42 -0
- data/spec/models/create_issue_option_spec.rb +84 -0
- data/spec/models/create_key_option_spec.rb +48 -0
- data/spec/models/create_label_option_spec.rb +60 -0
- data/spec/models/create_milestone_option_spec.rb +58 -0
- data/spec/models/create_o_auth2_application_options_spec.rb +48 -0
- data/spec/models/create_or_update_secret_option_spec.rb +36 -0
- data/spec/models/create_org_option_spec.rb +82 -0
- data/spec/models/create_pull_request_option_spec.rb +84 -0
- data/spec/models/create_pull_review_comment_spec.rb +54 -0
- data/spec/models/create_pull_review_options_spec.rb +54 -0
- data/spec/models/create_push_mirror_option_spec.rb +60 -0
- data/spec/models/create_release_option_spec.rb +72 -0
- data/spec/models/create_repo_option_spec.rb +110 -0
- data/spec/models/create_status_option_spec.rb +54 -0
- data/spec/models/create_tag_option_spec.rb +48 -0
- data/spec/models/create_tag_protection_option_spec.rb +48 -0
- data/spec/models/create_team_option_spec.rb +76 -0
- data/spec/models/create_user_option_spec.rb +96 -0
- data/spec/models/create_variable_option_spec.rb +36 -0
- data/spec/models/create_wiki_page_options_spec.rb +48 -0
- data/spec/models/cron_spec.rb +60 -0
- data/spec/models/delete_email_option_spec.rb +36 -0
- data/spec/models/delete_file_options_spec.rb +78 -0
- data/spec/models/delete_labels_option_spec.rb +36 -0
- data/spec/models/deploy_key_spec.rb +84 -0
- data/spec/models/dismiss_pull_review_options_spec.rb +42 -0
- data/spec/models/dispatch_workflow_option_spec.rb +42 -0
- data/spec/models/edit_attachment_options_spec.rb +36 -0
- data/spec/models/edit_branch_protection_option_spec.rb +168 -0
- data/spec/models/edit_deadline_option_spec.rb +36 -0
- data/spec/models/edit_git_hook_option_spec.rb +36 -0
- data/spec/models/edit_hook_option_spec.rb +60 -0
- data/spec/models/edit_issue_comment_option_spec.rb +42 -0
- data/spec/models/edit_issue_option_spec.rb +90 -0
- data/spec/models/edit_label_option_spec.rb +60 -0
- data/spec/models/edit_milestone_option_spec.rb +54 -0
- data/spec/models/edit_org_option_spec.rb +76 -0
- data/spec/models/edit_pull_request_option_spec.rb +96 -0
- data/spec/models/edit_reaction_option_spec.rb +36 -0
- data/spec/models/edit_release_option_spec.rb +72 -0
- data/spec/models/edit_repo_option_spec.rb +228 -0
- data/spec/models/edit_tag_protection_option_spec.rb +48 -0
- data/spec/models/edit_team_option_spec.rb +76 -0
- data/spec/models/edit_user_option_spec.rb +144 -0
- data/spec/models/email_spec.rb +60 -0
- data/spec/models/external_tracker_spec.rb +54 -0
- data/spec/models/external_wiki_spec.rb +36 -0
- data/spec/models/file_commit_response_spec.rb +84 -0
- data/spec/models/file_delete_response_spec.rb +48 -0
- data/spec/models/file_links_response_spec.rb +48 -0
- data/spec/models/file_response_spec.rb +48 -0
- data/spec/models/files_response_spec.rb +48 -0
- data/spec/models/general_api_settings_spec.rb +54 -0
- data/spec/models/general_attachment_settings_spec.rb +54 -0
- data/spec/models/general_repo_settings_spec.rb +72 -0
- data/spec/models/general_ui_settings_spec.rb +48 -0
- data/spec/models/generate_repo_option_spec.rb +102 -0
- data/spec/models/git_blob_response_spec.rb +60 -0
- data/spec/models/git_entry_spec.rb +66 -0
- data/spec/models/git_hook_spec.rb +48 -0
- data/spec/models/git_object_spec.rb +48 -0
- data/spec/models/git_tree_response_spec.rb +66 -0
- data/spec/models/gitignore_template_info_spec.rb +42 -0
- data/spec/models/gpg_key_email_spec.rb +42 -0
- data/spec/models/gpg_key_spec.rb +108 -0
- data/spec/models/hook_spec.rb +102 -0
- data/spec/models/identity_spec.rb +42 -0
- data/spec/models/internal_tracker_spec.rb +48 -0
- data/spec/models/issue_config_contact_link_spec.rb +48 -0
- data/spec/models/issue_config_spec.rb +42 -0
- data/spec/models/issue_config_validation_spec.rb +42 -0
- data/spec/models/issue_deadline_spec.rb +36 -0
- data/spec/models/issue_form_field_spec.rb +60 -0
- data/spec/models/issue_labels_option_spec.rb +42 -0
- data/spec/models/issue_meta_spec.rb +48 -0
- data/spec/models/issue_spec.rb +180 -0
- data/spec/models/issue_template_spec.rb +78 -0
- data/spec/models/label_spec.rb +72 -0
- data/spec/models/label_template_spec.rb +54 -0
- data/spec/models/license_template_info_spec.rb +60 -0
- data/spec/models/licenses_template_list_entry_spec.rb +48 -0
- data/spec/models/markdown_option_spec.rb +54 -0
- data/spec/models/markup_option_spec.rb +60 -0
- data/spec/models/merge_pull_request_option_spec.rb +82 -0
- data/spec/models/migrate_repo_options_spec.rb +154 -0
- data/spec/models/milestone_spec.rb +90 -0
- data/spec/models/new_issue_pins_allowed_spec.rb +42 -0
- data/spec/models/node_info_services_spec.rb +42 -0
- data/spec/models/node_info_software_spec.rb +54 -0
- data/spec/models/node_info_spec.rb +72 -0
- data/spec/models/node_info_usage_spec.rb +48 -0
- data/spec/models/node_info_usage_users_spec.rb +48 -0
- data/spec/models/note_spec.rb +42 -0
- data/spec/models/notification_count_spec.rb +36 -0
- data/spec/models/notification_subject_spec.rb +72 -0
- data/spec/models/notification_thread_spec.rb +72 -0
- data/spec/models/o_auth2_application_spec.rb +72 -0
- data/spec/models/organization_permissions_spec.rb +60 -0
- data/spec/models/organization_spec.rb +96 -0
- data/spec/models/package_file_spec.rb +72 -0
- data/spec/models/package_spec.rb +84 -0
- data/spec/models/payload_commit_spec.rb +90 -0
- data/spec/models/payload_commit_verification_spec.rb +60 -0
- data/spec/models/payload_user_spec.rb +48 -0
- data/spec/models/permission_spec.rb +48 -0
- data/spec/models/pr_branch_info_spec.rb +60 -0
- data/spec/models/public_key_spec.rb +84 -0
- data/spec/models/pull_request_meta_spec.rb +54 -0
- data/spec/models/pull_request_spec.rb +246 -0
- data/spec/models/pull_review_comment_spec.rb +120 -0
- data/spec/models/pull_review_request_options_spec.rb +42 -0
- data/spec/models/pull_review_spec.rb +114 -0
- data/spec/models/push_mirror_spec.rb +78 -0
- data/spec/models/reaction_spec.rb +48 -0
- data/spec/models/reference_spec.rb +48 -0
- data/spec/models/release_spec.rb +138 -0
- data/spec/models/rename_user_option_spec.rb +36 -0
- data/spec/models/replace_flags_option_spec.rb +36 -0
- data/spec/models/repo_collaborator_permission_spec.rb +48 -0
- data/spec/models/repo_commit_spec.rb +66 -0
- data/spec/models/repo_create_release_attachment_request_spec.rb +36 -0
- data/spec/models/repo_topic_options_spec.rb +36 -0
- data/spec/models/repo_transfer_spec.rb +48 -0
- data/spec/models/repository_meta_spec.rb +54 -0
- data/spec/models/repository_spec.rb +406 -0
- data/spec/models/search_results_spec.rb +42 -0
- data/spec/models/secret_spec.rb +42 -0
- data/spec/models/server_version_spec.rb +36 -0
- data/spec/models/stop_watch_spec.rb +72 -0
- data/spec/models/submit_pull_review_options_spec.rb +42 -0
- data/spec/models/tag_archive_download_count_spec.rb +42 -0
- data/spec/models/tag_protection_spec.rb +66 -0
- data/spec/models/tag_spec.rb +72 -0
- data/spec/models/team_search200_response_spec.rb +42 -0
- data/spec/models/team_spec.rb +88 -0
- data/spec/models/timeline_comment_spec.rb +204 -0
- data/spec/models/topic_name_spec.rb +36 -0
- data/spec/models/topic_response_spec.rb +60 -0
- data/spec/models/tracked_time_spec.rb +72 -0
- data/spec/models/transfer_repo_option_spec.rb +42 -0
- data/spec/models/update_file_options_spec.rb +90 -0
- data/spec/models/update_repo_avatar_option_spec.rb +36 -0
- data/spec/models/update_user_avatar_option_spec.rb +36 -0
- data/spec/models/update_variable_option_spec.rb +42 -0
- data/spec/models/user_heatmap_data_spec.rb +42 -0
- data/spec/models/user_search200_response_spec.rb +42 -0
- data/spec/models/user_settings_options_spec.rb +96 -0
- data/spec/models/user_settings_spec.rb +96 -0
- data/spec/models/user_spec.rb +168 -0
- data/spec/models/watch_info_spec.rb +66 -0
- data/spec/models/wiki_commit_list_spec.rb +42 -0
- data/spec/models/wiki_commit_spec.rb +54 -0
- data/spec/models/wiki_page_meta_data_spec.rb +54 -0
- data/spec/models/wiki_page_spec.rb +78 -0
- data/spec/spec_helper.rb +111 -0
- data/swagger.v1.json +26802 -0
- data/swagger.v1.patched.json +1 -0
- metadata +949 -0
data/docs/AdminApi.md
ADDED
@@ -0,0 +1,1672 @@
|
|
1
|
+
# Forgejo::AdminApi
|
2
|
+
|
3
|
+
All URIs are relative to */api/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**admin_adopt_repository**](AdminApi.md#admin_adopt_repository) | **POST** /admin/unadopted/{owner}/{repo} | Adopt unadopted files as a repository |
|
8
|
+
| [**admin_create_hook**](AdminApi.md#admin_create_hook) | **POST** /admin/hooks | Create a hook |
|
9
|
+
| [**admin_create_org**](AdminApi.md#admin_create_org) | **POST** /admin/users/{username}/orgs | Create an organization |
|
10
|
+
| [**admin_create_public_key**](AdminApi.md#admin_create_public_key) | **POST** /admin/users/{username}/keys | Add a public key on behalf of a user |
|
11
|
+
| [**admin_create_repo**](AdminApi.md#admin_create_repo) | **POST** /admin/users/{username}/repos | Create a repository on behalf of a user |
|
12
|
+
| [**admin_create_user**](AdminApi.md#admin_create_user) | **POST** /admin/users | Create a user |
|
13
|
+
| [**admin_cron_list**](AdminApi.md#admin_cron_list) | **GET** /admin/cron | List cron tasks |
|
14
|
+
| [**admin_cron_run**](AdminApi.md#admin_cron_run) | **POST** /admin/cron/{task} | Run cron task |
|
15
|
+
| [**admin_delete_hook**](AdminApi.md#admin_delete_hook) | **DELETE** /admin/hooks/{id} | Delete a hook |
|
16
|
+
| [**admin_delete_unadopted_repository**](AdminApi.md#admin_delete_unadopted_repository) | **DELETE** /admin/unadopted/{owner}/{repo} | Delete unadopted files |
|
17
|
+
| [**admin_delete_user**](AdminApi.md#admin_delete_user) | **DELETE** /admin/users/{username} | Delete a user |
|
18
|
+
| [**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
|
+
| [**admin_edit_hook**](AdminApi.md#admin_edit_hook) | **PATCH** /admin/hooks/{id} | Update a hook |
|
20
|
+
| [**admin_edit_user**](AdminApi.md#admin_edit_user) | **PATCH** /admin/users/{username} | Edit an existing user |
|
21
|
+
| [**admin_get_all_emails**](AdminApi.md#admin_get_all_emails) | **GET** /admin/emails | List all emails |
|
22
|
+
| [**admin_get_all_orgs**](AdminApi.md#admin_get_all_orgs) | **GET** /admin/orgs | List all organizations |
|
23
|
+
| [**admin_get_hook**](AdminApi.md#admin_get_hook) | **GET** /admin/hooks/{id} | Get a hook |
|
24
|
+
| [**admin_get_runner_registration_token**](AdminApi.md#admin_get_runner_registration_token) | **GET** /admin/runners/registration-token | Get an global actions runner registration token |
|
25
|
+
| [**admin_list_hooks**](AdminApi.md#admin_list_hooks) | **GET** /admin/hooks | List system's webhooks |
|
26
|
+
| [**admin_rename_user**](AdminApi.md#admin_rename_user) | **POST** /admin/users/{username}/rename | Rename a user |
|
27
|
+
| [**admin_search_emails**](AdminApi.md#admin_search_emails) | **GET** /admin/emails/search | Search all emails |
|
28
|
+
| [**admin_search_users**](AdminApi.md#admin_search_users) | **GET** /admin/users | Search users according filter conditions |
|
29
|
+
| [**admin_unadopted_list**](AdminApi.md#admin_unadopted_list) | **GET** /admin/unadopted | List unadopted repositories |
|
30
|
+
|
31
|
+
|
32
|
+
## admin_adopt_repository
|
33
|
+
|
34
|
+
> admin_adopt_repository(owner, repo)
|
35
|
+
|
36
|
+
Adopt unadopted files as a repository
|
37
|
+
|
38
|
+
### Examples
|
39
|
+
|
40
|
+
```ruby
|
41
|
+
require 'time'
|
42
|
+
require 'forgejo'
|
43
|
+
# setup authorization
|
44
|
+
Forgejo.configure do |config|
|
45
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
46
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
47
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
48
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
49
|
+
end
|
50
|
+
|
51
|
+
api_instance = Forgejo::AdminApi.new
|
52
|
+
owner = 'owner_example' # String | owner of the repo
|
53
|
+
repo = 'repo_example' # String | name of the repo
|
54
|
+
|
55
|
+
begin
|
56
|
+
# Adopt unadopted files as a repository
|
57
|
+
api_instance.admin_adopt_repository(owner, repo)
|
58
|
+
rescue Forgejo::ApiError => e
|
59
|
+
puts "Error when calling AdminApi->admin_adopt_repository: #{e}"
|
60
|
+
end
|
61
|
+
```
|
62
|
+
|
63
|
+
#### Using the admin_adopt_repository_with_http_info variant
|
64
|
+
|
65
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
66
|
+
|
67
|
+
> <Array(nil, Integer, Hash)> admin_adopt_repository_with_http_info(owner, repo)
|
68
|
+
|
69
|
+
```ruby
|
70
|
+
begin
|
71
|
+
# Adopt unadopted files as a repository
|
72
|
+
data, status_code, headers = api_instance.admin_adopt_repository_with_http_info(owner, repo)
|
73
|
+
p status_code # => 2xx
|
74
|
+
p headers # => { ... }
|
75
|
+
p data # => nil
|
76
|
+
rescue Forgejo::ApiError => e
|
77
|
+
puts "Error when calling AdminApi->admin_adopt_repository_with_http_info: #{e}"
|
78
|
+
end
|
79
|
+
```
|
80
|
+
|
81
|
+
### Parameters
|
82
|
+
|
83
|
+
| Name | Type | Description | Notes |
|
84
|
+
| ---- | ---- | ----------- | ----- |
|
85
|
+
| **owner** | **String** | owner of the repo | |
|
86
|
+
| **repo** | **String** | name of the repo | |
|
87
|
+
|
88
|
+
### Return type
|
89
|
+
|
90
|
+
nil (empty response body)
|
91
|
+
|
92
|
+
### Authorization
|
93
|
+
|
94
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
95
|
+
|
96
|
+
### HTTP request headers
|
97
|
+
|
98
|
+
- **Content-Type**: Not defined
|
99
|
+
- **Accept**: Not defined
|
100
|
+
|
101
|
+
|
102
|
+
## admin_create_hook
|
103
|
+
|
104
|
+
> <Hook> admin_create_hook(body)
|
105
|
+
|
106
|
+
Create a hook
|
107
|
+
|
108
|
+
### Examples
|
109
|
+
|
110
|
+
```ruby
|
111
|
+
require 'time'
|
112
|
+
require 'forgejo'
|
113
|
+
# setup authorization
|
114
|
+
Forgejo.configure do |config|
|
115
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
116
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
117
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
118
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
119
|
+
end
|
120
|
+
|
121
|
+
api_instance = Forgejo::AdminApi.new
|
122
|
+
body = Forgejo::CreateHookOption.new({config: { key: 'inner_example'}, type: 'forgejo'}) # CreateHookOption |
|
123
|
+
|
124
|
+
begin
|
125
|
+
# Create a hook
|
126
|
+
result = api_instance.admin_create_hook(body)
|
127
|
+
p result
|
128
|
+
rescue Forgejo::ApiError => e
|
129
|
+
puts "Error when calling AdminApi->admin_create_hook: #{e}"
|
130
|
+
end
|
131
|
+
```
|
132
|
+
|
133
|
+
#### Using the admin_create_hook_with_http_info variant
|
134
|
+
|
135
|
+
This returns an Array which contains the response data, status code and headers.
|
136
|
+
|
137
|
+
> <Array(<Hook>, Integer, Hash)> admin_create_hook_with_http_info(body)
|
138
|
+
|
139
|
+
```ruby
|
140
|
+
begin
|
141
|
+
# Create a hook
|
142
|
+
data, status_code, headers = api_instance.admin_create_hook_with_http_info(body)
|
143
|
+
p status_code # => 2xx
|
144
|
+
p headers # => { ... }
|
145
|
+
p data # => <Hook>
|
146
|
+
rescue Forgejo::ApiError => e
|
147
|
+
puts "Error when calling AdminApi->admin_create_hook_with_http_info: #{e}"
|
148
|
+
end
|
149
|
+
```
|
150
|
+
|
151
|
+
### Parameters
|
152
|
+
|
153
|
+
| Name | Type | Description | Notes |
|
154
|
+
| ---- | ---- | ----------- | ----- |
|
155
|
+
| **body** | [**CreateHookOption**](CreateHookOption.md) | | |
|
156
|
+
|
157
|
+
### Return type
|
158
|
+
|
159
|
+
[**Hook**](Hook.md)
|
160
|
+
|
161
|
+
### Authorization
|
162
|
+
|
163
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
164
|
+
|
165
|
+
### HTTP request headers
|
166
|
+
|
167
|
+
- **Content-Type**: application/json
|
168
|
+
- **Accept**: application/json
|
169
|
+
|
170
|
+
|
171
|
+
## admin_create_org
|
172
|
+
|
173
|
+
> <Organization> admin_create_org(username, organization)
|
174
|
+
|
175
|
+
Create an organization
|
176
|
+
|
177
|
+
### Examples
|
178
|
+
|
179
|
+
```ruby
|
180
|
+
require 'time'
|
181
|
+
require 'forgejo'
|
182
|
+
# setup authorization
|
183
|
+
Forgejo.configure do |config|
|
184
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
185
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
186
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
187
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
188
|
+
end
|
189
|
+
|
190
|
+
api_instance = Forgejo::AdminApi.new
|
191
|
+
username = 'username_example' # String | username of the user that will own the created organization
|
192
|
+
organization = Forgejo::CreateOrgOption.new({username: 'username_example'}) # CreateOrgOption |
|
193
|
+
|
194
|
+
begin
|
195
|
+
# Create an organization
|
196
|
+
result = api_instance.admin_create_org(username, organization)
|
197
|
+
p result
|
198
|
+
rescue Forgejo::ApiError => e
|
199
|
+
puts "Error when calling AdminApi->admin_create_org: #{e}"
|
200
|
+
end
|
201
|
+
```
|
202
|
+
|
203
|
+
#### Using the admin_create_org_with_http_info variant
|
204
|
+
|
205
|
+
This returns an Array which contains the response data, status code and headers.
|
206
|
+
|
207
|
+
> <Array(<Organization>, Integer, Hash)> admin_create_org_with_http_info(username, organization)
|
208
|
+
|
209
|
+
```ruby
|
210
|
+
begin
|
211
|
+
# Create an organization
|
212
|
+
data, status_code, headers = api_instance.admin_create_org_with_http_info(username, organization)
|
213
|
+
p status_code # => 2xx
|
214
|
+
p headers # => { ... }
|
215
|
+
p data # => <Organization>
|
216
|
+
rescue Forgejo::ApiError => e
|
217
|
+
puts "Error when calling AdminApi->admin_create_org_with_http_info: #{e}"
|
218
|
+
end
|
219
|
+
```
|
220
|
+
|
221
|
+
### Parameters
|
222
|
+
|
223
|
+
| Name | Type | Description | Notes |
|
224
|
+
| ---- | ---- | ----------- | ----- |
|
225
|
+
| **username** | **String** | username of the user that will own the created organization | |
|
226
|
+
| **organization** | [**CreateOrgOption**](CreateOrgOption.md) | | |
|
227
|
+
|
228
|
+
### Return type
|
229
|
+
|
230
|
+
[**Organization**](Organization.md)
|
231
|
+
|
232
|
+
### Authorization
|
233
|
+
|
234
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
235
|
+
|
236
|
+
### HTTP request headers
|
237
|
+
|
238
|
+
- **Content-Type**: application/json
|
239
|
+
- **Accept**: application/json
|
240
|
+
|
241
|
+
|
242
|
+
## admin_create_public_key
|
243
|
+
|
244
|
+
> <PublicKey> admin_create_public_key(username, opts)
|
245
|
+
|
246
|
+
Add a public key on behalf of a user
|
247
|
+
|
248
|
+
### Examples
|
249
|
+
|
250
|
+
```ruby
|
251
|
+
require 'time'
|
252
|
+
require 'forgejo'
|
253
|
+
# setup authorization
|
254
|
+
Forgejo.configure do |config|
|
255
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
256
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
257
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
258
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
259
|
+
end
|
260
|
+
|
261
|
+
api_instance = Forgejo::AdminApi.new
|
262
|
+
username = 'username_example' # String | username of the user
|
263
|
+
opts = {
|
264
|
+
key: Forgejo::CreateKeyOption.new({key: 'key_example', title: 'title_example'}) # CreateKeyOption |
|
265
|
+
}
|
266
|
+
|
267
|
+
begin
|
268
|
+
# Add a public key on behalf of a user
|
269
|
+
result = api_instance.admin_create_public_key(username, opts)
|
270
|
+
p result
|
271
|
+
rescue Forgejo::ApiError => e
|
272
|
+
puts "Error when calling AdminApi->admin_create_public_key: #{e}"
|
273
|
+
end
|
274
|
+
```
|
275
|
+
|
276
|
+
#### Using the admin_create_public_key_with_http_info variant
|
277
|
+
|
278
|
+
This returns an Array which contains the response data, status code and headers.
|
279
|
+
|
280
|
+
> <Array(<PublicKey>, Integer, Hash)> admin_create_public_key_with_http_info(username, opts)
|
281
|
+
|
282
|
+
```ruby
|
283
|
+
begin
|
284
|
+
# Add a public key on behalf of a user
|
285
|
+
data, status_code, headers = api_instance.admin_create_public_key_with_http_info(username, opts)
|
286
|
+
p status_code # => 2xx
|
287
|
+
p headers # => { ... }
|
288
|
+
p data # => <PublicKey>
|
289
|
+
rescue Forgejo::ApiError => e
|
290
|
+
puts "Error when calling AdminApi->admin_create_public_key_with_http_info: #{e}"
|
291
|
+
end
|
292
|
+
```
|
293
|
+
|
294
|
+
### Parameters
|
295
|
+
|
296
|
+
| Name | Type | Description | Notes |
|
297
|
+
| ---- | ---- | ----------- | ----- |
|
298
|
+
| **username** | **String** | username of the user | |
|
299
|
+
| **key** | [**CreateKeyOption**](CreateKeyOption.md) | | [optional] |
|
300
|
+
|
301
|
+
### Return type
|
302
|
+
|
303
|
+
[**PublicKey**](PublicKey.md)
|
304
|
+
|
305
|
+
### Authorization
|
306
|
+
|
307
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
308
|
+
|
309
|
+
### HTTP request headers
|
310
|
+
|
311
|
+
- **Content-Type**: application/json
|
312
|
+
- **Accept**: application/json
|
313
|
+
|
314
|
+
|
315
|
+
## admin_create_repo
|
316
|
+
|
317
|
+
> <Repository> admin_create_repo(username, repository)
|
318
|
+
|
319
|
+
Create a repository on behalf of a user
|
320
|
+
|
321
|
+
### Examples
|
322
|
+
|
323
|
+
```ruby
|
324
|
+
require 'time'
|
325
|
+
require 'forgejo'
|
326
|
+
# setup authorization
|
327
|
+
Forgejo.configure do |config|
|
328
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
329
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
330
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
331
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
332
|
+
end
|
333
|
+
|
334
|
+
api_instance = Forgejo::AdminApi.new
|
335
|
+
username = 'username_example' # String | username of the user. This user will own the created repository
|
336
|
+
repository = Forgejo::CreateRepoOption.new({name: 'name_example'}) # CreateRepoOption |
|
337
|
+
|
338
|
+
begin
|
339
|
+
# Create a repository on behalf of a user
|
340
|
+
result = api_instance.admin_create_repo(username, repository)
|
341
|
+
p result
|
342
|
+
rescue Forgejo::ApiError => e
|
343
|
+
puts "Error when calling AdminApi->admin_create_repo: #{e}"
|
344
|
+
end
|
345
|
+
```
|
346
|
+
|
347
|
+
#### Using the admin_create_repo_with_http_info variant
|
348
|
+
|
349
|
+
This returns an Array which contains the response data, status code and headers.
|
350
|
+
|
351
|
+
> <Array(<Repository>, Integer, Hash)> admin_create_repo_with_http_info(username, repository)
|
352
|
+
|
353
|
+
```ruby
|
354
|
+
begin
|
355
|
+
# Create a repository on behalf of a user
|
356
|
+
data, status_code, headers = api_instance.admin_create_repo_with_http_info(username, repository)
|
357
|
+
p status_code # => 2xx
|
358
|
+
p headers # => { ... }
|
359
|
+
p data # => <Repository>
|
360
|
+
rescue Forgejo::ApiError => e
|
361
|
+
puts "Error when calling AdminApi->admin_create_repo_with_http_info: #{e}"
|
362
|
+
end
|
363
|
+
```
|
364
|
+
|
365
|
+
### Parameters
|
366
|
+
|
367
|
+
| Name | Type | Description | Notes |
|
368
|
+
| ---- | ---- | ----------- | ----- |
|
369
|
+
| **username** | **String** | username of the user. This user will own the created repository | |
|
370
|
+
| **repository** | [**CreateRepoOption**](CreateRepoOption.md) | | |
|
371
|
+
|
372
|
+
### Return type
|
373
|
+
|
374
|
+
[**Repository**](Repository.md)
|
375
|
+
|
376
|
+
### Authorization
|
377
|
+
|
378
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
379
|
+
|
380
|
+
### HTTP request headers
|
381
|
+
|
382
|
+
- **Content-Type**: application/json
|
383
|
+
- **Accept**: application/json
|
384
|
+
|
385
|
+
|
386
|
+
## admin_create_user
|
387
|
+
|
388
|
+
> <User> admin_create_user(opts)
|
389
|
+
|
390
|
+
Create a user
|
391
|
+
|
392
|
+
### Examples
|
393
|
+
|
394
|
+
```ruby
|
395
|
+
require 'time'
|
396
|
+
require 'forgejo'
|
397
|
+
# setup authorization
|
398
|
+
Forgejo.configure do |config|
|
399
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
400
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
401
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
402
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
403
|
+
end
|
404
|
+
|
405
|
+
api_instance = Forgejo::AdminApi.new
|
406
|
+
opts = {
|
407
|
+
body: Forgejo::CreateUserOption.new({email: 'email_example', username: 'username_example'}) # CreateUserOption |
|
408
|
+
}
|
409
|
+
|
410
|
+
begin
|
411
|
+
# Create a user
|
412
|
+
result = api_instance.admin_create_user(opts)
|
413
|
+
p result
|
414
|
+
rescue Forgejo::ApiError => e
|
415
|
+
puts "Error when calling AdminApi->admin_create_user: #{e}"
|
416
|
+
end
|
417
|
+
```
|
418
|
+
|
419
|
+
#### Using the admin_create_user_with_http_info variant
|
420
|
+
|
421
|
+
This returns an Array which contains the response data, status code and headers.
|
422
|
+
|
423
|
+
> <Array(<User>, Integer, Hash)> admin_create_user_with_http_info(opts)
|
424
|
+
|
425
|
+
```ruby
|
426
|
+
begin
|
427
|
+
# Create a user
|
428
|
+
data, status_code, headers = api_instance.admin_create_user_with_http_info(opts)
|
429
|
+
p status_code # => 2xx
|
430
|
+
p headers # => { ... }
|
431
|
+
p data # => <User>
|
432
|
+
rescue Forgejo::ApiError => e
|
433
|
+
puts "Error when calling AdminApi->admin_create_user_with_http_info: #{e}"
|
434
|
+
end
|
435
|
+
```
|
436
|
+
|
437
|
+
### Parameters
|
438
|
+
|
439
|
+
| Name | Type | Description | Notes |
|
440
|
+
| ---- | ---- | ----------- | ----- |
|
441
|
+
| **body** | [**CreateUserOption**](CreateUserOption.md) | | [optional] |
|
442
|
+
|
443
|
+
### Return type
|
444
|
+
|
445
|
+
[**User**](User.md)
|
446
|
+
|
447
|
+
### Authorization
|
448
|
+
|
449
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
450
|
+
|
451
|
+
### HTTP request headers
|
452
|
+
|
453
|
+
- **Content-Type**: application/json
|
454
|
+
- **Accept**: application/json
|
455
|
+
|
456
|
+
|
457
|
+
## admin_cron_list
|
458
|
+
|
459
|
+
> <Array<Cron>> admin_cron_list(opts)
|
460
|
+
|
461
|
+
List cron tasks
|
462
|
+
|
463
|
+
### Examples
|
464
|
+
|
465
|
+
```ruby
|
466
|
+
require 'time'
|
467
|
+
require 'forgejo'
|
468
|
+
# setup authorization
|
469
|
+
Forgejo.configure do |config|
|
470
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
471
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
472
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
473
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
474
|
+
end
|
475
|
+
|
476
|
+
api_instance = Forgejo::AdminApi.new
|
477
|
+
opts = {
|
478
|
+
page: 56, # Integer | page number of results to return (1-based)
|
479
|
+
limit: 56 # Integer | page size of results
|
480
|
+
}
|
481
|
+
|
482
|
+
begin
|
483
|
+
# List cron tasks
|
484
|
+
result = api_instance.admin_cron_list(opts)
|
485
|
+
p result
|
486
|
+
rescue Forgejo::ApiError => e
|
487
|
+
puts "Error when calling AdminApi->admin_cron_list: #{e}"
|
488
|
+
end
|
489
|
+
```
|
490
|
+
|
491
|
+
#### Using the admin_cron_list_with_http_info variant
|
492
|
+
|
493
|
+
This returns an Array which contains the response data, status code and headers.
|
494
|
+
|
495
|
+
> <Array(<Array<Cron>>, Integer, Hash)> admin_cron_list_with_http_info(opts)
|
496
|
+
|
497
|
+
```ruby
|
498
|
+
begin
|
499
|
+
# List cron tasks
|
500
|
+
data, status_code, headers = api_instance.admin_cron_list_with_http_info(opts)
|
501
|
+
p status_code # => 2xx
|
502
|
+
p headers # => { ... }
|
503
|
+
p data # => <Array<Cron>>
|
504
|
+
rescue Forgejo::ApiError => e
|
505
|
+
puts "Error when calling AdminApi->admin_cron_list_with_http_info: #{e}"
|
506
|
+
end
|
507
|
+
```
|
508
|
+
|
509
|
+
### Parameters
|
510
|
+
|
511
|
+
| Name | Type | Description | Notes |
|
512
|
+
| ---- | ---- | ----------- | ----- |
|
513
|
+
| **page** | **Integer** | page number of results to return (1-based) | [optional] |
|
514
|
+
| **limit** | **Integer** | page size of results | [optional] |
|
515
|
+
|
516
|
+
### Return type
|
517
|
+
|
518
|
+
[**Array<Cron>**](Cron.md)
|
519
|
+
|
520
|
+
### Authorization
|
521
|
+
|
522
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
523
|
+
|
524
|
+
### HTTP request headers
|
525
|
+
|
526
|
+
- **Content-Type**: Not defined
|
527
|
+
- **Accept**: application/json
|
528
|
+
|
529
|
+
|
530
|
+
## admin_cron_run
|
531
|
+
|
532
|
+
> admin_cron_run(task)
|
533
|
+
|
534
|
+
Run cron task
|
535
|
+
|
536
|
+
### Examples
|
537
|
+
|
538
|
+
```ruby
|
539
|
+
require 'time'
|
540
|
+
require 'forgejo'
|
541
|
+
# setup authorization
|
542
|
+
Forgejo.configure do |config|
|
543
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
544
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
545
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
546
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
547
|
+
end
|
548
|
+
|
549
|
+
api_instance = Forgejo::AdminApi.new
|
550
|
+
task = 'task_example' # String | task to run
|
551
|
+
|
552
|
+
begin
|
553
|
+
# Run cron task
|
554
|
+
api_instance.admin_cron_run(task)
|
555
|
+
rescue Forgejo::ApiError => e
|
556
|
+
puts "Error when calling AdminApi->admin_cron_run: #{e}"
|
557
|
+
end
|
558
|
+
```
|
559
|
+
|
560
|
+
#### Using the admin_cron_run_with_http_info variant
|
561
|
+
|
562
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
563
|
+
|
564
|
+
> <Array(nil, Integer, Hash)> admin_cron_run_with_http_info(task)
|
565
|
+
|
566
|
+
```ruby
|
567
|
+
begin
|
568
|
+
# Run cron task
|
569
|
+
data, status_code, headers = api_instance.admin_cron_run_with_http_info(task)
|
570
|
+
p status_code # => 2xx
|
571
|
+
p headers # => { ... }
|
572
|
+
p data # => nil
|
573
|
+
rescue Forgejo::ApiError => e
|
574
|
+
puts "Error when calling AdminApi->admin_cron_run_with_http_info: #{e}"
|
575
|
+
end
|
576
|
+
```
|
577
|
+
|
578
|
+
### Parameters
|
579
|
+
|
580
|
+
| Name | Type | Description | Notes |
|
581
|
+
| ---- | ---- | ----------- | ----- |
|
582
|
+
| **task** | **String** | task to run | |
|
583
|
+
|
584
|
+
### Return type
|
585
|
+
|
586
|
+
nil (empty response body)
|
587
|
+
|
588
|
+
### Authorization
|
589
|
+
|
590
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
591
|
+
|
592
|
+
### HTTP request headers
|
593
|
+
|
594
|
+
- **Content-Type**: Not defined
|
595
|
+
- **Accept**: Not defined
|
596
|
+
|
597
|
+
|
598
|
+
## admin_delete_hook
|
599
|
+
|
600
|
+
> admin_delete_hook(id)
|
601
|
+
|
602
|
+
Delete a hook
|
603
|
+
|
604
|
+
### Examples
|
605
|
+
|
606
|
+
```ruby
|
607
|
+
require 'time'
|
608
|
+
require 'forgejo'
|
609
|
+
# setup authorization
|
610
|
+
Forgejo.configure do |config|
|
611
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
612
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
613
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
614
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
615
|
+
end
|
616
|
+
|
617
|
+
api_instance = Forgejo::AdminApi.new
|
618
|
+
id = 789 # Integer | id of the hook to delete
|
619
|
+
|
620
|
+
begin
|
621
|
+
# Delete a hook
|
622
|
+
api_instance.admin_delete_hook(id)
|
623
|
+
rescue Forgejo::ApiError => e
|
624
|
+
puts "Error when calling AdminApi->admin_delete_hook: #{e}"
|
625
|
+
end
|
626
|
+
```
|
627
|
+
|
628
|
+
#### Using the admin_delete_hook_with_http_info variant
|
629
|
+
|
630
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
631
|
+
|
632
|
+
> <Array(nil, Integer, Hash)> admin_delete_hook_with_http_info(id)
|
633
|
+
|
634
|
+
```ruby
|
635
|
+
begin
|
636
|
+
# Delete a hook
|
637
|
+
data, status_code, headers = api_instance.admin_delete_hook_with_http_info(id)
|
638
|
+
p status_code # => 2xx
|
639
|
+
p headers # => { ... }
|
640
|
+
p data # => nil
|
641
|
+
rescue Forgejo::ApiError => e
|
642
|
+
puts "Error when calling AdminApi->admin_delete_hook_with_http_info: #{e}"
|
643
|
+
end
|
644
|
+
```
|
645
|
+
|
646
|
+
### Parameters
|
647
|
+
|
648
|
+
| Name | Type | Description | Notes |
|
649
|
+
| ---- | ---- | ----------- | ----- |
|
650
|
+
| **id** | **Integer** | id of the hook to delete | |
|
651
|
+
|
652
|
+
### Return type
|
653
|
+
|
654
|
+
nil (empty response body)
|
655
|
+
|
656
|
+
### Authorization
|
657
|
+
|
658
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
659
|
+
|
660
|
+
### HTTP request headers
|
661
|
+
|
662
|
+
- **Content-Type**: Not defined
|
663
|
+
- **Accept**: Not defined
|
664
|
+
|
665
|
+
|
666
|
+
## admin_delete_unadopted_repository
|
667
|
+
|
668
|
+
> admin_delete_unadopted_repository(owner, repo)
|
669
|
+
|
670
|
+
Delete unadopted files
|
671
|
+
|
672
|
+
### Examples
|
673
|
+
|
674
|
+
```ruby
|
675
|
+
require 'time'
|
676
|
+
require 'forgejo'
|
677
|
+
# setup authorization
|
678
|
+
Forgejo.configure do |config|
|
679
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
680
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
681
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
682
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
683
|
+
end
|
684
|
+
|
685
|
+
api_instance = Forgejo::AdminApi.new
|
686
|
+
owner = 'owner_example' # String | owner of the repo
|
687
|
+
repo = 'repo_example' # String | name of the repo
|
688
|
+
|
689
|
+
begin
|
690
|
+
# Delete unadopted files
|
691
|
+
api_instance.admin_delete_unadopted_repository(owner, repo)
|
692
|
+
rescue Forgejo::ApiError => e
|
693
|
+
puts "Error when calling AdminApi->admin_delete_unadopted_repository: #{e}"
|
694
|
+
end
|
695
|
+
```
|
696
|
+
|
697
|
+
#### Using the admin_delete_unadopted_repository_with_http_info variant
|
698
|
+
|
699
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
700
|
+
|
701
|
+
> <Array(nil, Integer, Hash)> admin_delete_unadopted_repository_with_http_info(owner, repo)
|
702
|
+
|
703
|
+
```ruby
|
704
|
+
begin
|
705
|
+
# Delete unadopted files
|
706
|
+
data, status_code, headers = api_instance.admin_delete_unadopted_repository_with_http_info(owner, repo)
|
707
|
+
p status_code # => 2xx
|
708
|
+
p headers # => { ... }
|
709
|
+
p data # => nil
|
710
|
+
rescue Forgejo::ApiError => e
|
711
|
+
puts "Error when calling AdminApi->admin_delete_unadopted_repository_with_http_info: #{e}"
|
712
|
+
end
|
713
|
+
```
|
714
|
+
|
715
|
+
### Parameters
|
716
|
+
|
717
|
+
| Name | Type | Description | Notes |
|
718
|
+
| ---- | ---- | ----------- | ----- |
|
719
|
+
| **owner** | **String** | owner of the repo | |
|
720
|
+
| **repo** | **String** | name of the repo | |
|
721
|
+
|
722
|
+
### Return type
|
723
|
+
|
724
|
+
nil (empty response body)
|
725
|
+
|
726
|
+
### Authorization
|
727
|
+
|
728
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
729
|
+
|
730
|
+
### HTTP request headers
|
731
|
+
|
732
|
+
- **Content-Type**: Not defined
|
733
|
+
- **Accept**: Not defined
|
734
|
+
|
735
|
+
|
736
|
+
## admin_delete_user
|
737
|
+
|
738
|
+
> admin_delete_user(username, opts)
|
739
|
+
|
740
|
+
Delete a user
|
741
|
+
|
742
|
+
### Examples
|
743
|
+
|
744
|
+
```ruby
|
745
|
+
require 'time'
|
746
|
+
require 'forgejo'
|
747
|
+
# setup authorization
|
748
|
+
Forgejo.configure do |config|
|
749
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
750
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
751
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
752
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
753
|
+
end
|
754
|
+
|
755
|
+
api_instance = Forgejo::AdminApi.new
|
756
|
+
username = 'username_example' # String | username of user to delete
|
757
|
+
opts = {
|
758
|
+
purge: true # Boolean | purge the user from the system completely
|
759
|
+
}
|
760
|
+
|
761
|
+
begin
|
762
|
+
# Delete a user
|
763
|
+
api_instance.admin_delete_user(username, opts)
|
764
|
+
rescue Forgejo::ApiError => e
|
765
|
+
puts "Error when calling AdminApi->admin_delete_user: #{e}"
|
766
|
+
end
|
767
|
+
```
|
768
|
+
|
769
|
+
#### Using the admin_delete_user_with_http_info variant
|
770
|
+
|
771
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
772
|
+
|
773
|
+
> <Array(nil, Integer, Hash)> admin_delete_user_with_http_info(username, opts)
|
774
|
+
|
775
|
+
```ruby
|
776
|
+
begin
|
777
|
+
# Delete a user
|
778
|
+
data, status_code, headers = api_instance.admin_delete_user_with_http_info(username, opts)
|
779
|
+
p status_code # => 2xx
|
780
|
+
p headers # => { ... }
|
781
|
+
p data # => nil
|
782
|
+
rescue Forgejo::ApiError => e
|
783
|
+
puts "Error when calling AdminApi->admin_delete_user_with_http_info: #{e}"
|
784
|
+
end
|
785
|
+
```
|
786
|
+
|
787
|
+
### Parameters
|
788
|
+
|
789
|
+
| Name | Type | Description | Notes |
|
790
|
+
| ---- | ---- | ----------- | ----- |
|
791
|
+
| **username** | **String** | username of user to delete | |
|
792
|
+
| **purge** | **Boolean** | purge the user from the system completely | [optional] |
|
793
|
+
|
794
|
+
### Return type
|
795
|
+
|
796
|
+
nil (empty response body)
|
797
|
+
|
798
|
+
### Authorization
|
799
|
+
|
800
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
801
|
+
|
802
|
+
### HTTP request headers
|
803
|
+
|
804
|
+
- **Content-Type**: Not defined
|
805
|
+
- **Accept**: Not defined
|
806
|
+
|
807
|
+
|
808
|
+
## admin_delete_user_public_key
|
809
|
+
|
810
|
+
> admin_delete_user_public_key(username, id)
|
811
|
+
|
812
|
+
Delete a user's public key
|
813
|
+
|
814
|
+
### Examples
|
815
|
+
|
816
|
+
```ruby
|
817
|
+
require 'time'
|
818
|
+
require 'forgejo'
|
819
|
+
# setup authorization
|
820
|
+
Forgejo.configure do |config|
|
821
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
822
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
823
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
824
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
825
|
+
end
|
826
|
+
|
827
|
+
api_instance = Forgejo::AdminApi.new
|
828
|
+
username = 'username_example' # String | username of user
|
829
|
+
id = 789 # Integer | id of the key to delete
|
830
|
+
|
831
|
+
begin
|
832
|
+
# Delete a user's public key
|
833
|
+
api_instance.admin_delete_user_public_key(username, id)
|
834
|
+
rescue Forgejo::ApiError => e
|
835
|
+
puts "Error when calling AdminApi->admin_delete_user_public_key: #{e}"
|
836
|
+
end
|
837
|
+
```
|
838
|
+
|
839
|
+
#### Using the admin_delete_user_public_key_with_http_info variant
|
840
|
+
|
841
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
842
|
+
|
843
|
+
> <Array(nil, Integer, Hash)> admin_delete_user_public_key_with_http_info(username, id)
|
844
|
+
|
845
|
+
```ruby
|
846
|
+
begin
|
847
|
+
# Delete a user's public key
|
848
|
+
data, status_code, headers = api_instance.admin_delete_user_public_key_with_http_info(username, id)
|
849
|
+
p status_code # => 2xx
|
850
|
+
p headers # => { ... }
|
851
|
+
p data # => nil
|
852
|
+
rescue Forgejo::ApiError => e
|
853
|
+
puts "Error when calling AdminApi->admin_delete_user_public_key_with_http_info: #{e}"
|
854
|
+
end
|
855
|
+
```
|
856
|
+
|
857
|
+
### Parameters
|
858
|
+
|
859
|
+
| Name | Type | Description | Notes |
|
860
|
+
| ---- | ---- | ----------- | ----- |
|
861
|
+
| **username** | **String** | username of user | |
|
862
|
+
| **id** | **Integer** | id of the key to delete | |
|
863
|
+
|
864
|
+
### Return type
|
865
|
+
|
866
|
+
nil (empty response body)
|
867
|
+
|
868
|
+
### Authorization
|
869
|
+
|
870
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
871
|
+
|
872
|
+
### HTTP request headers
|
873
|
+
|
874
|
+
- **Content-Type**: Not defined
|
875
|
+
- **Accept**: Not defined
|
876
|
+
|
877
|
+
|
878
|
+
## admin_edit_hook
|
879
|
+
|
880
|
+
> <Hook> admin_edit_hook(id, opts)
|
881
|
+
|
882
|
+
Update a hook
|
883
|
+
|
884
|
+
### Examples
|
885
|
+
|
886
|
+
```ruby
|
887
|
+
require 'time'
|
888
|
+
require 'forgejo'
|
889
|
+
# setup authorization
|
890
|
+
Forgejo.configure do |config|
|
891
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
892
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
893
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
894
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
895
|
+
end
|
896
|
+
|
897
|
+
api_instance = Forgejo::AdminApi.new
|
898
|
+
id = 789 # Integer | id of the hook to update
|
899
|
+
opts = {
|
900
|
+
body: Forgejo::EditHookOption.new # EditHookOption |
|
901
|
+
}
|
902
|
+
|
903
|
+
begin
|
904
|
+
# Update a hook
|
905
|
+
result = api_instance.admin_edit_hook(id, opts)
|
906
|
+
p result
|
907
|
+
rescue Forgejo::ApiError => e
|
908
|
+
puts "Error when calling AdminApi->admin_edit_hook: #{e}"
|
909
|
+
end
|
910
|
+
```
|
911
|
+
|
912
|
+
#### Using the admin_edit_hook_with_http_info variant
|
913
|
+
|
914
|
+
This returns an Array which contains the response data, status code and headers.
|
915
|
+
|
916
|
+
> <Array(<Hook>, Integer, Hash)> admin_edit_hook_with_http_info(id, opts)
|
917
|
+
|
918
|
+
```ruby
|
919
|
+
begin
|
920
|
+
# Update a hook
|
921
|
+
data, status_code, headers = api_instance.admin_edit_hook_with_http_info(id, opts)
|
922
|
+
p status_code # => 2xx
|
923
|
+
p headers # => { ... }
|
924
|
+
p data # => <Hook>
|
925
|
+
rescue Forgejo::ApiError => e
|
926
|
+
puts "Error when calling AdminApi->admin_edit_hook_with_http_info: #{e}"
|
927
|
+
end
|
928
|
+
```
|
929
|
+
|
930
|
+
### Parameters
|
931
|
+
|
932
|
+
| Name | Type | Description | Notes |
|
933
|
+
| ---- | ---- | ----------- | ----- |
|
934
|
+
| **id** | **Integer** | id of the hook to update | |
|
935
|
+
| **body** | [**EditHookOption**](EditHookOption.md) | | [optional] |
|
936
|
+
|
937
|
+
### Return type
|
938
|
+
|
939
|
+
[**Hook**](Hook.md)
|
940
|
+
|
941
|
+
### Authorization
|
942
|
+
|
943
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
944
|
+
|
945
|
+
### HTTP request headers
|
946
|
+
|
947
|
+
- **Content-Type**: application/json
|
948
|
+
- **Accept**: application/json
|
949
|
+
|
950
|
+
|
951
|
+
## admin_edit_user
|
952
|
+
|
953
|
+
> <User> admin_edit_user(username, opts)
|
954
|
+
|
955
|
+
Edit an existing user
|
956
|
+
|
957
|
+
### Examples
|
958
|
+
|
959
|
+
```ruby
|
960
|
+
require 'time'
|
961
|
+
require 'forgejo'
|
962
|
+
# setup authorization
|
963
|
+
Forgejo.configure do |config|
|
964
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
965
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
966
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
967
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
968
|
+
end
|
969
|
+
|
970
|
+
api_instance = Forgejo::AdminApi.new
|
971
|
+
username = 'username_example' # String | username of user to edit
|
972
|
+
opts = {
|
973
|
+
body: Forgejo::EditUserOption.new # EditUserOption |
|
974
|
+
}
|
975
|
+
|
976
|
+
begin
|
977
|
+
# Edit an existing user
|
978
|
+
result = api_instance.admin_edit_user(username, opts)
|
979
|
+
p result
|
980
|
+
rescue Forgejo::ApiError => e
|
981
|
+
puts "Error when calling AdminApi->admin_edit_user: #{e}"
|
982
|
+
end
|
983
|
+
```
|
984
|
+
|
985
|
+
#### Using the admin_edit_user_with_http_info variant
|
986
|
+
|
987
|
+
This returns an Array which contains the response data, status code and headers.
|
988
|
+
|
989
|
+
> <Array(<User>, Integer, Hash)> admin_edit_user_with_http_info(username, opts)
|
990
|
+
|
991
|
+
```ruby
|
992
|
+
begin
|
993
|
+
# Edit an existing user
|
994
|
+
data, status_code, headers = api_instance.admin_edit_user_with_http_info(username, opts)
|
995
|
+
p status_code # => 2xx
|
996
|
+
p headers # => { ... }
|
997
|
+
p data # => <User>
|
998
|
+
rescue Forgejo::ApiError => e
|
999
|
+
puts "Error when calling AdminApi->admin_edit_user_with_http_info: #{e}"
|
1000
|
+
end
|
1001
|
+
```
|
1002
|
+
|
1003
|
+
### Parameters
|
1004
|
+
|
1005
|
+
| Name | Type | Description | Notes |
|
1006
|
+
| ---- | ---- | ----------- | ----- |
|
1007
|
+
| **username** | **String** | username of user to edit | |
|
1008
|
+
| **body** | [**EditUserOption**](EditUserOption.md) | | [optional] |
|
1009
|
+
|
1010
|
+
### Return type
|
1011
|
+
|
1012
|
+
[**User**](User.md)
|
1013
|
+
|
1014
|
+
### Authorization
|
1015
|
+
|
1016
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1017
|
+
|
1018
|
+
### HTTP request headers
|
1019
|
+
|
1020
|
+
- **Content-Type**: application/json
|
1021
|
+
- **Accept**: application/json
|
1022
|
+
|
1023
|
+
|
1024
|
+
## admin_get_all_emails
|
1025
|
+
|
1026
|
+
> <Array<Email>> admin_get_all_emails(opts)
|
1027
|
+
|
1028
|
+
List all emails
|
1029
|
+
|
1030
|
+
### Examples
|
1031
|
+
|
1032
|
+
```ruby
|
1033
|
+
require 'time'
|
1034
|
+
require 'forgejo'
|
1035
|
+
# setup authorization
|
1036
|
+
Forgejo.configure do |config|
|
1037
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1038
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1039
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1040
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1041
|
+
end
|
1042
|
+
|
1043
|
+
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
|
+
|
1049
|
+
begin
|
1050
|
+
# List all emails
|
1051
|
+
result = api_instance.admin_get_all_emails(opts)
|
1052
|
+
p result
|
1053
|
+
rescue Forgejo::ApiError => e
|
1054
|
+
puts "Error when calling AdminApi->admin_get_all_emails: #{e}"
|
1055
|
+
end
|
1056
|
+
```
|
1057
|
+
|
1058
|
+
#### Using the admin_get_all_emails_with_http_info variant
|
1059
|
+
|
1060
|
+
This returns an Array which contains the response data, status code and headers.
|
1061
|
+
|
1062
|
+
> <Array(<Array<Email>>, Integer, Hash)> admin_get_all_emails_with_http_info(opts)
|
1063
|
+
|
1064
|
+
```ruby
|
1065
|
+
begin
|
1066
|
+
# List all emails
|
1067
|
+
data, status_code, headers = api_instance.admin_get_all_emails_with_http_info(opts)
|
1068
|
+
p status_code # => 2xx
|
1069
|
+
p headers # => { ... }
|
1070
|
+
p data # => <Array<Email>>
|
1071
|
+
rescue Forgejo::ApiError => e
|
1072
|
+
puts "Error when calling AdminApi->admin_get_all_emails_with_http_info: #{e}"
|
1073
|
+
end
|
1074
|
+
```
|
1075
|
+
|
1076
|
+
### Parameters
|
1077
|
+
|
1078
|
+
| Name | Type | Description | Notes |
|
1079
|
+
| ---- | ---- | ----------- | ----- |
|
1080
|
+
| **page** | **Integer** | page number of results to return (1-based) | [optional] |
|
1081
|
+
| **limit** | **Integer** | page size of results | [optional] |
|
1082
|
+
|
1083
|
+
### Return type
|
1084
|
+
|
1085
|
+
[**Array<Email>**](Email.md)
|
1086
|
+
|
1087
|
+
### Authorization
|
1088
|
+
|
1089
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1090
|
+
|
1091
|
+
### HTTP request headers
|
1092
|
+
|
1093
|
+
- **Content-Type**: Not defined
|
1094
|
+
- **Accept**: application/json
|
1095
|
+
|
1096
|
+
|
1097
|
+
## admin_get_all_orgs
|
1098
|
+
|
1099
|
+
> <Array<Organization>> admin_get_all_orgs(opts)
|
1100
|
+
|
1101
|
+
List all organizations
|
1102
|
+
|
1103
|
+
### Examples
|
1104
|
+
|
1105
|
+
```ruby
|
1106
|
+
require 'time'
|
1107
|
+
require 'forgejo'
|
1108
|
+
# setup authorization
|
1109
|
+
Forgejo.configure do |config|
|
1110
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1111
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1112
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1113
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1114
|
+
end
|
1115
|
+
|
1116
|
+
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
|
+
|
1122
|
+
begin
|
1123
|
+
# List all organizations
|
1124
|
+
result = api_instance.admin_get_all_orgs(opts)
|
1125
|
+
p result
|
1126
|
+
rescue Forgejo::ApiError => e
|
1127
|
+
puts "Error when calling AdminApi->admin_get_all_orgs: #{e}"
|
1128
|
+
end
|
1129
|
+
```
|
1130
|
+
|
1131
|
+
#### Using the admin_get_all_orgs_with_http_info variant
|
1132
|
+
|
1133
|
+
This returns an Array which contains the response data, status code and headers.
|
1134
|
+
|
1135
|
+
> <Array(<Array<Organization>>, Integer, Hash)> admin_get_all_orgs_with_http_info(opts)
|
1136
|
+
|
1137
|
+
```ruby
|
1138
|
+
begin
|
1139
|
+
# List all organizations
|
1140
|
+
data, status_code, headers = api_instance.admin_get_all_orgs_with_http_info(opts)
|
1141
|
+
p status_code # => 2xx
|
1142
|
+
p headers # => { ... }
|
1143
|
+
p data # => <Array<Organization>>
|
1144
|
+
rescue Forgejo::ApiError => e
|
1145
|
+
puts "Error when calling AdminApi->admin_get_all_orgs_with_http_info: #{e}"
|
1146
|
+
end
|
1147
|
+
```
|
1148
|
+
|
1149
|
+
### Parameters
|
1150
|
+
|
1151
|
+
| Name | Type | Description | Notes |
|
1152
|
+
| ---- | ---- | ----------- | ----- |
|
1153
|
+
| **page** | **Integer** | page number of results to return (1-based) | [optional] |
|
1154
|
+
| **limit** | **Integer** | page size of results | [optional] |
|
1155
|
+
|
1156
|
+
### Return type
|
1157
|
+
|
1158
|
+
[**Array<Organization>**](Organization.md)
|
1159
|
+
|
1160
|
+
### Authorization
|
1161
|
+
|
1162
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1163
|
+
|
1164
|
+
### HTTP request headers
|
1165
|
+
|
1166
|
+
- **Content-Type**: Not defined
|
1167
|
+
- **Accept**: application/json
|
1168
|
+
|
1169
|
+
|
1170
|
+
## admin_get_hook
|
1171
|
+
|
1172
|
+
> <Hook> admin_get_hook(id)
|
1173
|
+
|
1174
|
+
Get a hook
|
1175
|
+
|
1176
|
+
### Examples
|
1177
|
+
|
1178
|
+
```ruby
|
1179
|
+
require 'time'
|
1180
|
+
require 'forgejo'
|
1181
|
+
# setup authorization
|
1182
|
+
Forgejo.configure do |config|
|
1183
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1184
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1185
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1186
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1187
|
+
end
|
1188
|
+
|
1189
|
+
api_instance = Forgejo::AdminApi.new
|
1190
|
+
id = 789 # Integer | id of the hook to get
|
1191
|
+
|
1192
|
+
begin
|
1193
|
+
# Get a hook
|
1194
|
+
result = api_instance.admin_get_hook(id)
|
1195
|
+
p result
|
1196
|
+
rescue Forgejo::ApiError => e
|
1197
|
+
puts "Error when calling AdminApi->admin_get_hook: #{e}"
|
1198
|
+
end
|
1199
|
+
```
|
1200
|
+
|
1201
|
+
#### Using the admin_get_hook_with_http_info variant
|
1202
|
+
|
1203
|
+
This returns an Array which contains the response data, status code and headers.
|
1204
|
+
|
1205
|
+
> <Array(<Hook>, Integer, Hash)> admin_get_hook_with_http_info(id)
|
1206
|
+
|
1207
|
+
```ruby
|
1208
|
+
begin
|
1209
|
+
# Get a hook
|
1210
|
+
data, status_code, headers = api_instance.admin_get_hook_with_http_info(id)
|
1211
|
+
p status_code # => 2xx
|
1212
|
+
p headers # => { ... }
|
1213
|
+
p data # => <Hook>
|
1214
|
+
rescue Forgejo::ApiError => e
|
1215
|
+
puts "Error when calling AdminApi->admin_get_hook_with_http_info: #{e}"
|
1216
|
+
end
|
1217
|
+
```
|
1218
|
+
|
1219
|
+
### Parameters
|
1220
|
+
|
1221
|
+
| Name | Type | Description | Notes |
|
1222
|
+
| ---- | ---- | ----------- | ----- |
|
1223
|
+
| **id** | **Integer** | id of the hook to get | |
|
1224
|
+
|
1225
|
+
### Return type
|
1226
|
+
|
1227
|
+
[**Hook**](Hook.md)
|
1228
|
+
|
1229
|
+
### Authorization
|
1230
|
+
|
1231
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1232
|
+
|
1233
|
+
### HTTP request headers
|
1234
|
+
|
1235
|
+
- **Content-Type**: Not defined
|
1236
|
+
- **Accept**: application/json
|
1237
|
+
|
1238
|
+
|
1239
|
+
## admin_get_runner_registration_token
|
1240
|
+
|
1241
|
+
> admin_get_runner_registration_token
|
1242
|
+
|
1243
|
+
Get an global actions runner registration token
|
1244
|
+
|
1245
|
+
### Examples
|
1246
|
+
|
1247
|
+
```ruby
|
1248
|
+
require 'time'
|
1249
|
+
require 'forgejo'
|
1250
|
+
# setup authorization
|
1251
|
+
Forgejo.configure do |config|
|
1252
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1253
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1254
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1255
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1256
|
+
end
|
1257
|
+
|
1258
|
+
api_instance = Forgejo::AdminApi.new
|
1259
|
+
|
1260
|
+
begin
|
1261
|
+
# Get an global actions runner registration token
|
1262
|
+
api_instance.admin_get_runner_registration_token
|
1263
|
+
rescue Forgejo::ApiError => e
|
1264
|
+
puts "Error when calling AdminApi->admin_get_runner_registration_token: #{e}"
|
1265
|
+
end
|
1266
|
+
```
|
1267
|
+
|
1268
|
+
#### Using the admin_get_runner_registration_token_with_http_info variant
|
1269
|
+
|
1270
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1271
|
+
|
1272
|
+
> <Array(nil, Integer, Hash)> admin_get_runner_registration_token_with_http_info
|
1273
|
+
|
1274
|
+
```ruby
|
1275
|
+
begin
|
1276
|
+
# Get an global actions runner registration token
|
1277
|
+
data, status_code, headers = api_instance.admin_get_runner_registration_token_with_http_info
|
1278
|
+
p status_code # => 2xx
|
1279
|
+
p headers # => { ... }
|
1280
|
+
p data # => nil
|
1281
|
+
rescue Forgejo::ApiError => e
|
1282
|
+
puts "Error when calling AdminApi->admin_get_runner_registration_token_with_http_info: #{e}"
|
1283
|
+
end
|
1284
|
+
```
|
1285
|
+
|
1286
|
+
### Parameters
|
1287
|
+
|
1288
|
+
This endpoint does not need any parameter.
|
1289
|
+
|
1290
|
+
### Return type
|
1291
|
+
|
1292
|
+
nil (empty response body)
|
1293
|
+
|
1294
|
+
### Authorization
|
1295
|
+
|
1296
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1297
|
+
|
1298
|
+
### HTTP request headers
|
1299
|
+
|
1300
|
+
- **Content-Type**: Not defined
|
1301
|
+
- **Accept**: Not defined
|
1302
|
+
|
1303
|
+
|
1304
|
+
## admin_list_hooks
|
1305
|
+
|
1306
|
+
> <Array<Hook>> admin_list_hooks(opts)
|
1307
|
+
|
1308
|
+
List system's webhooks
|
1309
|
+
|
1310
|
+
### Examples
|
1311
|
+
|
1312
|
+
```ruby
|
1313
|
+
require 'time'
|
1314
|
+
require 'forgejo'
|
1315
|
+
# setup authorization
|
1316
|
+
Forgejo.configure do |config|
|
1317
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1318
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1319
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1320
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1321
|
+
end
|
1322
|
+
|
1323
|
+
api_instance = Forgejo::AdminApi.new
|
1324
|
+
opts = {
|
1325
|
+
page: 56, # Integer | page number of results to return (1-based)
|
1326
|
+
limit: 56 # Integer | page size of results
|
1327
|
+
}
|
1328
|
+
|
1329
|
+
begin
|
1330
|
+
# List system's webhooks
|
1331
|
+
result = api_instance.admin_list_hooks(opts)
|
1332
|
+
p result
|
1333
|
+
rescue Forgejo::ApiError => e
|
1334
|
+
puts "Error when calling AdminApi->admin_list_hooks: #{e}"
|
1335
|
+
end
|
1336
|
+
```
|
1337
|
+
|
1338
|
+
#### Using the admin_list_hooks_with_http_info variant
|
1339
|
+
|
1340
|
+
This returns an Array which contains the response data, status code and headers.
|
1341
|
+
|
1342
|
+
> <Array(<Array<Hook>>, Integer, Hash)> admin_list_hooks_with_http_info(opts)
|
1343
|
+
|
1344
|
+
```ruby
|
1345
|
+
begin
|
1346
|
+
# List system's webhooks
|
1347
|
+
data, status_code, headers = api_instance.admin_list_hooks_with_http_info(opts)
|
1348
|
+
p status_code # => 2xx
|
1349
|
+
p headers # => { ... }
|
1350
|
+
p data # => <Array<Hook>>
|
1351
|
+
rescue Forgejo::ApiError => e
|
1352
|
+
puts "Error when calling AdminApi->admin_list_hooks_with_http_info: #{e}"
|
1353
|
+
end
|
1354
|
+
```
|
1355
|
+
|
1356
|
+
### Parameters
|
1357
|
+
|
1358
|
+
| Name | Type | Description | Notes |
|
1359
|
+
| ---- | ---- | ----------- | ----- |
|
1360
|
+
| **page** | **Integer** | page number of results to return (1-based) | [optional] |
|
1361
|
+
| **limit** | **Integer** | page size of results | [optional] |
|
1362
|
+
|
1363
|
+
### Return type
|
1364
|
+
|
1365
|
+
[**Array<Hook>**](Hook.md)
|
1366
|
+
|
1367
|
+
### Authorization
|
1368
|
+
|
1369
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1370
|
+
|
1371
|
+
### HTTP request headers
|
1372
|
+
|
1373
|
+
- **Content-Type**: Not defined
|
1374
|
+
- **Accept**: application/json
|
1375
|
+
|
1376
|
+
|
1377
|
+
## admin_rename_user
|
1378
|
+
|
1379
|
+
> admin_rename_user(username, body)
|
1380
|
+
|
1381
|
+
Rename a user
|
1382
|
+
|
1383
|
+
### Examples
|
1384
|
+
|
1385
|
+
```ruby
|
1386
|
+
require 'time'
|
1387
|
+
require 'forgejo'
|
1388
|
+
# setup authorization
|
1389
|
+
Forgejo.configure do |config|
|
1390
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1391
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1392
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1393
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1394
|
+
end
|
1395
|
+
|
1396
|
+
api_instance = Forgejo::AdminApi.new
|
1397
|
+
username = 'username_example' # String | existing username of user
|
1398
|
+
body = Forgejo::RenameUserOption.new({new_username: 'new_username_example'}) # RenameUserOption |
|
1399
|
+
|
1400
|
+
begin
|
1401
|
+
# Rename a user
|
1402
|
+
api_instance.admin_rename_user(username, body)
|
1403
|
+
rescue Forgejo::ApiError => e
|
1404
|
+
puts "Error when calling AdminApi->admin_rename_user: #{e}"
|
1405
|
+
end
|
1406
|
+
```
|
1407
|
+
|
1408
|
+
#### Using the admin_rename_user_with_http_info variant
|
1409
|
+
|
1410
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1411
|
+
|
1412
|
+
> <Array(nil, Integer, Hash)> admin_rename_user_with_http_info(username, body)
|
1413
|
+
|
1414
|
+
```ruby
|
1415
|
+
begin
|
1416
|
+
# Rename a user
|
1417
|
+
data, status_code, headers = api_instance.admin_rename_user_with_http_info(username, body)
|
1418
|
+
p status_code # => 2xx
|
1419
|
+
p headers # => { ... }
|
1420
|
+
p data # => nil
|
1421
|
+
rescue Forgejo::ApiError => e
|
1422
|
+
puts "Error when calling AdminApi->admin_rename_user_with_http_info: #{e}"
|
1423
|
+
end
|
1424
|
+
```
|
1425
|
+
|
1426
|
+
### Parameters
|
1427
|
+
|
1428
|
+
| Name | Type | Description | Notes |
|
1429
|
+
| ---- | ---- | ----------- | ----- |
|
1430
|
+
| **username** | **String** | existing username of user | |
|
1431
|
+
| **body** | [**RenameUserOption**](RenameUserOption.md) | | |
|
1432
|
+
|
1433
|
+
### Return type
|
1434
|
+
|
1435
|
+
nil (empty response body)
|
1436
|
+
|
1437
|
+
### Authorization
|
1438
|
+
|
1439
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1440
|
+
|
1441
|
+
### HTTP request headers
|
1442
|
+
|
1443
|
+
- **Content-Type**: application/json, text/plain
|
1444
|
+
- **Accept**: Not defined
|
1445
|
+
|
1446
|
+
|
1447
|
+
## admin_search_emails
|
1448
|
+
|
1449
|
+
> <Array<Email>> admin_search_emails(opts)
|
1450
|
+
|
1451
|
+
Search all emails
|
1452
|
+
|
1453
|
+
### Examples
|
1454
|
+
|
1455
|
+
```ruby
|
1456
|
+
require 'time'
|
1457
|
+
require 'forgejo'
|
1458
|
+
# setup authorization
|
1459
|
+
Forgejo.configure do |config|
|
1460
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1461
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1462
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1463
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1464
|
+
end
|
1465
|
+
|
1466
|
+
api_instance = Forgejo::AdminApi.new
|
1467
|
+
opts = {
|
1468
|
+
q: 'q_example', # String | keyword
|
1469
|
+
page: 56, # Integer | page number of results to return (1-based)
|
1470
|
+
limit: 56 # Integer | page size of results
|
1471
|
+
}
|
1472
|
+
|
1473
|
+
begin
|
1474
|
+
# Search all emails
|
1475
|
+
result = api_instance.admin_search_emails(opts)
|
1476
|
+
p result
|
1477
|
+
rescue Forgejo::ApiError => e
|
1478
|
+
puts "Error when calling AdminApi->admin_search_emails: #{e}"
|
1479
|
+
end
|
1480
|
+
```
|
1481
|
+
|
1482
|
+
#### Using the admin_search_emails_with_http_info variant
|
1483
|
+
|
1484
|
+
This returns an Array which contains the response data, status code and headers.
|
1485
|
+
|
1486
|
+
> <Array(<Array<Email>>, Integer, Hash)> admin_search_emails_with_http_info(opts)
|
1487
|
+
|
1488
|
+
```ruby
|
1489
|
+
begin
|
1490
|
+
# Search all emails
|
1491
|
+
data, status_code, headers = api_instance.admin_search_emails_with_http_info(opts)
|
1492
|
+
p status_code # => 2xx
|
1493
|
+
p headers # => { ... }
|
1494
|
+
p data # => <Array<Email>>
|
1495
|
+
rescue Forgejo::ApiError => e
|
1496
|
+
puts "Error when calling AdminApi->admin_search_emails_with_http_info: #{e}"
|
1497
|
+
end
|
1498
|
+
```
|
1499
|
+
|
1500
|
+
### Parameters
|
1501
|
+
|
1502
|
+
| Name | Type | Description | Notes |
|
1503
|
+
| ---- | ---- | ----------- | ----- |
|
1504
|
+
| **q** | **String** | keyword | [optional] |
|
1505
|
+
| **page** | **Integer** | page number of results to return (1-based) | [optional] |
|
1506
|
+
| **limit** | **Integer** | page size of results | [optional] |
|
1507
|
+
|
1508
|
+
### Return type
|
1509
|
+
|
1510
|
+
[**Array<Email>**](Email.md)
|
1511
|
+
|
1512
|
+
### Authorization
|
1513
|
+
|
1514
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1515
|
+
|
1516
|
+
### HTTP request headers
|
1517
|
+
|
1518
|
+
- **Content-Type**: Not defined
|
1519
|
+
- **Accept**: application/json
|
1520
|
+
|
1521
|
+
|
1522
|
+
## admin_search_users
|
1523
|
+
|
1524
|
+
> <Array<User>> admin_search_users(opts)
|
1525
|
+
|
1526
|
+
Search users according filter conditions
|
1527
|
+
|
1528
|
+
### Examples
|
1529
|
+
|
1530
|
+
```ruby
|
1531
|
+
require 'time'
|
1532
|
+
require 'forgejo'
|
1533
|
+
# setup authorization
|
1534
|
+
Forgejo.configure do |config|
|
1535
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1536
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1537
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1538
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1539
|
+
end
|
1540
|
+
|
1541
|
+
api_instance = Forgejo::AdminApi.new
|
1542
|
+
opts = {
|
1543
|
+
source_id: 789, # Integer | ID of the user's login source to search for
|
1544
|
+
login_name: 'login_name_example', # String | user's login name to search for
|
1545
|
+
page: 56, # Integer | page number of results to return (1-based)
|
1546
|
+
limit: 56 # Integer | page size of results
|
1547
|
+
}
|
1548
|
+
|
1549
|
+
begin
|
1550
|
+
# Search users according filter conditions
|
1551
|
+
result = api_instance.admin_search_users(opts)
|
1552
|
+
p result
|
1553
|
+
rescue Forgejo::ApiError => e
|
1554
|
+
puts "Error when calling AdminApi->admin_search_users: #{e}"
|
1555
|
+
end
|
1556
|
+
```
|
1557
|
+
|
1558
|
+
#### Using the admin_search_users_with_http_info variant
|
1559
|
+
|
1560
|
+
This returns an Array which contains the response data, status code and headers.
|
1561
|
+
|
1562
|
+
> <Array(<Array<User>>, Integer, Hash)> admin_search_users_with_http_info(opts)
|
1563
|
+
|
1564
|
+
```ruby
|
1565
|
+
begin
|
1566
|
+
# Search users according filter conditions
|
1567
|
+
data, status_code, headers = api_instance.admin_search_users_with_http_info(opts)
|
1568
|
+
p status_code # => 2xx
|
1569
|
+
p headers # => { ... }
|
1570
|
+
p data # => <Array<User>>
|
1571
|
+
rescue Forgejo::ApiError => e
|
1572
|
+
puts "Error when calling AdminApi->admin_search_users_with_http_info: #{e}"
|
1573
|
+
end
|
1574
|
+
```
|
1575
|
+
|
1576
|
+
### Parameters
|
1577
|
+
|
1578
|
+
| Name | Type | Description | Notes |
|
1579
|
+
| ---- | ---- | ----------- | ----- |
|
1580
|
+
| **source_id** | **Integer** | ID of the user's login source to search for | [optional] |
|
1581
|
+
| **login_name** | **String** | user's login name to search for | [optional] |
|
1582
|
+
| **page** | **Integer** | page number of results to return (1-based) | [optional] |
|
1583
|
+
| **limit** | **Integer** | page size of results | [optional] |
|
1584
|
+
|
1585
|
+
### Return type
|
1586
|
+
|
1587
|
+
[**Array<User>**](User.md)
|
1588
|
+
|
1589
|
+
### Authorization
|
1590
|
+
|
1591
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1592
|
+
|
1593
|
+
### HTTP request headers
|
1594
|
+
|
1595
|
+
- **Content-Type**: Not defined
|
1596
|
+
- **Accept**: application/json
|
1597
|
+
|
1598
|
+
|
1599
|
+
## admin_unadopted_list
|
1600
|
+
|
1601
|
+
> Array<String> admin_unadopted_list(opts)
|
1602
|
+
|
1603
|
+
List unadopted repositories
|
1604
|
+
|
1605
|
+
### Examples
|
1606
|
+
|
1607
|
+
```ruby
|
1608
|
+
require 'time'
|
1609
|
+
require 'forgejo'
|
1610
|
+
# setup authorization
|
1611
|
+
Forgejo.configure do |config|
|
1612
|
+
# Configure API key authorization: AuthorizationHeaderToken
|
1613
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
1614
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
1615
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
1616
|
+
end
|
1617
|
+
|
1618
|
+
api_instance = Forgejo::AdminApi.new
|
1619
|
+
opts = {
|
1620
|
+
page: 56, # Integer | page number of results to return (1-based)
|
1621
|
+
limit: 56, # Integer | page size of results
|
1622
|
+
pattern: 'pattern_example' # String | pattern of repositories to search for
|
1623
|
+
}
|
1624
|
+
|
1625
|
+
begin
|
1626
|
+
# List unadopted repositories
|
1627
|
+
result = api_instance.admin_unadopted_list(opts)
|
1628
|
+
p result
|
1629
|
+
rescue Forgejo::ApiError => e
|
1630
|
+
puts "Error when calling AdminApi->admin_unadopted_list: #{e}"
|
1631
|
+
end
|
1632
|
+
```
|
1633
|
+
|
1634
|
+
#### Using the admin_unadopted_list_with_http_info variant
|
1635
|
+
|
1636
|
+
This returns an Array which contains the response data, status code and headers.
|
1637
|
+
|
1638
|
+
> <Array(Array<String>, Integer, Hash)> admin_unadopted_list_with_http_info(opts)
|
1639
|
+
|
1640
|
+
```ruby
|
1641
|
+
begin
|
1642
|
+
# List unadopted repositories
|
1643
|
+
data, status_code, headers = api_instance.admin_unadopted_list_with_http_info(opts)
|
1644
|
+
p status_code # => 2xx
|
1645
|
+
p headers # => { ... }
|
1646
|
+
p data # => Array<String>
|
1647
|
+
rescue Forgejo::ApiError => e
|
1648
|
+
puts "Error when calling AdminApi->admin_unadopted_list_with_http_info: #{e}"
|
1649
|
+
end
|
1650
|
+
```
|
1651
|
+
|
1652
|
+
### Parameters
|
1653
|
+
|
1654
|
+
| Name | Type | Description | Notes |
|
1655
|
+
| ---- | ---- | ----------- | ----- |
|
1656
|
+
| **page** | **Integer** | page number of results to return (1-based) | [optional] |
|
1657
|
+
| **limit** | **Integer** | page size of results | [optional] |
|
1658
|
+
| **pattern** | **String** | pattern of repositories to search for | [optional] |
|
1659
|
+
|
1660
|
+
### Return type
|
1661
|
+
|
1662
|
+
**Array<String>**
|
1663
|
+
|
1664
|
+
### Authorization
|
1665
|
+
|
1666
|
+
[AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken)
|
1667
|
+
|
1668
|
+
### HTTP request headers
|
1669
|
+
|
1670
|
+
- **Content-Type**: Not defined
|
1671
|
+
- **Accept**: application/json
|
1672
|
+
|