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,4314 @@
|
|
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 UserApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a repository
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @option opts [CreateRepoOption] :body
|
25
|
+
# @return [Repository]
|
26
|
+
def create_current_user_repo_0(opts = {})
|
27
|
+
data, _status_code, _headers = create_current_user_repo_0_with_http_info(opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# Create a repository
|
32
|
+
# @param [Hash] opts the optional parameters
|
33
|
+
# @option opts [CreateRepoOption] :body
|
34
|
+
# @return [Array<(Repository, Integer, Hash)>] Repository data, response status code and response headers
|
35
|
+
def create_current_user_repo_0_with_http_info(opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: UserApi.create_current_user_repo_0 ...'
|
38
|
+
end
|
39
|
+
# resource path
|
40
|
+
local_var_path = '/user/repos'
|
41
|
+
|
42
|
+
# query parameters
|
43
|
+
query_params = opts[:query_params] || {}
|
44
|
+
|
45
|
+
# header parameters
|
46
|
+
header_params = opts[:header_params] || {}
|
47
|
+
# HTTP header 'Accept' (if needed)
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
49
|
+
# HTTP header 'Content-Type'
|
50
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
51
|
+
if !content_type.nil?
|
52
|
+
header_params['Content-Type'] = content_type
|
53
|
+
end
|
54
|
+
|
55
|
+
# form parameters
|
56
|
+
form_params = opts[:form_params] || {}
|
57
|
+
|
58
|
+
# http body (model)
|
59
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
60
|
+
|
61
|
+
# return_type
|
62
|
+
return_type = opts[:debug_return_type] || 'Repository'
|
63
|
+
|
64
|
+
# auth_names
|
65
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
66
|
+
|
67
|
+
new_options = opts.merge(
|
68
|
+
:operation => :"UserApi.create_current_user_repo_0",
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => return_type
|
75
|
+
)
|
76
|
+
|
77
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: UserApi#create_current_user_repo_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
|
84
|
+
# Create a user-level variable
|
85
|
+
# @param variablename [String] name of the variable
|
86
|
+
# @param [Hash] opts the optional parameters
|
87
|
+
# @option opts [CreateVariableOption] :body
|
88
|
+
# @return [nil]
|
89
|
+
def create_user_variable(variablename, opts = {})
|
90
|
+
create_user_variable_with_http_info(variablename, opts)
|
91
|
+
nil
|
92
|
+
end
|
93
|
+
|
94
|
+
# Create a user-level variable
|
95
|
+
# @param variablename [String] name of the variable
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @option opts [CreateVariableOption] :body
|
98
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
99
|
+
def create_user_variable_with_http_info(variablename, opts = {})
|
100
|
+
if @api_client.config.debugging
|
101
|
+
@api_client.config.logger.debug 'Calling API: UserApi.create_user_variable ...'
|
102
|
+
end
|
103
|
+
# verify the required parameter 'variablename' is set
|
104
|
+
if @api_client.config.client_side_validation && variablename.nil?
|
105
|
+
fail ArgumentError, "Missing the required parameter 'variablename' when calling UserApi.create_user_variable"
|
106
|
+
end
|
107
|
+
# resource path
|
108
|
+
local_var_path = '/user/actions/variables/{variablename}'.sub('{' + 'variablename' + '}', CGI.escape(variablename.to_s))
|
109
|
+
|
110
|
+
# query parameters
|
111
|
+
query_params = opts[:query_params] || {}
|
112
|
+
|
113
|
+
# header parameters
|
114
|
+
header_params = opts[:header_params] || {}
|
115
|
+
# HTTP header 'Content-Type'
|
116
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
117
|
+
if !content_type.nil?
|
118
|
+
header_params['Content-Type'] = content_type
|
119
|
+
end
|
120
|
+
|
121
|
+
# form parameters
|
122
|
+
form_params = opts[:form_params] || {}
|
123
|
+
|
124
|
+
# http body (model)
|
125
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
126
|
+
|
127
|
+
# return_type
|
128
|
+
return_type = opts[:debug_return_type]
|
129
|
+
|
130
|
+
# auth_names
|
131
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
132
|
+
|
133
|
+
new_options = opts.merge(
|
134
|
+
:operation => :"UserApi.create_user_variable",
|
135
|
+
:header_params => header_params,
|
136
|
+
:query_params => query_params,
|
137
|
+
:form_params => form_params,
|
138
|
+
:body => post_body,
|
139
|
+
:auth_names => auth_names,
|
140
|
+
:return_type => return_type
|
141
|
+
)
|
142
|
+
|
143
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
144
|
+
if @api_client.config.debugging
|
145
|
+
@api_client.config.logger.debug "API called: UserApi#create_user_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
146
|
+
end
|
147
|
+
return data, status_code, headers
|
148
|
+
end
|
149
|
+
|
150
|
+
# Delete a secret in a user scope
|
151
|
+
# @param secretname [String] name of the secret
|
152
|
+
# @param [Hash] opts the optional parameters
|
153
|
+
# @return [nil]
|
154
|
+
def delete_user_secret(secretname, opts = {})
|
155
|
+
delete_user_secret_with_http_info(secretname, opts)
|
156
|
+
nil
|
157
|
+
end
|
158
|
+
|
159
|
+
# Delete a secret in a user scope
|
160
|
+
# @param secretname [String] name of the secret
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
163
|
+
def delete_user_secret_with_http_info(secretname, opts = {})
|
164
|
+
if @api_client.config.debugging
|
165
|
+
@api_client.config.logger.debug 'Calling API: UserApi.delete_user_secret ...'
|
166
|
+
end
|
167
|
+
# verify the required parameter 'secretname' is set
|
168
|
+
if @api_client.config.client_side_validation && secretname.nil?
|
169
|
+
fail ArgumentError, "Missing the required parameter 'secretname' when calling UserApi.delete_user_secret"
|
170
|
+
end
|
171
|
+
# resource path
|
172
|
+
local_var_path = '/user/actions/secrets/{secretname}'.sub('{' + 'secretname' + '}', CGI.escape(secretname.to_s))
|
173
|
+
|
174
|
+
# query parameters
|
175
|
+
query_params = opts[:query_params] || {}
|
176
|
+
|
177
|
+
# header parameters
|
178
|
+
header_params = opts[:header_params] || {}
|
179
|
+
|
180
|
+
# form parameters
|
181
|
+
form_params = opts[:form_params] || {}
|
182
|
+
|
183
|
+
# http body (model)
|
184
|
+
post_body = opts[:debug_body]
|
185
|
+
|
186
|
+
# return_type
|
187
|
+
return_type = opts[:debug_return_type]
|
188
|
+
|
189
|
+
# auth_names
|
190
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
191
|
+
|
192
|
+
new_options = opts.merge(
|
193
|
+
:operation => :"UserApi.delete_user_secret",
|
194
|
+
:header_params => header_params,
|
195
|
+
:query_params => query_params,
|
196
|
+
:form_params => form_params,
|
197
|
+
:body => post_body,
|
198
|
+
:auth_names => auth_names,
|
199
|
+
:return_type => return_type
|
200
|
+
)
|
201
|
+
|
202
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
203
|
+
if @api_client.config.debugging
|
204
|
+
@api_client.config.logger.debug "API called: UserApi#delete_user_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
205
|
+
end
|
206
|
+
return data, status_code, headers
|
207
|
+
end
|
208
|
+
|
209
|
+
# Delete a user-level variable which is created by current doer
|
210
|
+
# @param variablename [String] name of the variable
|
211
|
+
# @param [Hash] opts the optional parameters
|
212
|
+
# @return [nil]
|
213
|
+
def delete_user_variable(variablename, opts = {})
|
214
|
+
delete_user_variable_with_http_info(variablename, opts)
|
215
|
+
nil
|
216
|
+
end
|
217
|
+
|
218
|
+
# Delete a user-level variable which is created by current doer
|
219
|
+
# @param variablename [String] name of the variable
|
220
|
+
# @param [Hash] opts the optional parameters
|
221
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
222
|
+
def delete_user_variable_with_http_info(variablename, opts = {})
|
223
|
+
if @api_client.config.debugging
|
224
|
+
@api_client.config.logger.debug 'Calling API: UserApi.delete_user_variable ...'
|
225
|
+
end
|
226
|
+
# verify the required parameter 'variablename' is set
|
227
|
+
if @api_client.config.client_side_validation && variablename.nil?
|
228
|
+
fail ArgumentError, "Missing the required parameter 'variablename' when calling UserApi.delete_user_variable"
|
229
|
+
end
|
230
|
+
# resource path
|
231
|
+
local_var_path = '/user/actions/variables/{variablename}'.sub('{' + 'variablename' + '}', CGI.escape(variablename.to_s))
|
232
|
+
|
233
|
+
# query parameters
|
234
|
+
query_params = opts[:query_params] || {}
|
235
|
+
|
236
|
+
# header parameters
|
237
|
+
header_params = opts[:header_params] || {}
|
238
|
+
|
239
|
+
# form parameters
|
240
|
+
form_params = opts[:form_params] || {}
|
241
|
+
|
242
|
+
# http body (model)
|
243
|
+
post_body = opts[:debug_body]
|
244
|
+
|
245
|
+
# return_type
|
246
|
+
return_type = opts[:debug_return_type]
|
247
|
+
|
248
|
+
# auth_names
|
249
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
250
|
+
|
251
|
+
new_options = opts.merge(
|
252
|
+
:operation => :"UserApi.delete_user_variable",
|
253
|
+
:header_params => header_params,
|
254
|
+
:query_params => query_params,
|
255
|
+
:form_params => form_params,
|
256
|
+
:body => post_body,
|
257
|
+
:auth_names => auth_names,
|
258
|
+
:return_type => return_type
|
259
|
+
)
|
260
|
+
|
261
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
262
|
+
if @api_client.config.debugging
|
263
|
+
@api_client.config.logger.debug "API called: UserApi#delete_user_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
264
|
+
end
|
265
|
+
return data, status_code, headers
|
266
|
+
end
|
267
|
+
|
268
|
+
# Get user settings
|
269
|
+
# @param [Hash] opts the optional parameters
|
270
|
+
# @return [UserSettings]
|
271
|
+
def get_user_settings(opts = {})
|
272
|
+
data, _status_code, _headers = get_user_settings_with_http_info(opts)
|
273
|
+
data
|
274
|
+
end
|
275
|
+
|
276
|
+
# Get user settings
|
277
|
+
# @param [Hash] opts the optional parameters
|
278
|
+
# @return [Array<(UserSettings, Integer, Hash)>] UserSettings data, response status code and response headers
|
279
|
+
def get_user_settings_with_http_info(opts = {})
|
280
|
+
if @api_client.config.debugging
|
281
|
+
@api_client.config.logger.debug 'Calling API: UserApi.get_user_settings ...'
|
282
|
+
end
|
283
|
+
# resource path
|
284
|
+
local_var_path = '/user/settings'
|
285
|
+
|
286
|
+
# query parameters
|
287
|
+
query_params = opts[:query_params] || {}
|
288
|
+
|
289
|
+
# header parameters
|
290
|
+
header_params = opts[:header_params] || {}
|
291
|
+
# HTTP header 'Accept' (if needed)
|
292
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
293
|
+
|
294
|
+
# form parameters
|
295
|
+
form_params = opts[:form_params] || {}
|
296
|
+
|
297
|
+
# http body (model)
|
298
|
+
post_body = opts[:debug_body]
|
299
|
+
|
300
|
+
# return_type
|
301
|
+
return_type = opts[:debug_return_type] || 'UserSettings'
|
302
|
+
|
303
|
+
# auth_names
|
304
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
305
|
+
|
306
|
+
new_options = opts.merge(
|
307
|
+
:operation => :"UserApi.get_user_settings",
|
308
|
+
:header_params => header_params,
|
309
|
+
:query_params => query_params,
|
310
|
+
:form_params => form_params,
|
311
|
+
:body => post_body,
|
312
|
+
:auth_names => auth_names,
|
313
|
+
:return_type => return_type
|
314
|
+
)
|
315
|
+
|
316
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
317
|
+
if @api_client.config.debugging
|
318
|
+
@api_client.config.logger.debug "API called: UserApi#get_user_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
319
|
+
end
|
320
|
+
return data, status_code, headers
|
321
|
+
end
|
322
|
+
|
323
|
+
# Get a user-level variable which is created by current doer
|
324
|
+
# @param variablename [String] name of the variable
|
325
|
+
# @param [Hash] opts the optional parameters
|
326
|
+
# @return [ActionVariable]
|
327
|
+
def get_user_variable(variablename, opts = {})
|
328
|
+
data, _status_code, _headers = get_user_variable_with_http_info(variablename, opts)
|
329
|
+
data
|
330
|
+
end
|
331
|
+
|
332
|
+
# Get a user-level variable which is created by current doer
|
333
|
+
# @param variablename [String] name of the variable
|
334
|
+
# @param [Hash] opts the optional parameters
|
335
|
+
# @return [Array<(ActionVariable, Integer, Hash)>] ActionVariable data, response status code and response headers
|
336
|
+
def get_user_variable_with_http_info(variablename, opts = {})
|
337
|
+
if @api_client.config.debugging
|
338
|
+
@api_client.config.logger.debug 'Calling API: UserApi.get_user_variable ...'
|
339
|
+
end
|
340
|
+
# verify the required parameter 'variablename' is set
|
341
|
+
if @api_client.config.client_side_validation && variablename.nil?
|
342
|
+
fail ArgumentError, "Missing the required parameter 'variablename' when calling UserApi.get_user_variable"
|
343
|
+
end
|
344
|
+
# resource path
|
345
|
+
local_var_path = '/user/actions/variables/{variablename}'.sub('{' + 'variablename' + '}', CGI.escape(variablename.to_s))
|
346
|
+
|
347
|
+
# query parameters
|
348
|
+
query_params = opts[:query_params] || {}
|
349
|
+
|
350
|
+
# header parameters
|
351
|
+
header_params = opts[:header_params] || {}
|
352
|
+
# HTTP header 'Accept' (if needed)
|
353
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
354
|
+
|
355
|
+
# form parameters
|
356
|
+
form_params = opts[:form_params] || {}
|
357
|
+
|
358
|
+
# http body (model)
|
359
|
+
post_body = opts[:debug_body]
|
360
|
+
|
361
|
+
# return_type
|
362
|
+
return_type = opts[:debug_return_type] || 'ActionVariable'
|
363
|
+
|
364
|
+
# auth_names
|
365
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
366
|
+
|
367
|
+
new_options = opts.merge(
|
368
|
+
:operation => :"UserApi.get_user_variable",
|
369
|
+
:header_params => header_params,
|
370
|
+
:query_params => query_params,
|
371
|
+
:form_params => form_params,
|
372
|
+
:body => post_body,
|
373
|
+
:auth_names => auth_names,
|
374
|
+
:return_type => return_type
|
375
|
+
)
|
376
|
+
|
377
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
378
|
+
if @api_client.config.debugging
|
379
|
+
@api_client.config.logger.debug "API called: UserApi#get_user_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
380
|
+
end
|
381
|
+
return data, status_code, headers
|
382
|
+
end
|
383
|
+
|
384
|
+
# Get the user-level list of variables which is created by current doer
|
385
|
+
# @param [Hash] opts the optional parameters
|
386
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
387
|
+
# @option opts [Integer] :limit page size of results
|
388
|
+
# @return [Array<ActionVariable>]
|
389
|
+
def get_user_variables_list(opts = {})
|
390
|
+
data, _status_code, _headers = get_user_variables_list_with_http_info(opts)
|
391
|
+
data
|
392
|
+
end
|
393
|
+
|
394
|
+
# Get the user-level list of variables which is created by current doer
|
395
|
+
# @param [Hash] opts the optional parameters
|
396
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
397
|
+
# @option opts [Integer] :limit page size of results
|
398
|
+
# @return [Array<(Array<ActionVariable>, Integer, Hash)>] Array<ActionVariable> data, response status code and response headers
|
399
|
+
def get_user_variables_list_with_http_info(opts = {})
|
400
|
+
if @api_client.config.debugging
|
401
|
+
@api_client.config.logger.debug 'Calling API: UserApi.get_user_variables_list ...'
|
402
|
+
end
|
403
|
+
# resource path
|
404
|
+
local_var_path = '/user/actions/variables'
|
405
|
+
|
406
|
+
# query parameters
|
407
|
+
query_params = opts[:query_params] || {}
|
408
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
409
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
410
|
+
|
411
|
+
# header parameters
|
412
|
+
header_params = opts[:header_params] || {}
|
413
|
+
# HTTP header 'Accept' (if needed)
|
414
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
415
|
+
|
416
|
+
# form parameters
|
417
|
+
form_params = opts[:form_params] || {}
|
418
|
+
|
419
|
+
# http body (model)
|
420
|
+
post_body = opts[:debug_body]
|
421
|
+
|
422
|
+
# return_type
|
423
|
+
return_type = opts[:debug_return_type] || 'Array<ActionVariable>'
|
424
|
+
|
425
|
+
# auth_names
|
426
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
427
|
+
|
428
|
+
new_options = opts.merge(
|
429
|
+
:operation => :"UserApi.get_user_variables_list",
|
430
|
+
:header_params => header_params,
|
431
|
+
:query_params => query_params,
|
432
|
+
:form_params => form_params,
|
433
|
+
:body => post_body,
|
434
|
+
:auth_names => auth_names,
|
435
|
+
:return_type => return_type
|
436
|
+
)
|
437
|
+
|
438
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
439
|
+
if @api_client.config.debugging
|
440
|
+
@api_client.config.logger.debug "API called: UserApi#get_user_variables_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
441
|
+
end
|
442
|
+
return data, status_code, headers
|
443
|
+
end
|
444
|
+
|
445
|
+
# Get a Token to verify
|
446
|
+
# @param [Hash] opts the optional parameters
|
447
|
+
# @return [String]
|
448
|
+
def get_verification_token(opts = {})
|
449
|
+
data, _status_code, _headers = get_verification_token_with_http_info(opts)
|
450
|
+
data
|
451
|
+
end
|
452
|
+
|
453
|
+
# Get a Token to verify
|
454
|
+
# @param [Hash] opts the optional parameters
|
455
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
456
|
+
def get_verification_token_with_http_info(opts = {})
|
457
|
+
if @api_client.config.debugging
|
458
|
+
@api_client.config.logger.debug 'Calling API: UserApi.get_verification_token ...'
|
459
|
+
end
|
460
|
+
# resource path
|
461
|
+
local_var_path = '/user/gpg_key_token'
|
462
|
+
|
463
|
+
# query parameters
|
464
|
+
query_params = opts[:query_params] || {}
|
465
|
+
|
466
|
+
# header parameters
|
467
|
+
header_params = opts[:header_params] || {}
|
468
|
+
# HTTP header 'Accept' (if needed)
|
469
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/plain']) unless header_params['Accept']
|
470
|
+
|
471
|
+
# form parameters
|
472
|
+
form_params = opts[:form_params] || {}
|
473
|
+
|
474
|
+
# http body (model)
|
475
|
+
post_body = opts[:debug_body]
|
476
|
+
|
477
|
+
# return_type
|
478
|
+
return_type = opts[:debug_return_type] || 'String'
|
479
|
+
|
480
|
+
# auth_names
|
481
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
482
|
+
|
483
|
+
new_options = opts.merge(
|
484
|
+
:operation => :"UserApi.get_verification_token",
|
485
|
+
:header_params => header_params,
|
486
|
+
:query_params => query_params,
|
487
|
+
:form_params => form_params,
|
488
|
+
:body => post_body,
|
489
|
+
:auth_names => auth_names,
|
490
|
+
:return_type => return_type
|
491
|
+
)
|
492
|
+
|
493
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
494
|
+
if @api_client.config.debugging
|
495
|
+
@api_client.config.logger.debug "API called: UserApi#get_verification_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
496
|
+
end
|
497
|
+
return data, status_code, headers
|
498
|
+
end
|
499
|
+
|
500
|
+
# Create or Update a secret value in a user scope
|
501
|
+
# @param secretname [String] name of the secret
|
502
|
+
# @param [Hash] opts the optional parameters
|
503
|
+
# @option opts [CreateOrUpdateSecretOption] :body
|
504
|
+
# @return [nil]
|
505
|
+
def update_user_secret(secretname, opts = {})
|
506
|
+
update_user_secret_with_http_info(secretname, opts)
|
507
|
+
nil
|
508
|
+
end
|
509
|
+
|
510
|
+
# Create or Update a secret value in a user scope
|
511
|
+
# @param secretname [String] name of the secret
|
512
|
+
# @param [Hash] opts the optional parameters
|
513
|
+
# @option opts [CreateOrUpdateSecretOption] :body
|
514
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
515
|
+
def update_user_secret_with_http_info(secretname, opts = {})
|
516
|
+
if @api_client.config.debugging
|
517
|
+
@api_client.config.logger.debug 'Calling API: UserApi.update_user_secret ...'
|
518
|
+
end
|
519
|
+
# verify the required parameter 'secretname' is set
|
520
|
+
if @api_client.config.client_side_validation && secretname.nil?
|
521
|
+
fail ArgumentError, "Missing the required parameter 'secretname' when calling UserApi.update_user_secret"
|
522
|
+
end
|
523
|
+
# resource path
|
524
|
+
local_var_path = '/user/actions/secrets/{secretname}'.sub('{' + 'secretname' + '}', CGI.escape(secretname.to_s))
|
525
|
+
|
526
|
+
# query parameters
|
527
|
+
query_params = opts[:query_params] || {}
|
528
|
+
|
529
|
+
# header parameters
|
530
|
+
header_params = opts[:header_params] || {}
|
531
|
+
# HTTP header 'Content-Type'
|
532
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
533
|
+
if !content_type.nil?
|
534
|
+
header_params['Content-Type'] = content_type
|
535
|
+
end
|
536
|
+
|
537
|
+
# form parameters
|
538
|
+
form_params = opts[:form_params] || {}
|
539
|
+
|
540
|
+
# http body (model)
|
541
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
542
|
+
|
543
|
+
# return_type
|
544
|
+
return_type = opts[:debug_return_type]
|
545
|
+
|
546
|
+
# auth_names
|
547
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
548
|
+
|
549
|
+
new_options = opts.merge(
|
550
|
+
:operation => :"UserApi.update_user_secret",
|
551
|
+
:header_params => header_params,
|
552
|
+
:query_params => query_params,
|
553
|
+
:form_params => form_params,
|
554
|
+
:body => post_body,
|
555
|
+
:auth_names => auth_names,
|
556
|
+
:return_type => return_type
|
557
|
+
)
|
558
|
+
|
559
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
560
|
+
if @api_client.config.debugging
|
561
|
+
@api_client.config.logger.debug "API called: UserApi#update_user_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
562
|
+
end
|
563
|
+
return data, status_code, headers
|
564
|
+
end
|
565
|
+
|
566
|
+
# Update user settings
|
567
|
+
# @param [Hash] opts the optional parameters
|
568
|
+
# @option opts [UserSettingsOptions] :body
|
569
|
+
# @return [UserSettings]
|
570
|
+
def update_user_settings(opts = {})
|
571
|
+
data, _status_code, _headers = update_user_settings_with_http_info(opts)
|
572
|
+
data
|
573
|
+
end
|
574
|
+
|
575
|
+
# Update user settings
|
576
|
+
# @param [Hash] opts the optional parameters
|
577
|
+
# @option opts [UserSettingsOptions] :body
|
578
|
+
# @return [Array<(UserSettings, Integer, Hash)>] UserSettings data, response status code and response headers
|
579
|
+
def update_user_settings_with_http_info(opts = {})
|
580
|
+
if @api_client.config.debugging
|
581
|
+
@api_client.config.logger.debug 'Calling API: UserApi.update_user_settings ...'
|
582
|
+
end
|
583
|
+
# resource path
|
584
|
+
local_var_path = '/user/settings'
|
585
|
+
|
586
|
+
# query parameters
|
587
|
+
query_params = opts[:query_params] || {}
|
588
|
+
|
589
|
+
# header parameters
|
590
|
+
header_params = opts[:header_params] || {}
|
591
|
+
# HTTP header 'Accept' (if needed)
|
592
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
593
|
+
# HTTP header 'Content-Type'
|
594
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
|
595
|
+
if !content_type.nil?
|
596
|
+
header_params['Content-Type'] = content_type
|
597
|
+
end
|
598
|
+
|
599
|
+
# form parameters
|
600
|
+
form_params = opts[:form_params] || {}
|
601
|
+
|
602
|
+
# http body (model)
|
603
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
604
|
+
|
605
|
+
# return_type
|
606
|
+
return_type = opts[:debug_return_type] || 'UserSettings'
|
607
|
+
|
608
|
+
# auth_names
|
609
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
610
|
+
|
611
|
+
new_options = opts.merge(
|
612
|
+
:operation => :"UserApi.update_user_settings",
|
613
|
+
:header_params => header_params,
|
614
|
+
:query_params => query_params,
|
615
|
+
:form_params => form_params,
|
616
|
+
:body => post_body,
|
617
|
+
:auth_names => auth_names,
|
618
|
+
:return_type => return_type
|
619
|
+
)
|
620
|
+
|
621
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
622
|
+
if @api_client.config.debugging
|
623
|
+
@api_client.config.logger.debug "API called: UserApi#update_user_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
624
|
+
end
|
625
|
+
return data, status_code, headers
|
626
|
+
end
|
627
|
+
|
628
|
+
# Update a user-level variable which is created by current doer
|
629
|
+
# @param variablename [String] name of the variable
|
630
|
+
# @param [Hash] opts the optional parameters
|
631
|
+
# @option opts [UpdateVariableOption] :body
|
632
|
+
# @return [nil]
|
633
|
+
def update_user_variable(variablename, opts = {})
|
634
|
+
update_user_variable_with_http_info(variablename, opts)
|
635
|
+
nil
|
636
|
+
end
|
637
|
+
|
638
|
+
# Update a user-level variable which is created by current doer
|
639
|
+
# @param variablename [String] name of the variable
|
640
|
+
# @param [Hash] opts the optional parameters
|
641
|
+
# @option opts [UpdateVariableOption] :body
|
642
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
643
|
+
def update_user_variable_with_http_info(variablename, opts = {})
|
644
|
+
if @api_client.config.debugging
|
645
|
+
@api_client.config.logger.debug 'Calling API: UserApi.update_user_variable ...'
|
646
|
+
end
|
647
|
+
# verify the required parameter 'variablename' is set
|
648
|
+
if @api_client.config.client_side_validation && variablename.nil?
|
649
|
+
fail ArgumentError, "Missing the required parameter 'variablename' when calling UserApi.update_user_variable"
|
650
|
+
end
|
651
|
+
# resource path
|
652
|
+
local_var_path = '/user/actions/variables/{variablename}'.sub('{' + 'variablename' + '}', CGI.escape(variablename.to_s))
|
653
|
+
|
654
|
+
# query parameters
|
655
|
+
query_params = opts[:query_params] || {}
|
656
|
+
|
657
|
+
# header parameters
|
658
|
+
header_params = opts[:header_params] || {}
|
659
|
+
# HTTP header 'Content-Type'
|
660
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
661
|
+
if !content_type.nil?
|
662
|
+
header_params['Content-Type'] = content_type
|
663
|
+
end
|
664
|
+
|
665
|
+
# form parameters
|
666
|
+
form_params = opts[:form_params] || {}
|
667
|
+
|
668
|
+
# http body (model)
|
669
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
670
|
+
|
671
|
+
# return_type
|
672
|
+
return_type = opts[:debug_return_type]
|
673
|
+
|
674
|
+
# auth_names
|
675
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
676
|
+
|
677
|
+
new_options = opts.merge(
|
678
|
+
:operation => :"UserApi.update_user_variable",
|
679
|
+
:header_params => header_params,
|
680
|
+
:query_params => query_params,
|
681
|
+
:form_params => form_params,
|
682
|
+
:body => post_body,
|
683
|
+
:auth_names => auth_names,
|
684
|
+
:return_type => return_type
|
685
|
+
)
|
686
|
+
|
687
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
688
|
+
if @api_client.config.debugging
|
689
|
+
@api_client.config.logger.debug "API called: UserApi#update_user_variable\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
690
|
+
end
|
691
|
+
return data, status_code, headers
|
692
|
+
end
|
693
|
+
|
694
|
+
# Add email addresses
|
695
|
+
# @param [Hash] opts the optional parameters
|
696
|
+
# @option opts [CreateEmailOption] :body
|
697
|
+
# @return [Array<Email>]
|
698
|
+
def user_add_email(opts = {})
|
699
|
+
data, _status_code, _headers = user_add_email_with_http_info(opts)
|
700
|
+
data
|
701
|
+
end
|
702
|
+
|
703
|
+
# Add email addresses
|
704
|
+
# @param [Hash] opts the optional parameters
|
705
|
+
# @option opts [CreateEmailOption] :body
|
706
|
+
# @return [Array<(Array<Email>, Integer, Hash)>] Array<Email> data, response status code and response headers
|
707
|
+
def user_add_email_with_http_info(opts = {})
|
708
|
+
if @api_client.config.debugging
|
709
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_add_email ...'
|
710
|
+
end
|
711
|
+
# resource path
|
712
|
+
local_var_path = '/user/emails'
|
713
|
+
|
714
|
+
# query parameters
|
715
|
+
query_params = opts[:query_params] || {}
|
716
|
+
|
717
|
+
# header parameters
|
718
|
+
header_params = opts[:header_params] || {}
|
719
|
+
# HTTP header 'Accept' (if needed)
|
720
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
721
|
+
# HTTP header 'Content-Type'
|
722
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
|
723
|
+
if !content_type.nil?
|
724
|
+
header_params['Content-Type'] = content_type
|
725
|
+
end
|
726
|
+
|
727
|
+
# form parameters
|
728
|
+
form_params = opts[:form_params] || {}
|
729
|
+
|
730
|
+
# http body (model)
|
731
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
732
|
+
|
733
|
+
# return_type
|
734
|
+
return_type = opts[:debug_return_type] || 'Array<Email>'
|
735
|
+
|
736
|
+
# auth_names
|
737
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
738
|
+
|
739
|
+
new_options = opts.merge(
|
740
|
+
:operation => :"UserApi.user_add_email",
|
741
|
+
:header_params => header_params,
|
742
|
+
:query_params => query_params,
|
743
|
+
:form_params => form_params,
|
744
|
+
:body => post_body,
|
745
|
+
:auth_names => auth_names,
|
746
|
+
:return_type => return_type
|
747
|
+
)
|
748
|
+
|
749
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
750
|
+
if @api_client.config.debugging
|
751
|
+
@api_client.config.logger.debug "API called: UserApi#user_add_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
752
|
+
end
|
753
|
+
return data, status_code, headers
|
754
|
+
end
|
755
|
+
|
756
|
+
# Blocks a user from the doer.
|
757
|
+
# @param username [String] username of the user
|
758
|
+
# @param [Hash] opts the optional parameters
|
759
|
+
# @return [nil]
|
760
|
+
def user_block_user(username, opts = {})
|
761
|
+
user_block_user_with_http_info(username, opts)
|
762
|
+
nil
|
763
|
+
end
|
764
|
+
|
765
|
+
# Blocks a user from the doer.
|
766
|
+
# @param username [String] username of the user
|
767
|
+
# @param [Hash] opts the optional parameters
|
768
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
769
|
+
def user_block_user_with_http_info(username, opts = {})
|
770
|
+
if @api_client.config.debugging
|
771
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_block_user ...'
|
772
|
+
end
|
773
|
+
# verify the required parameter 'username' is set
|
774
|
+
if @api_client.config.client_side_validation && username.nil?
|
775
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_block_user"
|
776
|
+
end
|
777
|
+
# resource path
|
778
|
+
local_var_path = '/user/block/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
779
|
+
|
780
|
+
# query parameters
|
781
|
+
query_params = opts[:query_params] || {}
|
782
|
+
|
783
|
+
# header parameters
|
784
|
+
header_params = opts[:header_params] || {}
|
785
|
+
|
786
|
+
# form parameters
|
787
|
+
form_params = opts[:form_params] || {}
|
788
|
+
|
789
|
+
# http body (model)
|
790
|
+
post_body = opts[:debug_body]
|
791
|
+
|
792
|
+
# return_type
|
793
|
+
return_type = opts[:debug_return_type]
|
794
|
+
|
795
|
+
# auth_names
|
796
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
797
|
+
|
798
|
+
new_options = opts.merge(
|
799
|
+
:operation => :"UserApi.user_block_user",
|
800
|
+
:header_params => header_params,
|
801
|
+
:query_params => query_params,
|
802
|
+
:form_params => form_params,
|
803
|
+
:body => post_body,
|
804
|
+
:auth_names => auth_names,
|
805
|
+
:return_type => return_type
|
806
|
+
)
|
807
|
+
|
808
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
809
|
+
if @api_client.config.debugging
|
810
|
+
@api_client.config.logger.debug "API called: UserApi#user_block_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
811
|
+
end
|
812
|
+
return data, status_code, headers
|
813
|
+
end
|
814
|
+
|
815
|
+
# Check if one user is following another user
|
816
|
+
# @param username [String] username of following user
|
817
|
+
# @param target [String] username of followed user
|
818
|
+
# @param [Hash] opts the optional parameters
|
819
|
+
# @return [nil]
|
820
|
+
def user_check_following(username, target, opts = {})
|
821
|
+
user_check_following_with_http_info(username, target, opts)
|
822
|
+
nil
|
823
|
+
end
|
824
|
+
|
825
|
+
# Check if one user is following another user
|
826
|
+
# @param username [String] username of following user
|
827
|
+
# @param target [String] username of followed user
|
828
|
+
# @param [Hash] opts the optional parameters
|
829
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
830
|
+
def user_check_following_with_http_info(username, target, opts = {})
|
831
|
+
if @api_client.config.debugging
|
832
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_check_following ...'
|
833
|
+
end
|
834
|
+
# verify the required parameter 'username' is set
|
835
|
+
if @api_client.config.client_side_validation && username.nil?
|
836
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_check_following"
|
837
|
+
end
|
838
|
+
# verify the required parameter 'target' is set
|
839
|
+
if @api_client.config.client_side_validation && target.nil?
|
840
|
+
fail ArgumentError, "Missing the required parameter 'target' when calling UserApi.user_check_following"
|
841
|
+
end
|
842
|
+
# resource path
|
843
|
+
local_var_path = '/users/{username}/following/{target}'.sub('{' + 'username' + '}', CGI.escape(username.to_s)).sub('{' + 'target' + '}', CGI.escape(target.to_s))
|
844
|
+
|
845
|
+
# query parameters
|
846
|
+
query_params = opts[:query_params] || {}
|
847
|
+
|
848
|
+
# header parameters
|
849
|
+
header_params = opts[:header_params] || {}
|
850
|
+
|
851
|
+
# form parameters
|
852
|
+
form_params = opts[:form_params] || {}
|
853
|
+
|
854
|
+
# http body (model)
|
855
|
+
post_body = opts[:debug_body]
|
856
|
+
|
857
|
+
# return_type
|
858
|
+
return_type = opts[:debug_return_type]
|
859
|
+
|
860
|
+
# auth_names
|
861
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
862
|
+
|
863
|
+
new_options = opts.merge(
|
864
|
+
:operation => :"UserApi.user_check_following",
|
865
|
+
:header_params => header_params,
|
866
|
+
:query_params => query_params,
|
867
|
+
:form_params => form_params,
|
868
|
+
:body => post_body,
|
869
|
+
:auth_names => auth_names,
|
870
|
+
:return_type => return_type
|
871
|
+
)
|
872
|
+
|
873
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
874
|
+
if @api_client.config.debugging
|
875
|
+
@api_client.config.logger.debug "API called: UserApi#user_check_following\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
876
|
+
end
|
877
|
+
return data, status_code, headers
|
878
|
+
end
|
879
|
+
|
880
|
+
# Create a hook
|
881
|
+
# @param body [CreateHookOption]
|
882
|
+
# @param [Hash] opts the optional parameters
|
883
|
+
# @return [Hook]
|
884
|
+
def user_create_hook(body, opts = {})
|
885
|
+
data, _status_code, _headers = user_create_hook_with_http_info(body, opts)
|
886
|
+
data
|
887
|
+
end
|
888
|
+
|
889
|
+
# Create a hook
|
890
|
+
# @param body [CreateHookOption]
|
891
|
+
# @param [Hash] opts the optional parameters
|
892
|
+
# @return [Array<(Hook, Integer, Hash)>] Hook data, response status code and response headers
|
893
|
+
def user_create_hook_with_http_info(body, opts = {})
|
894
|
+
if @api_client.config.debugging
|
895
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_create_hook ...'
|
896
|
+
end
|
897
|
+
# verify the required parameter 'body' is set
|
898
|
+
if @api_client.config.client_side_validation && body.nil?
|
899
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling UserApi.user_create_hook"
|
900
|
+
end
|
901
|
+
# resource path
|
902
|
+
local_var_path = '/user/hooks'
|
903
|
+
|
904
|
+
# query parameters
|
905
|
+
query_params = opts[:query_params] || {}
|
906
|
+
|
907
|
+
# header parameters
|
908
|
+
header_params = opts[:header_params] || {}
|
909
|
+
# HTTP header 'Accept' (if needed)
|
910
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
911
|
+
# HTTP header 'Content-Type'
|
912
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
913
|
+
if !content_type.nil?
|
914
|
+
header_params['Content-Type'] = content_type
|
915
|
+
end
|
916
|
+
|
917
|
+
# form parameters
|
918
|
+
form_params = opts[:form_params] || {}
|
919
|
+
|
920
|
+
# http body (model)
|
921
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
922
|
+
|
923
|
+
# return_type
|
924
|
+
return_type = opts[:debug_return_type] || 'Hook'
|
925
|
+
|
926
|
+
# auth_names
|
927
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
928
|
+
|
929
|
+
new_options = opts.merge(
|
930
|
+
:operation => :"UserApi.user_create_hook",
|
931
|
+
:header_params => header_params,
|
932
|
+
:query_params => query_params,
|
933
|
+
:form_params => form_params,
|
934
|
+
:body => post_body,
|
935
|
+
:auth_names => auth_names,
|
936
|
+
:return_type => return_type
|
937
|
+
)
|
938
|
+
|
939
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
940
|
+
if @api_client.config.debugging
|
941
|
+
@api_client.config.logger.debug "API called: UserApi#user_create_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
942
|
+
end
|
943
|
+
return data, status_code, headers
|
944
|
+
end
|
945
|
+
|
946
|
+
# creates a new OAuth2 application
|
947
|
+
# @param body [CreateOAuth2ApplicationOptions]
|
948
|
+
# @param [Hash] opts the optional parameters
|
949
|
+
# @return [OAuth2Application]
|
950
|
+
def user_create_o_auth2_application(body, opts = {})
|
951
|
+
data, _status_code, _headers = user_create_o_auth2_application_with_http_info(body, opts)
|
952
|
+
data
|
953
|
+
end
|
954
|
+
|
955
|
+
# creates a new OAuth2 application
|
956
|
+
# @param body [CreateOAuth2ApplicationOptions]
|
957
|
+
# @param [Hash] opts the optional parameters
|
958
|
+
# @return [Array<(OAuth2Application, Integer, Hash)>] OAuth2Application data, response status code and response headers
|
959
|
+
def user_create_o_auth2_application_with_http_info(body, opts = {})
|
960
|
+
if @api_client.config.debugging
|
961
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_create_o_auth2_application ...'
|
962
|
+
end
|
963
|
+
# verify the required parameter 'body' is set
|
964
|
+
if @api_client.config.client_side_validation && body.nil?
|
965
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling UserApi.user_create_o_auth2_application"
|
966
|
+
end
|
967
|
+
# resource path
|
968
|
+
local_var_path = '/user/applications/oauth2'
|
969
|
+
|
970
|
+
# query parameters
|
971
|
+
query_params = opts[:query_params] || {}
|
972
|
+
|
973
|
+
# header parameters
|
974
|
+
header_params = opts[:header_params] || {}
|
975
|
+
# HTTP header 'Accept' (if needed)
|
976
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
977
|
+
# HTTP header 'Content-Type'
|
978
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
|
979
|
+
if !content_type.nil?
|
980
|
+
header_params['Content-Type'] = content_type
|
981
|
+
end
|
982
|
+
|
983
|
+
# form parameters
|
984
|
+
form_params = opts[:form_params] || {}
|
985
|
+
|
986
|
+
# http body (model)
|
987
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
988
|
+
|
989
|
+
# return_type
|
990
|
+
return_type = opts[:debug_return_type] || 'OAuth2Application'
|
991
|
+
|
992
|
+
# auth_names
|
993
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
994
|
+
|
995
|
+
new_options = opts.merge(
|
996
|
+
:operation => :"UserApi.user_create_o_auth2_application",
|
997
|
+
:header_params => header_params,
|
998
|
+
:query_params => query_params,
|
999
|
+
:form_params => form_params,
|
1000
|
+
:body => post_body,
|
1001
|
+
:auth_names => auth_names,
|
1002
|
+
:return_type => return_type
|
1003
|
+
)
|
1004
|
+
|
1005
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1006
|
+
if @api_client.config.debugging
|
1007
|
+
@api_client.config.logger.debug "API called: UserApi#user_create_o_auth2_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1008
|
+
end
|
1009
|
+
return data, status_code, headers
|
1010
|
+
end
|
1011
|
+
|
1012
|
+
# Create an access token
|
1013
|
+
# @param username [String] username of user
|
1014
|
+
# @param [Hash] opts the optional parameters
|
1015
|
+
# @option opts [CreateAccessTokenOption] :body
|
1016
|
+
# @return [AccessToken]
|
1017
|
+
def user_create_token(username, opts = {})
|
1018
|
+
data, _status_code, _headers = user_create_token_with_http_info(username, opts)
|
1019
|
+
data
|
1020
|
+
end
|
1021
|
+
|
1022
|
+
# Create an access token
|
1023
|
+
# @param username [String] username of user
|
1024
|
+
# @param [Hash] opts the optional parameters
|
1025
|
+
# @option opts [CreateAccessTokenOption] :body
|
1026
|
+
# @return [Array<(AccessToken, Integer, Hash)>] AccessToken data, response status code and response headers
|
1027
|
+
def user_create_token_with_http_info(username, opts = {})
|
1028
|
+
if @api_client.config.debugging
|
1029
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_create_token ...'
|
1030
|
+
end
|
1031
|
+
# verify the required parameter 'username' is set
|
1032
|
+
if @api_client.config.client_side_validation && username.nil?
|
1033
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_create_token"
|
1034
|
+
end
|
1035
|
+
# resource path
|
1036
|
+
local_var_path = '/users/{username}/tokens'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
1037
|
+
|
1038
|
+
# query parameters
|
1039
|
+
query_params = opts[:query_params] || {}
|
1040
|
+
|
1041
|
+
# header parameters
|
1042
|
+
header_params = opts[:header_params] || {}
|
1043
|
+
# HTTP header 'Accept' (if needed)
|
1044
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1045
|
+
# HTTP header 'Content-Type'
|
1046
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
1047
|
+
if !content_type.nil?
|
1048
|
+
header_params['Content-Type'] = content_type
|
1049
|
+
end
|
1050
|
+
|
1051
|
+
# form parameters
|
1052
|
+
form_params = opts[:form_params] || {}
|
1053
|
+
|
1054
|
+
# http body (model)
|
1055
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
1056
|
+
|
1057
|
+
# return_type
|
1058
|
+
return_type = opts[:debug_return_type] || 'AccessToken'
|
1059
|
+
|
1060
|
+
# auth_names
|
1061
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1062
|
+
|
1063
|
+
new_options = opts.merge(
|
1064
|
+
:operation => :"UserApi.user_create_token",
|
1065
|
+
:header_params => header_params,
|
1066
|
+
:query_params => query_params,
|
1067
|
+
:form_params => form_params,
|
1068
|
+
:body => post_body,
|
1069
|
+
:auth_names => auth_names,
|
1070
|
+
:return_type => return_type
|
1071
|
+
)
|
1072
|
+
|
1073
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1074
|
+
if @api_client.config.debugging
|
1075
|
+
@api_client.config.logger.debug "API called: UserApi#user_create_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1076
|
+
end
|
1077
|
+
return data, status_code, headers
|
1078
|
+
end
|
1079
|
+
|
1080
|
+
# Check whether a user is followed by the authenticated user
|
1081
|
+
# @param username [String] username of followed user
|
1082
|
+
# @param [Hash] opts the optional parameters
|
1083
|
+
# @return [nil]
|
1084
|
+
def user_current_check_following(username, opts = {})
|
1085
|
+
user_current_check_following_with_http_info(username, opts)
|
1086
|
+
nil
|
1087
|
+
end
|
1088
|
+
|
1089
|
+
# Check whether a user is followed by the authenticated user
|
1090
|
+
# @param username [String] username of followed user
|
1091
|
+
# @param [Hash] opts the optional parameters
|
1092
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1093
|
+
def user_current_check_following_with_http_info(username, opts = {})
|
1094
|
+
if @api_client.config.debugging
|
1095
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_check_following ...'
|
1096
|
+
end
|
1097
|
+
# verify the required parameter 'username' is set
|
1098
|
+
if @api_client.config.client_side_validation && username.nil?
|
1099
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_current_check_following"
|
1100
|
+
end
|
1101
|
+
# resource path
|
1102
|
+
local_var_path = '/user/following/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
1103
|
+
|
1104
|
+
# query parameters
|
1105
|
+
query_params = opts[:query_params] || {}
|
1106
|
+
|
1107
|
+
# header parameters
|
1108
|
+
header_params = opts[:header_params] || {}
|
1109
|
+
|
1110
|
+
# form parameters
|
1111
|
+
form_params = opts[:form_params] || {}
|
1112
|
+
|
1113
|
+
# http body (model)
|
1114
|
+
post_body = opts[:debug_body]
|
1115
|
+
|
1116
|
+
# return_type
|
1117
|
+
return_type = opts[:debug_return_type]
|
1118
|
+
|
1119
|
+
# auth_names
|
1120
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1121
|
+
|
1122
|
+
new_options = opts.merge(
|
1123
|
+
:operation => :"UserApi.user_current_check_following",
|
1124
|
+
:header_params => header_params,
|
1125
|
+
:query_params => query_params,
|
1126
|
+
:form_params => form_params,
|
1127
|
+
:body => post_body,
|
1128
|
+
:auth_names => auth_names,
|
1129
|
+
:return_type => return_type
|
1130
|
+
)
|
1131
|
+
|
1132
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1133
|
+
if @api_client.config.debugging
|
1134
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_check_following\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1135
|
+
end
|
1136
|
+
return data, status_code, headers
|
1137
|
+
end
|
1138
|
+
|
1139
|
+
# Whether the authenticated is starring the repo
|
1140
|
+
# @param owner [String] owner of the repo
|
1141
|
+
# @param repo [String] name of the repo
|
1142
|
+
# @param [Hash] opts the optional parameters
|
1143
|
+
# @return [nil]
|
1144
|
+
def user_current_check_starring(owner, repo, opts = {})
|
1145
|
+
user_current_check_starring_with_http_info(owner, repo, opts)
|
1146
|
+
nil
|
1147
|
+
end
|
1148
|
+
|
1149
|
+
# Whether the authenticated is starring the repo
|
1150
|
+
# @param owner [String] owner of the repo
|
1151
|
+
# @param repo [String] name of the repo
|
1152
|
+
# @param [Hash] opts the optional parameters
|
1153
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1154
|
+
def user_current_check_starring_with_http_info(owner, repo, opts = {})
|
1155
|
+
if @api_client.config.debugging
|
1156
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_check_starring ...'
|
1157
|
+
end
|
1158
|
+
# verify the required parameter 'owner' is set
|
1159
|
+
if @api_client.config.client_side_validation && owner.nil?
|
1160
|
+
fail ArgumentError, "Missing the required parameter 'owner' when calling UserApi.user_current_check_starring"
|
1161
|
+
end
|
1162
|
+
# verify the required parameter 'repo' is set
|
1163
|
+
if @api_client.config.client_side_validation && repo.nil?
|
1164
|
+
fail ArgumentError, "Missing the required parameter 'repo' when calling UserApi.user_current_check_starring"
|
1165
|
+
end
|
1166
|
+
# resource path
|
1167
|
+
local_var_path = '/user/starred/{owner}/{repo}'.sub('{' + 'owner' + '}', CGI.escape(owner.to_s)).sub('{' + 'repo' + '}', CGI.escape(repo.to_s))
|
1168
|
+
|
1169
|
+
# query parameters
|
1170
|
+
query_params = opts[:query_params] || {}
|
1171
|
+
|
1172
|
+
# header parameters
|
1173
|
+
header_params = opts[:header_params] || {}
|
1174
|
+
|
1175
|
+
# form parameters
|
1176
|
+
form_params = opts[:form_params] || {}
|
1177
|
+
|
1178
|
+
# http body (model)
|
1179
|
+
post_body = opts[:debug_body]
|
1180
|
+
|
1181
|
+
# return_type
|
1182
|
+
return_type = opts[:debug_return_type]
|
1183
|
+
|
1184
|
+
# auth_names
|
1185
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1186
|
+
|
1187
|
+
new_options = opts.merge(
|
1188
|
+
:operation => :"UserApi.user_current_check_starring",
|
1189
|
+
:header_params => header_params,
|
1190
|
+
:query_params => query_params,
|
1191
|
+
:form_params => form_params,
|
1192
|
+
:body => post_body,
|
1193
|
+
:auth_names => auth_names,
|
1194
|
+
:return_type => return_type
|
1195
|
+
)
|
1196
|
+
|
1197
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1198
|
+
if @api_client.config.debugging
|
1199
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_check_starring\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1200
|
+
end
|
1201
|
+
return data, status_code, headers
|
1202
|
+
end
|
1203
|
+
|
1204
|
+
# Unfollow a user
|
1205
|
+
# @param username [String] username of user to unfollow
|
1206
|
+
# @param [Hash] opts the optional parameters
|
1207
|
+
# @return [nil]
|
1208
|
+
def user_current_delete_follow(username, opts = {})
|
1209
|
+
user_current_delete_follow_with_http_info(username, opts)
|
1210
|
+
nil
|
1211
|
+
end
|
1212
|
+
|
1213
|
+
# Unfollow a user
|
1214
|
+
# @param username [String] username of user to unfollow
|
1215
|
+
# @param [Hash] opts the optional parameters
|
1216
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1217
|
+
def user_current_delete_follow_with_http_info(username, opts = {})
|
1218
|
+
if @api_client.config.debugging
|
1219
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_delete_follow ...'
|
1220
|
+
end
|
1221
|
+
# verify the required parameter 'username' is set
|
1222
|
+
if @api_client.config.client_side_validation && username.nil?
|
1223
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_current_delete_follow"
|
1224
|
+
end
|
1225
|
+
# resource path
|
1226
|
+
local_var_path = '/user/following/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
1227
|
+
|
1228
|
+
# query parameters
|
1229
|
+
query_params = opts[:query_params] || {}
|
1230
|
+
|
1231
|
+
# header parameters
|
1232
|
+
header_params = opts[:header_params] || {}
|
1233
|
+
|
1234
|
+
# form parameters
|
1235
|
+
form_params = opts[:form_params] || {}
|
1236
|
+
|
1237
|
+
# http body (model)
|
1238
|
+
post_body = opts[:debug_body]
|
1239
|
+
|
1240
|
+
# return_type
|
1241
|
+
return_type = opts[:debug_return_type]
|
1242
|
+
|
1243
|
+
# auth_names
|
1244
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1245
|
+
|
1246
|
+
new_options = opts.merge(
|
1247
|
+
:operation => :"UserApi.user_current_delete_follow",
|
1248
|
+
:header_params => header_params,
|
1249
|
+
:query_params => query_params,
|
1250
|
+
:form_params => form_params,
|
1251
|
+
:body => post_body,
|
1252
|
+
:auth_names => auth_names,
|
1253
|
+
:return_type => return_type
|
1254
|
+
)
|
1255
|
+
|
1256
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
1257
|
+
if @api_client.config.debugging
|
1258
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_delete_follow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1259
|
+
end
|
1260
|
+
return data, status_code, headers
|
1261
|
+
end
|
1262
|
+
|
1263
|
+
# Remove a GPG key
|
1264
|
+
# @param id [Integer] id of key to delete
|
1265
|
+
# @param [Hash] opts the optional parameters
|
1266
|
+
# @return [nil]
|
1267
|
+
def user_current_delete_gpg_key(id, opts = {})
|
1268
|
+
user_current_delete_gpg_key_with_http_info(id, opts)
|
1269
|
+
nil
|
1270
|
+
end
|
1271
|
+
|
1272
|
+
# Remove a GPG key
|
1273
|
+
# @param id [Integer] id of key to delete
|
1274
|
+
# @param [Hash] opts the optional parameters
|
1275
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1276
|
+
def user_current_delete_gpg_key_with_http_info(id, opts = {})
|
1277
|
+
if @api_client.config.debugging
|
1278
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_delete_gpg_key ...'
|
1279
|
+
end
|
1280
|
+
# verify the required parameter 'id' is set
|
1281
|
+
if @api_client.config.client_side_validation && id.nil?
|
1282
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.user_current_delete_gpg_key"
|
1283
|
+
end
|
1284
|
+
# resource path
|
1285
|
+
local_var_path = '/user/gpg_keys/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
1286
|
+
|
1287
|
+
# query parameters
|
1288
|
+
query_params = opts[:query_params] || {}
|
1289
|
+
|
1290
|
+
# header parameters
|
1291
|
+
header_params = opts[:header_params] || {}
|
1292
|
+
|
1293
|
+
# form parameters
|
1294
|
+
form_params = opts[:form_params] || {}
|
1295
|
+
|
1296
|
+
# http body (model)
|
1297
|
+
post_body = opts[:debug_body]
|
1298
|
+
|
1299
|
+
# return_type
|
1300
|
+
return_type = opts[:debug_return_type]
|
1301
|
+
|
1302
|
+
# auth_names
|
1303
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1304
|
+
|
1305
|
+
new_options = opts.merge(
|
1306
|
+
:operation => :"UserApi.user_current_delete_gpg_key",
|
1307
|
+
:header_params => header_params,
|
1308
|
+
:query_params => query_params,
|
1309
|
+
:form_params => form_params,
|
1310
|
+
:body => post_body,
|
1311
|
+
:auth_names => auth_names,
|
1312
|
+
:return_type => return_type
|
1313
|
+
)
|
1314
|
+
|
1315
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
1316
|
+
if @api_client.config.debugging
|
1317
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_delete_gpg_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1318
|
+
end
|
1319
|
+
return data, status_code, headers
|
1320
|
+
end
|
1321
|
+
|
1322
|
+
# Delete a public key
|
1323
|
+
# @param id [Integer] id of key to delete
|
1324
|
+
# @param [Hash] opts the optional parameters
|
1325
|
+
# @return [nil]
|
1326
|
+
def user_current_delete_key(id, opts = {})
|
1327
|
+
user_current_delete_key_with_http_info(id, opts)
|
1328
|
+
nil
|
1329
|
+
end
|
1330
|
+
|
1331
|
+
# Delete a public key
|
1332
|
+
# @param id [Integer] id of key to delete
|
1333
|
+
# @param [Hash] opts the optional parameters
|
1334
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1335
|
+
def user_current_delete_key_with_http_info(id, opts = {})
|
1336
|
+
if @api_client.config.debugging
|
1337
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_delete_key ...'
|
1338
|
+
end
|
1339
|
+
# verify the required parameter 'id' is set
|
1340
|
+
if @api_client.config.client_side_validation && id.nil?
|
1341
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.user_current_delete_key"
|
1342
|
+
end
|
1343
|
+
# resource path
|
1344
|
+
local_var_path = '/user/keys/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
1345
|
+
|
1346
|
+
# query parameters
|
1347
|
+
query_params = opts[:query_params] || {}
|
1348
|
+
|
1349
|
+
# header parameters
|
1350
|
+
header_params = opts[:header_params] || {}
|
1351
|
+
|
1352
|
+
# form parameters
|
1353
|
+
form_params = opts[:form_params] || {}
|
1354
|
+
|
1355
|
+
# http body (model)
|
1356
|
+
post_body = opts[:debug_body]
|
1357
|
+
|
1358
|
+
# return_type
|
1359
|
+
return_type = opts[:debug_return_type]
|
1360
|
+
|
1361
|
+
# auth_names
|
1362
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1363
|
+
|
1364
|
+
new_options = opts.merge(
|
1365
|
+
:operation => :"UserApi.user_current_delete_key",
|
1366
|
+
:header_params => header_params,
|
1367
|
+
:query_params => query_params,
|
1368
|
+
:form_params => form_params,
|
1369
|
+
:body => post_body,
|
1370
|
+
:auth_names => auth_names,
|
1371
|
+
:return_type => return_type
|
1372
|
+
)
|
1373
|
+
|
1374
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
1375
|
+
if @api_client.config.debugging
|
1376
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_delete_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1377
|
+
end
|
1378
|
+
return data, status_code, headers
|
1379
|
+
end
|
1380
|
+
|
1381
|
+
# Unstar the given repo
|
1382
|
+
# @param owner [String] owner of the repo to unstar
|
1383
|
+
# @param repo [String] name of the repo to unstar
|
1384
|
+
# @param [Hash] opts the optional parameters
|
1385
|
+
# @return [nil]
|
1386
|
+
def user_current_delete_star(owner, repo, opts = {})
|
1387
|
+
user_current_delete_star_with_http_info(owner, repo, opts)
|
1388
|
+
nil
|
1389
|
+
end
|
1390
|
+
|
1391
|
+
# Unstar the given repo
|
1392
|
+
# @param owner [String] owner of the repo to unstar
|
1393
|
+
# @param repo [String] name of the repo to unstar
|
1394
|
+
# @param [Hash] opts the optional parameters
|
1395
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1396
|
+
def user_current_delete_star_with_http_info(owner, repo, opts = {})
|
1397
|
+
if @api_client.config.debugging
|
1398
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_delete_star ...'
|
1399
|
+
end
|
1400
|
+
# verify the required parameter 'owner' is set
|
1401
|
+
if @api_client.config.client_side_validation && owner.nil?
|
1402
|
+
fail ArgumentError, "Missing the required parameter 'owner' when calling UserApi.user_current_delete_star"
|
1403
|
+
end
|
1404
|
+
# verify the required parameter 'repo' is set
|
1405
|
+
if @api_client.config.client_side_validation && repo.nil?
|
1406
|
+
fail ArgumentError, "Missing the required parameter 'repo' when calling UserApi.user_current_delete_star"
|
1407
|
+
end
|
1408
|
+
# resource path
|
1409
|
+
local_var_path = '/user/starred/{owner}/{repo}'.sub('{' + 'owner' + '}', CGI.escape(owner.to_s)).sub('{' + 'repo' + '}', CGI.escape(repo.to_s))
|
1410
|
+
|
1411
|
+
# query parameters
|
1412
|
+
query_params = opts[:query_params] || {}
|
1413
|
+
|
1414
|
+
# header parameters
|
1415
|
+
header_params = opts[:header_params] || {}
|
1416
|
+
|
1417
|
+
# form parameters
|
1418
|
+
form_params = opts[:form_params] || {}
|
1419
|
+
|
1420
|
+
# http body (model)
|
1421
|
+
post_body = opts[:debug_body]
|
1422
|
+
|
1423
|
+
# return_type
|
1424
|
+
return_type = opts[:debug_return_type]
|
1425
|
+
|
1426
|
+
# auth_names
|
1427
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1428
|
+
|
1429
|
+
new_options = opts.merge(
|
1430
|
+
:operation => :"UserApi.user_current_delete_star",
|
1431
|
+
:header_params => header_params,
|
1432
|
+
:query_params => query_params,
|
1433
|
+
:form_params => form_params,
|
1434
|
+
:body => post_body,
|
1435
|
+
:auth_names => auth_names,
|
1436
|
+
:return_type => return_type
|
1437
|
+
)
|
1438
|
+
|
1439
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
1440
|
+
if @api_client.config.debugging
|
1441
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_delete_star\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1442
|
+
end
|
1443
|
+
return data, status_code, headers
|
1444
|
+
end
|
1445
|
+
|
1446
|
+
# Get a GPG key
|
1447
|
+
# @param id [Integer] id of key to get
|
1448
|
+
# @param [Hash] opts the optional parameters
|
1449
|
+
# @return [GPGKey]
|
1450
|
+
def user_current_get_gpg_key(id, opts = {})
|
1451
|
+
data, _status_code, _headers = user_current_get_gpg_key_with_http_info(id, opts)
|
1452
|
+
data
|
1453
|
+
end
|
1454
|
+
|
1455
|
+
# Get a GPG key
|
1456
|
+
# @param id [Integer] id of key to get
|
1457
|
+
# @param [Hash] opts the optional parameters
|
1458
|
+
# @return [Array<(GPGKey, Integer, Hash)>] GPGKey data, response status code and response headers
|
1459
|
+
def user_current_get_gpg_key_with_http_info(id, opts = {})
|
1460
|
+
if @api_client.config.debugging
|
1461
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_get_gpg_key ...'
|
1462
|
+
end
|
1463
|
+
# verify the required parameter 'id' is set
|
1464
|
+
if @api_client.config.client_side_validation && id.nil?
|
1465
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.user_current_get_gpg_key"
|
1466
|
+
end
|
1467
|
+
# resource path
|
1468
|
+
local_var_path = '/user/gpg_keys/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
1469
|
+
|
1470
|
+
# query parameters
|
1471
|
+
query_params = opts[:query_params] || {}
|
1472
|
+
|
1473
|
+
# header parameters
|
1474
|
+
header_params = opts[:header_params] || {}
|
1475
|
+
# HTTP header 'Accept' (if needed)
|
1476
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1477
|
+
|
1478
|
+
# form parameters
|
1479
|
+
form_params = opts[:form_params] || {}
|
1480
|
+
|
1481
|
+
# http body (model)
|
1482
|
+
post_body = opts[:debug_body]
|
1483
|
+
|
1484
|
+
# return_type
|
1485
|
+
return_type = opts[:debug_return_type] || 'GPGKey'
|
1486
|
+
|
1487
|
+
# auth_names
|
1488
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1489
|
+
|
1490
|
+
new_options = opts.merge(
|
1491
|
+
:operation => :"UserApi.user_current_get_gpg_key",
|
1492
|
+
:header_params => header_params,
|
1493
|
+
:query_params => query_params,
|
1494
|
+
:form_params => form_params,
|
1495
|
+
:body => post_body,
|
1496
|
+
:auth_names => auth_names,
|
1497
|
+
:return_type => return_type
|
1498
|
+
)
|
1499
|
+
|
1500
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1501
|
+
if @api_client.config.debugging
|
1502
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_get_gpg_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1503
|
+
end
|
1504
|
+
return data, status_code, headers
|
1505
|
+
end
|
1506
|
+
|
1507
|
+
# Get a public key
|
1508
|
+
# @param id [Integer] id of key to get
|
1509
|
+
# @param [Hash] opts the optional parameters
|
1510
|
+
# @return [PublicKey]
|
1511
|
+
def user_current_get_key(id, opts = {})
|
1512
|
+
data, _status_code, _headers = user_current_get_key_with_http_info(id, opts)
|
1513
|
+
data
|
1514
|
+
end
|
1515
|
+
|
1516
|
+
# Get a public key
|
1517
|
+
# @param id [Integer] id of key to get
|
1518
|
+
# @param [Hash] opts the optional parameters
|
1519
|
+
# @return [Array<(PublicKey, Integer, Hash)>] PublicKey data, response status code and response headers
|
1520
|
+
def user_current_get_key_with_http_info(id, opts = {})
|
1521
|
+
if @api_client.config.debugging
|
1522
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_get_key ...'
|
1523
|
+
end
|
1524
|
+
# verify the required parameter 'id' is set
|
1525
|
+
if @api_client.config.client_side_validation && id.nil?
|
1526
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.user_current_get_key"
|
1527
|
+
end
|
1528
|
+
# resource path
|
1529
|
+
local_var_path = '/user/keys/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
1530
|
+
|
1531
|
+
# query parameters
|
1532
|
+
query_params = opts[:query_params] || {}
|
1533
|
+
|
1534
|
+
# header parameters
|
1535
|
+
header_params = opts[:header_params] || {}
|
1536
|
+
# HTTP header 'Accept' (if needed)
|
1537
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1538
|
+
|
1539
|
+
# form parameters
|
1540
|
+
form_params = opts[:form_params] || {}
|
1541
|
+
|
1542
|
+
# http body (model)
|
1543
|
+
post_body = opts[:debug_body]
|
1544
|
+
|
1545
|
+
# return_type
|
1546
|
+
return_type = opts[:debug_return_type] || 'PublicKey'
|
1547
|
+
|
1548
|
+
# auth_names
|
1549
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1550
|
+
|
1551
|
+
new_options = opts.merge(
|
1552
|
+
:operation => :"UserApi.user_current_get_key",
|
1553
|
+
:header_params => header_params,
|
1554
|
+
:query_params => query_params,
|
1555
|
+
:form_params => form_params,
|
1556
|
+
:body => post_body,
|
1557
|
+
:auth_names => auth_names,
|
1558
|
+
:return_type => return_type
|
1559
|
+
)
|
1560
|
+
|
1561
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1562
|
+
if @api_client.config.debugging
|
1563
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_get_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1564
|
+
end
|
1565
|
+
return data, status_code, headers
|
1566
|
+
end
|
1567
|
+
|
1568
|
+
# List the authenticated user's followers
|
1569
|
+
# @param [Hash] opts the optional parameters
|
1570
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1571
|
+
# @option opts [Integer] :limit page size of results
|
1572
|
+
# @return [Array<User>]
|
1573
|
+
def user_current_list_followers(opts = {})
|
1574
|
+
data, _status_code, _headers = user_current_list_followers_with_http_info(opts)
|
1575
|
+
data
|
1576
|
+
end
|
1577
|
+
|
1578
|
+
# List the authenticated user's followers
|
1579
|
+
# @param [Hash] opts the optional parameters
|
1580
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1581
|
+
# @option opts [Integer] :limit page size of results
|
1582
|
+
# @return [Array<(Array<User>, Integer, Hash)>] Array<User> data, response status code and response headers
|
1583
|
+
def user_current_list_followers_with_http_info(opts = {})
|
1584
|
+
if @api_client.config.debugging
|
1585
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_list_followers ...'
|
1586
|
+
end
|
1587
|
+
# resource path
|
1588
|
+
local_var_path = '/user/followers'
|
1589
|
+
|
1590
|
+
# query parameters
|
1591
|
+
query_params = opts[:query_params] || {}
|
1592
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
1593
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1594
|
+
|
1595
|
+
# header parameters
|
1596
|
+
header_params = opts[:header_params] || {}
|
1597
|
+
# HTTP header 'Accept' (if needed)
|
1598
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1599
|
+
|
1600
|
+
# form parameters
|
1601
|
+
form_params = opts[:form_params] || {}
|
1602
|
+
|
1603
|
+
# http body (model)
|
1604
|
+
post_body = opts[:debug_body]
|
1605
|
+
|
1606
|
+
# return_type
|
1607
|
+
return_type = opts[:debug_return_type] || 'Array<User>'
|
1608
|
+
|
1609
|
+
# auth_names
|
1610
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1611
|
+
|
1612
|
+
new_options = opts.merge(
|
1613
|
+
:operation => :"UserApi.user_current_list_followers",
|
1614
|
+
:header_params => header_params,
|
1615
|
+
:query_params => query_params,
|
1616
|
+
:form_params => form_params,
|
1617
|
+
:body => post_body,
|
1618
|
+
:auth_names => auth_names,
|
1619
|
+
:return_type => return_type
|
1620
|
+
)
|
1621
|
+
|
1622
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1623
|
+
if @api_client.config.debugging
|
1624
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_list_followers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1625
|
+
end
|
1626
|
+
return data, status_code, headers
|
1627
|
+
end
|
1628
|
+
|
1629
|
+
# List the users that the authenticated user is following
|
1630
|
+
# @param [Hash] opts the optional parameters
|
1631
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1632
|
+
# @option opts [Integer] :limit page size of results
|
1633
|
+
# @return [Array<User>]
|
1634
|
+
def user_current_list_following(opts = {})
|
1635
|
+
data, _status_code, _headers = user_current_list_following_with_http_info(opts)
|
1636
|
+
data
|
1637
|
+
end
|
1638
|
+
|
1639
|
+
# List the users that the authenticated user is following
|
1640
|
+
# @param [Hash] opts the optional parameters
|
1641
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1642
|
+
# @option opts [Integer] :limit page size of results
|
1643
|
+
# @return [Array<(Array<User>, Integer, Hash)>] Array<User> data, response status code and response headers
|
1644
|
+
def user_current_list_following_with_http_info(opts = {})
|
1645
|
+
if @api_client.config.debugging
|
1646
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_list_following ...'
|
1647
|
+
end
|
1648
|
+
# resource path
|
1649
|
+
local_var_path = '/user/following'
|
1650
|
+
|
1651
|
+
# query parameters
|
1652
|
+
query_params = opts[:query_params] || {}
|
1653
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
1654
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1655
|
+
|
1656
|
+
# header parameters
|
1657
|
+
header_params = opts[:header_params] || {}
|
1658
|
+
# HTTP header 'Accept' (if needed)
|
1659
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1660
|
+
|
1661
|
+
# form parameters
|
1662
|
+
form_params = opts[:form_params] || {}
|
1663
|
+
|
1664
|
+
# http body (model)
|
1665
|
+
post_body = opts[:debug_body]
|
1666
|
+
|
1667
|
+
# return_type
|
1668
|
+
return_type = opts[:debug_return_type] || 'Array<User>'
|
1669
|
+
|
1670
|
+
# auth_names
|
1671
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1672
|
+
|
1673
|
+
new_options = opts.merge(
|
1674
|
+
:operation => :"UserApi.user_current_list_following",
|
1675
|
+
:header_params => header_params,
|
1676
|
+
:query_params => query_params,
|
1677
|
+
:form_params => form_params,
|
1678
|
+
:body => post_body,
|
1679
|
+
:auth_names => auth_names,
|
1680
|
+
:return_type => return_type
|
1681
|
+
)
|
1682
|
+
|
1683
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1684
|
+
if @api_client.config.debugging
|
1685
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_list_following\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1686
|
+
end
|
1687
|
+
return data, status_code, headers
|
1688
|
+
end
|
1689
|
+
|
1690
|
+
# List the authenticated user's GPG keys
|
1691
|
+
# @param [Hash] opts the optional parameters
|
1692
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1693
|
+
# @option opts [Integer] :limit page size of results
|
1694
|
+
# @return [Array<GPGKey>]
|
1695
|
+
def user_current_list_gpg_keys(opts = {})
|
1696
|
+
data, _status_code, _headers = user_current_list_gpg_keys_with_http_info(opts)
|
1697
|
+
data
|
1698
|
+
end
|
1699
|
+
|
1700
|
+
# List the authenticated user's GPG keys
|
1701
|
+
# @param [Hash] opts the optional parameters
|
1702
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1703
|
+
# @option opts [Integer] :limit page size of results
|
1704
|
+
# @return [Array<(Array<GPGKey>, Integer, Hash)>] Array<GPGKey> data, response status code and response headers
|
1705
|
+
def user_current_list_gpg_keys_with_http_info(opts = {})
|
1706
|
+
if @api_client.config.debugging
|
1707
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_list_gpg_keys ...'
|
1708
|
+
end
|
1709
|
+
# resource path
|
1710
|
+
local_var_path = '/user/gpg_keys'
|
1711
|
+
|
1712
|
+
# query parameters
|
1713
|
+
query_params = opts[:query_params] || {}
|
1714
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
1715
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1716
|
+
|
1717
|
+
# header parameters
|
1718
|
+
header_params = opts[:header_params] || {}
|
1719
|
+
# HTTP header 'Accept' (if needed)
|
1720
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1721
|
+
|
1722
|
+
# form parameters
|
1723
|
+
form_params = opts[:form_params] || {}
|
1724
|
+
|
1725
|
+
# http body (model)
|
1726
|
+
post_body = opts[:debug_body]
|
1727
|
+
|
1728
|
+
# return_type
|
1729
|
+
return_type = opts[:debug_return_type] || 'Array<GPGKey>'
|
1730
|
+
|
1731
|
+
# auth_names
|
1732
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1733
|
+
|
1734
|
+
new_options = opts.merge(
|
1735
|
+
:operation => :"UserApi.user_current_list_gpg_keys",
|
1736
|
+
:header_params => header_params,
|
1737
|
+
:query_params => query_params,
|
1738
|
+
:form_params => form_params,
|
1739
|
+
:body => post_body,
|
1740
|
+
:auth_names => auth_names,
|
1741
|
+
:return_type => return_type
|
1742
|
+
)
|
1743
|
+
|
1744
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1745
|
+
if @api_client.config.debugging
|
1746
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_list_gpg_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1747
|
+
end
|
1748
|
+
return data, status_code, headers
|
1749
|
+
end
|
1750
|
+
|
1751
|
+
# List the authenticated user's public keys
|
1752
|
+
# @param [Hash] opts the optional parameters
|
1753
|
+
# @option opts [String] :fingerprint fingerprint of the key
|
1754
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1755
|
+
# @option opts [Integer] :limit page size of results
|
1756
|
+
# @return [Array<PublicKey>]
|
1757
|
+
def user_current_list_keys(opts = {})
|
1758
|
+
data, _status_code, _headers = user_current_list_keys_with_http_info(opts)
|
1759
|
+
data
|
1760
|
+
end
|
1761
|
+
|
1762
|
+
# List the authenticated user's public keys
|
1763
|
+
# @param [Hash] opts the optional parameters
|
1764
|
+
# @option opts [String] :fingerprint fingerprint of the key
|
1765
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1766
|
+
# @option opts [Integer] :limit page size of results
|
1767
|
+
# @return [Array<(Array<PublicKey>, Integer, Hash)>] Array<PublicKey> data, response status code and response headers
|
1768
|
+
def user_current_list_keys_with_http_info(opts = {})
|
1769
|
+
if @api_client.config.debugging
|
1770
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_list_keys ...'
|
1771
|
+
end
|
1772
|
+
# resource path
|
1773
|
+
local_var_path = '/user/keys'
|
1774
|
+
|
1775
|
+
# query parameters
|
1776
|
+
query_params = opts[:query_params] || {}
|
1777
|
+
query_params[:'fingerprint'] = opts[:'fingerprint'] if !opts[:'fingerprint'].nil?
|
1778
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
1779
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1780
|
+
|
1781
|
+
# header parameters
|
1782
|
+
header_params = opts[:header_params] || {}
|
1783
|
+
# HTTP header 'Accept' (if needed)
|
1784
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1785
|
+
|
1786
|
+
# form parameters
|
1787
|
+
form_params = opts[:form_params] || {}
|
1788
|
+
|
1789
|
+
# http body (model)
|
1790
|
+
post_body = opts[:debug_body]
|
1791
|
+
|
1792
|
+
# return_type
|
1793
|
+
return_type = opts[:debug_return_type] || 'Array<PublicKey>'
|
1794
|
+
|
1795
|
+
# auth_names
|
1796
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1797
|
+
|
1798
|
+
new_options = opts.merge(
|
1799
|
+
:operation => :"UserApi.user_current_list_keys",
|
1800
|
+
:header_params => header_params,
|
1801
|
+
:query_params => query_params,
|
1802
|
+
:form_params => form_params,
|
1803
|
+
:body => post_body,
|
1804
|
+
:auth_names => auth_names,
|
1805
|
+
:return_type => return_type
|
1806
|
+
)
|
1807
|
+
|
1808
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1809
|
+
if @api_client.config.debugging
|
1810
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_list_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1811
|
+
end
|
1812
|
+
return data, status_code, headers
|
1813
|
+
end
|
1814
|
+
|
1815
|
+
# List the repos that the authenticated user owns
|
1816
|
+
# @param [Hash] opts the optional parameters
|
1817
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1818
|
+
# @option opts [Integer] :limit page size of results
|
1819
|
+
# @return [Array<Repository>]
|
1820
|
+
def user_current_list_repos(opts = {})
|
1821
|
+
data, _status_code, _headers = user_current_list_repos_with_http_info(opts)
|
1822
|
+
data
|
1823
|
+
end
|
1824
|
+
|
1825
|
+
# List the repos that the authenticated user owns
|
1826
|
+
# @param [Hash] opts the optional parameters
|
1827
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1828
|
+
# @option opts [Integer] :limit page size of results
|
1829
|
+
# @return [Array<(Array<Repository>, Integer, Hash)>] Array<Repository> data, response status code and response headers
|
1830
|
+
def user_current_list_repos_with_http_info(opts = {})
|
1831
|
+
if @api_client.config.debugging
|
1832
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_list_repos ...'
|
1833
|
+
end
|
1834
|
+
# resource path
|
1835
|
+
local_var_path = '/user/repos'
|
1836
|
+
|
1837
|
+
# query parameters
|
1838
|
+
query_params = opts[:query_params] || {}
|
1839
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
1840
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1841
|
+
|
1842
|
+
# header parameters
|
1843
|
+
header_params = opts[:header_params] || {}
|
1844
|
+
# HTTP header 'Accept' (if needed)
|
1845
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1846
|
+
|
1847
|
+
# form parameters
|
1848
|
+
form_params = opts[:form_params] || {}
|
1849
|
+
|
1850
|
+
# http body (model)
|
1851
|
+
post_body = opts[:debug_body]
|
1852
|
+
|
1853
|
+
# return_type
|
1854
|
+
return_type = opts[:debug_return_type] || 'Array<Repository>'
|
1855
|
+
|
1856
|
+
# auth_names
|
1857
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1858
|
+
|
1859
|
+
new_options = opts.merge(
|
1860
|
+
:operation => :"UserApi.user_current_list_repos",
|
1861
|
+
:header_params => header_params,
|
1862
|
+
:query_params => query_params,
|
1863
|
+
:form_params => form_params,
|
1864
|
+
:body => post_body,
|
1865
|
+
:auth_names => auth_names,
|
1866
|
+
:return_type => return_type
|
1867
|
+
)
|
1868
|
+
|
1869
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1870
|
+
if @api_client.config.debugging
|
1871
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_list_repos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1872
|
+
end
|
1873
|
+
return data, status_code, headers
|
1874
|
+
end
|
1875
|
+
|
1876
|
+
# The repos that the authenticated user has starred
|
1877
|
+
# @param [Hash] opts the optional parameters
|
1878
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1879
|
+
# @option opts [Integer] :limit page size of results
|
1880
|
+
# @return [Array<Repository>]
|
1881
|
+
def user_current_list_starred(opts = {})
|
1882
|
+
data, _status_code, _headers = user_current_list_starred_with_http_info(opts)
|
1883
|
+
data
|
1884
|
+
end
|
1885
|
+
|
1886
|
+
# The repos that the authenticated user has starred
|
1887
|
+
# @param [Hash] opts the optional parameters
|
1888
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1889
|
+
# @option opts [Integer] :limit page size of results
|
1890
|
+
# @return [Array<(Array<Repository>, Integer, Hash)>] Array<Repository> data, response status code and response headers
|
1891
|
+
def user_current_list_starred_with_http_info(opts = {})
|
1892
|
+
if @api_client.config.debugging
|
1893
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_list_starred ...'
|
1894
|
+
end
|
1895
|
+
# resource path
|
1896
|
+
local_var_path = '/user/starred'
|
1897
|
+
|
1898
|
+
# query parameters
|
1899
|
+
query_params = opts[:query_params] || {}
|
1900
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
1901
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1902
|
+
|
1903
|
+
# header parameters
|
1904
|
+
header_params = opts[:header_params] || {}
|
1905
|
+
# HTTP header 'Accept' (if needed)
|
1906
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1907
|
+
|
1908
|
+
# form parameters
|
1909
|
+
form_params = opts[:form_params] || {}
|
1910
|
+
|
1911
|
+
# http body (model)
|
1912
|
+
post_body = opts[:debug_body]
|
1913
|
+
|
1914
|
+
# return_type
|
1915
|
+
return_type = opts[:debug_return_type] || 'Array<Repository>'
|
1916
|
+
|
1917
|
+
# auth_names
|
1918
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1919
|
+
|
1920
|
+
new_options = opts.merge(
|
1921
|
+
:operation => :"UserApi.user_current_list_starred",
|
1922
|
+
:header_params => header_params,
|
1923
|
+
:query_params => query_params,
|
1924
|
+
:form_params => form_params,
|
1925
|
+
:body => post_body,
|
1926
|
+
:auth_names => auth_names,
|
1927
|
+
:return_type => return_type
|
1928
|
+
)
|
1929
|
+
|
1930
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1931
|
+
if @api_client.config.debugging
|
1932
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_list_starred\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1933
|
+
end
|
1934
|
+
return data, status_code, headers
|
1935
|
+
end
|
1936
|
+
|
1937
|
+
# List repositories watched by the authenticated user
|
1938
|
+
# @param [Hash] opts the optional parameters
|
1939
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1940
|
+
# @option opts [Integer] :limit page size of results
|
1941
|
+
# @return [Array<Repository>]
|
1942
|
+
def user_current_list_subscriptions(opts = {})
|
1943
|
+
data, _status_code, _headers = user_current_list_subscriptions_with_http_info(opts)
|
1944
|
+
data
|
1945
|
+
end
|
1946
|
+
|
1947
|
+
# List repositories watched by the authenticated user
|
1948
|
+
# @param [Hash] opts the optional parameters
|
1949
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
1950
|
+
# @option opts [Integer] :limit page size of results
|
1951
|
+
# @return [Array<(Array<Repository>, Integer, Hash)>] Array<Repository> data, response status code and response headers
|
1952
|
+
def user_current_list_subscriptions_with_http_info(opts = {})
|
1953
|
+
if @api_client.config.debugging
|
1954
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_list_subscriptions ...'
|
1955
|
+
end
|
1956
|
+
# resource path
|
1957
|
+
local_var_path = '/user/subscriptions'
|
1958
|
+
|
1959
|
+
# query parameters
|
1960
|
+
query_params = opts[:query_params] || {}
|
1961
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
1962
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
1963
|
+
|
1964
|
+
# header parameters
|
1965
|
+
header_params = opts[:header_params] || {}
|
1966
|
+
# HTTP header 'Accept' (if needed)
|
1967
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
1968
|
+
|
1969
|
+
# form parameters
|
1970
|
+
form_params = opts[:form_params] || {}
|
1971
|
+
|
1972
|
+
# http body (model)
|
1973
|
+
post_body = opts[:debug_body]
|
1974
|
+
|
1975
|
+
# return_type
|
1976
|
+
return_type = opts[:debug_return_type] || 'Array<Repository>'
|
1977
|
+
|
1978
|
+
# auth_names
|
1979
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
1980
|
+
|
1981
|
+
new_options = opts.merge(
|
1982
|
+
:operation => :"UserApi.user_current_list_subscriptions",
|
1983
|
+
:header_params => header_params,
|
1984
|
+
:query_params => query_params,
|
1985
|
+
:form_params => form_params,
|
1986
|
+
:body => post_body,
|
1987
|
+
:auth_names => auth_names,
|
1988
|
+
:return_type => return_type
|
1989
|
+
)
|
1990
|
+
|
1991
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1992
|
+
if @api_client.config.debugging
|
1993
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_list_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1994
|
+
end
|
1995
|
+
return data, status_code, headers
|
1996
|
+
end
|
1997
|
+
|
1998
|
+
# Create a GPG key
|
1999
|
+
# @param [Hash] opts the optional parameters
|
2000
|
+
# @option opts [CreateGPGKeyOption] :form
|
2001
|
+
# @return [GPGKey]
|
2002
|
+
def user_current_post_gpg_key(opts = {})
|
2003
|
+
data, _status_code, _headers = user_current_post_gpg_key_with_http_info(opts)
|
2004
|
+
data
|
2005
|
+
end
|
2006
|
+
|
2007
|
+
# Create a GPG key
|
2008
|
+
# @param [Hash] opts the optional parameters
|
2009
|
+
# @option opts [CreateGPGKeyOption] :form
|
2010
|
+
# @return [Array<(GPGKey, Integer, Hash)>] GPGKey data, response status code and response headers
|
2011
|
+
def user_current_post_gpg_key_with_http_info(opts = {})
|
2012
|
+
if @api_client.config.debugging
|
2013
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_post_gpg_key ...'
|
2014
|
+
end
|
2015
|
+
# resource path
|
2016
|
+
local_var_path = '/user/gpg_keys'
|
2017
|
+
|
2018
|
+
# query parameters
|
2019
|
+
query_params = opts[:query_params] || {}
|
2020
|
+
|
2021
|
+
# header parameters
|
2022
|
+
header_params = opts[:header_params] || {}
|
2023
|
+
# HTTP header 'Accept' (if needed)
|
2024
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
2025
|
+
# HTTP header 'Content-Type'
|
2026
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
2027
|
+
if !content_type.nil?
|
2028
|
+
header_params['Content-Type'] = content_type
|
2029
|
+
end
|
2030
|
+
|
2031
|
+
# form parameters
|
2032
|
+
form_params = opts[:form_params] || {}
|
2033
|
+
|
2034
|
+
# http body (model)
|
2035
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'form'])
|
2036
|
+
|
2037
|
+
# return_type
|
2038
|
+
return_type = opts[:debug_return_type] || 'GPGKey'
|
2039
|
+
|
2040
|
+
# auth_names
|
2041
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2042
|
+
|
2043
|
+
new_options = opts.merge(
|
2044
|
+
:operation => :"UserApi.user_current_post_gpg_key",
|
2045
|
+
:header_params => header_params,
|
2046
|
+
:query_params => query_params,
|
2047
|
+
:form_params => form_params,
|
2048
|
+
:body => post_body,
|
2049
|
+
:auth_names => auth_names,
|
2050
|
+
:return_type => return_type
|
2051
|
+
)
|
2052
|
+
|
2053
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
2054
|
+
if @api_client.config.debugging
|
2055
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_post_gpg_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2056
|
+
end
|
2057
|
+
return data, status_code, headers
|
2058
|
+
end
|
2059
|
+
|
2060
|
+
# Create a public key
|
2061
|
+
# @param [Hash] opts the optional parameters
|
2062
|
+
# @option opts [CreateKeyOption] :body
|
2063
|
+
# @return [PublicKey]
|
2064
|
+
def user_current_post_key(opts = {})
|
2065
|
+
data, _status_code, _headers = user_current_post_key_with_http_info(opts)
|
2066
|
+
data
|
2067
|
+
end
|
2068
|
+
|
2069
|
+
# Create a public key
|
2070
|
+
# @param [Hash] opts the optional parameters
|
2071
|
+
# @option opts [CreateKeyOption] :body
|
2072
|
+
# @return [Array<(PublicKey, Integer, Hash)>] PublicKey data, response status code and response headers
|
2073
|
+
def user_current_post_key_with_http_info(opts = {})
|
2074
|
+
if @api_client.config.debugging
|
2075
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_post_key ...'
|
2076
|
+
end
|
2077
|
+
# resource path
|
2078
|
+
local_var_path = '/user/keys'
|
2079
|
+
|
2080
|
+
# query parameters
|
2081
|
+
query_params = opts[:query_params] || {}
|
2082
|
+
|
2083
|
+
# header parameters
|
2084
|
+
header_params = opts[:header_params] || {}
|
2085
|
+
# HTTP header 'Accept' (if needed)
|
2086
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
2087
|
+
# HTTP header 'Content-Type'
|
2088
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
2089
|
+
if !content_type.nil?
|
2090
|
+
header_params['Content-Type'] = content_type
|
2091
|
+
end
|
2092
|
+
|
2093
|
+
# form parameters
|
2094
|
+
form_params = opts[:form_params] || {}
|
2095
|
+
|
2096
|
+
# http body (model)
|
2097
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
2098
|
+
|
2099
|
+
# return_type
|
2100
|
+
return_type = opts[:debug_return_type] || 'PublicKey'
|
2101
|
+
|
2102
|
+
# auth_names
|
2103
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2104
|
+
|
2105
|
+
new_options = opts.merge(
|
2106
|
+
:operation => :"UserApi.user_current_post_key",
|
2107
|
+
:header_params => header_params,
|
2108
|
+
:query_params => query_params,
|
2109
|
+
:form_params => form_params,
|
2110
|
+
:body => post_body,
|
2111
|
+
:auth_names => auth_names,
|
2112
|
+
:return_type => return_type
|
2113
|
+
)
|
2114
|
+
|
2115
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
2116
|
+
if @api_client.config.debugging
|
2117
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_post_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2118
|
+
end
|
2119
|
+
return data, status_code, headers
|
2120
|
+
end
|
2121
|
+
|
2122
|
+
# Follow a user
|
2123
|
+
# @param username [String] username of user to follow
|
2124
|
+
# @param [Hash] opts the optional parameters
|
2125
|
+
# @return [nil]
|
2126
|
+
def user_current_put_follow(username, opts = {})
|
2127
|
+
user_current_put_follow_with_http_info(username, opts)
|
2128
|
+
nil
|
2129
|
+
end
|
2130
|
+
|
2131
|
+
# Follow a user
|
2132
|
+
# @param username [String] username of user to follow
|
2133
|
+
# @param [Hash] opts the optional parameters
|
2134
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
2135
|
+
def user_current_put_follow_with_http_info(username, opts = {})
|
2136
|
+
if @api_client.config.debugging
|
2137
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_put_follow ...'
|
2138
|
+
end
|
2139
|
+
# verify the required parameter 'username' is set
|
2140
|
+
if @api_client.config.client_side_validation && username.nil?
|
2141
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_current_put_follow"
|
2142
|
+
end
|
2143
|
+
# resource path
|
2144
|
+
local_var_path = '/user/following/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
2145
|
+
|
2146
|
+
# query parameters
|
2147
|
+
query_params = opts[:query_params] || {}
|
2148
|
+
|
2149
|
+
# header parameters
|
2150
|
+
header_params = opts[:header_params] || {}
|
2151
|
+
|
2152
|
+
# form parameters
|
2153
|
+
form_params = opts[:form_params] || {}
|
2154
|
+
|
2155
|
+
# http body (model)
|
2156
|
+
post_body = opts[:debug_body]
|
2157
|
+
|
2158
|
+
# return_type
|
2159
|
+
return_type = opts[:debug_return_type]
|
2160
|
+
|
2161
|
+
# auth_names
|
2162
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2163
|
+
|
2164
|
+
new_options = opts.merge(
|
2165
|
+
:operation => :"UserApi.user_current_put_follow",
|
2166
|
+
:header_params => header_params,
|
2167
|
+
:query_params => query_params,
|
2168
|
+
:form_params => form_params,
|
2169
|
+
:body => post_body,
|
2170
|
+
:auth_names => auth_names,
|
2171
|
+
:return_type => return_type
|
2172
|
+
)
|
2173
|
+
|
2174
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
2175
|
+
if @api_client.config.debugging
|
2176
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_put_follow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2177
|
+
end
|
2178
|
+
return data, status_code, headers
|
2179
|
+
end
|
2180
|
+
|
2181
|
+
# Star the given repo
|
2182
|
+
# @param owner [String] owner of the repo to star
|
2183
|
+
# @param repo [String] name of the repo to star
|
2184
|
+
# @param [Hash] opts the optional parameters
|
2185
|
+
# @return [nil]
|
2186
|
+
def user_current_put_star(owner, repo, opts = {})
|
2187
|
+
user_current_put_star_with_http_info(owner, repo, opts)
|
2188
|
+
nil
|
2189
|
+
end
|
2190
|
+
|
2191
|
+
# Star the given repo
|
2192
|
+
# @param owner [String] owner of the repo to star
|
2193
|
+
# @param repo [String] name of the repo to star
|
2194
|
+
# @param [Hash] opts the optional parameters
|
2195
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
2196
|
+
def user_current_put_star_with_http_info(owner, repo, opts = {})
|
2197
|
+
if @api_client.config.debugging
|
2198
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_put_star ...'
|
2199
|
+
end
|
2200
|
+
# verify the required parameter 'owner' is set
|
2201
|
+
if @api_client.config.client_side_validation && owner.nil?
|
2202
|
+
fail ArgumentError, "Missing the required parameter 'owner' when calling UserApi.user_current_put_star"
|
2203
|
+
end
|
2204
|
+
# verify the required parameter 'repo' is set
|
2205
|
+
if @api_client.config.client_side_validation && repo.nil?
|
2206
|
+
fail ArgumentError, "Missing the required parameter 'repo' when calling UserApi.user_current_put_star"
|
2207
|
+
end
|
2208
|
+
# resource path
|
2209
|
+
local_var_path = '/user/starred/{owner}/{repo}'.sub('{' + 'owner' + '}', CGI.escape(owner.to_s)).sub('{' + 'repo' + '}', CGI.escape(repo.to_s))
|
2210
|
+
|
2211
|
+
# query parameters
|
2212
|
+
query_params = opts[:query_params] || {}
|
2213
|
+
|
2214
|
+
# header parameters
|
2215
|
+
header_params = opts[:header_params] || {}
|
2216
|
+
|
2217
|
+
# form parameters
|
2218
|
+
form_params = opts[:form_params] || {}
|
2219
|
+
|
2220
|
+
# http body (model)
|
2221
|
+
post_body = opts[:debug_body]
|
2222
|
+
|
2223
|
+
# return_type
|
2224
|
+
return_type = opts[:debug_return_type]
|
2225
|
+
|
2226
|
+
# auth_names
|
2227
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2228
|
+
|
2229
|
+
new_options = opts.merge(
|
2230
|
+
:operation => :"UserApi.user_current_put_star",
|
2231
|
+
:header_params => header_params,
|
2232
|
+
:query_params => query_params,
|
2233
|
+
:form_params => form_params,
|
2234
|
+
:body => post_body,
|
2235
|
+
:auth_names => auth_names,
|
2236
|
+
:return_type => return_type
|
2237
|
+
)
|
2238
|
+
|
2239
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
2240
|
+
if @api_client.config.debugging
|
2241
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_put_star\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2242
|
+
end
|
2243
|
+
return data, status_code, headers
|
2244
|
+
end
|
2245
|
+
|
2246
|
+
# List the current user's tracked times
|
2247
|
+
# @param [Hash] opts the optional parameters
|
2248
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
2249
|
+
# @option opts [Integer] :limit page size of results
|
2250
|
+
# @option opts [Time] :since Only show times updated after the given time. This is a timestamp in RFC 3339 format
|
2251
|
+
# @option opts [Time] :before Only show times updated before the given time. This is a timestamp in RFC 3339 format
|
2252
|
+
# @return [Array<TrackedTime>]
|
2253
|
+
def user_current_tracked_times(opts = {})
|
2254
|
+
data, _status_code, _headers = user_current_tracked_times_with_http_info(opts)
|
2255
|
+
data
|
2256
|
+
end
|
2257
|
+
|
2258
|
+
# List the current user's tracked times
|
2259
|
+
# @param [Hash] opts the optional parameters
|
2260
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
2261
|
+
# @option opts [Integer] :limit page size of results
|
2262
|
+
# @option opts [Time] :since Only show times updated after the given time. This is a timestamp in RFC 3339 format
|
2263
|
+
# @option opts [Time] :before Only show times updated before the given time. This is a timestamp in RFC 3339 format
|
2264
|
+
# @return [Array<(Array<TrackedTime>, Integer, Hash)>] Array<TrackedTime> data, response status code and response headers
|
2265
|
+
def user_current_tracked_times_with_http_info(opts = {})
|
2266
|
+
if @api_client.config.debugging
|
2267
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_current_tracked_times ...'
|
2268
|
+
end
|
2269
|
+
# resource path
|
2270
|
+
local_var_path = '/user/times'
|
2271
|
+
|
2272
|
+
# query parameters
|
2273
|
+
query_params = opts[:query_params] || {}
|
2274
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
2275
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
2276
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
2277
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
2278
|
+
|
2279
|
+
# header parameters
|
2280
|
+
header_params = opts[:header_params] || {}
|
2281
|
+
# HTTP header 'Accept' (if needed)
|
2282
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
2283
|
+
|
2284
|
+
# form parameters
|
2285
|
+
form_params = opts[:form_params] || {}
|
2286
|
+
|
2287
|
+
# http body (model)
|
2288
|
+
post_body = opts[:debug_body]
|
2289
|
+
|
2290
|
+
# return_type
|
2291
|
+
return_type = opts[:debug_return_type] || 'Array<TrackedTime>'
|
2292
|
+
|
2293
|
+
# auth_names
|
2294
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2295
|
+
|
2296
|
+
new_options = opts.merge(
|
2297
|
+
:operation => :"UserApi.user_current_tracked_times",
|
2298
|
+
:header_params => header_params,
|
2299
|
+
:query_params => query_params,
|
2300
|
+
:form_params => form_params,
|
2301
|
+
:body => post_body,
|
2302
|
+
:auth_names => auth_names,
|
2303
|
+
:return_type => return_type
|
2304
|
+
)
|
2305
|
+
|
2306
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2307
|
+
if @api_client.config.debugging
|
2308
|
+
@api_client.config.logger.debug "API called: UserApi#user_current_tracked_times\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2309
|
+
end
|
2310
|
+
return data, status_code, headers
|
2311
|
+
end
|
2312
|
+
|
2313
|
+
# delete an access token
|
2314
|
+
# @param username [String] username of user
|
2315
|
+
# @param token [String] token to be deleted, identified by ID and if not available by name
|
2316
|
+
# @param [Hash] opts the optional parameters
|
2317
|
+
# @return [nil]
|
2318
|
+
def user_delete_access_token(username, token, opts = {})
|
2319
|
+
user_delete_access_token_with_http_info(username, token, opts)
|
2320
|
+
nil
|
2321
|
+
end
|
2322
|
+
|
2323
|
+
# delete an access token
|
2324
|
+
# @param username [String] username of user
|
2325
|
+
# @param token [String] token to be deleted, identified by ID and if not available by name
|
2326
|
+
# @param [Hash] opts the optional parameters
|
2327
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
2328
|
+
def user_delete_access_token_with_http_info(username, token, opts = {})
|
2329
|
+
if @api_client.config.debugging
|
2330
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_delete_access_token ...'
|
2331
|
+
end
|
2332
|
+
# verify the required parameter 'username' is set
|
2333
|
+
if @api_client.config.client_side_validation && username.nil?
|
2334
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_delete_access_token"
|
2335
|
+
end
|
2336
|
+
# verify the required parameter 'token' is set
|
2337
|
+
if @api_client.config.client_side_validation && token.nil?
|
2338
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling UserApi.user_delete_access_token"
|
2339
|
+
end
|
2340
|
+
# resource path
|
2341
|
+
local_var_path = '/users/{username}/tokens/{token}'.sub('{' + 'username' + '}', CGI.escape(username.to_s)).sub('{' + 'token' + '}', CGI.escape(token.to_s))
|
2342
|
+
|
2343
|
+
# query parameters
|
2344
|
+
query_params = opts[:query_params] || {}
|
2345
|
+
|
2346
|
+
# header parameters
|
2347
|
+
header_params = opts[:header_params] || {}
|
2348
|
+
|
2349
|
+
# form parameters
|
2350
|
+
form_params = opts[:form_params] || {}
|
2351
|
+
|
2352
|
+
# http body (model)
|
2353
|
+
post_body = opts[:debug_body]
|
2354
|
+
|
2355
|
+
# return_type
|
2356
|
+
return_type = opts[:debug_return_type]
|
2357
|
+
|
2358
|
+
# auth_names
|
2359
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2360
|
+
|
2361
|
+
new_options = opts.merge(
|
2362
|
+
:operation => :"UserApi.user_delete_access_token",
|
2363
|
+
:header_params => header_params,
|
2364
|
+
:query_params => query_params,
|
2365
|
+
:form_params => form_params,
|
2366
|
+
:body => post_body,
|
2367
|
+
:auth_names => auth_names,
|
2368
|
+
:return_type => return_type
|
2369
|
+
)
|
2370
|
+
|
2371
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
2372
|
+
if @api_client.config.debugging
|
2373
|
+
@api_client.config.logger.debug "API called: UserApi#user_delete_access_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2374
|
+
end
|
2375
|
+
return data, status_code, headers
|
2376
|
+
end
|
2377
|
+
|
2378
|
+
# Delete Avatar
|
2379
|
+
# @param [Hash] opts the optional parameters
|
2380
|
+
# @return [nil]
|
2381
|
+
def user_delete_avatar(opts = {})
|
2382
|
+
user_delete_avatar_with_http_info(opts)
|
2383
|
+
nil
|
2384
|
+
end
|
2385
|
+
|
2386
|
+
# Delete Avatar
|
2387
|
+
# @param [Hash] opts the optional parameters
|
2388
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
2389
|
+
def user_delete_avatar_with_http_info(opts = {})
|
2390
|
+
if @api_client.config.debugging
|
2391
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_delete_avatar ...'
|
2392
|
+
end
|
2393
|
+
# resource path
|
2394
|
+
local_var_path = '/user/avatar'
|
2395
|
+
|
2396
|
+
# query parameters
|
2397
|
+
query_params = opts[:query_params] || {}
|
2398
|
+
|
2399
|
+
# header parameters
|
2400
|
+
header_params = opts[:header_params] || {}
|
2401
|
+
|
2402
|
+
# form parameters
|
2403
|
+
form_params = opts[:form_params] || {}
|
2404
|
+
|
2405
|
+
# http body (model)
|
2406
|
+
post_body = opts[:debug_body]
|
2407
|
+
|
2408
|
+
# return_type
|
2409
|
+
return_type = opts[:debug_return_type]
|
2410
|
+
|
2411
|
+
# auth_names
|
2412
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2413
|
+
|
2414
|
+
new_options = opts.merge(
|
2415
|
+
:operation => :"UserApi.user_delete_avatar",
|
2416
|
+
:header_params => header_params,
|
2417
|
+
:query_params => query_params,
|
2418
|
+
:form_params => form_params,
|
2419
|
+
:body => post_body,
|
2420
|
+
:auth_names => auth_names,
|
2421
|
+
:return_type => return_type
|
2422
|
+
)
|
2423
|
+
|
2424
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
2425
|
+
if @api_client.config.debugging
|
2426
|
+
@api_client.config.logger.debug "API called: UserApi#user_delete_avatar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2427
|
+
end
|
2428
|
+
return data, status_code, headers
|
2429
|
+
end
|
2430
|
+
|
2431
|
+
# Delete email addresses
|
2432
|
+
# @param [Hash] opts the optional parameters
|
2433
|
+
# @option opts [DeleteEmailOption] :body
|
2434
|
+
# @return [nil]
|
2435
|
+
def user_delete_email(opts = {})
|
2436
|
+
user_delete_email_with_http_info(opts)
|
2437
|
+
nil
|
2438
|
+
end
|
2439
|
+
|
2440
|
+
# Delete email addresses
|
2441
|
+
# @param [Hash] opts the optional parameters
|
2442
|
+
# @option opts [DeleteEmailOption] :body
|
2443
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
2444
|
+
def user_delete_email_with_http_info(opts = {})
|
2445
|
+
if @api_client.config.debugging
|
2446
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_delete_email ...'
|
2447
|
+
end
|
2448
|
+
# resource path
|
2449
|
+
local_var_path = '/user/emails'
|
2450
|
+
|
2451
|
+
# query parameters
|
2452
|
+
query_params = opts[:query_params] || {}
|
2453
|
+
|
2454
|
+
# header parameters
|
2455
|
+
header_params = opts[:header_params] || {}
|
2456
|
+
# HTTP header 'Content-Type'
|
2457
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
|
2458
|
+
if !content_type.nil?
|
2459
|
+
header_params['Content-Type'] = content_type
|
2460
|
+
end
|
2461
|
+
|
2462
|
+
# form parameters
|
2463
|
+
form_params = opts[:form_params] || {}
|
2464
|
+
|
2465
|
+
# http body (model)
|
2466
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
2467
|
+
|
2468
|
+
# return_type
|
2469
|
+
return_type = opts[:debug_return_type]
|
2470
|
+
|
2471
|
+
# auth_names
|
2472
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2473
|
+
|
2474
|
+
new_options = opts.merge(
|
2475
|
+
:operation => :"UserApi.user_delete_email",
|
2476
|
+
:header_params => header_params,
|
2477
|
+
:query_params => query_params,
|
2478
|
+
:form_params => form_params,
|
2479
|
+
:body => post_body,
|
2480
|
+
:auth_names => auth_names,
|
2481
|
+
:return_type => return_type
|
2482
|
+
)
|
2483
|
+
|
2484
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
2485
|
+
if @api_client.config.debugging
|
2486
|
+
@api_client.config.logger.debug "API called: UserApi#user_delete_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2487
|
+
end
|
2488
|
+
return data, status_code, headers
|
2489
|
+
end
|
2490
|
+
|
2491
|
+
# Delete a hook
|
2492
|
+
# @param id [Integer] id of the hook to delete
|
2493
|
+
# @param [Hash] opts the optional parameters
|
2494
|
+
# @return [nil]
|
2495
|
+
def user_delete_hook(id, opts = {})
|
2496
|
+
user_delete_hook_with_http_info(id, opts)
|
2497
|
+
nil
|
2498
|
+
end
|
2499
|
+
|
2500
|
+
# Delete a hook
|
2501
|
+
# @param id [Integer] id of the hook to delete
|
2502
|
+
# @param [Hash] opts the optional parameters
|
2503
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
2504
|
+
def user_delete_hook_with_http_info(id, opts = {})
|
2505
|
+
if @api_client.config.debugging
|
2506
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_delete_hook ...'
|
2507
|
+
end
|
2508
|
+
# verify the required parameter 'id' is set
|
2509
|
+
if @api_client.config.client_side_validation && id.nil?
|
2510
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.user_delete_hook"
|
2511
|
+
end
|
2512
|
+
# resource path
|
2513
|
+
local_var_path = '/user/hooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
2514
|
+
|
2515
|
+
# query parameters
|
2516
|
+
query_params = opts[:query_params] || {}
|
2517
|
+
|
2518
|
+
# header parameters
|
2519
|
+
header_params = opts[:header_params] || {}
|
2520
|
+
|
2521
|
+
# form parameters
|
2522
|
+
form_params = opts[:form_params] || {}
|
2523
|
+
|
2524
|
+
# http body (model)
|
2525
|
+
post_body = opts[:debug_body]
|
2526
|
+
|
2527
|
+
# return_type
|
2528
|
+
return_type = opts[:debug_return_type]
|
2529
|
+
|
2530
|
+
# auth_names
|
2531
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2532
|
+
|
2533
|
+
new_options = opts.merge(
|
2534
|
+
:operation => :"UserApi.user_delete_hook",
|
2535
|
+
:header_params => header_params,
|
2536
|
+
:query_params => query_params,
|
2537
|
+
:form_params => form_params,
|
2538
|
+
:body => post_body,
|
2539
|
+
:auth_names => auth_names,
|
2540
|
+
:return_type => return_type
|
2541
|
+
)
|
2542
|
+
|
2543
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
2544
|
+
if @api_client.config.debugging
|
2545
|
+
@api_client.config.logger.debug "API called: UserApi#user_delete_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2546
|
+
end
|
2547
|
+
return data, status_code, headers
|
2548
|
+
end
|
2549
|
+
|
2550
|
+
# delete an OAuth2 Application
|
2551
|
+
# @param id [Integer] token to be deleted
|
2552
|
+
# @param [Hash] opts the optional parameters
|
2553
|
+
# @return [nil]
|
2554
|
+
def user_delete_o_auth2_application(id, opts = {})
|
2555
|
+
user_delete_o_auth2_application_with_http_info(id, opts)
|
2556
|
+
nil
|
2557
|
+
end
|
2558
|
+
|
2559
|
+
# delete an OAuth2 Application
|
2560
|
+
# @param id [Integer] token to be deleted
|
2561
|
+
# @param [Hash] opts the optional parameters
|
2562
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
2563
|
+
def user_delete_o_auth2_application_with_http_info(id, opts = {})
|
2564
|
+
if @api_client.config.debugging
|
2565
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_delete_o_auth2_application ...'
|
2566
|
+
end
|
2567
|
+
# verify the required parameter 'id' is set
|
2568
|
+
if @api_client.config.client_side_validation && id.nil?
|
2569
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.user_delete_o_auth2_application"
|
2570
|
+
end
|
2571
|
+
# resource path
|
2572
|
+
local_var_path = '/user/applications/oauth2/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
2573
|
+
|
2574
|
+
# query parameters
|
2575
|
+
query_params = opts[:query_params] || {}
|
2576
|
+
|
2577
|
+
# header parameters
|
2578
|
+
header_params = opts[:header_params] || {}
|
2579
|
+
|
2580
|
+
# form parameters
|
2581
|
+
form_params = opts[:form_params] || {}
|
2582
|
+
|
2583
|
+
# http body (model)
|
2584
|
+
post_body = opts[:debug_body]
|
2585
|
+
|
2586
|
+
# return_type
|
2587
|
+
return_type = opts[:debug_return_type]
|
2588
|
+
|
2589
|
+
# auth_names
|
2590
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2591
|
+
|
2592
|
+
new_options = opts.merge(
|
2593
|
+
:operation => :"UserApi.user_delete_o_auth2_application",
|
2594
|
+
:header_params => header_params,
|
2595
|
+
:query_params => query_params,
|
2596
|
+
:form_params => form_params,
|
2597
|
+
:body => post_body,
|
2598
|
+
:auth_names => auth_names,
|
2599
|
+
:return_type => return_type
|
2600
|
+
)
|
2601
|
+
|
2602
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
2603
|
+
if @api_client.config.debugging
|
2604
|
+
@api_client.config.logger.debug "API called: UserApi#user_delete_o_auth2_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2605
|
+
end
|
2606
|
+
return data, status_code, headers
|
2607
|
+
end
|
2608
|
+
|
2609
|
+
# Update a hook
|
2610
|
+
# @param id [Integer] id of the hook to update
|
2611
|
+
# @param [Hash] opts the optional parameters
|
2612
|
+
# @option opts [EditHookOption] :body
|
2613
|
+
# @return [Hook]
|
2614
|
+
def user_edit_hook(id, opts = {})
|
2615
|
+
data, _status_code, _headers = user_edit_hook_with_http_info(id, opts)
|
2616
|
+
data
|
2617
|
+
end
|
2618
|
+
|
2619
|
+
# Update a hook
|
2620
|
+
# @param id [Integer] id of the hook to update
|
2621
|
+
# @param [Hash] opts the optional parameters
|
2622
|
+
# @option opts [EditHookOption] :body
|
2623
|
+
# @return [Array<(Hook, Integer, Hash)>] Hook data, response status code and response headers
|
2624
|
+
def user_edit_hook_with_http_info(id, opts = {})
|
2625
|
+
if @api_client.config.debugging
|
2626
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_edit_hook ...'
|
2627
|
+
end
|
2628
|
+
# verify the required parameter 'id' is set
|
2629
|
+
if @api_client.config.client_side_validation && id.nil?
|
2630
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.user_edit_hook"
|
2631
|
+
end
|
2632
|
+
# resource path
|
2633
|
+
local_var_path = '/user/hooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
2634
|
+
|
2635
|
+
# query parameters
|
2636
|
+
query_params = opts[:query_params] || {}
|
2637
|
+
|
2638
|
+
# header parameters
|
2639
|
+
header_params = opts[:header_params] || {}
|
2640
|
+
# HTTP header 'Accept' (if needed)
|
2641
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
2642
|
+
# HTTP header 'Content-Type'
|
2643
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
2644
|
+
if !content_type.nil?
|
2645
|
+
header_params['Content-Type'] = content_type
|
2646
|
+
end
|
2647
|
+
|
2648
|
+
# form parameters
|
2649
|
+
form_params = opts[:form_params] || {}
|
2650
|
+
|
2651
|
+
# http body (model)
|
2652
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
2653
|
+
|
2654
|
+
# return_type
|
2655
|
+
return_type = opts[:debug_return_type] || 'Hook'
|
2656
|
+
|
2657
|
+
# auth_names
|
2658
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2659
|
+
|
2660
|
+
new_options = opts.merge(
|
2661
|
+
:operation => :"UserApi.user_edit_hook",
|
2662
|
+
:header_params => header_params,
|
2663
|
+
:query_params => query_params,
|
2664
|
+
:form_params => form_params,
|
2665
|
+
:body => post_body,
|
2666
|
+
:auth_names => auth_names,
|
2667
|
+
:return_type => return_type
|
2668
|
+
)
|
2669
|
+
|
2670
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
2671
|
+
if @api_client.config.debugging
|
2672
|
+
@api_client.config.logger.debug "API called: UserApi#user_edit_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2673
|
+
end
|
2674
|
+
return data, status_code, headers
|
2675
|
+
end
|
2676
|
+
|
2677
|
+
# Get a user
|
2678
|
+
# @param username [String] username of user to get
|
2679
|
+
# @param [Hash] opts the optional parameters
|
2680
|
+
# @return [User]
|
2681
|
+
def user_get(username, opts = {})
|
2682
|
+
data, _status_code, _headers = user_get_with_http_info(username, opts)
|
2683
|
+
data
|
2684
|
+
end
|
2685
|
+
|
2686
|
+
# Get a user
|
2687
|
+
# @param username [String] username of user to get
|
2688
|
+
# @param [Hash] opts the optional parameters
|
2689
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
2690
|
+
def user_get_with_http_info(username, opts = {})
|
2691
|
+
if @api_client.config.debugging
|
2692
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_get ...'
|
2693
|
+
end
|
2694
|
+
# verify the required parameter 'username' is set
|
2695
|
+
if @api_client.config.client_side_validation && username.nil?
|
2696
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_get"
|
2697
|
+
end
|
2698
|
+
# resource path
|
2699
|
+
local_var_path = '/users/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
2700
|
+
|
2701
|
+
# query parameters
|
2702
|
+
query_params = opts[:query_params] || {}
|
2703
|
+
|
2704
|
+
# header parameters
|
2705
|
+
header_params = opts[:header_params] || {}
|
2706
|
+
# HTTP header 'Accept' (if needed)
|
2707
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
2708
|
+
|
2709
|
+
# form parameters
|
2710
|
+
form_params = opts[:form_params] || {}
|
2711
|
+
|
2712
|
+
# http body (model)
|
2713
|
+
post_body = opts[:debug_body]
|
2714
|
+
|
2715
|
+
# return_type
|
2716
|
+
return_type = opts[:debug_return_type] || 'User'
|
2717
|
+
|
2718
|
+
# auth_names
|
2719
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2720
|
+
|
2721
|
+
new_options = opts.merge(
|
2722
|
+
:operation => :"UserApi.user_get",
|
2723
|
+
:header_params => header_params,
|
2724
|
+
:query_params => query_params,
|
2725
|
+
:form_params => form_params,
|
2726
|
+
:body => post_body,
|
2727
|
+
:auth_names => auth_names,
|
2728
|
+
:return_type => return_type
|
2729
|
+
)
|
2730
|
+
|
2731
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2732
|
+
if @api_client.config.debugging
|
2733
|
+
@api_client.config.logger.debug "API called: UserApi#user_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2734
|
+
end
|
2735
|
+
return data, status_code, headers
|
2736
|
+
end
|
2737
|
+
|
2738
|
+
# Get the authenticated user
|
2739
|
+
# @param [Hash] opts the optional parameters
|
2740
|
+
# @return [User]
|
2741
|
+
def user_get_current(opts = {})
|
2742
|
+
data, _status_code, _headers = user_get_current_with_http_info(opts)
|
2743
|
+
data
|
2744
|
+
end
|
2745
|
+
|
2746
|
+
# Get the authenticated user
|
2747
|
+
# @param [Hash] opts the optional parameters
|
2748
|
+
# @return [Array<(User, Integer, Hash)>] User data, response status code and response headers
|
2749
|
+
def user_get_current_with_http_info(opts = {})
|
2750
|
+
if @api_client.config.debugging
|
2751
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_get_current ...'
|
2752
|
+
end
|
2753
|
+
# resource path
|
2754
|
+
local_var_path = '/user'
|
2755
|
+
|
2756
|
+
# query parameters
|
2757
|
+
query_params = opts[:query_params] || {}
|
2758
|
+
|
2759
|
+
# header parameters
|
2760
|
+
header_params = opts[:header_params] || {}
|
2761
|
+
# HTTP header 'Accept' (if needed)
|
2762
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
2763
|
+
|
2764
|
+
# form parameters
|
2765
|
+
form_params = opts[:form_params] || {}
|
2766
|
+
|
2767
|
+
# http body (model)
|
2768
|
+
post_body = opts[:debug_body]
|
2769
|
+
|
2770
|
+
# return_type
|
2771
|
+
return_type = opts[:debug_return_type] || 'User'
|
2772
|
+
|
2773
|
+
# auth_names
|
2774
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2775
|
+
|
2776
|
+
new_options = opts.merge(
|
2777
|
+
:operation => :"UserApi.user_get_current",
|
2778
|
+
:header_params => header_params,
|
2779
|
+
:query_params => query_params,
|
2780
|
+
:form_params => form_params,
|
2781
|
+
:body => post_body,
|
2782
|
+
:auth_names => auth_names,
|
2783
|
+
:return_type => return_type
|
2784
|
+
)
|
2785
|
+
|
2786
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2787
|
+
if @api_client.config.debugging
|
2788
|
+
@api_client.config.logger.debug "API called: UserApi#user_get_current\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2789
|
+
end
|
2790
|
+
return data, status_code, headers
|
2791
|
+
end
|
2792
|
+
|
2793
|
+
# Get a user's heatmap
|
2794
|
+
# @param username [String] username of user to get
|
2795
|
+
# @param [Hash] opts the optional parameters
|
2796
|
+
# @return [Array<UserHeatmapData>]
|
2797
|
+
def user_get_heatmap_data(username, opts = {})
|
2798
|
+
data, _status_code, _headers = user_get_heatmap_data_with_http_info(username, opts)
|
2799
|
+
data
|
2800
|
+
end
|
2801
|
+
|
2802
|
+
# Get a user's heatmap
|
2803
|
+
# @param username [String] username of user to get
|
2804
|
+
# @param [Hash] opts the optional parameters
|
2805
|
+
# @return [Array<(Array<UserHeatmapData>, Integer, Hash)>] Array<UserHeatmapData> data, response status code and response headers
|
2806
|
+
def user_get_heatmap_data_with_http_info(username, opts = {})
|
2807
|
+
if @api_client.config.debugging
|
2808
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_get_heatmap_data ...'
|
2809
|
+
end
|
2810
|
+
# verify the required parameter 'username' is set
|
2811
|
+
if @api_client.config.client_side_validation && username.nil?
|
2812
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_get_heatmap_data"
|
2813
|
+
end
|
2814
|
+
# resource path
|
2815
|
+
local_var_path = '/users/{username}/heatmap'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
2816
|
+
|
2817
|
+
# query parameters
|
2818
|
+
query_params = opts[:query_params] || {}
|
2819
|
+
|
2820
|
+
# header parameters
|
2821
|
+
header_params = opts[:header_params] || {}
|
2822
|
+
# HTTP header 'Accept' (if needed)
|
2823
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
2824
|
+
|
2825
|
+
# form parameters
|
2826
|
+
form_params = opts[:form_params] || {}
|
2827
|
+
|
2828
|
+
# http body (model)
|
2829
|
+
post_body = opts[:debug_body]
|
2830
|
+
|
2831
|
+
# return_type
|
2832
|
+
return_type = opts[:debug_return_type] || 'Array<UserHeatmapData>'
|
2833
|
+
|
2834
|
+
# auth_names
|
2835
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2836
|
+
|
2837
|
+
new_options = opts.merge(
|
2838
|
+
:operation => :"UserApi.user_get_heatmap_data",
|
2839
|
+
:header_params => header_params,
|
2840
|
+
:query_params => query_params,
|
2841
|
+
:form_params => form_params,
|
2842
|
+
:body => post_body,
|
2843
|
+
:auth_names => auth_names,
|
2844
|
+
:return_type => return_type
|
2845
|
+
)
|
2846
|
+
|
2847
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2848
|
+
if @api_client.config.debugging
|
2849
|
+
@api_client.config.logger.debug "API called: UserApi#user_get_heatmap_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2850
|
+
end
|
2851
|
+
return data, status_code, headers
|
2852
|
+
end
|
2853
|
+
|
2854
|
+
# Get a hook
|
2855
|
+
# @param id [Integer] id of the hook to get
|
2856
|
+
# @param [Hash] opts the optional parameters
|
2857
|
+
# @return [Hook]
|
2858
|
+
def user_get_hook(id, opts = {})
|
2859
|
+
data, _status_code, _headers = user_get_hook_with_http_info(id, opts)
|
2860
|
+
data
|
2861
|
+
end
|
2862
|
+
|
2863
|
+
# Get a hook
|
2864
|
+
# @param id [Integer] id of the hook to get
|
2865
|
+
# @param [Hash] opts the optional parameters
|
2866
|
+
# @return [Array<(Hook, Integer, Hash)>] Hook data, response status code and response headers
|
2867
|
+
def user_get_hook_with_http_info(id, opts = {})
|
2868
|
+
if @api_client.config.debugging
|
2869
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_get_hook ...'
|
2870
|
+
end
|
2871
|
+
# verify the required parameter 'id' is set
|
2872
|
+
if @api_client.config.client_side_validation && id.nil?
|
2873
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.user_get_hook"
|
2874
|
+
end
|
2875
|
+
# resource path
|
2876
|
+
local_var_path = '/user/hooks/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
2877
|
+
|
2878
|
+
# query parameters
|
2879
|
+
query_params = opts[:query_params] || {}
|
2880
|
+
|
2881
|
+
# header parameters
|
2882
|
+
header_params = opts[:header_params] || {}
|
2883
|
+
# HTTP header 'Accept' (if needed)
|
2884
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
2885
|
+
|
2886
|
+
# form parameters
|
2887
|
+
form_params = opts[:form_params] || {}
|
2888
|
+
|
2889
|
+
# http body (model)
|
2890
|
+
post_body = opts[:debug_body]
|
2891
|
+
|
2892
|
+
# return_type
|
2893
|
+
return_type = opts[:debug_return_type] || 'Hook'
|
2894
|
+
|
2895
|
+
# auth_names
|
2896
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2897
|
+
|
2898
|
+
new_options = opts.merge(
|
2899
|
+
:operation => :"UserApi.user_get_hook",
|
2900
|
+
:header_params => header_params,
|
2901
|
+
:query_params => query_params,
|
2902
|
+
:form_params => form_params,
|
2903
|
+
:body => post_body,
|
2904
|
+
:auth_names => auth_names,
|
2905
|
+
:return_type => return_type
|
2906
|
+
)
|
2907
|
+
|
2908
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2909
|
+
if @api_client.config.debugging
|
2910
|
+
@api_client.config.logger.debug "API called: UserApi#user_get_hook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2911
|
+
end
|
2912
|
+
return data, status_code, headers
|
2913
|
+
end
|
2914
|
+
|
2915
|
+
# get an OAuth2 Application
|
2916
|
+
# @param id [Integer] Application ID to be found
|
2917
|
+
# @param [Hash] opts the optional parameters
|
2918
|
+
# @return [OAuth2Application]
|
2919
|
+
def user_get_o_auth2_application(id, opts = {})
|
2920
|
+
data, _status_code, _headers = user_get_o_auth2_application_with_http_info(id, opts)
|
2921
|
+
data
|
2922
|
+
end
|
2923
|
+
|
2924
|
+
# get an OAuth2 Application
|
2925
|
+
# @param id [Integer] Application ID to be found
|
2926
|
+
# @param [Hash] opts the optional parameters
|
2927
|
+
# @return [Array<(OAuth2Application, Integer, Hash)>] OAuth2Application data, response status code and response headers
|
2928
|
+
def user_get_o_auth2_application_with_http_info(id, opts = {})
|
2929
|
+
if @api_client.config.debugging
|
2930
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_get_o_auth2_application ...'
|
2931
|
+
end
|
2932
|
+
# verify the required parameter 'id' is set
|
2933
|
+
if @api_client.config.client_side_validation && id.nil?
|
2934
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.user_get_o_auth2_application"
|
2935
|
+
end
|
2936
|
+
# resource path
|
2937
|
+
local_var_path = '/user/applications/oauth2/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
2938
|
+
|
2939
|
+
# query parameters
|
2940
|
+
query_params = opts[:query_params] || {}
|
2941
|
+
|
2942
|
+
# header parameters
|
2943
|
+
header_params = opts[:header_params] || {}
|
2944
|
+
# HTTP header 'Accept' (if needed)
|
2945
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
2946
|
+
|
2947
|
+
# form parameters
|
2948
|
+
form_params = opts[:form_params] || {}
|
2949
|
+
|
2950
|
+
# http body (model)
|
2951
|
+
post_body = opts[:debug_body]
|
2952
|
+
|
2953
|
+
# return_type
|
2954
|
+
return_type = opts[:debug_return_type] || 'OAuth2Application'
|
2955
|
+
|
2956
|
+
# auth_names
|
2957
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
2958
|
+
|
2959
|
+
new_options = opts.merge(
|
2960
|
+
:operation => :"UserApi.user_get_o_auth2_application",
|
2961
|
+
:header_params => header_params,
|
2962
|
+
:query_params => query_params,
|
2963
|
+
:form_params => form_params,
|
2964
|
+
:body => post_body,
|
2965
|
+
:auth_names => auth_names,
|
2966
|
+
:return_type => return_type
|
2967
|
+
)
|
2968
|
+
|
2969
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2970
|
+
if @api_client.config.debugging
|
2971
|
+
@api_client.config.logger.debug "API called: UserApi#user_get_o_auth2_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2972
|
+
end
|
2973
|
+
return data, status_code, headers
|
2974
|
+
end
|
2975
|
+
|
2976
|
+
# List the authenticated user's oauth2 applications
|
2977
|
+
# @param [Hash] opts the optional parameters
|
2978
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
2979
|
+
# @option opts [Integer] :limit page size of results
|
2980
|
+
# @return [Array<OAuth2Application>]
|
2981
|
+
def user_get_o_auth2_applications(opts = {})
|
2982
|
+
data, _status_code, _headers = user_get_o_auth2_applications_with_http_info(opts)
|
2983
|
+
data
|
2984
|
+
end
|
2985
|
+
|
2986
|
+
# List the authenticated user's oauth2 applications
|
2987
|
+
# @param [Hash] opts the optional parameters
|
2988
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
2989
|
+
# @option opts [Integer] :limit page size of results
|
2990
|
+
# @return [Array<(Array<OAuth2Application>, Integer, Hash)>] Array<OAuth2Application> data, response status code and response headers
|
2991
|
+
def user_get_o_auth2_applications_with_http_info(opts = {})
|
2992
|
+
if @api_client.config.debugging
|
2993
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_get_o_auth2_applications ...'
|
2994
|
+
end
|
2995
|
+
# resource path
|
2996
|
+
local_var_path = '/user/applications/oauth2'
|
2997
|
+
|
2998
|
+
# query parameters
|
2999
|
+
query_params = opts[:query_params] || {}
|
3000
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
3001
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
3002
|
+
|
3003
|
+
# header parameters
|
3004
|
+
header_params = opts[:header_params] || {}
|
3005
|
+
# HTTP header 'Accept' (if needed)
|
3006
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
3007
|
+
|
3008
|
+
# form parameters
|
3009
|
+
form_params = opts[:form_params] || {}
|
3010
|
+
|
3011
|
+
# http body (model)
|
3012
|
+
post_body = opts[:debug_body]
|
3013
|
+
|
3014
|
+
# return_type
|
3015
|
+
return_type = opts[:debug_return_type] || 'Array<OAuth2Application>'
|
3016
|
+
|
3017
|
+
# auth_names
|
3018
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3019
|
+
|
3020
|
+
new_options = opts.merge(
|
3021
|
+
:operation => :"UserApi.user_get_o_auth2_applications",
|
3022
|
+
:header_params => header_params,
|
3023
|
+
:query_params => query_params,
|
3024
|
+
:form_params => form_params,
|
3025
|
+
:body => post_body,
|
3026
|
+
:auth_names => auth_names,
|
3027
|
+
:return_type => return_type
|
3028
|
+
)
|
3029
|
+
|
3030
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3031
|
+
if @api_client.config.debugging
|
3032
|
+
@api_client.config.logger.debug "API called: UserApi#user_get_o_auth2_applications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3033
|
+
end
|
3034
|
+
return data, status_code, headers
|
3035
|
+
end
|
3036
|
+
|
3037
|
+
# Get an user's actions runner registration token
|
3038
|
+
# @param [Hash] opts the optional parameters
|
3039
|
+
# @return [nil]
|
3040
|
+
def user_get_runner_registration_token(opts = {})
|
3041
|
+
user_get_runner_registration_token_with_http_info(opts)
|
3042
|
+
nil
|
3043
|
+
end
|
3044
|
+
|
3045
|
+
# Get an user's actions runner registration token
|
3046
|
+
# @param [Hash] opts the optional parameters
|
3047
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
3048
|
+
def user_get_runner_registration_token_with_http_info(opts = {})
|
3049
|
+
if @api_client.config.debugging
|
3050
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_get_runner_registration_token ...'
|
3051
|
+
end
|
3052
|
+
# resource path
|
3053
|
+
local_var_path = '/user/actions/runners/registration-token'
|
3054
|
+
|
3055
|
+
# query parameters
|
3056
|
+
query_params = opts[:query_params] || {}
|
3057
|
+
|
3058
|
+
# header parameters
|
3059
|
+
header_params = opts[:header_params] || {}
|
3060
|
+
|
3061
|
+
# form parameters
|
3062
|
+
form_params = opts[:form_params] || {}
|
3063
|
+
|
3064
|
+
# http body (model)
|
3065
|
+
post_body = opts[:debug_body]
|
3066
|
+
|
3067
|
+
# return_type
|
3068
|
+
return_type = opts[:debug_return_type]
|
3069
|
+
|
3070
|
+
# auth_names
|
3071
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3072
|
+
|
3073
|
+
new_options = opts.merge(
|
3074
|
+
:operation => :"UserApi.user_get_runner_registration_token",
|
3075
|
+
:header_params => header_params,
|
3076
|
+
:query_params => query_params,
|
3077
|
+
:form_params => form_params,
|
3078
|
+
:body => post_body,
|
3079
|
+
:auth_names => auth_names,
|
3080
|
+
:return_type => return_type
|
3081
|
+
)
|
3082
|
+
|
3083
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3084
|
+
if @api_client.config.debugging
|
3085
|
+
@api_client.config.logger.debug "API called: UserApi#user_get_runner_registration_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3086
|
+
end
|
3087
|
+
return data, status_code, headers
|
3088
|
+
end
|
3089
|
+
|
3090
|
+
# Get list of all existing stopwatches
|
3091
|
+
# @param [Hash] opts the optional parameters
|
3092
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3093
|
+
# @option opts [Integer] :limit page size of results
|
3094
|
+
# @return [Array<StopWatch>]
|
3095
|
+
def user_get_stop_watches(opts = {})
|
3096
|
+
data, _status_code, _headers = user_get_stop_watches_with_http_info(opts)
|
3097
|
+
data
|
3098
|
+
end
|
3099
|
+
|
3100
|
+
# Get list of all existing stopwatches
|
3101
|
+
# @param [Hash] opts the optional parameters
|
3102
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3103
|
+
# @option opts [Integer] :limit page size of results
|
3104
|
+
# @return [Array<(Array<StopWatch>, Integer, Hash)>] Array<StopWatch> data, response status code and response headers
|
3105
|
+
def user_get_stop_watches_with_http_info(opts = {})
|
3106
|
+
if @api_client.config.debugging
|
3107
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_get_stop_watches ...'
|
3108
|
+
end
|
3109
|
+
# resource path
|
3110
|
+
local_var_path = '/user/stopwatches'
|
3111
|
+
|
3112
|
+
# query parameters
|
3113
|
+
query_params = opts[:query_params] || {}
|
3114
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
3115
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
3116
|
+
|
3117
|
+
# header parameters
|
3118
|
+
header_params = opts[:header_params] || {}
|
3119
|
+
# HTTP header 'Accept' (if needed)
|
3120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
3121
|
+
|
3122
|
+
# form parameters
|
3123
|
+
form_params = opts[:form_params] || {}
|
3124
|
+
|
3125
|
+
# http body (model)
|
3126
|
+
post_body = opts[:debug_body]
|
3127
|
+
|
3128
|
+
# return_type
|
3129
|
+
return_type = opts[:debug_return_type] || 'Array<StopWatch>'
|
3130
|
+
|
3131
|
+
# auth_names
|
3132
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3133
|
+
|
3134
|
+
new_options = opts.merge(
|
3135
|
+
:operation => :"UserApi.user_get_stop_watches",
|
3136
|
+
:header_params => header_params,
|
3137
|
+
:query_params => query_params,
|
3138
|
+
:form_params => form_params,
|
3139
|
+
:body => post_body,
|
3140
|
+
:auth_names => auth_names,
|
3141
|
+
:return_type => return_type
|
3142
|
+
)
|
3143
|
+
|
3144
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3145
|
+
if @api_client.config.debugging
|
3146
|
+
@api_client.config.logger.debug "API called: UserApi#user_get_stop_watches\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3147
|
+
end
|
3148
|
+
return data, status_code, headers
|
3149
|
+
end
|
3150
|
+
|
3151
|
+
# List the authenticated user's access tokens
|
3152
|
+
# @param username [String] username of user
|
3153
|
+
# @param [Hash] opts the optional parameters
|
3154
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3155
|
+
# @option opts [Integer] :limit page size of results
|
3156
|
+
# @return [Array<AccessToken>]
|
3157
|
+
def user_get_tokens(username, opts = {})
|
3158
|
+
data, _status_code, _headers = user_get_tokens_with_http_info(username, opts)
|
3159
|
+
data
|
3160
|
+
end
|
3161
|
+
|
3162
|
+
# List the authenticated user's access tokens
|
3163
|
+
# @param username [String] username of user
|
3164
|
+
# @param [Hash] opts the optional parameters
|
3165
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3166
|
+
# @option opts [Integer] :limit page size of results
|
3167
|
+
# @return [Array<(Array<AccessToken>, Integer, Hash)>] Array<AccessToken> data, response status code and response headers
|
3168
|
+
def user_get_tokens_with_http_info(username, opts = {})
|
3169
|
+
if @api_client.config.debugging
|
3170
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_get_tokens ...'
|
3171
|
+
end
|
3172
|
+
# verify the required parameter 'username' is set
|
3173
|
+
if @api_client.config.client_side_validation && username.nil?
|
3174
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_get_tokens"
|
3175
|
+
end
|
3176
|
+
# resource path
|
3177
|
+
local_var_path = '/users/{username}/tokens'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
3178
|
+
|
3179
|
+
# query parameters
|
3180
|
+
query_params = opts[:query_params] || {}
|
3181
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
3182
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
3183
|
+
|
3184
|
+
# header parameters
|
3185
|
+
header_params = opts[:header_params] || {}
|
3186
|
+
# HTTP header 'Accept' (if needed)
|
3187
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
3188
|
+
|
3189
|
+
# form parameters
|
3190
|
+
form_params = opts[:form_params] || {}
|
3191
|
+
|
3192
|
+
# http body (model)
|
3193
|
+
post_body = opts[:debug_body]
|
3194
|
+
|
3195
|
+
# return_type
|
3196
|
+
return_type = opts[:debug_return_type] || 'Array<AccessToken>'
|
3197
|
+
|
3198
|
+
# auth_names
|
3199
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3200
|
+
|
3201
|
+
new_options = opts.merge(
|
3202
|
+
:operation => :"UserApi.user_get_tokens",
|
3203
|
+
:header_params => header_params,
|
3204
|
+
:query_params => query_params,
|
3205
|
+
:form_params => form_params,
|
3206
|
+
:body => post_body,
|
3207
|
+
:auth_names => auth_names,
|
3208
|
+
:return_type => return_type
|
3209
|
+
)
|
3210
|
+
|
3211
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3212
|
+
if @api_client.config.debugging
|
3213
|
+
@api_client.config.logger.debug "API called: UserApi#user_get_tokens\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3214
|
+
end
|
3215
|
+
return data, status_code, headers
|
3216
|
+
end
|
3217
|
+
|
3218
|
+
# List a user's activity feeds
|
3219
|
+
# @param username [String] username of user
|
3220
|
+
# @param [Hash] opts the optional parameters
|
3221
|
+
# @option opts [Boolean] :only_performed_by if true, only show actions performed by the requested user
|
3222
|
+
# @option opts [Date] :date the date of the activities to be found
|
3223
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3224
|
+
# @option opts [Integer] :limit page size of results
|
3225
|
+
# @return [Array<Activity>]
|
3226
|
+
def user_list_activity_feeds(username, opts = {})
|
3227
|
+
data, _status_code, _headers = user_list_activity_feeds_with_http_info(username, opts)
|
3228
|
+
data
|
3229
|
+
end
|
3230
|
+
|
3231
|
+
# List a user's activity feeds
|
3232
|
+
# @param username [String] username of user
|
3233
|
+
# @param [Hash] opts the optional parameters
|
3234
|
+
# @option opts [Boolean] :only_performed_by if true, only show actions performed by the requested user
|
3235
|
+
# @option opts [Date] :date the date of the activities to be found
|
3236
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3237
|
+
# @option opts [Integer] :limit page size of results
|
3238
|
+
# @return [Array<(Array<Activity>, Integer, Hash)>] Array<Activity> data, response status code and response headers
|
3239
|
+
def user_list_activity_feeds_with_http_info(username, opts = {})
|
3240
|
+
if @api_client.config.debugging
|
3241
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_list_activity_feeds ...'
|
3242
|
+
end
|
3243
|
+
# verify the required parameter 'username' is set
|
3244
|
+
if @api_client.config.client_side_validation && username.nil?
|
3245
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_list_activity_feeds"
|
3246
|
+
end
|
3247
|
+
# resource path
|
3248
|
+
local_var_path = '/users/{username}/activities/feeds'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
3249
|
+
|
3250
|
+
# query parameters
|
3251
|
+
query_params = opts[:query_params] || {}
|
3252
|
+
query_params[:'only-performed-by'] = opts[:'only_performed_by'] if !opts[:'only_performed_by'].nil?
|
3253
|
+
query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil?
|
3254
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
3255
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
3256
|
+
|
3257
|
+
# header parameters
|
3258
|
+
header_params = opts[:header_params] || {}
|
3259
|
+
# HTTP header 'Accept' (if needed)
|
3260
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
3261
|
+
|
3262
|
+
# form parameters
|
3263
|
+
form_params = opts[:form_params] || {}
|
3264
|
+
|
3265
|
+
# http body (model)
|
3266
|
+
post_body = opts[:debug_body]
|
3267
|
+
|
3268
|
+
# return_type
|
3269
|
+
return_type = opts[:debug_return_type] || 'Array<Activity>'
|
3270
|
+
|
3271
|
+
# auth_names
|
3272
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3273
|
+
|
3274
|
+
new_options = opts.merge(
|
3275
|
+
:operation => :"UserApi.user_list_activity_feeds",
|
3276
|
+
:header_params => header_params,
|
3277
|
+
:query_params => query_params,
|
3278
|
+
:form_params => form_params,
|
3279
|
+
:body => post_body,
|
3280
|
+
:auth_names => auth_names,
|
3281
|
+
:return_type => return_type
|
3282
|
+
)
|
3283
|
+
|
3284
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3285
|
+
if @api_client.config.debugging
|
3286
|
+
@api_client.config.logger.debug "API called: UserApi#user_list_activity_feeds\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3287
|
+
end
|
3288
|
+
return data, status_code, headers
|
3289
|
+
end
|
3290
|
+
|
3291
|
+
# List the authenticated user's blocked users
|
3292
|
+
# @param [Hash] opts the optional parameters
|
3293
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3294
|
+
# @option opts [Integer] :limit page size of results
|
3295
|
+
# @return [Array<BlockedUser>]
|
3296
|
+
def user_list_blocked_users(opts = {})
|
3297
|
+
data, _status_code, _headers = user_list_blocked_users_with_http_info(opts)
|
3298
|
+
data
|
3299
|
+
end
|
3300
|
+
|
3301
|
+
# List the authenticated user's blocked users
|
3302
|
+
# @param [Hash] opts the optional parameters
|
3303
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3304
|
+
# @option opts [Integer] :limit page size of results
|
3305
|
+
# @return [Array<(Array<BlockedUser>, Integer, Hash)>] Array<BlockedUser> data, response status code and response headers
|
3306
|
+
def user_list_blocked_users_with_http_info(opts = {})
|
3307
|
+
if @api_client.config.debugging
|
3308
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_list_blocked_users ...'
|
3309
|
+
end
|
3310
|
+
# resource path
|
3311
|
+
local_var_path = '/user/list_blocked'
|
3312
|
+
|
3313
|
+
# query parameters
|
3314
|
+
query_params = opts[:query_params] || {}
|
3315
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
3316
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
3317
|
+
|
3318
|
+
# header parameters
|
3319
|
+
header_params = opts[:header_params] || {}
|
3320
|
+
# HTTP header 'Accept' (if needed)
|
3321
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
3322
|
+
|
3323
|
+
# form parameters
|
3324
|
+
form_params = opts[:form_params] || {}
|
3325
|
+
|
3326
|
+
# http body (model)
|
3327
|
+
post_body = opts[:debug_body]
|
3328
|
+
|
3329
|
+
# return_type
|
3330
|
+
return_type = opts[:debug_return_type] || 'Array<BlockedUser>'
|
3331
|
+
|
3332
|
+
# auth_names
|
3333
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3334
|
+
|
3335
|
+
new_options = opts.merge(
|
3336
|
+
:operation => :"UserApi.user_list_blocked_users",
|
3337
|
+
:header_params => header_params,
|
3338
|
+
:query_params => query_params,
|
3339
|
+
:form_params => form_params,
|
3340
|
+
:body => post_body,
|
3341
|
+
:auth_names => auth_names,
|
3342
|
+
:return_type => return_type
|
3343
|
+
)
|
3344
|
+
|
3345
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3346
|
+
if @api_client.config.debugging
|
3347
|
+
@api_client.config.logger.debug "API called: UserApi#user_list_blocked_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3348
|
+
end
|
3349
|
+
return data, status_code, headers
|
3350
|
+
end
|
3351
|
+
|
3352
|
+
# List the authenticated user's email addresses
|
3353
|
+
# @param [Hash] opts the optional parameters
|
3354
|
+
# @return [Array<Email>]
|
3355
|
+
def user_list_emails(opts = {})
|
3356
|
+
data, _status_code, _headers = user_list_emails_with_http_info(opts)
|
3357
|
+
data
|
3358
|
+
end
|
3359
|
+
|
3360
|
+
# List the authenticated user's email addresses
|
3361
|
+
# @param [Hash] opts the optional parameters
|
3362
|
+
# @return [Array<(Array<Email>, Integer, Hash)>] Array<Email> data, response status code and response headers
|
3363
|
+
def user_list_emails_with_http_info(opts = {})
|
3364
|
+
if @api_client.config.debugging
|
3365
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_list_emails ...'
|
3366
|
+
end
|
3367
|
+
# resource path
|
3368
|
+
local_var_path = '/user/emails'
|
3369
|
+
|
3370
|
+
# query parameters
|
3371
|
+
query_params = opts[:query_params] || {}
|
3372
|
+
|
3373
|
+
# header parameters
|
3374
|
+
header_params = opts[:header_params] || {}
|
3375
|
+
# HTTP header 'Accept' (if needed)
|
3376
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
3377
|
+
|
3378
|
+
# form parameters
|
3379
|
+
form_params = opts[:form_params] || {}
|
3380
|
+
|
3381
|
+
# http body (model)
|
3382
|
+
post_body = opts[:debug_body]
|
3383
|
+
|
3384
|
+
# return_type
|
3385
|
+
return_type = opts[:debug_return_type] || 'Array<Email>'
|
3386
|
+
|
3387
|
+
# auth_names
|
3388
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3389
|
+
|
3390
|
+
new_options = opts.merge(
|
3391
|
+
:operation => :"UserApi.user_list_emails",
|
3392
|
+
:header_params => header_params,
|
3393
|
+
:query_params => query_params,
|
3394
|
+
:form_params => form_params,
|
3395
|
+
:body => post_body,
|
3396
|
+
:auth_names => auth_names,
|
3397
|
+
:return_type => return_type
|
3398
|
+
)
|
3399
|
+
|
3400
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3401
|
+
if @api_client.config.debugging
|
3402
|
+
@api_client.config.logger.debug "API called: UserApi#user_list_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3403
|
+
end
|
3404
|
+
return data, status_code, headers
|
3405
|
+
end
|
3406
|
+
|
3407
|
+
# List the given user's followers
|
3408
|
+
# @param username [String] username of user
|
3409
|
+
# @param [Hash] opts the optional parameters
|
3410
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3411
|
+
# @option opts [Integer] :limit page size of results
|
3412
|
+
# @return [Array<User>]
|
3413
|
+
def user_list_followers(username, opts = {})
|
3414
|
+
data, _status_code, _headers = user_list_followers_with_http_info(username, opts)
|
3415
|
+
data
|
3416
|
+
end
|
3417
|
+
|
3418
|
+
# List the given user's followers
|
3419
|
+
# @param username [String] username of user
|
3420
|
+
# @param [Hash] opts the optional parameters
|
3421
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3422
|
+
# @option opts [Integer] :limit page size of results
|
3423
|
+
# @return [Array<(Array<User>, Integer, Hash)>] Array<User> data, response status code and response headers
|
3424
|
+
def user_list_followers_with_http_info(username, opts = {})
|
3425
|
+
if @api_client.config.debugging
|
3426
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_list_followers ...'
|
3427
|
+
end
|
3428
|
+
# verify the required parameter 'username' is set
|
3429
|
+
if @api_client.config.client_side_validation && username.nil?
|
3430
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_list_followers"
|
3431
|
+
end
|
3432
|
+
# resource path
|
3433
|
+
local_var_path = '/users/{username}/followers'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
3434
|
+
|
3435
|
+
# query parameters
|
3436
|
+
query_params = opts[:query_params] || {}
|
3437
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
3438
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
3439
|
+
|
3440
|
+
# header parameters
|
3441
|
+
header_params = opts[:header_params] || {}
|
3442
|
+
# HTTP header 'Accept' (if needed)
|
3443
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
3444
|
+
|
3445
|
+
# form parameters
|
3446
|
+
form_params = opts[:form_params] || {}
|
3447
|
+
|
3448
|
+
# http body (model)
|
3449
|
+
post_body = opts[:debug_body]
|
3450
|
+
|
3451
|
+
# return_type
|
3452
|
+
return_type = opts[:debug_return_type] || 'Array<User>'
|
3453
|
+
|
3454
|
+
# auth_names
|
3455
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3456
|
+
|
3457
|
+
new_options = opts.merge(
|
3458
|
+
:operation => :"UserApi.user_list_followers",
|
3459
|
+
:header_params => header_params,
|
3460
|
+
:query_params => query_params,
|
3461
|
+
:form_params => form_params,
|
3462
|
+
:body => post_body,
|
3463
|
+
:auth_names => auth_names,
|
3464
|
+
:return_type => return_type
|
3465
|
+
)
|
3466
|
+
|
3467
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3468
|
+
if @api_client.config.debugging
|
3469
|
+
@api_client.config.logger.debug "API called: UserApi#user_list_followers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3470
|
+
end
|
3471
|
+
return data, status_code, headers
|
3472
|
+
end
|
3473
|
+
|
3474
|
+
# List the users that the given user is following
|
3475
|
+
# @param username [String] username of user
|
3476
|
+
# @param [Hash] opts the optional parameters
|
3477
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3478
|
+
# @option opts [Integer] :limit page size of results
|
3479
|
+
# @return [Array<User>]
|
3480
|
+
def user_list_following(username, opts = {})
|
3481
|
+
data, _status_code, _headers = user_list_following_with_http_info(username, opts)
|
3482
|
+
data
|
3483
|
+
end
|
3484
|
+
|
3485
|
+
# List the users that the given user is following
|
3486
|
+
# @param username [String] username of user
|
3487
|
+
# @param [Hash] opts the optional parameters
|
3488
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3489
|
+
# @option opts [Integer] :limit page size of results
|
3490
|
+
# @return [Array<(Array<User>, Integer, Hash)>] Array<User> data, response status code and response headers
|
3491
|
+
def user_list_following_with_http_info(username, opts = {})
|
3492
|
+
if @api_client.config.debugging
|
3493
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_list_following ...'
|
3494
|
+
end
|
3495
|
+
# verify the required parameter 'username' is set
|
3496
|
+
if @api_client.config.client_side_validation && username.nil?
|
3497
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_list_following"
|
3498
|
+
end
|
3499
|
+
# resource path
|
3500
|
+
local_var_path = '/users/{username}/following'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
3501
|
+
|
3502
|
+
# query parameters
|
3503
|
+
query_params = opts[:query_params] || {}
|
3504
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
3505
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
3506
|
+
|
3507
|
+
# header parameters
|
3508
|
+
header_params = opts[:header_params] || {}
|
3509
|
+
# HTTP header 'Accept' (if needed)
|
3510
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
3511
|
+
|
3512
|
+
# form parameters
|
3513
|
+
form_params = opts[:form_params] || {}
|
3514
|
+
|
3515
|
+
# http body (model)
|
3516
|
+
post_body = opts[:debug_body]
|
3517
|
+
|
3518
|
+
# return_type
|
3519
|
+
return_type = opts[:debug_return_type] || 'Array<User>'
|
3520
|
+
|
3521
|
+
# auth_names
|
3522
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3523
|
+
|
3524
|
+
new_options = opts.merge(
|
3525
|
+
:operation => :"UserApi.user_list_following",
|
3526
|
+
:header_params => header_params,
|
3527
|
+
:query_params => query_params,
|
3528
|
+
:form_params => form_params,
|
3529
|
+
:body => post_body,
|
3530
|
+
:auth_names => auth_names,
|
3531
|
+
:return_type => return_type
|
3532
|
+
)
|
3533
|
+
|
3534
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3535
|
+
if @api_client.config.debugging
|
3536
|
+
@api_client.config.logger.debug "API called: UserApi#user_list_following\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3537
|
+
end
|
3538
|
+
return data, status_code, headers
|
3539
|
+
end
|
3540
|
+
|
3541
|
+
# List the given user's GPG keys
|
3542
|
+
# @param username [String] username of user
|
3543
|
+
# @param [Hash] opts the optional parameters
|
3544
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3545
|
+
# @option opts [Integer] :limit page size of results
|
3546
|
+
# @return [Array<GPGKey>]
|
3547
|
+
def user_list_gpg_keys(username, opts = {})
|
3548
|
+
data, _status_code, _headers = user_list_gpg_keys_with_http_info(username, opts)
|
3549
|
+
data
|
3550
|
+
end
|
3551
|
+
|
3552
|
+
# List the given user's GPG keys
|
3553
|
+
# @param username [String] username of user
|
3554
|
+
# @param [Hash] opts the optional parameters
|
3555
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3556
|
+
# @option opts [Integer] :limit page size of results
|
3557
|
+
# @return [Array<(Array<GPGKey>, Integer, Hash)>] Array<GPGKey> data, response status code and response headers
|
3558
|
+
def user_list_gpg_keys_with_http_info(username, opts = {})
|
3559
|
+
if @api_client.config.debugging
|
3560
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_list_gpg_keys ...'
|
3561
|
+
end
|
3562
|
+
# verify the required parameter 'username' is set
|
3563
|
+
if @api_client.config.client_side_validation && username.nil?
|
3564
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_list_gpg_keys"
|
3565
|
+
end
|
3566
|
+
# resource path
|
3567
|
+
local_var_path = '/users/{username}/gpg_keys'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
3568
|
+
|
3569
|
+
# query parameters
|
3570
|
+
query_params = opts[:query_params] || {}
|
3571
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
3572
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
3573
|
+
|
3574
|
+
# header parameters
|
3575
|
+
header_params = opts[:header_params] || {}
|
3576
|
+
# HTTP header 'Accept' (if needed)
|
3577
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
3578
|
+
|
3579
|
+
# form parameters
|
3580
|
+
form_params = opts[:form_params] || {}
|
3581
|
+
|
3582
|
+
# http body (model)
|
3583
|
+
post_body = opts[:debug_body]
|
3584
|
+
|
3585
|
+
# return_type
|
3586
|
+
return_type = opts[:debug_return_type] || 'Array<GPGKey>'
|
3587
|
+
|
3588
|
+
# auth_names
|
3589
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3590
|
+
|
3591
|
+
new_options = opts.merge(
|
3592
|
+
:operation => :"UserApi.user_list_gpg_keys",
|
3593
|
+
:header_params => header_params,
|
3594
|
+
:query_params => query_params,
|
3595
|
+
:form_params => form_params,
|
3596
|
+
:body => post_body,
|
3597
|
+
:auth_names => auth_names,
|
3598
|
+
:return_type => return_type
|
3599
|
+
)
|
3600
|
+
|
3601
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3602
|
+
if @api_client.config.debugging
|
3603
|
+
@api_client.config.logger.debug "API called: UserApi#user_list_gpg_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3604
|
+
end
|
3605
|
+
return data, status_code, headers
|
3606
|
+
end
|
3607
|
+
|
3608
|
+
# List the authenticated user's webhooks
|
3609
|
+
# @param [Hash] opts the optional parameters
|
3610
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3611
|
+
# @option opts [Integer] :limit page size of results
|
3612
|
+
# @return [Array<Hook>]
|
3613
|
+
def user_list_hooks(opts = {})
|
3614
|
+
data, _status_code, _headers = user_list_hooks_with_http_info(opts)
|
3615
|
+
data
|
3616
|
+
end
|
3617
|
+
|
3618
|
+
# List the authenticated user's webhooks
|
3619
|
+
# @param [Hash] opts the optional parameters
|
3620
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3621
|
+
# @option opts [Integer] :limit page size of results
|
3622
|
+
# @return [Array<(Array<Hook>, Integer, Hash)>] Array<Hook> data, response status code and response headers
|
3623
|
+
def user_list_hooks_with_http_info(opts = {})
|
3624
|
+
if @api_client.config.debugging
|
3625
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_list_hooks ...'
|
3626
|
+
end
|
3627
|
+
# resource path
|
3628
|
+
local_var_path = '/user/hooks'
|
3629
|
+
|
3630
|
+
# query parameters
|
3631
|
+
query_params = opts[:query_params] || {}
|
3632
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
3633
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
3634
|
+
|
3635
|
+
# header parameters
|
3636
|
+
header_params = opts[:header_params] || {}
|
3637
|
+
# HTTP header 'Accept' (if needed)
|
3638
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
3639
|
+
|
3640
|
+
# form parameters
|
3641
|
+
form_params = opts[:form_params] || {}
|
3642
|
+
|
3643
|
+
# http body (model)
|
3644
|
+
post_body = opts[:debug_body]
|
3645
|
+
|
3646
|
+
# return_type
|
3647
|
+
return_type = opts[:debug_return_type] || 'Array<Hook>'
|
3648
|
+
|
3649
|
+
# auth_names
|
3650
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3651
|
+
|
3652
|
+
new_options = opts.merge(
|
3653
|
+
:operation => :"UserApi.user_list_hooks",
|
3654
|
+
:header_params => header_params,
|
3655
|
+
:query_params => query_params,
|
3656
|
+
:form_params => form_params,
|
3657
|
+
:body => post_body,
|
3658
|
+
:auth_names => auth_names,
|
3659
|
+
:return_type => return_type
|
3660
|
+
)
|
3661
|
+
|
3662
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3663
|
+
if @api_client.config.debugging
|
3664
|
+
@api_client.config.logger.debug "API called: UserApi#user_list_hooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3665
|
+
end
|
3666
|
+
return data, status_code, headers
|
3667
|
+
end
|
3668
|
+
|
3669
|
+
# List the given user's public keys
|
3670
|
+
# @param username [String] username of user
|
3671
|
+
# @param [Hash] opts the optional parameters
|
3672
|
+
# @option opts [String] :fingerprint fingerprint of the key
|
3673
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3674
|
+
# @option opts [Integer] :limit page size of results
|
3675
|
+
# @return [Array<PublicKey>]
|
3676
|
+
def user_list_keys(username, opts = {})
|
3677
|
+
data, _status_code, _headers = user_list_keys_with_http_info(username, opts)
|
3678
|
+
data
|
3679
|
+
end
|
3680
|
+
|
3681
|
+
# List the given user's public keys
|
3682
|
+
# @param username [String] username of user
|
3683
|
+
# @param [Hash] opts the optional parameters
|
3684
|
+
# @option opts [String] :fingerprint fingerprint of the key
|
3685
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3686
|
+
# @option opts [Integer] :limit page size of results
|
3687
|
+
# @return [Array<(Array<PublicKey>, Integer, Hash)>] Array<PublicKey> data, response status code and response headers
|
3688
|
+
def user_list_keys_with_http_info(username, opts = {})
|
3689
|
+
if @api_client.config.debugging
|
3690
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_list_keys ...'
|
3691
|
+
end
|
3692
|
+
# verify the required parameter 'username' is set
|
3693
|
+
if @api_client.config.client_side_validation && username.nil?
|
3694
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_list_keys"
|
3695
|
+
end
|
3696
|
+
# resource path
|
3697
|
+
local_var_path = '/users/{username}/keys'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
3698
|
+
|
3699
|
+
# query parameters
|
3700
|
+
query_params = opts[:query_params] || {}
|
3701
|
+
query_params[:'fingerprint'] = opts[:'fingerprint'] if !opts[:'fingerprint'].nil?
|
3702
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
3703
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
3704
|
+
|
3705
|
+
# header parameters
|
3706
|
+
header_params = opts[:header_params] || {}
|
3707
|
+
# HTTP header 'Accept' (if needed)
|
3708
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
3709
|
+
|
3710
|
+
# form parameters
|
3711
|
+
form_params = opts[:form_params] || {}
|
3712
|
+
|
3713
|
+
# http body (model)
|
3714
|
+
post_body = opts[:debug_body]
|
3715
|
+
|
3716
|
+
# return_type
|
3717
|
+
return_type = opts[:debug_return_type] || 'Array<PublicKey>'
|
3718
|
+
|
3719
|
+
# auth_names
|
3720
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3721
|
+
|
3722
|
+
new_options = opts.merge(
|
3723
|
+
:operation => :"UserApi.user_list_keys",
|
3724
|
+
:header_params => header_params,
|
3725
|
+
:query_params => query_params,
|
3726
|
+
:form_params => form_params,
|
3727
|
+
:body => post_body,
|
3728
|
+
:auth_names => auth_names,
|
3729
|
+
:return_type => return_type
|
3730
|
+
)
|
3731
|
+
|
3732
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3733
|
+
if @api_client.config.debugging
|
3734
|
+
@api_client.config.logger.debug "API called: UserApi#user_list_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3735
|
+
end
|
3736
|
+
return data, status_code, headers
|
3737
|
+
end
|
3738
|
+
|
3739
|
+
# List the repos owned by the given user
|
3740
|
+
# @param username [String] username of user
|
3741
|
+
# @param [Hash] opts the optional parameters
|
3742
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3743
|
+
# @option opts [Integer] :limit page size of results
|
3744
|
+
# @return [Array<Repository>]
|
3745
|
+
def user_list_repos(username, opts = {})
|
3746
|
+
data, _status_code, _headers = user_list_repos_with_http_info(username, opts)
|
3747
|
+
data
|
3748
|
+
end
|
3749
|
+
|
3750
|
+
# List the repos owned by the given user
|
3751
|
+
# @param username [String] username of user
|
3752
|
+
# @param [Hash] opts the optional parameters
|
3753
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3754
|
+
# @option opts [Integer] :limit page size of results
|
3755
|
+
# @return [Array<(Array<Repository>, Integer, Hash)>] Array<Repository> data, response status code and response headers
|
3756
|
+
def user_list_repos_with_http_info(username, opts = {})
|
3757
|
+
if @api_client.config.debugging
|
3758
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_list_repos ...'
|
3759
|
+
end
|
3760
|
+
# verify the required parameter 'username' is set
|
3761
|
+
if @api_client.config.client_side_validation && username.nil?
|
3762
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_list_repos"
|
3763
|
+
end
|
3764
|
+
# resource path
|
3765
|
+
local_var_path = '/users/{username}/repos'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
3766
|
+
|
3767
|
+
# query parameters
|
3768
|
+
query_params = opts[:query_params] || {}
|
3769
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
3770
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
3771
|
+
|
3772
|
+
# header parameters
|
3773
|
+
header_params = opts[:header_params] || {}
|
3774
|
+
# HTTP header 'Accept' (if needed)
|
3775
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
3776
|
+
|
3777
|
+
# form parameters
|
3778
|
+
form_params = opts[:form_params] || {}
|
3779
|
+
|
3780
|
+
# http body (model)
|
3781
|
+
post_body = opts[:debug_body]
|
3782
|
+
|
3783
|
+
# return_type
|
3784
|
+
return_type = opts[:debug_return_type] || 'Array<Repository>'
|
3785
|
+
|
3786
|
+
# auth_names
|
3787
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3788
|
+
|
3789
|
+
new_options = opts.merge(
|
3790
|
+
:operation => :"UserApi.user_list_repos",
|
3791
|
+
:header_params => header_params,
|
3792
|
+
:query_params => query_params,
|
3793
|
+
:form_params => form_params,
|
3794
|
+
:body => post_body,
|
3795
|
+
:auth_names => auth_names,
|
3796
|
+
:return_type => return_type
|
3797
|
+
)
|
3798
|
+
|
3799
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3800
|
+
if @api_client.config.debugging
|
3801
|
+
@api_client.config.logger.debug "API called: UserApi#user_list_repos\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3802
|
+
end
|
3803
|
+
return data, status_code, headers
|
3804
|
+
end
|
3805
|
+
|
3806
|
+
# The repos that the given user has starred
|
3807
|
+
# @param username [String] username of user
|
3808
|
+
# @param [Hash] opts the optional parameters
|
3809
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3810
|
+
# @option opts [Integer] :limit page size of results
|
3811
|
+
# @return [Array<Repository>]
|
3812
|
+
def user_list_starred(username, opts = {})
|
3813
|
+
data, _status_code, _headers = user_list_starred_with_http_info(username, opts)
|
3814
|
+
data
|
3815
|
+
end
|
3816
|
+
|
3817
|
+
# The repos that the given user has starred
|
3818
|
+
# @param username [String] username of user
|
3819
|
+
# @param [Hash] opts the optional parameters
|
3820
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3821
|
+
# @option opts [Integer] :limit page size of results
|
3822
|
+
# @return [Array<(Array<Repository>, Integer, Hash)>] Array<Repository> data, response status code and response headers
|
3823
|
+
def user_list_starred_with_http_info(username, opts = {})
|
3824
|
+
if @api_client.config.debugging
|
3825
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_list_starred ...'
|
3826
|
+
end
|
3827
|
+
# verify the required parameter 'username' is set
|
3828
|
+
if @api_client.config.client_side_validation && username.nil?
|
3829
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_list_starred"
|
3830
|
+
end
|
3831
|
+
# resource path
|
3832
|
+
local_var_path = '/users/{username}/starred'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
3833
|
+
|
3834
|
+
# query parameters
|
3835
|
+
query_params = opts[:query_params] || {}
|
3836
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
3837
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
3838
|
+
|
3839
|
+
# header parameters
|
3840
|
+
header_params = opts[:header_params] || {}
|
3841
|
+
# HTTP header 'Accept' (if needed)
|
3842
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
3843
|
+
|
3844
|
+
# form parameters
|
3845
|
+
form_params = opts[:form_params] || {}
|
3846
|
+
|
3847
|
+
# http body (model)
|
3848
|
+
post_body = opts[:debug_body]
|
3849
|
+
|
3850
|
+
# return_type
|
3851
|
+
return_type = opts[:debug_return_type] || 'Array<Repository>'
|
3852
|
+
|
3853
|
+
# auth_names
|
3854
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3855
|
+
|
3856
|
+
new_options = opts.merge(
|
3857
|
+
:operation => :"UserApi.user_list_starred",
|
3858
|
+
:header_params => header_params,
|
3859
|
+
:query_params => query_params,
|
3860
|
+
:form_params => form_params,
|
3861
|
+
:body => post_body,
|
3862
|
+
:auth_names => auth_names,
|
3863
|
+
:return_type => return_type
|
3864
|
+
)
|
3865
|
+
|
3866
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3867
|
+
if @api_client.config.debugging
|
3868
|
+
@api_client.config.logger.debug "API called: UserApi#user_list_starred\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3869
|
+
end
|
3870
|
+
return data, status_code, headers
|
3871
|
+
end
|
3872
|
+
|
3873
|
+
# List the repositories watched by a user
|
3874
|
+
# @param username [String] username of the user
|
3875
|
+
# @param [Hash] opts the optional parameters
|
3876
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3877
|
+
# @option opts [Integer] :limit page size of results
|
3878
|
+
# @return [Array<Repository>]
|
3879
|
+
def user_list_subscriptions(username, opts = {})
|
3880
|
+
data, _status_code, _headers = user_list_subscriptions_with_http_info(username, opts)
|
3881
|
+
data
|
3882
|
+
end
|
3883
|
+
|
3884
|
+
# List the repositories watched by a user
|
3885
|
+
# @param username [String] username of the user
|
3886
|
+
# @param [Hash] opts the optional parameters
|
3887
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3888
|
+
# @option opts [Integer] :limit page size of results
|
3889
|
+
# @return [Array<(Array<Repository>, Integer, Hash)>] Array<Repository> data, response status code and response headers
|
3890
|
+
def user_list_subscriptions_with_http_info(username, opts = {})
|
3891
|
+
if @api_client.config.debugging
|
3892
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_list_subscriptions ...'
|
3893
|
+
end
|
3894
|
+
# verify the required parameter 'username' is set
|
3895
|
+
if @api_client.config.client_side_validation && username.nil?
|
3896
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_list_subscriptions"
|
3897
|
+
end
|
3898
|
+
# resource path
|
3899
|
+
local_var_path = '/users/{username}/subscriptions'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
3900
|
+
|
3901
|
+
# query parameters
|
3902
|
+
query_params = opts[:query_params] || {}
|
3903
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
3904
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
3905
|
+
|
3906
|
+
# header parameters
|
3907
|
+
header_params = opts[:header_params] || {}
|
3908
|
+
# HTTP header 'Accept' (if needed)
|
3909
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
3910
|
+
|
3911
|
+
# form parameters
|
3912
|
+
form_params = opts[:form_params] || {}
|
3913
|
+
|
3914
|
+
# http body (model)
|
3915
|
+
post_body = opts[:debug_body]
|
3916
|
+
|
3917
|
+
# return_type
|
3918
|
+
return_type = opts[:debug_return_type] || 'Array<Repository>'
|
3919
|
+
|
3920
|
+
# auth_names
|
3921
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3922
|
+
|
3923
|
+
new_options = opts.merge(
|
3924
|
+
:operation => :"UserApi.user_list_subscriptions",
|
3925
|
+
:header_params => header_params,
|
3926
|
+
:query_params => query_params,
|
3927
|
+
:form_params => form_params,
|
3928
|
+
:body => post_body,
|
3929
|
+
:auth_names => auth_names,
|
3930
|
+
:return_type => return_type
|
3931
|
+
)
|
3932
|
+
|
3933
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3934
|
+
if @api_client.config.debugging
|
3935
|
+
@api_client.config.logger.debug "API called: UserApi#user_list_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3936
|
+
end
|
3937
|
+
return data, status_code, headers
|
3938
|
+
end
|
3939
|
+
|
3940
|
+
# List all the teams a user belongs to
|
3941
|
+
# @param [Hash] opts the optional parameters
|
3942
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3943
|
+
# @option opts [Integer] :limit page size of results
|
3944
|
+
# @return [Array<Team>]
|
3945
|
+
def user_list_teams(opts = {})
|
3946
|
+
data, _status_code, _headers = user_list_teams_with_http_info(opts)
|
3947
|
+
data
|
3948
|
+
end
|
3949
|
+
|
3950
|
+
# List all the teams a user belongs to
|
3951
|
+
# @param [Hash] opts the optional parameters
|
3952
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
3953
|
+
# @option opts [Integer] :limit page size of results
|
3954
|
+
# @return [Array<(Array<Team>, Integer, Hash)>] Array<Team> data, response status code and response headers
|
3955
|
+
def user_list_teams_with_http_info(opts = {})
|
3956
|
+
if @api_client.config.debugging
|
3957
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_list_teams ...'
|
3958
|
+
end
|
3959
|
+
# resource path
|
3960
|
+
local_var_path = '/user/teams'
|
3961
|
+
|
3962
|
+
# query parameters
|
3963
|
+
query_params = opts[:query_params] || {}
|
3964
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
3965
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
3966
|
+
|
3967
|
+
# header parameters
|
3968
|
+
header_params = opts[:header_params] || {}
|
3969
|
+
# HTTP header 'Accept' (if needed)
|
3970
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
3971
|
+
|
3972
|
+
# form parameters
|
3973
|
+
form_params = opts[:form_params] || {}
|
3974
|
+
|
3975
|
+
# http body (model)
|
3976
|
+
post_body = opts[:debug_body]
|
3977
|
+
|
3978
|
+
# return_type
|
3979
|
+
return_type = opts[:debug_return_type] || 'Array<Team>'
|
3980
|
+
|
3981
|
+
# auth_names
|
3982
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
3983
|
+
|
3984
|
+
new_options = opts.merge(
|
3985
|
+
:operation => :"UserApi.user_list_teams",
|
3986
|
+
:header_params => header_params,
|
3987
|
+
:query_params => query_params,
|
3988
|
+
:form_params => form_params,
|
3989
|
+
:body => post_body,
|
3990
|
+
:auth_names => auth_names,
|
3991
|
+
:return_type => return_type
|
3992
|
+
)
|
3993
|
+
|
3994
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
3995
|
+
if @api_client.config.debugging
|
3996
|
+
@api_client.config.logger.debug "API called: UserApi#user_list_teams\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3997
|
+
end
|
3998
|
+
return data, status_code, headers
|
3999
|
+
end
|
4000
|
+
|
4001
|
+
# Search for users
|
4002
|
+
# @param [Hash] opts the optional parameters
|
4003
|
+
# @option opts [String] :q keyword
|
4004
|
+
# @option opts [Integer] :uid ID of the user to search for
|
4005
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
4006
|
+
# @option opts [Integer] :limit page size of results
|
4007
|
+
# @return [UserSearch200Response]
|
4008
|
+
def user_search(opts = {})
|
4009
|
+
data, _status_code, _headers = user_search_with_http_info(opts)
|
4010
|
+
data
|
4011
|
+
end
|
4012
|
+
|
4013
|
+
# Search for users
|
4014
|
+
# @param [Hash] opts the optional parameters
|
4015
|
+
# @option opts [String] :q keyword
|
4016
|
+
# @option opts [Integer] :uid ID of the user to search for
|
4017
|
+
# @option opts [Integer] :page page number of results to return (1-based)
|
4018
|
+
# @option opts [Integer] :limit page size of results
|
4019
|
+
# @return [Array<(UserSearch200Response, Integer, Hash)>] UserSearch200Response data, response status code and response headers
|
4020
|
+
def user_search_with_http_info(opts = {})
|
4021
|
+
if @api_client.config.debugging
|
4022
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_search ...'
|
4023
|
+
end
|
4024
|
+
# resource path
|
4025
|
+
local_var_path = '/users/search'
|
4026
|
+
|
4027
|
+
# query parameters
|
4028
|
+
query_params = opts[:query_params] || {}
|
4029
|
+
query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
|
4030
|
+
query_params[:'uid'] = opts[:'uid'] if !opts[:'uid'].nil?
|
4031
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
4032
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
4033
|
+
|
4034
|
+
# header parameters
|
4035
|
+
header_params = opts[:header_params] || {}
|
4036
|
+
# HTTP header 'Accept' (if needed)
|
4037
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
4038
|
+
|
4039
|
+
# form parameters
|
4040
|
+
form_params = opts[:form_params] || {}
|
4041
|
+
|
4042
|
+
# http body (model)
|
4043
|
+
post_body = opts[:debug_body]
|
4044
|
+
|
4045
|
+
# return_type
|
4046
|
+
return_type = opts[:debug_return_type] || 'UserSearch200Response'
|
4047
|
+
|
4048
|
+
# auth_names
|
4049
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
4050
|
+
|
4051
|
+
new_options = opts.merge(
|
4052
|
+
:operation => :"UserApi.user_search",
|
4053
|
+
:header_params => header_params,
|
4054
|
+
:query_params => query_params,
|
4055
|
+
:form_params => form_params,
|
4056
|
+
:body => post_body,
|
4057
|
+
:auth_names => auth_names,
|
4058
|
+
:return_type => return_type
|
4059
|
+
)
|
4060
|
+
|
4061
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
4062
|
+
if @api_client.config.debugging
|
4063
|
+
@api_client.config.logger.debug "API called: UserApi#user_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4064
|
+
end
|
4065
|
+
return data, status_code, headers
|
4066
|
+
end
|
4067
|
+
|
4068
|
+
# Unblocks a user from the doer.
|
4069
|
+
# @param username [String] username of the user
|
4070
|
+
# @param [Hash] opts the optional parameters
|
4071
|
+
# @return [nil]
|
4072
|
+
def user_unblock_user(username, opts = {})
|
4073
|
+
user_unblock_user_with_http_info(username, opts)
|
4074
|
+
nil
|
4075
|
+
end
|
4076
|
+
|
4077
|
+
# Unblocks a user from the doer.
|
4078
|
+
# @param username [String] username of the user
|
4079
|
+
# @param [Hash] opts the optional parameters
|
4080
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
4081
|
+
def user_unblock_user_with_http_info(username, opts = {})
|
4082
|
+
if @api_client.config.debugging
|
4083
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_unblock_user ...'
|
4084
|
+
end
|
4085
|
+
# verify the required parameter 'username' is set
|
4086
|
+
if @api_client.config.client_side_validation && username.nil?
|
4087
|
+
fail ArgumentError, "Missing the required parameter 'username' when calling UserApi.user_unblock_user"
|
4088
|
+
end
|
4089
|
+
# resource path
|
4090
|
+
local_var_path = '/user/unblock/{username}'.sub('{' + 'username' + '}', CGI.escape(username.to_s))
|
4091
|
+
|
4092
|
+
# query parameters
|
4093
|
+
query_params = opts[:query_params] || {}
|
4094
|
+
|
4095
|
+
# header parameters
|
4096
|
+
header_params = opts[:header_params] || {}
|
4097
|
+
|
4098
|
+
# form parameters
|
4099
|
+
form_params = opts[:form_params] || {}
|
4100
|
+
|
4101
|
+
# http body (model)
|
4102
|
+
post_body = opts[:debug_body]
|
4103
|
+
|
4104
|
+
# return_type
|
4105
|
+
return_type = opts[:debug_return_type]
|
4106
|
+
|
4107
|
+
# auth_names
|
4108
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
4109
|
+
|
4110
|
+
new_options = opts.merge(
|
4111
|
+
:operation => :"UserApi.user_unblock_user",
|
4112
|
+
:header_params => header_params,
|
4113
|
+
:query_params => query_params,
|
4114
|
+
:form_params => form_params,
|
4115
|
+
:body => post_body,
|
4116
|
+
:auth_names => auth_names,
|
4117
|
+
:return_type => return_type
|
4118
|
+
)
|
4119
|
+
|
4120
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
4121
|
+
if @api_client.config.debugging
|
4122
|
+
@api_client.config.logger.debug "API called: UserApi#user_unblock_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4123
|
+
end
|
4124
|
+
return data, status_code, headers
|
4125
|
+
end
|
4126
|
+
|
4127
|
+
# Update Avatar
|
4128
|
+
# @param [Hash] opts the optional parameters
|
4129
|
+
# @option opts [UpdateUserAvatarOption] :body
|
4130
|
+
# @return [nil]
|
4131
|
+
def user_update_avatar(opts = {})
|
4132
|
+
user_update_avatar_with_http_info(opts)
|
4133
|
+
nil
|
4134
|
+
end
|
4135
|
+
|
4136
|
+
# Update Avatar
|
4137
|
+
# @param [Hash] opts the optional parameters
|
4138
|
+
# @option opts [UpdateUserAvatarOption] :body
|
4139
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
4140
|
+
def user_update_avatar_with_http_info(opts = {})
|
4141
|
+
if @api_client.config.debugging
|
4142
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_update_avatar ...'
|
4143
|
+
end
|
4144
|
+
# resource path
|
4145
|
+
local_var_path = '/user/avatar'
|
4146
|
+
|
4147
|
+
# query parameters
|
4148
|
+
query_params = opts[:query_params] || {}
|
4149
|
+
|
4150
|
+
# header parameters
|
4151
|
+
header_params = opts[:header_params] || {}
|
4152
|
+
# HTTP header 'Content-Type'
|
4153
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
|
4154
|
+
if !content_type.nil?
|
4155
|
+
header_params['Content-Type'] = content_type
|
4156
|
+
end
|
4157
|
+
|
4158
|
+
# form parameters
|
4159
|
+
form_params = opts[:form_params] || {}
|
4160
|
+
|
4161
|
+
# http body (model)
|
4162
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
|
4163
|
+
|
4164
|
+
# return_type
|
4165
|
+
return_type = opts[:debug_return_type]
|
4166
|
+
|
4167
|
+
# auth_names
|
4168
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
4169
|
+
|
4170
|
+
new_options = opts.merge(
|
4171
|
+
:operation => :"UserApi.user_update_avatar",
|
4172
|
+
:header_params => header_params,
|
4173
|
+
:query_params => query_params,
|
4174
|
+
:form_params => form_params,
|
4175
|
+
:body => post_body,
|
4176
|
+
:auth_names => auth_names,
|
4177
|
+
:return_type => return_type
|
4178
|
+
)
|
4179
|
+
|
4180
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
4181
|
+
if @api_client.config.debugging
|
4182
|
+
@api_client.config.logger.debug "API called: UserApi#user_update_avatar\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4183
|
+
end
|
4184
|
+
return data, status_code, headers
|
4185
|
+
end
|
4186
|
+
|
4187
|
+
# update an OAuth2 Application, this includes regenerating the client secret
|
4188
|
+
# @param id [Integer] application to be updated
|
4189
|
+
# @param body [CreateOAuth2ApplicationOptions]
|
4190
|
+
# @param [Hash] opts the optional parameters
|
4191
|
+
# @return [OAuth2Application]
|
4192
|
+
def user_update_o_auth2_application(id, body, opts = {})
|
4193
|
+
data, _status_code, _headers = user_update_o_auth2_application_with_http_info(id, body, opts)
|
4194
|
+
data
|
4195
|
+
end
|
4196
|
+
|
4197
|
+
# update an OAuth2 Application, this includes regenerating the client secret
|
4198
|
+
# @param id [Integer] application to be updated
|
4199
|
+
# @param body [CreateOAuth2ApplicationOptions]
|
4200
|
+
# @param [Hash] opts the optional parameters
|
4201
|
+
# @return [Array<(OAuth2Application, Integer, Hash)>] OAuth2Application data, response status code and response headers
|
4202
|
+
def user_update_o_auth2_application_with_http_info(id, body, opts = {})
|
4203
|
+
if @api_client.config.debugging
|
4204
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_update_o_auth2_application ...'
|
4205
|
+
end
|
4206
|
+
# verify the required parameter 'id' is set
|
4207
|
+
if @api_client.config.client_side_validation && id.nil?
|
4208
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling UserApi.user_update_o_auth2_application"
|
4209
|
+
end
|
4210
|
+
# verify the required parameter 'body' is set
|
4211
|
+
if @api_client.config.client_side_validation && body.nil?
|
4212
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling UserApi.user_update_o_auth2_application"
|
4213
|
+
end
|
4214
|
+
# resource path
|
4215
|
+
local_var_path = '/user/applications/oauth2/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
4216
|
+
|
4217
|
+
# query parameters
|
4218
|
+
query_params = opts[:query_params] || {}
|
4219
|
+
|
4220
|
+
# header parameters
|
4221
|
+
header_params = opts[:header_params] || {}
|
4222
|
+
# HTTP header 'Accept' (if needed)
|
4223
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
4224
|
+
# HTTP header 'Content-Type'
|
4225
|
+
content_type = @api_client.select_header_content_type(['application/json', 'text/plain'])
|
4226
|
+
if !content_type.nil?
|
4227
|
+
header_params['Content-Type'] = content_type
|
4228
|
+
end
|
4229
|
+
|
4230
|
+
# form parameters
|
4231
|
+
form_params = opts[:form_params] || {}
|
4232
|
+
|
4233
|
+
# http body (model)
|
4234
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
4235
|
+
|
4236
|
+
# return_type
|
4237
|
+
return_type = opts[:debug_return_type] || 'OAuth2Application'
|
4238
|
+
|
4239
|
+
# auth_names
|
4240
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
4241
|
+
|
4242
|
+
new_options = opts.merge(
|
4243
|
+
:operation => :"UserApi.user_update_o_auth2_application",
|
4244
|
+
:header_params => header_params,
|
4245
|
+
:query_params => query_params,
|
4246
|
+
:form_params => form_params,
|
4247
|
+
:body => post_body,
|
4248
|
+
:auth_names => auth_names,
|
4249
|
+
:return_type => return_type
|
4250
|
+
)
|
4251
|
+
|
4252
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
4253
|
+
if @api_client.config.debugging
|
4254
|
+
@api_client.config.logger.debug "API called: UserApi#user_update_o_auth2_application\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4255
|
+
end
|
4256
|
+
return data, status_code, headers
|
4257
|
+
end
|
4258
|
+
|
4259
|
+
# Verify a GPG key
|
4260
|
+
# @param [Hash] opts the optional parameters
|
4261
|
+
# @return [GPGKey]
|
4262
|
+
def user_verify_gpg_key(opts = {})
|
4263
|
+
data, _status_code, _headers = user_verify_gpg_key_with_http_info(opts)
|
4264
|
+
data
|
4265
|
+
end
|
4266
|
+
|
4267
|
+
# Verify a GPG key
|
4268
|
+
# @param [Hash] opts the optional parameters
|
4269
|
+
# @return [Array<(GPGKey, Integer, Hash)>] GPGKey data, response status code and response headers
|
4270
|
+
def user_verify_gpg_key_with_http_info(opts = {})
|
4271
|
+
if @api_client.config.debugging
|
4272
|
+
@api_client.config.logger.debug 'Calling API: UserApi.user_verify_gpg_key ...'
|
4273
|
+
end
|
4274
|
+
# resource path
|
4275
|
+
local_var_path = '/user/gpg_key_verify'
|
4276
|
+
|
4277
|
+
# query parameters
|
4278
|
+
query_params = opts[:query_params] || {}
|
4279
|
+
|
4280
|
+
# header parameters
|
4281
|
+
header_params = opts[:header_params] || {}
|
4282
|
+
# HTTP header 'Accept' (if needed)
|
4283
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
4284
|
+
|
4285
|
+
# form parameters
|
4286
|
+
form_params = opts[:form_params] || {}
|
4287
|
+
|
4288
|
+
# http body (model)
|
4289
|
+
post_body = opts[:debug_body]
|
4290
|
+
|
4291
|
+
# return_type
|
4292
|
+
return_type = opts[:debug_return_type] || 'GPGKey'
|
4293
|
+
|
4294
|
+
# auth_names
|
4295
|
+
auth_names = opts[:debug_auth_names] || ['AuthorizationHeaderToken']
|
4296
|
+
|
4297
|
+
new_options = opts.merge(
|
4298
|
+
:operation => :"UserApi.user_verify_gpg_key",
|
4299
|
+
:header_params => header_params,
|
4300
|
+
:query_params => query_params,
|
4301
|
+
:form_params => form_params,
|
4302
|
+
:body => post_body,
|
4303
|
+
:auth_names => auth_names,
|
4304
|
+
:return_type => return_type
|
4305
|
+
)
|
4306
|
+
|
4307
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
4308
|
+
if @api_client.config.debugging
|
4309
|
+
@api_client.config.logger.debug "API called: UserApi#user_verify_gpg_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
4310
|
+
end
|
4311
|
+
return data, status_code, headers
|
4312
|
+
end
|
4313
|
+
end
|
4314
|
+
end
|