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
@@ -0,0 +1,1496 @@
|
|
1
|
+
=begin
|
2
|
+
#Forgejo API
|
3
|
+
|
4
|
+
#This documentation describes the Forgejo API.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 8.0.3-53-9d5cce4bcc+gitea-1.22.0
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.9.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Forgejo
|
16
|
+
class AdminApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Adopt unadopted files as a repository
|
23
|
+
# @param owner [String] owner of the repo
|
24
|
+
# @param repo [String] name of the repo
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [nil]
|
27
|
+
def admin_adopt_repository(owner, repo, opts = {})
|
28
|
+
admin_adopt_repository_with_http_info(owner, repo, opts)
|
29
|
+
nil
|
30
|
+
end
|
31
|
+
|
32
|
+
# Adopt unadopted files as a repository
|
33
|
+
# @param owner [String] owner of the repo
|
34
|
+
# @param repo [String] name of the repo
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
37
|
+
def admin_adopt_repository_with_http_info(owner, repo, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_adopt_repository ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'owner' is set
|
42
|
+
if @api_client.config.client_side_validation && owner.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'owner' when calling AdminApi.admin_adopt_repository"
|
44
|
+
end
|
45
|
+
# verify the required parameter 'repo' is set
|
46
|
+
if @api_client.config.client_side_validation && repo.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'repo' when calling AdminApi.admin_adopt_repository"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/admin/unadopted/{owner}/{repo}'.sub('{' + 'owner' + '}', CGI.escape(owner.to_s)).sub('{' + 'repo' + '}', CGI.escape(repo.to_s))
|
51
|
+
|
52
|
+
# query parameters
|
53
|
+
query_params = opts[:query_params] || {}
|
54
|
+
|
55
|
+
# header parameters
|
56
|
+
header_params = opts[:header_params] || {}
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = opts[:form_params] || {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = opts[:debug_body]
|
63
|
+
|
64
|
+
# return_type
|
65
|
+
return_type = opts[:debug_return_type]
|
66
|
+
|
67
|
+
# auth_names
|
68
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
69
|
+
|
70
|
+
new_options = opts.merge(
|
71
|
+
:operation => :"AdminApi.admin_adopt_repository",
|
72
|
+
:header_params => header_params,
|
73
|
+
:query_params => query_params,
|
74
|
+
:form_params => form_params,
|
75
|
+
:body => post_body,
|
76
|
+
:auth_names => auth_names,
|
77
|
+
:return_type => return_type
|
78
|
+
)
|
79
|
+
|
80
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
81
|
+
if @api_client.config.debugging
|
82
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_adopt_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
83
|
+
end
|
84
|
+
return data, status_code, headers
|
85
|
+
end
|
86
|
+
|
87
|
+
# Create a hook
|
88
|
+
# @param body [CreateHookOption]
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [Hook]
|
91
|
+
def admin_create_hook(body, opts = {})
|
92
|
+
data, _status_code, _headers = admin_create_hook_with_http_info(body, opts)
|
93
|
+
data
|
94
|
+
end
|
95
|
+
|
96
|
+
# Create a hook
|
97
|
+
# @param body [CreateHookOption]
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @return [Array<(Hook, Integer, Hash)>] Hook data, response status code and response headers
|
100
|
+
def admin_create_hook_with_http_info(body, opts = {})
|
101
|
+
if @api_client.config.debugging
|
102
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_create_hook ...'
|
103
|
+
end
|
104
|
+
# verify the required parameter 'body' is set
|
105
|
+
if @api_client.config.client_side_validation && body.nil?
|
106
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.admin_create_hook"
|
107
|
+
end
|
108
|
+
# resource path
|
109
|
+
local_var_path = '/admin/hooks'
|
110
|
+
|
111
|
+
# query parameters
|
112
|
+
query_params = opts[:query_params] || {}
|
113
|
+
|
114
|
+
# header parameters
|
115
|
+
header_params = opts[:header_params] || {}
|
116
|
+
# HTTP header 'Accept' (if needed)
|
117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
118
|
+
# HTTP header 'Content-Type'
|
119
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
120
|
+
if !content_type.nil?
|
121
|
+
header_params['Content-Type'] = content_type
|
122
|
+
end
|
123
|
+
|
124
|
+
# form parameters
|
125
|
+
form_params = opts[:form_params] || {}
|
126
|
+
|
127
|
+
# http body (model)
|
128
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
129
|
+
|
130
|
+
# return_type
|
131
|
+
return_type = opts[:debug_return_type] || 'Hook'
|
132
|
+
|
133
|
+
# auth_names
|
134
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
135
|
+
|
136
|
+
new_options = opts.merge(
|
137
|
+
:operation => :"AdminApi.admin_create_hook",
|
138
|
+
:header_params => header_params,
|
139
|
+
:query_params => query_params,
|
140
|
+
:form_params => form_params,
|
141
|
+
:body => post_body,
|
142
|
+
:auth_names => auth_names,
|
143
|
+
:return_type => return_type
|
144
|
+
)
|
145
|
+
|
146
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
147
|
+
if @api_client.config.debugging
|
148
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_create_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
149
|
+
end
|
150
|
+
return data, status_code, headers
|
151
|
+
end
|
152
|
+
|
153
|
+
# Create an organization
|
154
|
+
# @param username [String] username of the user that will own the created organization
|
155
|
+
# @param organization [CreateOrgOption]
|
156
|
+
# @param [Hash] opts the optional parameters
|
157
|
+
# @return [Organization]
|
158
|
+
def admin_create_org(username, organization, opts = {})
|
159
|
+
data, _status_code, _headers = admin_create_org_with_http_info(username, organization, opts)
|
160
|
+
data
|
161
|
+
end
|
162
|
+
|
163
|
+
# Create an organization
|
164
|
+
# @param username [String] username of the user that will own the created organization
|
165
|
+
# @param organization [CreateOrgOption]
|
166
|
+
# @param [Hash] opts the optional parameters
|
167
|
+
# @return [Array<(Organization, Integer, Hash)>] Organization data, response status code and response headers
|
168
|
+
def admin_create_org_with_http_info(username, organization, opts = {})
|
169
|
+
if @api_client.config.debugging
|
170
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_create_org ...'
|
171
|
+
end
|
172
|
+
# verify the required parameter 'username' is set
|
173
|
+
if @api_client.config.client_side_validation && username.nil?
|
174
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_create_org"
|
175
|
+
end
|
176
|
+
# verify the required parameter 'organization' is set
|
177
|
+
if @api_client.config.client_side_validation && organization.nil?
|
178
|
+
fail ArgumentError, "Missing the required parameter 'organization' when calling AdminApi.admin_create_org"
|
179
|
+
end
|
180
|
+
# resource path
|
181
|
+
local_var_path = '/admin/users/{username}/orgs'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
182
|
+
|
183
|
+
# query parameters
|
184
|
+
query_params = opts[:query_params] || {}
|
185
|
+
|
186
|
+
# header parameters
|
187
|
+
header_params = opts[:header_params] || {}
|
188
|
+
# HTTP header 'Accept' (if needed)
|
189
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
190
|
+
# HTTP header 'Content-Type'
|
191
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
192
|
+
if !content_type.nil?
|
193
|
+
header_params['Content-Type'] = content_type
|
194
|
+
end
|
195
|
+
|
196
|
+
# form parameters
|
197
|
+
form_params = opts[:form_params] || {}
|
198
|
+
|
199
|
+
# http body (model)
|
200
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(organization)
|
201
|
+
|
202
|
+
# return_type
|
203
|
+
return_type = opts[:debug_return_type] || 'Organization'
|
204
|
+
|
205
|
+
# auth_names
|
206
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
207
|
+
|
208
|
+
new_options = opts.merge(
|
209
|
+
:operation => :"AdminApi.admin_create_org",
|
210
|
+
:header_params => header_params,
|
211
|
+
:query_params => query_params,
|
212
|
+
:form_params => form_params,
|
213
|
+
:body => post_body,
|
214
|
+
:auth_names => auth_names,
|
215
|
+
:return_type => return_type
|
216
|
+
)
|
217
|
+
|
218
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
219
|
+
if @api_client.config.debugging
|
220
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_create_org\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
221
|
+
end
|
222
|
+
return data, status_code, headers
|
223
|
+
end
|
224
|
+
|
225
|
+
# Add a public key on behalf of a user
|
226
|
+
# @param username [String] username of the user
|
227
|
+
# @param [Hash] opts the optional parameters
|
228
|
+
# @option opts [CreateKeyOption] :key
|
229
|
+
# @return [PublicKey]
|
230
|
+
def admin_create_public_key(username, opts = {})
|
231
|
+
data, _status_code, _headers = admin_create_public_key_with_http_info(username, opts)
|
232
|
+
data
|
233
|
+
end
|
234
|
+
|
235
|
+
# Add a public key on behalf of a user
|
236
|
+
# @param username [String] username of the user
|
237
|
+
# @param [Hash] opts the optional parameters
|
238
|
+
# @option opts [CreateKeyOption] :key
|
239
|
+
# @return [Array<(PublicKey, Integer, Hash)>] PublicKey data, response status code and response headers
|
240
|
+
def admin_create_public_key_with_http_info(username, opts = {})
|
241
|
+
if @api_client.config.debugging
|
242
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_create_public_key ...'
|
243
|
+
end
|
244
|
+
# verify the required parameter 'username' is set
|
245
|
+
if @api_client.config.client_side_validation && username.nil?
|
246
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_create_public_key"
|
247
|
+
end
|
248
|
+
# resource path
|
249
|
+
local_var_path = '/admin/users/{username}/keys'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
250
|
+
|
251
|
+
# query parameters
|
252
|
+
query_params = opts[:query_params] || {}
|
253
|
+
|
254
|
+
# header parameters
|
255
|
+
header_params = opts[:header_params] || {}
|
256
|
+
# HTTP header 'Accept' (if needed)
|
257
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
258
|
+
# HTTP header 'Content-Type'
|
259
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
260
|
+
if !content_type.nil?
|
261
|
+
header_params['Content-Type'] = content_type
|
262
|
+
end
|
263
|
+
|
264
|
+
# form parameters
|
265
|
+
form_params = opts[:form_params] || {}
|
266
|
+
|
267
|
+
# http body (model)
|
268
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'key'])
|
269
|
+
|
270
|
+
# return_type
|
271
|
+
return_type = opts[:debug_return_type] || 'PublicKey'
|
272
|
+
|
273
|
+
# auth_names
|
274
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
275
|
+
|
276
|
+
new_options = opts.merge(
|
277
|
+
:operation => :"AdminApi.admin_create_public_key",
|
278
|
+
:header_params => header_params,
|
279
|
+
:query_params => query_params,
|
280
|
+
:form_params => form_params,
|
281
|
+
:body => post_body,
|
282
|
+
:auth_names => auth_names,
|
283
|
+
:return_type => return_type
|
284
|
+
)
|
285
|
+
|
286
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
287
|
+
if @api_client.config.debugging
|
288
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_create_public_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
289
|
+
end
|
290
|
+
return data, status_code, headers
|
291
|
+
end
|
292
|
+
|
293
|
+
# Create a repository on behalf of a user
|
294
|
+
# @param username [String] username of the user. This user will own the created repository
|
295
|
+
# @param repository [CreateRepoOption]
|
296
|
+
# @param [Hash] opts the optional parameters
|
297
|
+
# @return [Repository]
|
298
|
+
def admin_create_repo(username, repository, opts = {})
|
299
|
+
data, _status_code, _headers = admin_create_repo_with_http_info(username, repository, opts)
|
300
|
+
data
|
301
|
+
end
|
302
|
+
|
303
|
+
# Create a repository on behalf of a user
|
304
|
+
# @param username [String] username of the user. This user will own the created repository
|
305
|
+
# @param repository [CreateRepoOption]
|
306
|
+
# @param [Hash] opts the optional parameters
|
307
|
+
# @return [Array<(Repository, Integer, Hash)>] Repository data, response status code and response headers
|
308
|
+
def admin_create_repo_with_http_info(username, repository, opts = {})
|
309
|
+
if @api_client.config.debugging
|
310
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_create_repo ...'
|
311
|
+
end
|
312
|
+
# verify the required parameter 'username' is set
|
313
|
+
if @api_client.config.client_side_validation && username.nil?
|
314
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_create_repo"
|
315
|
+
end
|
316
|
+
# verify the required parameter 'repository' is set
|
317
|
+
if @api_client.config.client_side_validation && repository.nil?
|
318
|
+
fail ArgumentError, "Missing the required parameter 'repository' when calling AdminApi.admin_create_repo"
|
319
|
+
end
|
320
|
+
# resource path
|
321
|
+
local_var_path = '/admin/users/{username}/repos'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
322
|
+
|
323
|
+
# query parameters
|
324
|
+
query_params = opts[:query_params] || {}
|
325
|
+
|
326
|
+
# header parameters
|
327
|
+
header_params = opts[:header_params] || {}
|
328
|
+
# HTTP header 'Accept' (if needed)
|
329
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
330
|
+
# HTTP header 'Content-Type'
|
331
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
332
|
+
if !content_type.nil?
|
333
|
+
header_params['Content-Type'] = content_type
|
334
|
+
end
|
335
|
+
|
336
|
+
# form parameters
|
337
|
+
form_params = opts[:form_params] || {}
|
338
|
+
|
339
|
+
# http body (model)
|
340
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(repository)
|
341
|
+
|
342
|
+
# return_type
|
343
|
+
return_type = opts[:debug_return_type] || 'Repository'
|
344
|
+
|
345
|
+
# auth_names
|
346
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
347
|
+
|
348
|
+
new_options = opts.merge(
|
349
|
+
:operation => :"AdminApi.admin_create_repo",
|
350
|
+
:header_params => header_params,
|
351
|
+
:query_params => query_params,
|
352
|
+
:form_params => form_params,
|
353
|
+
:body => post_body,
|
354
|
+
:auth_names => auth_names,
|
355
|
+
:return_type => return_type
|
356
|
+
)
|
357
|
+
|
358
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
359
|
+
if @api_client.config.debugging
|
360
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_create_repo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
361
|
+
end
|
362
|
+
return data, status_code, headers
|
363
|
+
end
|
364
|
+
|
365
|
+
# Create a user
|
366
|
+
# @param [Hash] opts the optional parameters
|
367
|
+
# @option opts [CreateUserOption] :body
|
368
|
+
# @return [User]
|
369
|
+
def admin_create_user(opts = {})
|
370
|
+
data, _status_code, _headers = admin_create_user_with_http_info(opts)
|
371
|
+
data
|
372
|
+
end
|
373
|
+
|
374
|
+
# Create a user
|
375
|
+
# @param [Hash] opts the optional parameters
|
376
|
+
# @option opts [CreateUserOption] :body
|
377
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
378
|
+
def admin_create_user_with_http_info(opts = {})
|
379
|
+
if @api_client.config.debugging
|
380
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_create_user ...'
|
381
|
+
end
|
382
|
+
# resource path
|
383
|
+
local_var_path = '/admin/users'
|
384
|
+
|
385
|
+
# query parameters
|
386
|
+
query_params = opts[:query_params] || {}
|
387
|
+
|
388
|
+
# header parameters
|
389
|
+
header_params = opts[:header_params] || {}
|
390
|
+
# HTTP header 'Accept' (if needed)
|
391
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
392
|
+
# HTTP header 'Content-Type'
|
393
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
394
|
+
if !content_type.nil?
|
395
|
+
header_params['Content-Type'] = content_type
|
396
|
+
end
|
397
|
+
|
398
|
+
# form parameters
|
399
|
+
form_params = opts[:form_params] || {}
|
400
|
+
|
401
|
+
# http body (model)
|
402
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
403
|
+
|
404
|
+
# return_type
|
405
|
+
return_type = opts[:debug_return_type] || 'User'
|
406
|
+
|
407
|
+
# auth_names
|
408
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
409
|
+
|
410
|
+
new_options = opts.merge(
|
411
|
+
:operation => :"AdminApi.admin_create_user",
|
412
|
+
:header_params => header_params,
|
413
|
+
:query_params => query_params,
|
414
|
+
:form_params => form_params,
|
415
|
+
:body => post_body,
|
416
|
+
:auth_names => auth_names,
|
417
|
+
:return_type => return_type
|
418
|
+
)
|
419
|
+
|
420
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
421
|
+
if @api_client.config.debugging
|
422
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_create_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
423
|
+
end
|
424
|
+
return data, status_code, headers
|
425
|
+
end
|
426
|
+
|
427
|
+
# List cron tasks
|
428
|
+
# @param [Hash] opts the optional parameters
|
429
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
430
|
+
# @option opts [Integer] :limit page size of results
|
431
|
+
# @return [Array<Cron>]
|
432
|
+
def admin_cron_list(opts = {})
|
433
|
+
data, _status_code, _headers = admin_cron_list_with_http_info(opts)
|
434
|
+
data
|
435
|
+
end
|
436
|
+
|
437
|
+
# List cron tasks
|
438
|
+
# @param [Hash] opts the optional parameters
|
439
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
440
|
+
# @option opts [Integer] :limit page size of results
|
441
|
+
# @return [Array<(Array<Cron>, Integer, Hash)>] Array<Cron> data, response status code and response headers
|
442
|
+
def admin_cron_list_with_http_info(opts = {})
|
443
|
+
if @api_client.config.debugging
|
444
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_cron_list ...'
|
445
|
+
end
|
446
|
+
# resource path
|
447
|
+
local_var_path = '/admin/cron'
|
448
|
+
|
449
|
+
# query parameters
|
450
|
+
query_params = opts[:query_params] || {}
|
451
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
452
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
453
|
+
|
454
|
+
# header parameters
|
455
|
+
header_params = opts[:header_params] || {}
|
456
|
+
# HTTP header 'Accept' (if needed)
|
457
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
458
|
+
|
459
|
+
# form parameters
|
460
|
+
form_params = opts[:form_params] || {}
|
461
|
+
|
462
|
+
# http body (model)
|
463
|
+
post_body = opts[:debug_body]
|
464
|
+
|
465
|
+
# return_type
|
466
|
+
return_type = opts[:debug_return_type] || 'Array<Cron>'
|
467
|
+
|
468
|
+
# auth_names
|
469
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
470
|
+
|
471
|
+
new_options = opts.merge(
|
472
|
+
:operation => :"AdminApi.admin_cron_list",
|
473
|
+
:header_params => header_params,
|
474
|
+
:query_params => query_params,
|
475
|
+
:form_params => form_params,
|
476
|
+
:body => post_body,
|
477
|
+
:auth_names => auth_names,
|
478
|
+
:return_type => return_type
|
479
|
+
)
|
480
|
+
|
481
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
482
|
+
if @api_client.config.debugging
|
483
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_cron_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
484
|
+
end
|
485
|
+
return data, status_code, headers
|
486
|
+
end
|
487
|
+
|
488
|
+
# Run cron task
|
489
|
+
# @param task [String] task to run
|
490
|
+
# @param [Hash] opts the optional parameters
|
491
|
+
# @return [nil]
|
492
|
+
def admin_cron_run(task, opts = {})
|
493
|
+
admin_cron_run_with_http_info(task, opts)
|
494
|
+
nil
|
495
|
+
end
|
496
|
+
|
497
|
+
# Run cron task
|
498
|
+
# @param task [String] task to run
|
499
|
+
# @param [Hash] opts the optional parameters
|
500
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
501
|
+
def admin_cron_run_with_http_info(task, opts = {})
|
502
|
+
if @api_client.config.debugging
|
503
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_cron_run ...'
|
504
|
+
end
|
505
|
+
# verify the required parameter 'task' is set
|
506
|
+
if @api_client.config.client_side_validation && task.nil?
|
507
|
+
fail ArgumentError, "Missing the required parameter 'task' when calling AdminApi.admin_cron_run"
|
508
|
+
end
|
509
|
+
# resource path
|
510
|
+
local_var_path = '/admin/cron/{task}'.sub('{' + 'task' + '}', CGI.escape(task.to_s))
|
511
|
+
|
512
|
+
# query parameters
|
513
|
+
query_params = opts[:query_params] || {}
|
514
|
+
|
515
|
+
# header parameters
|
516
|
+
header_params = opts[:header_params] || {}
|
517
|
+
|
518
|
+
# form parameters
|
519
|
+
form_params = opts[:form_params] || {}
|
520
|
+
|
521
|
+
# http body (model)
|
522
|
+
post_body = opts[:debug_body]
|
523
|
+
|
524
|
+
# return_type
|
525
|
+
return_type = opts[:debug_return_type]
|
526
|
+
|
527
|
+
# auth_names
|
528
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
529
|
+
|
530
|
+
new_options = opts.merge(
|
531
|
+
:operation => :"AdminApi.admin_cron_run",
|
532
|
+
:header_params => header_params,
|
533
|
+
:query_params => query_params,
|
534
|
+
:form_params => form_params,
|
535
|
+
:body => post_body,
|
536
|
+
:auth_names => auth_names,
|
537
|
+
:return_type => return_type
|
538
|
+
)
|
539
|
+
|
540
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
541
|
+
if @api_client.config.debugging
|
542
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_cron_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
543
|
+
end
|
544
|
+
return data, status_code, headers
|
545
|
+
end
|
546
|
+
|
547
|
+
# Delete a hook
|
548
|
+
# @param id [Integer] id of the hook to delete
|
549
|
+
# @param [Hash] opts the optional parameters
|
550
|
+
# @return [nil]
|
551
|
+
def admin_delete_hook(id, opts = {})
|
552
|
+
admin_delete_hook_with_http_info(id, opts)
|
553
|
+
nil
|
554
|
+
end
|
555
|
+
|
556
|
+
# Delete a hook
|
557
|
+
# @param id [Integer] id of the hook to delete
|
558
|
+
# @param [Hash] opts the optional parameters
|
559
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
560
|
+
def admin_delete_hook_with_http_info(id, opts = {})
|
561
|
+
if @api_client.config.debugging
|
562
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_hook ...'
|
563
|
+
end
|
564
|
+
# verify the required parameter 'id' is set
|
565
|
+
if @api_client.config.client_side_validation && id.nil?
|
566
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.admin_delete_hook"
|
567
|
+
end
|
568
|
+
# resource path
|
569
|
+
local_var_path = '/admin/hooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
570
|
+
|
571
|
+
# query parameters
|
572
|
+
query_params = opts[:query_params] || {}
|
573
|
+
|
574
|
+
# header parameters
|
575
|
+
header_params = opts[:header_params] || {}
|
576
|
+
|
577
|
+
# form parameters
|
578
|
+
form_params = opts[:form_params] || {}
|
579
|
+
|
580
|
+
# http body (model)
|
581
|
+
post_body = opts[:debug_body]
|
582
|
+
|
583
|
+
# return_type
|
584
|
+
return_type = opts[:debug_return_type]
|
585
|
+
|
586
|
+
# auth_names
|
587
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
588
|
+
|
589
|
+
new_options = opts.merge(
|
590
|
+
:operation => :"AdminApi.admin_delete_hook",
|
591
|
+
:header_params => header_params,
|
592
|
+
:query_params => query_params,
|
593
|
+
:form_params => form_params,
|
594
|
+
:body => post_body,
|
595
|
+
:auth_names => auth_names,
|
596
|
+
:return_type => return_type
|
597
|
+
)
|
598
|
+
|
599
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
600
|
+
if @api_client.config.debugging
|
601
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_delete_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
602
|
+
end
|
603
|
+
return data, status_code, headers
|
604
|
+
end
|
605
|
+
|
606
|
+
# Delete unadopted files
|
607
|
+
# @param owner [String] owner of the repo
|
608
|
+
# @param repo [String] name of the repo
|
609
|
+
# @param [Hash] opts the optional parameters
|
610
|
+
# @return [nil]
|
611
|
+
def admin_delete_unadopted_repository(owner, repo, opts = {})
|
612
|
+
admin_delete_unadopted_repository_with_http_info(owner, repo, opts)
|
613
|
+
nil
|
614
|
+
end
|
615
|
+
|
616
|
+
# Delete unadopted files
|
617
|
+
# @param owner [String] owner of the repo
|
618
|
+
# @param repo [String] name of the repo
|
619
|
+
# @param [Hash] opts the optional parameters
|
620
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
621
|
+
def admin_delete_unadopted_repository_with_http_info(owner, repo, opts = {})
|
622
|
+
if @api_client.config.debugging
|
623
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_unadopted_repository ...'
|
624
|
+
end
|
625
|
+
# verify the required parameter 'owner' is set
|
626
|
+
if @api_client.config.client_side_validation && owner.nil?
|
627
|
+
fail ArgumentError, "Missing the required parameter 'owner' when calling AdminApi.admin_delete_unadopted_repository"
|
628
|
+
end
|
629
|
+
# verify the required parameter 'repo' is set
|
630
|
+
if @api_client.config.client_side_validation && repo.nil?
|
631
|
+
fail ArgumentError, "Missing the required parameter 'repo' when calling AdminApi.admin_delete_unadopted_repository"
|
632
|
+
end
|
633
|
+
# resource path
|
634
|
+
local_var_path = '/admin/unadopted/{owner}/{repo}'.sub('{' + 'owner' + '}', CGI.escape(owner.to_s)).sub('{' + 'repo' + '}', CGI.escape(repo.to_s))
|
635
|
+
|
636
|
+
# query parameters
|
637
|
+
query_params = opts[:query_params] || {}
|
638
|
+
|
639
|
+
# header parameters
|
640
|
+
header_params = opts[:header_params] || {}
|
641
|
+
|
642
|
+
# form parameters
|
643
|
+
form_params = opts[:form_params] || {}
|
644
|
+
|
645
|
+
# http body (model)
|
646
|
+
post_body = opts[:debug_body]
|
647
|
+
|
648
|
+
# return_type
|
649
|
+
return_type = opts[:debug_return_type]
|
650
|
+
|
651
|
+
# auth_names
|
652
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
653
|
+
|
654
|
+
new_options = opts.merge(
|
655
|
+
:operation => :"AdminApi.admin_delete_unadopted_repository",
|
656
|
+
:header_params => header_params,
|
657
|
+
:query_params => query_params,
|
658
|
+
:form_params => form_params,
|
659
|
+
:body => post_body,
|
660
|
+
:auth_names => auth_names,
|
661
|
+
:return_type => return_type
|
662
|
+
)
|
663
|
+
|
664
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
665
|
+
if @api_client.config.debugging
|
666
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_delete_unadopted_repository\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
667
|
+
end
|
668
|
+
return data, status_code, headers
|
669
|
+
end
|
670
|
+
|
671
|
+
# Delete a user
|
672
|
+
# @param username [String] username of user to delete
|
673
|
+
# @param [Hash] opts the optional parameters
|
674
|
+
# @option opts [Boolean] :purge purge the user from the system completely
|
675
|
+
# @return [nil]
|
676
|
+
def admin_delete_user(username, opts = {})
|
677
|
+
admin_delete_user_with_http_info(username, opts)
|
678
|
+
nil
|
679
|
+
end
|
680
|
+
|
681
|
+
# Delete a user
|
682
|
+
# @param username [String] username of user to delete
|
683
|
+
# @param [Hash] opts the optional parameters
|
684
|
+
# @option opts [Boolean] :purge purge the user from the system completely
|
685
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
686
|
+
def admin_delete_user_with_http_info(username, opts = {})
|
687
|
+
if @api_client.config.debugging
|
688
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_user ...'
|
689
|
+
end
|
690
|
+
# verify the required parameter 'username' is set
|
691
|
+
if @api_client.config.client_side_validation && username.nil?
|
692
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_delete_user"
|
693
|
+
end
|
694
|
+
# resource path
|
695
|
+
local_var_path = '/admin/users/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
696
|
+
|
697
|
+
# query parameters
|
698
|
+
query_params = opts[:query_params] || {}
|
699
|
+
query_params[:'purge'] = opts[:'purge'] if !opts[:'purge'].nil?
|
700
|
+
|
701
|
+
# header parameters
|
702
|
+
header_params = opts[:header_params] || {}
|
703
|
+
|
704
|
+
# form parameters
|
705
|
+
form_params = opts[:form_params] || {}
|
706
|
+
|
707
|
+
# http body (model)
|
708
|
+
post_body = opts[:debug_body]
|
709
|
+
|
710
|
+
# return_type
|
711
|
+
return_type = opts[:debug_return_type]
|
712
|
+
|
713
|
+
# auth_names
|
714
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
715
|
+
|
716
|
+
new_options = opts.merge(
|
717
|
+
:operation => :"AdminApi.admin_delete_user",
|
718
|
+
:header_params => header_params,
|
719
|
+
:query_params => query_params,
|
720
|
+
:form_params => form_params,
|
721
|
+
:body => post_body,
|
722
|
+
:auth_names => auth_names,
|
723
|
+
:return_type => return_type
|
724
|
+
)
|
725
|
+
|
726
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
727
|
+
if @api_client.config.debugging
|
728
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
729
|
+
end
|
730
|
+
return data, status_code, headers
|
731
|
+
end
|
732
|
+
|
733
|
+
# Delete a user's public key
|
734
|
+
# @param username [String] username of user
|
735
|
+
# @param id [Integer] id of the key to delete
|
736
|
+
# @param [Hash] opts the optional parameters
|
737
|
+
# @return [nil]
|
738
|
+
def admin_delete_user_public_key(username, id, opts = {})
|
739
|
+
admin_delete_user_public_key_with_http_info(username, id, opts)
|
740
|
+
nil
|
741
|
+
end
|
742
|
+
|
743
|
+
# Delete a user's public key
|
744
|
+
# @param username [String] username of user
|
745
|
+
# @param id [Integer] id of the key to delete
|
746
|
+
# @param [Hash] opts the optional parameters
|
747
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
748
|
+
def admin_delete_user_public_key_with_http_info(username, id, opts = {})
|
749
|
+
if @api_client.config.debugging
|
750
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_delete_user_public_key ...'
|
751
|
+
end
|
752
|
+
# verify the required parameter 'username' is set
|
753
|
+
if @api_client.config.client_side_validation && username.nil?
|
754
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_delete_user_public_key"
|
755
|
+
end
|
756
|
+
# verify the required parameter 'id' is set
|
757
|
+
if @api_client.config.client_side_validation && id.nil?
|
758
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.admin_delete_user_public_key"
|
759
|
+
end
|
760
|
+
# resource path
|
761
|
+
local_var_path = '/admin/users/{username}/keys/{id}'.sub('{' + 'username' + '}', CGI.escape(username.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
762
|
+
|
763
|
+
# query parameters
|
764
|
+
query_params = opts[:query_params] || {}
|
765
|
+
|
766
|
+
# header parameters
|
767
|
+
header_params = opts[:header_params] || {}
|
768
|
+
|
769
|
+
# form parameters
|
770
|
+
form_params = opts[:form_params] || {}
|
771
|
+
|
772
|
+
# http body (model)
|
773
|
+
post_body = opts[:debug_body]
|
774
|
+
|
775
|
+
# return_type
|
776
|
+
return_type = opts[:debug_return_type]
|
777
|
+
|
778
|
+
# auth_names
|
779
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
780
|
+
|
781
|
+
new_options = opts.merge(
|
782
|
+
:operation => :"AdminApi.admin_delete_user_public_key",
|
783
|
+
:header_params => header_params,
|
784
|
+
:query_params => query_params,
|
785
|
+
:form_params => form_params,
|
786
|
+
:body => post_body,
|
787
|
+
:auth_names => auth_names,
|
788
|
+
:return_type => return_type
|
789
|
+
)
|
790
|
+
|
791
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
792
|
+
if @api_client.config.debugging
|
793
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_delete_user_public_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
794
|
+
end
|
795
|
+
return data, status_code, headers
|
796
|
+
end
|
797
|
+
|
798
|
+
# Update a hook
|
799
|
+
# @param id [Integer] id of the hook to update
|
800
|
+
# @param [Hash] opts the optional parameters
|
801
|
+
# @option opts [EditHookOption] :body
|
802
|
+
# @return [Hook]
|
803
|
+
def admin_edit_hook(id, opts = {})
|
804
|
+
data, _status_code, _headers = admin_edit_hook_with_http_info(id, opts)
|
805
|
+
data
|
806
|
+
end
|
807
|
+
|
808
|
+
# Update a hook
|
809
|
+
# @param id [Integer] id of the hook to update
|
810
|
+
# @param [Hash] opts the optional parameters
|
811
|
+
# @option opts [EditHookOption] :body
|
812
|
+
# @return [Array<(Hook, Integer, Hash)>] Hook data, response status code and response headers
|
813
|
+
def admin_edit_hook_with_http_info(id, opts = {})
|
814
|
+
if @api_client.config.debugging
|
815
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_edit_hook ...'
|
816
|
+
end
|
817
|
+
# verify the required parameter 'id' is set
|
818
|
+
if @api_client.config.client_side_validation && id.nil?
|
819
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.admin_edit_hook"
|
820
|
+
end
|
821
|
+
# resource path
|
822
|
+
local_var_path = '/admin/hooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
823
|
+
|
824
|
+
# query parameters
|
825
|
+
query_params = opts[:query_params] || {}
|
826
|
+
|
827
|
+
# header parameters
|
828
|
+
header_params = opts[:header_params] || {}
|
829
|
+
# HTTP header 'Accept' (if needed)
|
830
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
831
|
+
# HTTP header 'Content-Type'
|
832
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
833
|
+
if !content_type.nil?
|
834
|
+
header_params['Content-Type'] = content_type
|
835
|
+
end
|
836
|
+
|
837
|
+
# form parameters
|
838
|
+
form_params = opts[:form_params] || {}
|
839
|
+
|
840
|
+
# http body (model)
|
841
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
842
|
+
|
843
|
+
# return_type
|
844
|
+
return_type = opts[:debug_return_type] || 'Hook'
|
845
|
+
|
846
|
+
# auth_names
|
847
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
848
|
+
|
849
|
+
new_options = opts.merge(
|
850
|
+
:operation => :"AdminApi.admin_edit_hook",
|
851
|
+
:header_params => header_params,
|
852
|
+
:query_params => query_params,
|
853
|
+
:form_params => form_params,
|
854
|
+
:body => post_body,
|
855
|
+
:auth_names => auth_names,
|
856
|
+
:return_type => return_type
|
857
|
+
)
|
858
|
+
|
859
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
860
|
+
if @api_client.config.debugging
|
861
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_edit_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
862
|
+
end
|
863
|
+
return data, status_code, headers
|
864
|
+
end
|
865
|
+
|
866
|
+
# Edit an existing user
|
867
|
+
# @param username [String] username of user to edit
|
868
|
+
# @param [Hash] opts the optional parameters
|
869
|
+
# @option opts [EditUserOption] :body
|
870
|
+
# @return [User]
|
871
|
+
def admin_edit_user(username, opts = {})
|
872
|
+
data, _status_code, _headers = admin_edit_user_with_http_info(username, opts)
|
873
|
+
data
|
874
|
+
end
|
875
|
+
|
876
|
+
# Edit an existing user
|
877
|
+
# @param username [String] username of user to edit
|
878
|
+
# @param [Hash] opts the optional parameters
|
879
|
+
# @option opts [EditUserOption] :body
|
880
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
881
|
+
def admin_edit_user_with_http_info(username, opts = {})
|
882
|
+
if @api_client.config.debugging
|
883
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_edit_user ...'
|
884
|
+
end
|
885
|
+
# verify the required parameter 'username' is set
|
886
|
+
if @api_client.config.client_side_validation && username.nil?
|
887
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_edit_user"
|
888
|
+
end
|
889
|
+
# resource path
|
890
|
+
local_var_path = '/admin/users/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
891
|
+
|
892
|
+
# query parameters
|
893
|
+
query_params = opts[:query_params] || {}
|
894
|
+
|
895
|
+
# header parameters
|
896
|
+
header_params = opts[:header_params] || {}
|
897
|
+
# HTTP header 'Accept' (if needed)
|
898
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
899
|
+
# HTTP header 'Content-Type'
|
900
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
901
|
+
if !content_type.nil?
|
902
|
+
header_params['Content-Type'] = content_type
|
903
|
+
end
|
904
|
+
|
905
|
+
# form parameters
|
906
|
+
form_params = opts[:form_params] || {}
|
907
|
+
|
908
|
+
# http body (model)
|
909
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
910
|
+
|
911
|
+
# return_type
|
912
|
+
return_type = opts[:debug_return_type] || 'User'
|
913
|
+
|
914
|
+
# auth_names
|
915
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
916
|
+
|
917
|
+
new_options = opts.merge(
|
918
|
+
:operation => :"AdminApi.admin_edit_user",
|
919
|
+
:header_params => header_params,
|
920
|
+
:query_params => query_params,
|
921
|
+
:form_params => form_params,
|
922
|
+
:body => post_body,
|
923
|
+
:auth_names => auth_names,
|
924
|
+
:return_type => return_type
|
925
|
+
)
|
926
|
+
|
927
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
928
|
+
if @api_client.config.debugging
|
929
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_edit_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
930
|
+
end
|
931
|
+
return data, status_code, headers
|
932
|
+
end
|
933
|
+
|
934
|
+
# List all emails
|
935
|
+
# @param [Hash] opts the optional parameters
|
936
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
937
|
+
# @option opts [Integer] :limit page size of results
|
938
|
+
# @return [Array<Email>]
|
939
|
+
def admin_get_all_emails(opts = {})
|
940
|
+
data, _status_code, _headers = admin_get_all_emails_with_http_info(opts)
|
941
|
+
data
|
942
|
+
end
|
943
|
+
|
944
|
+
# List all emails
|
945
|
+
# @param [Hash] opts the optional parameters
|
946
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
947
|
+
# @option opts [Integer] :limit page size of results
|
948
|
+
# @return [Array<(Array<Email>, Integer, Hash)>] Array<Email> data, response status code and response headers
|
949
|
+
def admin_get_all_emails_with_http_info(opts = {})
|
950
|
+
if @api_client.config.debugging
|
951
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_get_all_emails ...'
|
952
|
+
end
|
953
|
+
# resource path
|
954
|
+
local_var_path = '/admin/emails'
|
955
|
+
|
956
|
+
# query parameters
|
957
|
+
query_params = opts[:query_params] || {}
|
958
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
959
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
960
|
+
|
961
|
+
# header parameters
|
962
|
+
header_params = opts[:header_params] || {}
|
963
|
+
# HTTP header 'Accept' (if needed)
|
964
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
965
|
+
|
966
|
+
# form parameters
|
967
|
+
form_params = opts[:form_params] || {}
|
968
|
+
|
969
|
+
# http body (model)
|
970
|
+
post_body = opts[:debug_body]
|
971
|
+
|
972
|
+
# return_type
|
973
|
+
return_type = opts[:debug_return_type] || 'Array<Email>'
|
974
|
+
|
975
|
+
# auth_names
|
976
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
977
|
+
|
978
|
+
new_options = opts.merge(
|
979
|
+
:operation => :"AdminApi.admin_get_all_emails",
|
980
|
+
:header_params => header_params,
|
981
|
+
:query_params => query_params,
|
982
|
+
:form_params => form_params,
|
983
|
+
:body => post_body,
|
984
|
+
:auth_names => auth_names,
|
985
|
+
:return_type => return_type
|
986
|
+
)
|
987
|
+
|
988
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
989
|
+
if @api_client.config.debugging
|
990
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_get_all_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
991
|
+
end
|
992
|
+
return data, status_code, headers
|
993
|
+
end
|
994
|
+
|
995
|
+
# List all organizations
|
996
|
+
# @param [Hash] opts the optional parameters
|
997
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
998
|
+
# @option opts [Integer] :limit page size of results
|
999
|
+
# @return [Array<Organization>]
|
1000
|
+
def admin_get_all_orgs(opts = {})
|
1001
|
+
data, _status_code, _headers = admin_get_all_orgs_with_http_info(opts)
|
1002
|
+
data
|
1003
|
+
end
|
1004
|
+
|
1005
|
+
# List all organizations
|
1006
|
+
# @param [Hash] opts the optional parameters
|
1007
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1008
|
+
# @option opts [Integer] :limit page size of results
|
1009
|
+
# @return [Array<(Array<Organization>, Integer, Hash)>] Array<Organization> data, response status code and response headers
|
1010
|
+
def admin_get_all_orgs_with_http_info(opts = {})
|
1011
|
+
if @api_client.config.debugging
|
1012
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_get_all_orgs ...'
|
1013
|
+
end
|
1014
|
+
# resource path
|
1015
|
+
local_var_path = '/admin/orgs'
|
1016
|
+
|
1017
|
+
# query parameters
|
1018
|
+
query_params = opts[:query_params] || {}
|
1019
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
1020
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1021
|
+
|
1022
|
+
# header parameters
|
1023
|
+
header_params = opts[:header_params] || {}
|
1024
|
+
# HTTP header 'Accept' (if needed)
|
1025
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1026
|
+
|
1027
|
+
# form parameters
|
1028
|
+
form_params = opts[:form_params] || {}
|
1029
|
+
|
1030
|
+
# http body (model)
|
1031
|
+
post_body = opts[:debug_body]
|
1032
|
+
|
1033
|
+
# return_type
|
1034
|
+
return_type = opts[:debug_return_type] || 'Array<Organization>'
|
1035
|
+
|
1036
|
+
# auth_names
|
1037
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1038
|
+
|
1039
|
+
new_options = opts.merge(
|
1040
|
+
:operation => :"AdminApi.admin_get_all_orgs",
|
1041
|
+
:header_params => header_params,
|
1042
|
+
:query_params => query_params,
|
1043
|
+
:form_params => form_params,
|
1044
|
+
:body => post_body,
|
1045
|
+
:auth_names => auth_names,
|
1046
|
+
:return_type => return_type
|
1047
|
+
)
|
1048
|
+
|
1049
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1050
|
+
if @api_client.config.debugging
|
1051
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_get_all_orgs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1052
|
+
end
|
1053
|
+
return data, status_code, headers
|
1054
|
+
end
|
1055
|
+
|
1056
|
+
# Get a hook
|
1057
|
+
# @param id [Integer] id of the hook to get
|
1058
|
+
# @param [Hash] opts the optional parameters
|
1059
|
+
# @return [Hook]
|
1060
|
+
def admin_get_hook(id, opts = {})
|
1061
|
+
data, _status_code, _headers = admin_get_hook_with_http_info(id, opts)
|
1062
|
+
data
|
1063
|
+
end
|
1064
|
+
|
1065
|
+
# Get a hook
|
1066
|
+
# @param id [Integer] id of the hook to get
|
1067
|
+
# @param [Hash] opts the optional parameters
|
1068
|
+
# @return [Array<(Hook, Integer, Hash)>] Hook data, response status code and response headers
|
1069
|
+
def admin_get_hook_with_http_info(id, opts = {})
|
1070
|
+
if @api_client.config.debugging
|
1071
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_get_hook ...'
|
1072
|
+
end
|
1073
|
+
# verify the required parameter 'id' is set
|
1074
|
+
if @api_client.config.client_side_validation && id.nil?
|
1075
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AdminApi.admin_get_hook"
|
1076
|
+
end
|
1077
|
+
# resource path
|
1078
|
+
local_var_path = '/admin/hooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
1079
|
+
|
1080
|
+
# query parameters
|
1081
|
+
query_params = opts[:query_params] || {}
|
1082
|
+
|
1083
|
+
# header parameters
|
1084
|
+
header_params = opts[:header_params] || {}
|
1085
|
+
# HTTP header 'Accept' (if needed)
|
1086
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1087
|
+
|
1088
|
+
# form parameters
|
1089
|
+
form_params = opts[:form_params] || {}
|
1090
|
+
|
1091
|
+
# http body (model)
|
1092
|
+
post_body = opts[:debug_body]
|
1093
|
+
|
1094
|
+
# return_type
|
1095
|
+
return_type = opts[:debug_return_type] || 'Hook'
|
1096
|
+
|
1097
|
+
# auth_names
|
1098
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1099
|
+
|
1100
|
+
new_options = opts.merge(
|
1101
|
+
:operation => :"AdminApi.admin_get_hook",
|
1102
|
+
:header_params => header_params,
|
1103
|
+
:query_params => query_params,
|
1104
|
+
:form_params => form_params,
|
1105
|
+
:body => post_body,
|
1106
|
+
:auth_names => auth_names,
|
1107
|
+
:return_type => return_type
|
1108
|
+
)
|
1109
|
+
|
1110
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1111
|
+
if @api_client.config.debugging
|
1112
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_get_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1113
|
+
end
|
1114
|
+
return data, status_code, headers
|
1115
|
+
end
|
1116
|
+
|
1117
|
+
# Get an global actions runner registration token
|
1118
|
+
# @param [Hash] opts the optional parameters
|
1119
|
+
# @return [nil]
|
1120
|
+
def admin_get_runner_registration_token(opts = {})
|
1121
|
+
admin_get_runner_registration_token_with_http_info(opts)
|
1122
|
+
nil
|
1123
|
+
end
|
1124
|
+
|
1125
|
+
# Get an global actions runner registration token
|
1126
|
+
# @param [Hash] opts the optional parameters
|
1127
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1128
|
+
def admin_get_runner_registration_token_with_http_info(opts = {})
|
1129
|
+
if @api_client.config.debugging
|
1130
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_get_runner_registration_token ...'
|
1131
|
+
end
|
1132
|
+
# resource path
|
1133
|
+
local_var_path = '/admin/runners/registration-token'
|
1134
|
+
|
1135
|
+
# query parameters
|
1136
|
+
query_params = opts[:query_params] || {}
|
1137
|
+
|
1138
|
+
# header parameters
|
1139
|
+
header_params = opts[:header_params] || {}
|
1140
|
+
|
1141
|
+
# form parameters
|
1142
|
+
form_params = opts[:form_params] || {}
|
1143
|
+
|
1144
|
+
# http body (model)
|
1145
|
+
post_body = opts[:debug_body]
|
1146
|
+
|
1147
|
+
# return_type
|
1148
|
+
return_type = opts[:debug_return_type]
|
1149
|
+
|
1150
|
+
# auth_names
|
1151
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1152
|
+
|
1153
|
+
new_options = opts.merge(
|
1154
|
+
:operation => :"AdminApi.admin_get_runner_registration_token",
|
1155
|
+
:header_params => header_params,
|
1156
|
+
:query_params => query_params,
|
1157
|
+
:form_params => form_params,
|
1158
|
+
:body => post_body,
|
1159
|
+
:auth_names => auth_names,
|
1160
|
+
:return_type => return_type
|
1161
|
+
)
|
1162
|
+
|
1163
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1164
|
+
if @api_client.config.debugging
|
1165
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_get_runner_registration_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1166
|
+
end
|
1167
|
+
return data, status_code, headers
|
1168
|
+
end
|
1169
|
+
|
1170
|
+
# List system's webhooks
|
1171
|
+
# @param [Hash] opts the optional parameters
|
1172
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1173
|
+
# @option opts [Integer] :limit page size of results
|
1174
|
+
# @return [Array<Hook>]
|
1175
|
+
def admin_list_hooks(opts = {})
|
1176
|
+
data, _status_code, _headers = admin_list_hooks_with_http_info(opts)
|
1177
|
+
data
|
1178
|
+
end
|
1179
|
+
|
1180
|
+
# List system's webhooks
|
1181
|
+
# @param [Hash] opts the optional parameters
|
1182
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1183
|
+
# @option opts [Integer] :limit page size of results
|
1184
|
+
# @return [Array<(Array<Hook>, Integer, Hash)>] Array<Hook> data, response status code and response headers
|
1185
|
+
def admin_list_hooks_with_http_info(opts = {})
|
1186
|
+
if @api_client.config.debugging
|
1187
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_list_hooks ...'
|
1188
|
+
end
|
1189
|
+
# resource path
|
1190
|
+
local_var_path = '/admin/hooks'
|
1191
|
+
|
1192
|
+
# query parameters
|
1193
|
+
query_params = opts[:query_params] || {}
|
1194
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
1195
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1196
|
+
|
1197
|
+
# header parameters
|
1198
|
+
header_params = opts[:header_params] || {}
|
1199
|
+
# HTTP header 'Accept' (if needed)
|
1200
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1201
|
+
|
1202
|
+
# form parameters
|
1203
|
+
form_params = opts[:form_params] || {}
|
1204
|
+
|
1205
|
+
# http body (model)
|
1206
|
+
post_body = opts[:debug_body]
|
1207
|
+
|
1208
|
+
# return_type
|
1209
|
+
return_type = opts[:debug_return_type] || 'Array<Hook>'
|
1210
|
+
|
1211
|
+
# auth_names
|
1212
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1213
|
+
|
1214
|
+
new_options = opts.merge(
|
1215
|
+
:operation => :"AdminApi.admin_list_hooks",
|
1216
|
+
:header_params => header_params,
|
1217
|
+
:query_params => query_params,
|
1218
|
+
:form_params => form_params,
|
1219
|
+
:body => post_body,
|
1220
|
+
:auth_names => auth_names,
|
1221
|
+
:return_type => return_type
|
1222
|
+
)
|
1223
|
+
|
1224
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1225
|
+
if @api_client.config.debugging
|
1226
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_list_hooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1227
|
+
end
|
1228
|
+
return data, status_code, headers
|
1229
|
+
end
|
1230
|
+
|
1231
|
+
# Rename a user
|
1232
|
+
# @param username [String] existing username of user
|
1233
|
+
# @param body [RenameUserOption]
|
1234
|
+
# @param [Hash] opts the optional parameters
|
1235
|
+
# @return [nil]
|
1236
|
+
def admin_rename_user(username, body, opts = {})
|
1237
|
+
admin_rename_user_with_http_info(username, body, opts)
|
1238
|
+
nil
|
1239
|
+
end
|
1240
|
+
|
1241
|
+
# Rename a user
|
1242
|
+
# @param username [String] existing username of user
|
1243
|
+
# @param body [RenameUserOption]
|
1244
|
+
# @param [Hash] opts the optional parameters
|
1245
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1246
|
+
def admin_rename_user_with_http_info(username, body, opts = {})
|
1247
|
+
if @api_client.config.debugging
|
1248
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_rename_user ...'
|
1249
|
+
end
|
1250
|
+
# verify the required parameter 'username' is set
|
1251
|
+
if @api_client.config.client_side_validation && username.nil?
|
1252
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling AdminApi.admin_rename_user"
|
1253
|
+
end
|
1254
|
+
# verify the required parameter 'body' is set
|
1255
|
+
if @api_client.config.client_side_validation && body.nil?
|
1256
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.admin_rename_user"
|
1257
|
+
end
|
1258
|
+
# resource path
|
1259
|
+
local_var_path = '/admin/users/{username}/rename'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
1260
|
+
|
1261
|
+
# query parameters
|
1262
|
+
query_params = opts[:query_params] || {}
|
1263
|
+
|
1264
|
+
# header parameters
|
1265
|
+
header_params = opts[:header_params] || {}
|
1266
|
+
# HTTP header 'Content-Type'
|
1267
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
|
1268
|
+
if !content_type.nil?
|
1269
|
+
header_params['Content-Type'] = content_type
|
1270
|
+
end
|
1271
|
+
|
1272
|
+
# form parameters
|
1273
|
+
form_params = opts[:form_params] || {}
|
1274
|
+
|
1275
|
+
# http body (model)
|
1276
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
1277
|
+
|
1278
|
+
# return_type
|
1279
|
+
return_type = opts[:debug_return_type]
|
1280
|
+
|
1281
|
+
# auth_names
|
1282
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1283
|
+
|
1284
|
+
new_options = opts.merge(
|
1285
|
+
:operation => :"AdminApi.admin_rename_user",
|
1286
|
+
:header_params => header_params,
|
1287
|
+
:query_params => query_params,
|
1288
|
+
:form_params => form_params,
|
1289
|
+
:body => post_body,
|
1290
|
+
:auth_names => auth_names,
|
1291
|
+
:return_type => return_type
|
1292
|
+
)
|
1293
|
+
|
1294
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1295
|
+
if @api_client.config.debugging
|
1296
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_rename_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1297
|
+
end
|
1298
|
+
return data, status_code, headers
|
1299
|
+
end
|
1300
|
+
|
1301
|
+
# Search all emails
|
1302
|
+
# @param [Hash] opts the optional parameters
|
1303
|
+
# @option opts [String] :q keyword
|
1304
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1305
|
+
# @option opts [Integer] :limit page size of results
|
1306
|
+
# @return [Array<Email>]
|
1307
|
+
def admin_search_emails(opts = {})
|
1308
|
+
data, _status_code, _headers = admin_search_emails_with_http_info(opts)
|
1309
|
+
data
|
1310
|
+
end
|
1311
|
+
|
1312
|
+
# Search all emails
|
1313
|
+
# @param [Hash] opts the optional parameters
|
1314
|
+
# @option opts [String] :q keyword
|
1315
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1316
|
+
# @option opts [Integer] :limit page size of results
|
1317
|
+
# @return [Array<(Array<Email>, Integer, Hash)>] Array<Email> data, response status code and response headers
|
1318
|
+
def admin_search_emails_with_http_info(opts = {})
|
1319
|
+
if @api_client.config.debugging
|
1320
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_search_emails ...'
|
1321
|
+
end
|
1322
|
+
# resource path
|
1323
|
+
local_var_path = '/admin/emails/search'
|
1324
|
+
|
1325
|
+
# query parameters
|
1326
|
+
query_params = opts[:query_params] || {}
|
1327
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
1328
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
1329
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1330
|
+
|
1331
|
+
# header parameters
|
1332
|
+
header_params = opts[:header_params] || {}
|
1333
|
+
# HTTP header 'Accept' (if needed)
|
1334
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1335
|
+
|
1336
|
+
# form parameters
|
1337
|
+
form_params = opts[:form_params] || {}
|
1338
|
+
|
1339
|
+
# http body (model)
|
1340
|
+
post_body = opts[:debug_body]
|
1341
|
+
|
1342
|
+
# return_type
|
1343
|
+
return_type = opts[:debug_return_type] || 'Array<Email>'
|
1344
|
+
|
1345
|
+
# auth_names
|
1346
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1347
|
+
|
1348
|
+
new_options = opts.merge(
|
1349
|
+
:operation => :"AdminApi.admin_search_emails",
|
1350
|
+
:header_params => header_params,
|
1351
|
+
:query_params => query_params,
|
1352
|
+
:form_params => form_params,
|
1353
|
+
:body => post_body,
|
1354
|
+
:auth_names => auth_names,
|
1355
|
+
:return_type => return_type
|
1356
|
+
)
|
1357
|
+
|
1358
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1359
|
+
if @api_client.config.debugging
|
1360
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_search_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1361
|
+
end
|
1362
|
+
return data, status_code, headers
|
1363
|
+
end
|
1364
|
+
|
1365
|
+
# Search users according filter conditions
|
1366
|
+
# @param [Hash] opts the optional parameters
|
1367
|
+
# @option opts [Integer] :source_id ID of the user's login source to search for
|
1368
|
+
# @option opts [String] :login_name user's login name to search for
|
1369
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1370
|
+
# @option opts [Integer] :limit page size of results
|
1371
|
+
# @return [Array<User>]
|
1372
|
+
def admin_search_users(opts = {})
|
1373
|
+
data, _status_code, _headers = admin_search_users_with_http_info(opts)
|
1374
|
+
data
|
1375
|
+
end
|
1376
|
+
|
1377
|
+
# Search users according filter conditions
|
1378
|
+
# @param [Hash] opts the optional parameters
|
1379
|
+
# @option opts [Integer] :source_id ID of the user's login source to search for
|
1380
|
+
# @option opts [String] :login_name user's login name to search for
|
1381
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1382
|
+
# @option opts [Integer] :limit page size of results
|
1383
|
+
# @return [Array<(Array<User>, Integer, Hash)>] Array<User> data, response status code and response headers
|
1384
|
+
def admin_search_users_with_http_info(opts = {})
|
1385
|
+
if @api_client.config.debugging
|
1386
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_search_users ...'
|
1387
|
+
end
|
1388
|
+
# resource path
|
1389
|
+
local_var_path = '/admin/users'
|
1390
|
+
|
1391
|
+
# query parameters
|
1392
|
+
query_params = opts[:query_params] || {}
|
1393
|
+
query_params[:'source_id'] = opts[:'source_id'] if !opts[:'source_id'].nil?
|
1394
|
+
query_params[:'login_name'] = opts[:'login_name'] if !opts[:'login_name'].nil?
|
1395
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
1396
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1397
|
+
|
1398
|
+
# header parameters
|
1399
|
+
header_params = opts[:header_params] || {}
|
1400
|
+
# HTTP header 'Accept' (if needed)
|
1401
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1402
|
+
|
1403
|
+
# form parameters
|
1404
|
+
form_params = opts[:form_params] || {}
|
1405
|
+
|
1406
|
+
# http body (model)
|
1407
|
+
post_body = opts[:debug_body]
|
1408
|
+
|
1409
|
+
# return_type
|
1410
|
+
return_type = opts[:debug_return_type] || 'Array<User>'
|
1411
|
+
|
1412
|
+
# auth_names
|
1413
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1414
|
+
|
1415
|
+
new_options = opts.merge(
|
1416
|
+
:operation => :"AdminApi.admin_search_users",
|
1417
|
+
:header_params => header_params,
|
1418
|
+
:query_params => query_params,
|
1419
|
+
:form_params => form_params,
|
1420
|
+
:body => post_body,
|
1421
|
+
:auth_names => auth_names,
|
1422
|
+
:return_type => return_type
|
1423
|
+
)
|
1424
|
+
|
1425
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1426
|
+
if @api_client.config.debugging
|
1427
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_search_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1428
|
+
end
|
1429
|
+
return data, status_code, headers
|
1430
|
+
end
|
1431
|
+
|
1432
|
+
# List unadopted repositories
|
1433
|
+
# @param [Hash] opts the optional parameters
|
1434
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1435
|
+
# @option opts [Integer] :limit page size of results
|
1436
|
+
# @option opts [String] :pattern pattern of repositories to search for
|
1437
|
+
# @return [Array<String>]
|
1438
|
+
def admin_unadopted_list(opts = {})
|
1439
|
+
data, _status_code, _headers = admin_unadopted_list_with_http_info(opts)
|
1440
|
+
data
|
1441
|
+
end
|
1442
|
+
|
1443
|
+
# List unadopted repositories
|
1444
|
+
# @param [Hash] opts the optional parameters
|
1445
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1446
|
+
# @option opts [Integer] :limit page size of results
|
1447
|
+
# @option opts [String] :pattern pattern of repositories to search for
|
1448
|
+
# @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
|
1449
|
+
def admin_unadopted_list_with_http_info(opts = {})
|
1450
|
+
if @api_client.config.debugging
|
1451
|
+
@api_client.config.logger.debug 'Calling API: AdminApi.admin_unadopted_list ...'
|
1452
|
+
end
|
1453
|
+
# resource path
|
1454
|
+
local_var_path = '/admin/unadopted'
|
1455
|
+
|
1456
|
+
# query parameters
|
1457
|
+
query_params = opts[:query_params] || {}
|
1458
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
1459
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1460
|
+
query_params[:'pattern'] = opts[:'pattern'] if !opts[:'pattern'].nil?
|
1461
|
+
|
1462
|
+
# header parameters
|
1463
|
+
header_params = opts[:header_params] || {}
|
1464
|
+
# HTTP header 'Accept' (if needed)
|
1465
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1466
|
+
|
1467
|
+
# form parameters
|
1468
|
+
form_params = opts[:form_params] || {}
|
1469
|
+
|
1470
|
+
# http body (model)
|
1471
|
+
post_body = opts[:debug_body]
|
1472
|
+
|
1473
|
+
# return_type
|
1474
|
+
return_type = opts[:debug_return_type] || 'Array<String>'
|
1475
|
+
|
1476
|
+
# auth_names
|
1477
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1478
|
+
|
1479
|
+
new_options = opts.merge(
|
1480
|
+
:operation => :"AdminApi.admin_unadopted_list",
|
1481
|
+
:header_params => header_params,
|
1482
|
+
:query_params => query_params,
|
1483
|
+
:form_params => form_params,
|
1484
|
+
:body => post_body,
|
1485
|
+
:auth_names => auth_names,
|
1486
|
+
:return_type => return_type
|
1487
|
+
)
|
1488
|
+
|
1489
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1490
|
+
if @api_client.config.debugging
|
1491
|
+
@api_client.config.logger.debug "API called: AdminApi#admin_unadopted_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1492
|
+
end
|
1493
|
+
return data, status_code, headers
|
1494
|
+
end
|
1495
|
+
end
|
1496
|
+
end
|