From fd997e7987fe2e2722a9cea1d2ea30d6aa73bb3e Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Sat, 9 May 2020 08:16:13 -0700 Subject: [PATCH] Update to 1.12.0 This is a re-generation of the swagger code and docs based on the API in Gitea version 1.12.0. --- .swagger-codegen/VERSION | 2 +- README.md | 88 +- docs/APIError.md | 4 +- docs/AccessToken.md | 2 +- docs/AddCollaboratorOption.md | 2 +- docs/AddTimeOption.md | 4 +- docs/AdminApi.md | 18 +- docs/AnnotatedTag.md | 14 +- docs/AnnotatedTagObject.md | 6 +- docs/Attachment.md | 14 +- docs/Branch.md | 11 +- docs/BranchProtection.md | 31 + docs/Comment.md | 20 +- docs/Commit.md | 14 +- docs/CommitDateOptions.md | 11 + docs/CommitMeta.md | 4 +- docs/CommitUser.md | 6 +- docs/ContentsResponse.md | 28 +- docs/CreateBranchProtectionOption.md | 29 + docs/CreateEmailOption.md | 2 +- docs/CreateFileOptions.md | 13 +- docs/CreateForkOption.md | 2 +- docs/CreateGPGKeyOption.md | 2 +- docs/CreateHookOption.md | 8 +- docs/CreateHookOptionConfig.md | 9 + docs/CreateIssueCommentOption.md | 2 +- docs/CreateIssueOption.md | 16 +- docs/CreateKeyOption.md | 6 +- docs/CreateLabelOption.md | 6 +- docs/CreateMilestoneOption.md | 6 +- docs/CreateOAuth2ApplicationOptions.md | 11 + docs/CreateOrgOption.md | 14 +- docs/CreatePullRequestOption.md | 18 +- docs/CreatePullReviewComment.md | 13 + docs/CreatePullReviewOptions.md | 13 + docs/CreateReleaseOption.md | 12 +- docs/CreateRepoOption.md | 17 +- docs/CreateStatusOption.md | 8 +- docs/CreateTeamOption.md | 10 +- docs/CreateUserOption.md | 16 +- docs/DeleteEmailOption.md | 2 +- docs/DeleteFileOptions.md | 13 +- docs/DeployKey.md | 18 +- docs/EditAttachmentOptions.md | 2 +- docs/EditBranchProtectionOption.md | 28 + docs/EditDeadlineOption.md | 2 +- docs/EditGitHookOption.md | 2 +- docs/EditHookOption.md | 8 +- docs/EditIssueCommentOption.md | 2 +- docs/EditIssueOption.md | 15 +- docs/EditLabelOption.md | 6 +- docs/EditMilestoneOption.md | 8 +- docs/EditOrgOption.md | 12 +- docs/EditPullRequestOption.md | 17 +- docs/EditReactionOption.md | 10 + docs/EditReleaseOption.md | 12 +- docs/EditRepoOption.md | 35 +- docs/EditTeamOption.md | 10 +- docs/EditUserOption.md | 30 +- docs/Email.md | 6 +- docs/ExternalTracker.md | 6 +- docs/ExternalWiki.md | 2 +- docs/FileCommitResponse.md | 16 +- docs/FileDeleteResponse.md | 6 +- docs/FileLinksResponse.md | 6 +- docs/FileResponse.md | 6 +- docs/GPGKey.md | 24 +- docs/GPGKeyEmail.md | 4 +- docs/GitBlobResponse.md | 10 +- docs/GitEntry.md | 13 +- docs/GitHook.md | 6 +- docs/GitObject.md | 6 +- docs/GitTreeResponse.md | 12 +- docs/Hook.md | 14 +- docs/Identity.md | 4 +- docs/InlineResponse200.md | 4 +- docs/InlineResponse2001.md | 4 +- docs/InternalTracker.md | 6 +- docs/Issue.md | 40 +- docs/IssueApi.md | 1754 ++++++-- docs/IssueDeadline.md | 2 +- docs/IssueLabelsOption.md | 2 +- docs/Label.md | 10 +- docs/MarkdownOption.md | 8 +- docs/MergePullRequestOption.md | 7 +- docs/MigrateRepoForm.md | 28 +- docs/Milestone.md | 16 +- docs/NotificationApi.md | 564 +++ docs/NotificationCount.md | 10 + docs/NotificationSubject.md | 13 + docs/NotificationThread.md | 16 + docs/OAuth2Application.md | 15 + docs/Organization.md | 18 +- docs/OrganizationApi.md | 642 ++- docs/PRBranchInfo.md | 10 +- docs/PayloadCommit.md | 20 +- docs/PayloadCommitVerification.md | 10 +- docs/PayloadUser.md | 6 +- docs/Permission.md | 6 +- docs/PublicKey.md | 18 +- docs/PullRequest.md | 54 +- docs/PullRequestMeta.md | 4 +- docs/PullReview.md | 20 + docs/PullReviewComment.md | 23 + docs/Reaction.md | 12 + docs/Reference.md | 6 +- docs/Release.md | 29 +- docs/RepoCommit.md | 10 +- docs/RepoTopicOptions.md | 2 +- docs/Repository.md | 77 +- docs/RepositoryApi.md | 1978 +++++++-- docs/RepositoryMeta.md | 13 + docs/ReviewStateType.md | 9 + docs/SearchResults.md | 4 +- docs/ServerVersion.md | 2 +- docs/Status.md | 18 +- docs/StopWatch.md | 11 + docs/SubmitPullReviewOptions.md | 11 + docs/Tag.md | 10 +- docs/Team.md | 14 +- docs/TopicName.md | 2 +- docs/TopicResponse.md | 10 +- docs/TrackedTime.md | 12 +- docs/TransferRepoOption.md | 11 + docs/UpdateFileOptions.md | 17 +- docs/User.md | 18 +- docs/UserApi.md | 592 ++- docs/UserHeatmapData.md | 4 +- docs/WatchInfo.md | 12 +- giteapy/__init__.py | 24 +- giteapy/api/__init__.py | 1 + giteapy/api/admin_api.py | 16 +- giteapy/api/issue_api.py | 2875 ++++++++++--- giteapy/api/miscellaneous_api.py | 2 +- giteapy/api/notification_api.py | 753 ++++ giteapy/api/organization_api.py | 1039 ++++- giteapy/api/repository_api.py | 3581 +++++++++++++---- giteapy/api/user_api.py | 735 +++- giteapy/api_client.py | 2 - giteapy/configuration.py | 21 +- giteapy/models/__init__.py | 23 +- giteapy/models/access_token.py | 2 +- giteapy/models/add_collaborator_option.py | 2 +- giteapy/models/add_time_option.py | 62 +- giteapy/models/annotated_tag.py | 6 +- giteapy/models/annotated_tag_object.py | 2 +- giteapy/models/api_error.py | 2 +- giteapy/models/attachment.py | 2 +- giteapy/models/branch.py | 192 +- giteapy/models/branch_protection.py | 661 +++ giteapy/models/comment.py | 4 +- giteapy/models/commit.py | 6 +- giteapy/models/commit_date_options.py | 141 + giteapy/models/commit_meta.py | 2 +- giteapy/models/commit_user.py | 2 +- giteapy/models/contents_response.py | 4 +- .../models/create_branch_protection_option.py | 609 +++ giteapy/models/create_email_option.py | 2 +- giteapy/models/create_file_options.py | 32 +- giteapy/models/create_fork_option.py | 2 +- giteapy/models/create_gpg_key_option.py | 2 +- giteapy/models/create_hook_option.py | 10 +- giteapy/models/create_hook_option_config.py | 87 + giteapy/models/create_issue_comment_option.py | 2 +- giteapy/models/create_issue_option.py | 2 +- giteapy/models/create_key_option.py | 2 +- giteapy/models/create_label_option.py | 2 +- giteapy/models/create_milestone_option.py | 2 +- .../create_o_auth2_application_options.py | 141 + giteapy/models/create_org_option.py | 2 +- giteapy/models/create_pull_request_option.py | 2 +- giteapy/models/create_pull_review_comment.py | 199 + giteapy/models/create_pull_review_options.py | 193 + giteapy/models/create_release_option.py | 2 +- giteapy/models/create_repo_option.py | 32 +- giteapy/models/create_status_option.py | 4 +- giteapy/models/create_team_option.py | 56 +- giteapy/models/create_user_option.py | 2 +- giteapy/models/delete_email_option.py | 2 +- giteapy/models/delete_file_options.py | 32 +- giteapy/models/deploy_key.py | 4 +- giteapy/models/edit_attachment_options.py | 2 +- .../models/edit_branch_protection_option.py | 583 +++ giteapy/models/edit_deadline_option.py | 2 +- giteapy/models/edit_git_hook_option.py | 2 +- giteapy/models/edit_hook_option.py | 2 +- giteapy/models/edit_issue_comment_option.py | 2 +- giteapy/models/edit_issue_option.py | 34 +- giteapy/models/edit_label_option.py | 2 +- giteapy/models/edit_milestone_option.py | 2 +- giteapy/models/edit_org_option.py | 2 +- giteapy/models/edit_pull_request_option.py | 34 +- giteapy/models/edit_reaction_option.py | 115 + giteapy/models/edit_release_option.py | 2 +- giteapy/models/edit_repo_option.py | 36 +- giteapy/models/edit_team_option.py | 56 +- giteapy/models/edit_user_option.py | 2 +- giteapy/models/email.py | 2 +- giteapy/models/external_tracker.py | 2 +- giteapy/models/external_wiki.py | 2 +- giteapy/models/file_commit_response.py | 5 +- giteapy/models/file_delete_response.py | 5 +- giteapy/models/file_links_response.py | 2 +- giteapy/models/file_response.py | 6 +- giteapy/models/git_blob_response.py | 2 +- giteapy/models/git_entry.py | 34 +- giteapy/models/git_hook.py | 2 +- giteapy/models/git_object.py | 2 +- giteapy/models/git_tree_response.py | 4 +- giteapy/models/gpg_key.py | 4 +- giteapy/models/gpg_key_email.py | 2 +- giteapy/models/hook.py | 2 +- giteapy/models/identity.py | 2 +- giteapy/models/inline_response200.py | 4 +- giteapy/models/inline_response2001.py | 4 +- giteapy/models/internal_tracker.py | 2 +- giteapy/models/issue.py | 62 +- giteapy/models/issue_deadline.py | 2 +- giteapy/models/issue_labels_option.py | 2 +- giteapy/models/label.py | 2 +- giteapy/models/markdown_option.py | 2 +- giteapy/models/merge_pull_request_option.py | 34 +- giteapy/models/migrate_repo_form.py | 2 +- giteapy/models/milestone.py | 4 +- giteapy/models/notification_count.py | 115 + giteapy/models/notification_subject.py | 193 + giteapy/models/notification_thread.py | 271 ++ giteapy/models/o_auth2_application.py | 245 ++ giteapy/models/organization.py | 2 +- giteapy/models/payload_commit.py | 5 +- giteapy/models/payload_commit_verification.py | 4 +- giteapy/models/payload_user.py | 2 +- giteapy/models/permission.py | 2 +- giteapy/models/pr_branch_info.py | 4 +- giteapy/models/public_key.py | 4 +- giteapy/models/pull_request.py | 8 +- giteapy/models/pull_request_meta.py | 2 +- giteapy/models/pull_review.py | 375 ++ giteapy/models/pull_review_comment.py | 453 +++ giteapy/models/reaction.py | 167 + giteapy/models/reference.py | 4 +- giteapy/models/release.py | 33 +- giteapy/models/repo_commit.py | 5 +- giteapy/models/repo_topic_options.py | 2 +- giteapy/models/repository.py | 88 +- giteapy/models/repository_meta.py | 193 + giteapy/models/review_state_type.py | 87 + giteapy/models/search_results.py | 4 +- giteapy/models/server_version.py | 2 +- giteapy/models/state_type.py | 2 +- giteapy/models/status.py | 5 +- giteapy/models/status_state.py | 2 +- giteapy/models/stop_watch.py | 141 + giteapy/models/submit_pull_review_options.py | 141 + giteapy/models/tag.py | 4 +- giteapy/models/team.py | 58 +- giteapy/models/time_stamp.py | 2 +- giteapy/models/topic_name.py | 2 +- giteapy/models/topic_response.py | 2 +- giteapy/models/tracked_time.py | 64 +- giteapy/models/transfer_repo_option.py | 144 + giteapy/models/update_file_options.py | 32 +- giteapy/models/user.py | 2 +- giteapy/models/user_heatmap_data.py | 4 +- giteapy/models/watch_info.py | 2 +- giteapy/rest.py | 5 +- setup.py | 3 +- test/test_access_token.py | 2 +- test/test_add_collaborator_option.py | 2 +- test/test_add_time_option.py | 2 +- test/test_admin_api.py | 2 +- test/test_annotated_tag.py | 2 +- test/test_annotated_tag_object.py | 2 +- test/test_api_error.py | 2 +- test/test_attachment.py | 2 +- test/test_branch.py | 2 +- test/test_branch_protection.py | 40 + test/test_comment.py | 2 +- test/test_commit.py | 2 +- test/test_commit_date_options.py | 40 + test/test_commit_meta.py | 2 +- test/test_commit_user.py | 2 +- test/test_contents_response.py | 2 +- test/test_create_branch_protection_option.py | 40 + test/test_create_email_option.py | 2 +- test/test_create_file_options.py | 2 +- test/test_create_fork_option.py | 2 +- test/test_create_gpg_key_option.py | 2 +- test/test_create_hook_option.py | 2 +- test/test_create_hook_option_config.py | 40 + test/test_create_issue_comment_option.py | 2 +- test/test_create_issue_option.py | 2 +- test/test_create_key_option.py | 2 +- test/test_create_label_option.py | 2 +- test/test_create_milestone_option.py | 2 +- ...test_create_o_auth2_application_options.py | 40 + test/test_create_org_option.py | 2 +- test/test_create_pull_request_option.py | 2 +- test/test_create_pull_review_comment.py | 40 + test/test_create_pull_review_options.py | 40 + test/test_create_release_option.py | 2 +- test/test_create_repo_option.py | 2 +- test/test_create_status_option.py | 2 +- test/test_create_team_option.py | 2 +- test/test_create_user_option.py | 2 +- test/test_delete_email_option.py | 2 +- test/test_delete_file_options.py | 2 +- test/test_deploy_key.py | 2 +- test/test_edit_attachment_options.py | 2 +- test/test_edit_branch_protection_option.py | 40 + test/test_edit_deadline_option.py | 2 +- test/test_edit_git_hook_option.py | 2 +- test/test_edit_hook_option.py | 2 +- test/test_edit_issue_comment_option.py | 2 +- test/test_edit_issue_option.py | 2 +- test/test_edit_label_option.py | 2 +- test/test_edit_milestone_option.py | 2 +- test/test_edit_org_option.py | 2 +- test/test_edit_pull_request_option.py | 2 +- test/test_edit_reaction_option.py | 40 + test/test_edit_release_option.py | 2 +- test/test_edit_repo_option.py | 2 +- test/test_edit_team_option.py | 2 +- test/test_edit_user_option.py | 2 +- test/test_email.py | 2 +- test/test_external_tracker.py | 2 +- test/test_external_wiki.py | 2 +- test/test_file_commit_response.py | 2 +- test/test_file_delete_response.py | 2 +- test/test_file_links_response.py | 2 +- test/test_file_response.py | 2 +- test/test_git_blob_response.py | 2 +- test/test_git_entry.py | 2 +- test/test_git_hook.py | 2 +- test/test_git_object.py | 2 +- test/test_git_tree_response.py | 2 +- test/test_gpg_key.py | 2 +- test/test_gpg_key_email.py | 2 +- test/test_hook.py | 2 +- test/test_identity.py | 2 +- test/test_inline_response200.py | 2 +- test/test_inline_response2001.py | 2 +- test/test_internal_tracker.py | 2 +- test/test_issue.py | 2 +- test/test_issue_api.py | 2 +- test/test_issue_deadline.py | 2 +- test/test_issue_labels_option.py | 2 +- test/test_label.py | 2 +- test/test_markdown_option.py | 2 +- test/test_merge_pull_request_option.py | 2 +- test/test_migrate_repo_form.py | 2 +- test/test_milestone.py | 2 +- test/test_miscellaneous_api.py | 2 +- test/test_notification_api.py | 83 + test/test_notification_count.py | 40 + test/test_notification_subject.py | 40 + test/test_notification_thread.py | 40 + test/test_o_auth2_application.py | 40 + test/test_organization.py | 2 +- test/test_organization_api.py | 2 +- test/test_payload_commit.py | 2 +- test/test_payload_commit_verification.py | 2 +- test/test_payload_user.py | 2 +- test/test_permission.py | 2 +- test/test_pr_branch_info.py | 2 +- test/test_public_key.py | 2 +- test/test_pull_request.py | 2 +- test/test_pull_request_meta.py | 2 +- test/test_pull_review.py | 40 + test/test_pull_review_comment.py | 40 + test/test_reaction.py | 40 + test/test_reference.py | 2 +- test/test_release.py | 2 +- test/test_repo_commit.py | 2 +- test/test_repo_topic_options.py | 2 +- test/test_repository.py | 2 +- test/test_repository_api.py | 2 +- test/test_repository_meta.py | 40 + test/test_review_state_type.py | 40 + test/test_search_results.py | 2 +- test/test_server_version.py | 2 +- test/test_state_type.py | 2 +- test/test_status.py | 2 +- test/test_status_state.py | 2 +- test/test_stop_watch.py | 40 + test/test_submit_pull_review_options.py | 40 + test/test_tag.py | 2 +- test/test_team.py | 2 +- test/test_time_stamp.py | 2 +- test/test_topic_name.py | 2 +- test/test_topic_response.py | 2 +- test/test_tracked_time.py | 2 +- test/test_transfer_repo_option.py | 40 + test/test_update_file_options.py | 2 +- test/test_user.py | 2 +- test/test_user_api.py | 2 +- test/test_user_heatmap_data.py | 2 +- test/test_watch_info.py | 2 +- 398 files changed, 20578 insertions(+), 3210 deletions(-) create mode 100644 docs/BranchProtection.md create mode 100644 docs/CommitDateOptions.md create mode 100644 docs/CreateBranchProtectionOption.md create mode 100644 docs/CreateHookOptionConfig.md create mode 100644 docs/CreateOAuth2ApplicationOptions.md create mode 100644 docs/CreatePullReviewComment.md create mode 100644 docs/CreatePullReviewOptions.md create mode 100644 docs/EditBranchProtectionOption.md create mode 100644 docs/EditReactionOption.md create mode 100644 docs/NotificationApi.md create mode 100644 docs/NotificationCount.md create mode 100644 docs/NotificationSubject.md create mode 100644 docs/NotificationThread.md create mode 100644 docs/OAuth2Application.md create mode 100644 docs/PullReview.md create mode 100644 docs/PullReviewComment.md create mode 100644 docs/Reaction.md create mode 100644 docs/RepositoryMeta.md create mode 100644 docs/ReviewStateType.md create mode 100644 docs/StopWatch.md create mode 100644 docs/SubmitPullReviewOptions.md create mode 100644 docs/TransferRepoOption.md mode change 100755 => 100644 giteapy/__init__.py mode change 100755 => 100644 giteapy/api/__init__.py mode change 100755 => 100644 giteapy/api/admin_api.py mode change 100755 => 100644 giteapy/api/issue_api.py mode change 100755 => 100644 giteapy/api/miscellaneous_api.py create mode 100644 giteapy/api/notification_api.py mode change 100755 => 100644 giteapy/api/organization_api.py mode change 100755 => 100644 giteapy/api/repository_api.py mode change 100755 => 100644 giteapy/api/user_api.py mode change 100755 => 100644 giteapy/api_client.py mode change 100755 => 100644 giteapy/configuration.py mode change 100755 => 100644 giteapy/models/__init__.py mode change 100755 => 100644 giteapy/models/access_token.py mode change 100755 => 100644 giteapy/models/add_collaborator_option.py mode change 100755 => 100644 giteapy/models/add_time_option.py mode change 100755 => 100644 giteapy/models/annotated_tag.py mode change 100755 => 100644 giteapy/models/annotated_tag_object.py mode change 100755 => 100644 giteapy/models/api_error.py mode change 100755 => 100644 giteapy/models/attachment.py mode change 100755 => 100644 giteapy/models/branch.py create mode 100644 giteapy/models/branch_protection.py mode change 100755 => 100644 giteapy/models/comment.py mode change 100755 => 100644 giteapy/models/commit.py create mode 100644 giteapy/models/commit_date_options.py mode change 100755 => 100644 giteapy/models/commit_meta.py mode change 100755 => 100644 giteapy/models/commit_user.py mode change 100755 => 100644 giteapy/models/contents_response.py create mode 100644 giteapy/models/create_branch_protection_option.py mode change 100755 => 100644 giteapy/models/create_email_option.py mode change 100755 => 100644 giteapy/models/create_file_options.py mode change 100755 => 100644 giteapy/models/create_fork_option.py mode change 100755 => 100644 giteapy/models/create_gpg_key_option.py mode change 100755 => 100644 giteapy/models/create_hook_option.py create mode 100644 giteapy/models/create_hook_option_config.py mode change 100755 => 100644 giteapy/models/create_issue_comment_option.py mode change 100755 => 100644 giteapy/models/create_issue_option.py mode change 100755 => 100644 giteapy/models/create_key_option.py mode change 100755 => 100644 giteapy/models/create_label_option.py mode change 100755 => 100644 giteapy/models/create_milestone_option.py create mode 100644 giteapy/models/create_o_auth2_application_options.py mode change 100755 => 100644 giteapy/models/create_org_option.py mode change 100755 => 100644 giteapy/models/create_pull_request_option.py create mode 100644 giteapy/models/create_pull_review_comment.py create mode 100644 giteapy/models/create_pull_review_options.py mode change 100755 => 100644 giteapy/models/create_release_option.py mode change 100755 => 100644 giteapy/models/create_repo_option.py mode change 100755 => 100644 giteapy/models/create_status_option.py mode change 100755 => 100644 giteapy/models/create_team_option.py mode change 100755 => 100644 giteapy/models/create_user_option.py mode change 100755 => 100644 giteapy/models/delete_email_option.py mode change 100755 => 100644 giteapy/models/delete_file_options.py mode change 100755 => 100644 giteapy/models/deploy_key.py mode change 100755 => 100644 giteapy/models/edit_attachment_options.py create mode 100644 giteapy/models/edit_branch_protection_option.py mode change 100755 => 100644 giteapy/models/edit_deadline_option.py mode change 100755 => 100644 giteapy/models/edit_git_hook_option.py mode change 100755 => 100644 giteapy/models/edit_hook_option.py mode change 100755 => 100644 giteapy/models/edit_issue_comment_option.py mode change 100755 => 100644 giteapy/models/edit_issue_option.py mode change 100755 => 100644 giteapy/models/edit_label_option.py mode change 100755 => 100644 giteapy/models/edit_milestone_option.py mode change 100755 => 100644 giteapy/models/edit_org_option.py mode change 100755 => 100644 giteapy/models/edit_pull_request_option.py create mode 100644 giteapy/models/edit_reaction_option.py mode change 100755 => 100644 giteapy/models/edit_release_option.py mode change 100755 => 100644 giteapy/models/edit_repo_option.py mode change 100755 => 100644 giteapy/models/edit_team_option.py mode change 100755 => 100644 giteapy/models/edit_user_option.py mode change 100755 => 100644 giteapy/models/email.py mode change 100755 => 100644 giteapy/models/external_tracker.py mode change 100755 => 100644 giteapy/models/external_wiki.py mode change 100755 => 100644 giteapy/models/file_commit_response.py mode change 100755 => 100644 giteapy/models/file_delete_response.py mode change 100755 => 100644 giteapy/models/file_links_response.py mode change 100755 => 100644 giteapy/models/file_response.py mode change 100755 => 100644 giteapy/models/git_blob_response.py mode change 100755 => 100644 giteapy/models/git_entry.py mode change 100755 => 100644 giteapy/models/git_hook.py mode change 100755 => 100644 giteapy/models/git_object.py mode change 100755 => 100644 giteapy/models/git_tree_response.py mode change 100755 => 100644 giteapy/models/gpg_key.py mode change 100755 => 100644 giteapy/models/gpg_key_email.py mode change 100755 => 100644 giteapy/models/hook.py mode change 100755 => 100644 giteapy/models/identity.py mode change 100755 => 100644 giteapy/models/inline_response200.py mode change 100755 => 100644 giteapy/models/inline_response2001.py mode change 100755 => 100644 giteapy/models/internal_tracker.py mode change 100755 => 100644 giteapy/models/issue.py mode change 100755 => 100644 giteapy/models/issue_deadline.py mode change 100755 => 100644 giteapy/models/issue_labels_option.py mode change 100755 => 100644 giteapy/models/label.py mode change 100755 => 100644 giteapy/models/markdown_option.py mode change 100755 => 100644 giteapy/models/merge_pull_request_option.py mode change 100755 => 100644 giteapy/models/migrate_repo_form.py mode change 100755 => 100644 giteapy/models/milestone.py create mode 100644 giteapy/models/notification_count.py create mode 100644 giteapy/models/notification_subject.py create mode 100644 giteapy/models/notification_thread.py create mode 100644 giteapy/models/o_auth2_application.py mode change 100755 => 100644 giteapy/models/organization.py mode change 100755 => 100644 giteapy/models/payload_commit.py mode change 100755 => 100644 giteapy/models/payload_commit_verification.py mode change 100755 => 100644 giteapy/models/payload_user.py mode change 100755 => 100644 giteapy/models/permission.py mode change 100755 => 100644 giteapy/models/pr_branch_info.py mode change 100755 => 100644 giteapy/models/public_key.py mode change 100755 => 100644 giteapy/models/pull_request.py mode change 100755 => 100644 giteapy/models/pull_request_meta.py create mode 100644 giteapy/models/pull_review.py create mode 100644 giteapy/models/pull_review_comment.py create mode 100644 giteapy/models/reaction.py mode change 100755 => 100644 giteapy/models/reference.py mode change 100755 => 100644 giteapy/models/release.py mode change 100755 => 100644 giteapy/models/repo_commit.py mode change 100755 => 100644 giteapy/models/repo_topic_options.py mode change 100755 => 100644 giteapy/models/repository.py create mode 100644 giteapy/models/repository_meta.py create mode 100644 giteapy/models/review_state_type.py mode change 100755 => 100644 giteapy/models/search_results.py mode change 100755 => 100644 giteapy/models/server_version.py mode change 100755 => 100644 giteapy/models/state_type.py mode change 100755 => 100644 giteapy/models/status.py mode change 100755 => 100644 giteapy/models/status_state.py create mode 100644 giteapy/models/stop_watch.py create mode 100644 giteapy/models/submit_pull_review_options.py mode change 100755 => 100644 giteapy/models/tag.py mode change 100755 => 100644 giteapy/models/team.py mode change 100755 => 100644 giteapy/models/time_stamp.py mode change 100755 => 100644 giteapy/models/topic_name.py mode change 100755 => 100644 giteapy/models/topic_response.py mode change 100755 => 100644 giteapy/models/tracked_time.py create mode 100644 giteapy/models/transfer_repo_option.py mode change 100755 => 100644 giteapy/models/update_file_options.py mode change 100755 => 100644 giteapy/models/user.py mode change 100755 => 100644 giteapy/models/user_heatmap_data.py mode change 100755 => 100644 giteapy/models/watch_info.py mode change 100755 => 100644 giteapy/rest.py create mode 100644 test/test_branch_protection.py create mode 100644 test/test_commit_date_options.py create mode 100644 test/test_create_branch_protection_option.py create mode 100644 test/test_create_hook_option_config.py create mode 100644 test/test_create_o_auth2_application_options.py create mode 100644 test/test_create_pull_review_comment.py create mode 100644 test/test_create_pull_review_options.py create mode 100644 test/test_edit_branch_protection_option.py create mode 100644 test/test_edit_reaction_option.py create mode 100644 test/test_notification_api.py create mode 100644 test/test_notification_count.py create mode 100644 test/test_notification_subject.py create mode 100644 test/test_notification_thread.py create mode 100644 test/test_o_auth2_application.py create mode 100644 test/test_pull_review.py create mode 100644 test/test_pull_review_comment.py create mode 100644 test/test_reaction.py create mode 100644 test/test_repository_meta.py create mode 100644 test/test_review_state_type.py create mode 100644 test/test_stop_watch.py create mode 100644 test/test_submit_pull_review_options.py create mode 100644 test/test_transfer_repo_option.py diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION index 752a79e..9c84656 100755 --- a/.swagger-codegen/VERSION +++ b/.swagger-codegen/VERSION @@ -1 +1 @@ -2.4.8 \ No newline at end of file +2.4.13 \ No newline at end of file diff --git a/README.md b/README.md index 5bd58bf..aac7cee 100755 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- *AdminApi* | [**admin_create_org**](docs/AdminApi.md#admin_create_org) | **POST** /admin/users/{username}/orgs | Create an organization *AdminApi* | [**admin_create_public_key**](docs/AdminApi.md#admin_create_public_key) | **POST** /admin/users/{username}/keys | Add a public key on behalf of a user -*AdminApi* | [**admin_create_repo**](docs/AdminApi.md#admin_create_repo) | **POST** /admin/users/{username}/repos | Create a repository on behalf a user +*AdminApi* | [**admin_create_repo**](docs/AdminApi.md#admin_create_repo) | **POST** /admin/users/{username}/repos | Create a repository on behalf of a user *AdminApi* | [**admin_create_user**](docs/AdminApi.md#admin_create_user) | **POST** /admin/users | Create a user *AdminApi* | [**admin_delete_user**](docs/AdminApi.md#admin_delete_user) | **DELETE** /admin/users/{username} | Delete a user *AdminApi* | [**admin_delete_user_public_key**](docs/AdminApi.md#admin_delete_user_public_key) | **DELETE** /admin/users/{username}/keys/{id} | Delete a user's public key @@ -111,7 +111,9 @@ Class | Method | HTTP request | Description *AdminApi* | [**admin_get_all_orgs**](docs/AdminApi.md#admin_get_all_orgs) | **GET** /admin/orgs | List all organizations *AdminApi* | [**admin_get_all_users**](docs/AdminApi.md#admin_get_all_users) | **GET** /admin/users | List all users *IssueApi* | [**issue_add_label**](docs/IssueApi.md#issue_add_label) | **POST** /repos/{owner}/{repo}/issues/{index}/labels | Add a label to an issue -*IssueApi* | [**issue_add_time**](docs/IssueApi.md#issue_add_time) | **POST** /repos/{owner}/{repo}/issues/{id}/times | Add a tracked time to a issue +*IssueApi* | [**issue_add_subscription**](docs/IssueApi.md#issue_add_subscription) | **PUT** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Subscribe user to issue +*IssueApi* | [**issue_add_time**](docs/IssueApi.md#issue_add_time) | **POST** /repos/{owner}/{repo}/issues/{index}/times | Add tracked time to a issue +*IssueApi* | [**issue_check_subscription**](docs/IssueApi.md#issue_check_subscription) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions/check | Check if user is subscribed to an issue *IssueApi* | [**issue_clear_labels**](docs/IssueApi.md#issue_clear_labels) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels | Remove all labels from an issue *IssueApi* | [**issue_create_comment**](docs/IssueApi.md#issue_create_comment) | **POST** /repos/{owner}/{repo}/issues/{index}/comments | Add a comment to an issue *IssueApi* | [**issue_create_issue**](docs/IssueApi.md#issue_create_issue) | **POST** /repos/{owner}/{repo}/issues | Create an issue. If using deadline only the date will be taken into account, and time of day ignored. @@ -119,16 +121,24 @@ Class | Method | HTTP request | Description *IssueApi* | [**issue_create_milestone**](docs/IssueApi.md#issue_create_milestone) | **POST** /repos/{owner}/{repo}/milestones | Create a milestone *IssueApi* | [**issue_delete_comment**](docs/IssueApi.md#issue_delete_comment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id} | Delete a comment *IssueApi* | [**issue_delete_comment_deprecated**](docs/IssueApi.md#issue_delete_comment_deprecated) | **DELETE** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Delete a comment +*IssueApi* | [**issue_delete_comment_reaction**](docs/IssueApi.md#issue_delete_comment_reaction) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Remove a reaction from a comment of an issue +*IssueApi* | [**issue_delete_issue_reaction**](docs/IssueApi.md#issue_delete_issue_reaction) | **DELETE** /repos/{owner}/{repo}/issues/{index}/reactions | Remove a reaction from an issue *IssueApi* | [**issue_delete_label**](docs/IssueApi.md#issue_delete_label) | **DELETE** /repos/{owner}/{repo}/labels/{id} | Delete a label *IssueApi* | [**issue_delete_milestone**](docs/IssueApi.md#issue_delete_milestone) | **DELETE** /repos/{owner}/{repo}/milestones/{id} | Delete a milestone +*IssueApi* | [**issue_delete_stop_watch**](docs/IssueApi.md#issue_delete_stop_watch) | **DELETE** /repos/{owner}/{repo}/issues/{index}/stopwatch/delete | Delete an issue's existing stopwatch. +*IssueApi* | [**issue_delete_subscription**](docs/IssueApi.md#issue_delete_subscription) | **DELETE** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Unsubscribe user from issue +*IssueApi* | [**issue_delete_time**](docs/IssueApi.md#issue_delete_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times/{id} | Delete specific tracked time *IssueApi* | [**issue_edit_comment**](docs/IssueApi.md#issue_edit_comment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id} | Edit a comment *IssueApi* | [**issue_edit_comment_deprecated**](docs/IssueApi.md#issue_edit_comment_deprecated) | **PATCH** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Edit a comment *IssueApi* | [**issue_edit_issue**](docs/IssueApi.md#issue_edit_issue) | **PATCH** /repos/{owner}/{repo}/issues/{index} | Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. *IssueApi* | [**issue_edit_issue_deadline**](docs/IssueApi.md#issue_edit_issue_deadline) | **POST** /repos/{owner}/{repo}/issues/{index}/deadline | Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. *IssueApi* | [**issue_edit_label**](docs/IssueApi.md#issue_edit_label) | **PATCH** /repos/{owner}/{repo}/labels/{id} | Update a label *IssueApi* | [**issue_edit_milestone**](docs/IssueApi.md#issue_edit_milestone) | **PATCH** /repos/{owner}/{repo}/milestones/{id} | Update a milestone +*IssueApi* | [**issue_get_comment**](docs/IssueApi.md#issue_get_comment) | **GET** /repos/{owner}/{repo}/issues/comments/{id} | Get a comment +*IssueApi* | [**issue_get_comment_reactions**](docs/IssueApi.md#issue_get_comment_reactions) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Get a list of reactions from a comment of an issue *IssueApi* | [**issue_get_comments**](docs/IssueApi.md#issue_get_comments) | **GET** /repos/{owner}/{repo}/issues/{index}/comments | List all comments on an issue *IssueApi* | [**issue_get_issue**](docs/IssueApi.md#issue_get_issue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get an issue +*IssueApi* | [**issue_get_issue_reactions**](docs/IssueApi.md#issue_get_issue_reactions) | **GET** /repos/{owner}/{repo}/issues/{index}/reactions | Get a list reactions of an issue *IssueApi* | [**issue_get_label**](docs/IssueApi.md#issue_get_label) | **GET** /repos/{owner}/{repo}/labels/{id} | Get a single label *IssueApi* | [**issue_get_labels**](docs/IssueApi.md#issue_get_labels) | **GET** /repos/{owner}/{repo}/issues/{index}/labels | Get an issue's labels *IssueApi* | [**issue_get_milestone**](docs/IssueApi.md#issue_get_milestone) | **GET** /repos/{owner}/{repo}/milestones/{id} | Get a milestone @@ -136,36 +146,55 @@ Class | Method | HTTP request | Description *IssueApi* | [**issue_get_repo_comments**](docs/IssueApi.md#issue_get_repo_comments) | **GET** /repos/{owner}/{repo}/issues/comments | List all comments in a repository *IssueApi* | [**issue_list_issues**](docs/IssueApi.md#issue_list_issues) | **GET** /repos/{owner}/{repo}/issues | List a repository's issues *IssueApi* | [**issue_list_labels**](docs/IssueApi.md#issue_list_labels) | **GET** /repos/{owner}/{repo}/labels | Get all of a repository's labels +*IssueApi* | [**issue_post_comment_reaction**](docs/IssueApi.md#issue_post_comment_reaction) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Add a reaction to a comment of an issue +*IssueApi* | [**issue_post_issue_reaction**](docs/IssueApi.md#issue_post_issue_reaction) | **POST** /repos/{owner}/{repo}/issues/{index}/reactions | Add a reaction to an issue *IssueApi* | [**issue_remove_label**](docs/IssueApi.md#issue_remove_label) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels/{id} | Remove a label from an issue *IssueApi* | [**issue_replace_labels**](docs/IssueApi.md#issue_replace_labels) | **PUT** /repos/{owner}/{repo}/issues/{index}/labels | Replace an issue's labels +*IssueApi* | [**issue_reset_time**](docs/IssueApi.md#issue_reset_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times | Reset a tracked time of an issue +*IssueApi* | [**issue_search_issues**](docs/IssueApi.md#issue_search_issues) | **GET** /repos/issues/search | Search for issues across the repositories that the user has access to *IssueApi* | [**issue_start_stop_watch**](docs/IssueApi.md#issue_start_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/start | Start stopwatch on an issue. -*IssueApi* | [**issue_stop_watch**](docs/IssueApi.md#issue_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch. -*IssueApi* | [**issue_tracked_times**](docs/IssueApi.md#issue_tracked_times) | **GET** /repos/{owner}/{repo}/issues/{id}/times | List an issue's tracked times +*IssueApi* | [**issue_stop_stop_watch**](docs/IssueApi.md#issue_stop_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch. +*IssueApi* | [**issue_subscriptions**](docs/IssueApi.md#issue_subscriptions) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions | Get users who subscribed on an issue. +*IssueApi* | [**issue_tracked_times**](docs/IssueApi.md#issue_tracked_times) | **GET** /repos/{owner}/{repo}/issues/{index}/times | List an issue's tracked times *MiscellaneousApi* | [**get_signing_key**](docs/MiscellaneousApi.md#get_signing_key) | **GET** /signing-key.gpg | Get default signing-key.gpg *MiscellaneousApi* | [**get_version**](docs/MiscellaneousApi.md#get_version) | **GET** /version | Returns the version of the Gitea application *MiscellaneousApi* | [**render_markdown**](docs/MiscellaneousApi.md#render_markdown) | **POST** /markdown | Render a markdown document as HTML *MiscellaneousApi* | [**render_markdown_raw**](docs/MiscellaneousApi.md#render_markdown_raw) | **POST** /markdown/raw | Render raw markdown as HTML -*OrganizationApi* | [**create_org_repo**](docs/OrganizationApi.md#create_org_repo) | **POST** /org/{org}/repos | Create a repository in an organization +*NotificationApi* | [**notify_get_list**](docs/NotificationApi.md#notify_get_list) | **GET** /notifications | List users's notification threads +*NotificationApi* | [**notify_get_repo_list**](docs/NotificationApi.md#notify_get_repo_list) | **GET** /repos/{owner}/{repo}/notifications | List users's notification threads on a specific repo +*NotificationApi* | [**notify_get_thread**](docs/NotificationApi.md#notify_get_thread) | **GET** /notifications/threads/{id} | Get notification thread by ID +*NotificationApi* | [**notify_new_available**](docs/NotificationApi.md#notify_new_available) | **GET** /notifications/new | Check if unread notifications exist +*NotificationApi* | [**notify_read_list**](docs/NotificationApi.md#notify_read_list) | **PUT** /notifications | Mark notification threads as read +*NotificationApi* | [**notify_read_repo_list**](docs/NotificationApi.md#notify_read_repo_list) | **PUT** /repos/{owner}/{repo}/notifications | Mark notification threads as read on a specific repo +*NotificationApi* | [**notify_read_thread**](docs/NotificationApi.md#notify_read_thread) | **PATCH** /notifications/threads/{id} | Mark notification thread as read by ID +*OrganizationApi* | [**create_org_repo**](docs/OrganizationApi.md#create_org_repo) | **POST** /orgs/{org}/repos | Create a repository in an organization +*OrganizationApi* | [**create_org_repo_deprecated**](docs/OrganizationApi.md#create_org_repo_deprecated) | **POST** /org/{org}/repos | Create a repository in an organization *OrganizationApi* | [**org_add_team_member**](docs/OrganizationApi.md#org_add_team_member) | **PUT** /teams/{id}/members/{username} | Add a team member *OrganizationApi* | [**org_add_team_repository**](docs/OrganizationApi.md#org_add_team_repository) | **PUT** /teams/{id}/repos/{org}/{repo} | Add a repository to a team *OrganizationApi* | [**org_conceal_member**](docs/OrganizationApi.md#org_conceal_member) | **DELETE** /orgs/{org}/public_members/{username} | Conceal a user's membership *OrganizationApi* | [**org_create**](docs/OrganizationApi.md#org_create) | **POST** /orgs | Create an organization *OrganizationApi* | [**org_create_hook**](docs/OrganizationApi.md#org_create_hook) | **POST** /orgs/{org}/hooks/ | Create a hook +*OrganizationApi* | [**org_create_label**](docs/OrganizationApi.md#org_create_label) | **POST** /orgs/{org}/labels | Create a label for an organization *OrganizationApi* | [**org_create_team**](docs/OrganizationApi.md#org_create_team) | **POST** /orgs/{org}/teams | Create a team *OrganizationApi* | [**org_delete**](docs/OrganizationApi.md#org_delete) | **DELETE** /orgs/{org} | Delete an organization *OrganizationApi* | [**org_delete_hook**](docs/OrganizationApi.md#org_delete_hook) | **DELETE** /orgs/{org}/hooks/{id} | Delete a hook +*OrganizationApi* | [**org_delete_label**](docs/OrganizationApi.md#org_delete_label) | **DELETE** /orgs/{org}/labels/{id} | Delete a label *OrganizationApi* | [**org_delete_member**](docs/OrganizationApi.md#org_delete_member) | **DELETE** /orgs/{org}/members/{username} | Remove a member from an organization *OrganizationApi* | [**org_delete_team**](docs/OrganizationApi.md#org_delete_team) | **DELETE** /teams/{id} | Delete a team *OrganizationApi* | [**org_edit**](docs/OrganizationApi.md#org_edit) | **PATCH** /orgs/{org} | Edit an organization *OrganizationApi* | [**org_edit_hook**](docs/OrganizationApi.md#org_edit_hook) | **PATCH** /orgs/{org}/hooks/{id} | Update a hook +*OrganizationApi* | [**org_edit_label**](docs/OrganizationApi.md#org_edit_label) | **PATCH** /orgs/{org}/labels/{id} | Update a label *OrganizationApi* | [**org_edit_team**](docs/OrganizationApi.md#org_edit_team) | **PATCH** /teams/{id} | Edit a team *OrganizationApi* | [**org_get**](docs/OrganizationApi.md#org_get) | **GET** /orgs/{org} | Get an organization +*OrganizationApi* | [**org_get_all**](docs/OrganizationApi.md#org_get_all) | **GET** /orgs | Get list of organizations *OrganizationApi* | [**org_get_hook**](docs/OrganizationApi.md#org_get_hook) | **GET** /orgs/{org}/hooks/{id} | Get a hook +*OrganizationApi* | [**org_get_label**](docs/OrganizationApi.md#org_get_label) | **GET** /orgs/{org}/labels/{id} | Get a single label *OrganizationApi* | [**org_get_team**](docs/OrganizationApi.md#org_get_team) | **GET** /teams/{id} | Get a team *OrganizationApi* | [**org_is_member**](docs/OrganizationApi.md#org_is_member) | **GET** /orgs/{org}/members/{username} | Check if a user is a member of an organization *OrganizationApi* | [**org_is_public_member**](docs/OrganizationApi.md#org_is_public_member) | **GET** /orgs/{org}/public_members/{username} | Check if a user is a public member of an organization *OrganizationApi* | [**org_list_current_user_orgs**](docs/OrganizationApi.md#org_list_current_user_orgs) | **GET** /user/orgs | List the current user's organizations *OrganizationApi* | [**org_list_hooks**](docs/OrganizationApi.md#org_list_hooks) | **GET** /orgs/{org}/hooks | List an organization's webhooks +*OrganizationApi* | [**org_list_labels**](docs/OrganizationApi.md#org_list_labels) | **GET** /orgs/{org}/labels | List an organization's labels *OrganizationApi* | [**org_list_members**](docs/OrganizationApi.md#org_list_members) | **GET** /orgs/{org}/members | List an organization's members *OrganizationApi* | [**org_list_public_members**](docs/OrganizationApi.md#org_list_public_members) | **GET** /orgs/{org}/public_members | List an organization's public members *OrganizationApi* | [**org_list_repos**](docs/OrganizationApi.md#org_list_repos) | **GET** /orgs/{org}/repos | List an organization's repos @@ -187,32 +216,39 @@ Class | Method | HTTP request | Description *RepositoryApi* | [**repo_add_collaborator**](docs/RepositoryApi.md#repo_add_collaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add a collaborator to a repository *RepositoryApi* | [**repo_add_topc**](docs/RepositoryApi.md#repo_add_topc) | **PUT** /repos/{owner}/{repo}/topics/{topic} | Add a topic to a repository *RepositoryApi* | [**repo_check_collaborator**](docs/RepositoryApi.md#repo_check_collaborator) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator} | Check if a user is a collaborator of a repository +*RepositoryApi* | [**repo_create_branch_protection**](docs/RepositoryApi.md#repo_create_branch_protection) | **POST** /repos/{owner}/{repo}/branch_protections | Create a branch protections for a repository *RepositoryApi* | [**repo_create_file**](docs/RepositoryApi.md#repo_create_file) | **POST** /repos/{owner}/{repo}/contents/{filepath} | Create a file in a repository *RepositoryApi* | [**repo_create_hook**](docs/RepositoryApi.md#repo_create_hook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook *RepositoryApi* | [**repo_create_key**](docs/RepositoryApi.md#repo_create_key) | **POST** /repos/{owner}/{repo}/keys | Add a key to a repository *RepositoryApi* | [**repo_create_pull_request**](docs/RepositoryApi.md#repo_create_pull_request) | **POST** /repos/{owner}/{repo}/pulls | Create a pull request +*RepositoryApi* | [**repo_create_pull_review**](docs/RepositoryApi.md#repo_create_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews | Create a review to an pull request *RepositoryApi* | [**repo_create_release**](docs/RepositoryApi.md#repo_create_release) | **POST** /repos/{owner}/{repo}/releases | Create a release *RepositoryApi* | [**repo_create_release_attachment**](docs/RepositoryApi.md#repo_create_release_attachment) | **POST** /repos/{owner}/{repo}/releases/{id}/assets | Create a release attachment *RepositoryApi* | [**repo_create_status**](docs/RepositoryApi.md#repo_create_status) | **POST** /repos/{owner}/{repo}/statuses/{sha} | Create a commit status *RepositoryApi* | [**repo_delete**](docs/RepositoryApi.md#repo_delete) | **DELETE** /repos/{owner}/{repo} | Delete a repository +*RepositoryApi* | [**repo_delete_branch**](docs/RepositoryApi.md#repo_delete_branch) | **DELETE** /repos/{owner}/{repo}/branches/{branch} | Delete a specific branch from a repository +*RepositoryApi* | [**repo_delete_branch_protection**](docs/RepositoryApi.md#repo_delete_branch_protection) | **DELETE** /repos/{owner}/{repo}/branch_protections/{name} | Delete a specific branch protection for the repository *RepositoryApi* | [**repo_delete_collaborator**](docs/RepositoryApi.md#repo_delete_collaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete a collaborator from a repository *RepositoryApi* | [**repo_delete_file**](docs/RepositoryApi.md#repo_delete_file) | **DELETE** /repos/{owner}/{repo}/contents/{filepath} | Delete a file in a repository *RepositoryApi* | [**repo_delete_git_hook**](docs/RepositoryApi.md#repo_delete_git_hook) | **DELETE** /repos/{owner}/{repo}/hooks/git/{id} | Delete a Git hook in a repository *RepositoryApi* | [**repo_delete_hook**](docs/RepositoryApi.md#repo_delete_hook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook in a repository *RepositoryApi* | [**repo_delete_key**](docs/RepositoryApi.md#repo_delete_key) | **DELETE** /repos/{owner}/{repo}/keys/{id} | Delete a key from a repository +*RepositoryApi* | [**repo_delete_pull_review**](docs/RepositoryApi.md#repo_delete_pull_review) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Delete a specific review from a pull request *RepositoryApi* | [**repo_delete_release**](docs/RepositoryApi.md#repo_delete_release) | **DELETE** /repos/{owner}/{repo}/releases/{id} | Delete a release *RepositoryApi* | [**repo_delete_release_attachment**](docs/RepositoryApi.md#repo_delete_release_attachment) | **DELETE** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Delete a release attachment *RepositoryApi* | [**repo_delete_topic**](docs/RepositoryApi.md#repo_delete_topic) | **DELETE** /repos/{owner}/{repo}/topics/{topic} | Delete a topic from a repository *RepositoryApi* | [**repo_edit**](docs/RepositoryApi.md#repo_edit) | **PATCH** /repos/{owner}/{repo} | Edit a repository's properties. Only fields that are set will be changed. +*RepositoryApi* | [**repo_edit_branch_protection**](docs/RepositoryApi.md#repo_edit_branch_protection) | **PATCH** /repos/{owner}/{repo}/branch_protections/{name} | Edit a branch protections for a repository. Only fields that are set will be changed *RepositoryApi* | [**repo_edit_git_hook**](docs/RepositoryApi.md#repo_edit_git_hook) | **PATCH** /repos/{owner}/{repo}/hooks/git/{id} | Edit a Git hook in a repository *RepositoryApi* | [**repo_edit_hook**](docs/RepositoryApi.md#repo_edit_hook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook in a repository -*RepositoryApi* | [**repo_edit_pull_request**](docs/RepositoryApi.md#repo_edit_pull_request) | **PATCH** /repos/{owner}/{repo}/pulls/{index} | Update a pull request +*RepositoryApi* | [**repo_edit_pull_request**](docs/RepositoryApi.md#repo_edit_pull_request) | **PATCH** /repos/{owner}/{repo}/pulls/{index} | Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. *RepositoryApi* | [**repo_edit_release**](docs/RepositoryApi.md#repo_edit_release) | **PATCH** /repos/{owner}/{repo}/releases/{id} | Update a release *RepositoryApi* | [**repo_edit_release_attachment**](docs/RepositoryApi.md#repo_edit_release_attachment) | **PATCH** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Edit a release attachment *RepositoryApi* | [**repo_get**](docs/RepositoryApi.md#repo_get) | **GET** /repos/{owner}/{repo} | Get a repository *RepositoryApi* | [**repo_get_all_commits**](docs/RepositoryApi.md#repo_get_all_commits) | **GET** /repos/{owner}/{repo}/commits | Get a list of all commits from a repository *RepositoryApi* | [**repo_get_archive**](docs/RepositoryApi.md#repo_get_archive) | **GET** /repos/{owner}/{repo}/archive/{archive} | Get an archive of a repository -*RepositoryApi* | [**repo_get_branch**](docs/RepositoryApi.md#repo_get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Retrieve a specific branch from a repository +*RepositoryApi* | [**repo_get_branch**](docs/RepositoryApi.md#repo_get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Retrieve a specific branch from a repository, including its effective branch protection +*RepositoryApi* | [**repo_get_branch_protection**](docs/RepositoryApi.md#repo_get_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections/{name} | Get a specific branch protection for the repository *RepositoryApi* | [**repo_get_by_id**](docs/RepositoryApi.md#repo_get_by_id) | **GET** /repositories/{id} | Get a repository by id *RepositoryApi* | [**repo_get_combined_status_by_ref**](docs/RepositoryApi.md#repo_get_combined_status_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/statuses | Get a commit's combined status, by branch/tag/commit reference *RepositoryApi* | [**repo_get_contents**](docs/RepositoryApi.md#repo_get_contents) | **GET** /repos/{owner}/{repo}/contents/{filepath} | Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir @@ -222,11 +258,15 @@ Class | Method | HTTP request | Description *RepositoryApi* | [**repo_get_hook**](docs/RepositoryApi.md#repo_get_hook) | **GET** /repos/{owner}/{repo}/hooks/{id} | Get a hook *RepositoryApi* | [**repo_get_key**](docs/RepositoryApi.md#repo_get_key) | **GET** /repos/{owner}/{repo}/keys/{id} | Get a repository's key by id *RepositoryApi* | [**repo_get_pull_request**](docs/RepositoryApi.md#repo_get_pull_request) | **GET** /repos/{owner}/{repo}/pulls/{index} | Get a pull request +*RepositoryApi* | [**repo_get_pull_review**](docs/RepositoryApi.md#repo_get_pull_review) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Get a specific review for a pull request +*RepositoryApi* | [**repo_get_pull_review_comments**](docs/RepositoryApi.md#repo_get_pull_review_comments) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments | Get a specific review for a pull request *RepositoryApi* | [**repo_get_raw_file**](docs/RepositoryApi.md#repo_get_raw_file) | **GET** /repos/{owner}/{repo}/raw/{filepath} | Get a file from a repository *RepositoryApi* | [**repo_get_release**](docs/RepositoryApi.md#repo_get_release) | **GET** /repos/{owner}/{repo}/releases/{id} | Get a release *RepositoryApi* | [**repo_get_release_attachment**](docs/RepositoryApi.md#repo_get_release_attachment) | **GET** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Get a release attachment -*RepositoryApi* | [**repo_get_single_commit**](docs/RepositoryApi.md#repo_get_single_commit) | **GET** /repos/{owner}/{repo}/git/commits/{sha} | Get a single commit from a repository +*RepositoryApi* | [**repo_get_single_commit_by_ref**](docs/RepositoryApi.md#repo_get_single_commit_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref} | Get a single commit from a repository +*RepositoryApi* | [**repo_get_single_commit_by_sha**](docs/RepositoryApi.md#repo_get_single_commit_by_sha) | **GET** /repos/{owner}/{repo}/git/commits/{sha} | Get a single commit from a repository *RepositoryApi* | [**repo_list_all_git_refs**](docs/RepositoryApi.md#repo_list_all_git_refs) | **GET** /repos/{owner}/{repo}/git/refs | Get specified ref or filtered repository's refs +*RepositoryApi* | [**repo_list_branch_protection**](docs/RepositoryApi.md#repo_list_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections | List branch protections for a repository *RepositoryApi* | [**repo_list_branches**](docs/RepositoryApi.md#repo_list_branches) | **GET** /repos/{owner}/{repo}/branches | List a repository's branches *RepositoryApi* | [**repo_list_collaborators**](docs/RepositoryApi.md#repo_list_collaborators) | **GET** /repos/{owner}/{repo}/collaborators | List a repository's collaborators *RepositoryApi* | [**repo_list_git_hooks**](docs/RepositoryApi.md#repo_list_git_hooks) | **GET** /repos/{owner}/{repo}/hooks/git | List the Git hooks in a repository @@ -234,6 +274,7 @@ Class | Method | HTTP request | Description *RepositoryApi* | [**repo_list_hooks**](docs/RepositoryApi.md#repo_list_hooks) | **GET** /repos/{owner}/{repo}/hooks | List the hooks in a repository *RepositoryApi* | [**repo_list_keys**](docs/RepositoryApi.md#repo_list_keys) | **GET** /repos/{owner}/{repo}/keys | List a repository's keys *RepositoryApi* | [**repo_list_pull_requests**](docs/RepositoryApi.md#repo_list_pull_requests) | **GET** /repos/{owner}/{repo}/pulls | List a repo's pull requests +*RepositoryApi* | [**repo_list_pull_reviews**](docs/RepositoryApi.md#repo_list_pull_reviews) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews | List all reviews for a pull request *RepositoryApi* | [**repo_list_release_attachments**](docs/RepositoryApi.md#repo_list_release_attachments) | **GET** /repos/{owner}/{repo}/releases/{id}/assets | List release's attachments *RepositoryApi* | [**repo_list_releases**](docs/RepositoryApi.md#repo_list_releases) | **GET** /repos/{owner}/{repo}/releases | List a repo's releases *RepositoryApi* | [**repo_list_stargazers**](docs/RepositoryApi.md#repo_list_stargazers) | **GET** /repos/{owner}/{repo}/stargazers | List a repo's stargazers @@ -247,17 +288,21 @@ Class | Method | HTTP request | Description *RepositoryApi* | [**repo_pull_request_is_merged**](docs/RepositoryApi.md#repo_pull_request_is_merged) | **GET** /repos/{owner}/{repo}/pulls/{index}/merge | Check if a pull request has been merged *RepositoryApi* | [**repo_search**](docs/RepositoryApi.md#repo_search) | **GET** /repos/search | Search for repositories *RepositoryApi* | [**repo_signing_key**](docs/RepositoryApi.md#repo_signing_key) | **GET** /repos/{owner}/{repo}/signing-key.gpg | Get signing-key.gpg for given repository +*RepositoryApi* | [**repo_submit_pull_review**](docs/RepositoryApi.md#repo_submit_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Submit a pending review to an pull request *RepositoryApi* | [**repo_test_hook**](docs/RepositoryApi.md#repo_test_hook) | **POST** /repos/{owner}/{repo}/hooks/{id}/tests | Test a push webhook *RepositoryApi* | [**repo_tracked_times**](docs/RepositoryApi.md#repo_tracked_times) | **GET** /repos/{owner}/{repo}/times | List a repo's tracked times +*RepositoryApi* | [**repo_transfer**](docs/RepositoryApi.md#repo_transfer) | **POST** /repos/{owner}/{repo}/transfer | Transfer a repo ownership *RepositoryApi* | [**repo_update_file**](docs/RepositoryApi.md#repo_update_file) | **PUT** /repos/{owner}/{repo}/contents/{filepath} | Update a file in a repository *RepositoryApi* | [**repo_update_topics**](docs/RepositoryApi.md#repo_update_topics) | **PUT** /repos/{owner}/{repo}/topics | Replace list of topics for a repository *RepositoryApi* | [**topic_search**](docs/RepositoryApi.md#topic_search) | **GET** /topics/search | search topics via keyword *RepositoryApi* | [**user_current_check_subscription**](docs/RepositoryApi.md#user_current_check_subscription) | **GET** /repos/{owner}/{repo}/subscription | Check if the current user is watching a repo *RepositoryApi* | [**user_current_delete_subscription**](docs/RepositoryApi.md#user_current_delete_subscription) | **DELETE** /repos/{owner}/{repo}/subscription | Unwatch a repo *RepositoryApi* | [**user_current_put_subscription**](docs/RepositoryApi.md#user_current_put_subscription) | **PUT** /repos/{owner}/{repo}/subscription | Watch a repo +*RepositoryApi* | [**user_tracked_times**](docs/RepositoryApi.md#user_tracked_times) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo *UserApi* | [**create_current_user_repo**](docs/UserApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository *UserApi* | [**user_add_email**](docs/UserApi.md#user_add_email) | **POST** /user/emails | Add email addresses *UserApi* | [**user_check_following**](docs/UserApi.md#user_check_following) | **GET** /users/{follower}/following/{followee} | Check if one user is following another user +*UserApi* | [**user_create_o_auth2_application**](docs/UserApi.md#user_create_o_auth2_application) | **POST** /user/applications/oauth2 | creates a new OAuth2 application *UserApi* | [**user_create_token**](docs/UserApi.md#user_create_token) | **POST** /users/{username}/tokens | Create an access token *UserApi* | [**user_current_check_following**](docs/UserApi.md#user_current_check_following) | **GET** /user/following/{username} | Check whether a user is followed by the authenticated user *UserApi* | [**user_current_check_starring**](docs/UserApi.md#user_current_check_starring) | **GET** /user/starred/{owner}/{repo} | Whether the authenticated is starring the repo @@ -281,9 +326,13 @@ Class | Method | HTTP request | Description *UserApi* | [**user_current_tracked_times**](docs/UserApi.md#user_current_tracked_times) | **GET** /user/times | List the current user's tracked times *UserApi* | [**user_delete_access_token**](docs/UserApi.md#user_delete_access_token) | **DELETE** /users/{username}/tokens/{token} | delete an access token *UserApi* | [**user_delete_email**](docs/UserApi.md#user_delete_email) | **DELETE** /user/emails | Delete email addresses +*UserApi* | [**user_delete_o_auth2_application**](docs/UserApi.md#user_delete_o_auth2_application) | **DELETE** /user/applications/oauth2/{id} | delete an OAuth2 Application *UserApi* | [**user_get**](docs/UserApi.md#user_get) | **GET** /users/{username} | Get a user *UserApi* | [**user_get_current**](docs/UserApi.md#user_get_current) | **GET** /user | Get the authenticated user *UserApi* | [**user_get_heatmap_data**](docs/UserApi.md#user_get_heatmap_data) | **GET** /users/{username}/heatmap | Get a user's heatmap +*UserApi* | [**user_get_o_auth2_application**](docs/UserApi.md#user_get_o_auth2_application) | **GET** /user/applications/oauth2/{id} | get an OAuth2 Application +*UserApi* | [**user_get_oauth2_application**](docs/UserApi.md#user_get_oauth2_application) | **GET** /user/applications/oauth2 | List the authenticated user's oauth2 applications +*UserApi* | [**user_get_stop_watches**](docs/UserApi.md#user_get_stop_watches) | **GET** /user/stopwatches | Get list of all existing stopwatches *UserApi* | [**user_get_tokens**](docs/UserApi.md#user_get_tokens) | **GET** /users/{username}/tokens | List the authenticated user's access tokens *UserApi* | [**user_list_emails**](docs/UserApi.md#user_list_emails) | **GET** /user/emails | List the authenticated user's email addresses *UserApi* | [**user_list_followers**](docs/UserApi.md#user_list_followers) | **GET** /users/{username}/followers | List the given user's followers @@ -295,7 +344,7 @@ Class | Method | HTTP request | Description *UserApi* | [**user_list_subscriptions**](docs/UserApi.md#user_list_subscriptions) | **GET** /users/{username}/subscriptions | List the repositories watched by a user *UserApi* | [**user_list_teams**](docs/UserApi.md#user_list_teams) | **GET** /user/teams | List all the teams a user belongs to *UserApi* | [**user_search**](docs/UserApi.md#user_search) | **GET** /users/search | Search for users -*UserApi* | [**user_tracked_times**](docs/UserApi.md#user_tracked_times) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo +*UserApi* | [**user_update_o_auth2_application**](docs/UserApi.md#user_update_o_auth2_application) | **PATCH** /user/applications/oauth2/{id} | update an OAuth2 Application, this includes regenerating the client secret ## Documentation For Models @@ -308,23 +357,30 @@ Class | Method | HTTP request | Description - [AnnotatedTagObject](docs/AnnotatedTagObject.md) - [Attachment](docs/Attachment.md) - [Branch](docs/Branch.md) + - [BranchProtection](docs/BranchProtection.md) - [Comment](docs/Comment.md) - [Commit](docs/Commit.md) + - [CommitDateOptions](docs/CommitDateOptions.md) - [CommitMeta](docs/CommitMeta.md) - [CommitUser](docs/CommitUser.md) - [ContentsResponse](docs/ContentsResponse.md) + - [CreateBranchProtectionOption](docs/CreateBranchProtectionOption.md) - [CreateEmailOption](docs/CreateEmailOption.md) - [CreateFileOptions](docs/CreateFileOptions.md) - [CreateForkOption](docs/CreateForkOption.md) - [CreateGPGKeyOption](docs/CreateGPGKeyOption.md) - [CreateHookOption](docs/CreateHookOption.md) + - [CreateHookOptionConfig](docs/CreateHookOptionConfig.md) - [CreateIssueCommentOption](docs/CreateIssueCommentOption.md) - [CreateIssueOption](docs/CreateIssueOption.md) - [CreateKeyOption](docs/CreateKeyOption.md) - [CreateLabelOption](docs/CreateLabelOption.md) - [CreateMilestoneOption](docs/CreateMilestoneOption.md) + - [CreateOAuth2ApplicationOptions](docs/CreateOAuth2ApplicationOptions.md) - [CreateOrgOption](docs/CreateOrgOption.md) - [CreatePullRequestOption](docs/CreatePullRequestOption.md) + - [CreatePullReviewComment](docs/CreatePullReviewComment.md) + - [CreatePullReviewOptions](docs/CreatePullReviewOptions.md) - [CreateReleaseOption](docs/CreateReleaseOption.md) - [CreateRepoOption](docs/CreateRepoOption.md) - [CreateStatusOption](docs/CreateStatusOption.md) @@ -334,6 +390,7 @@ Class | Method | HTTP request | Description - [DeleteFileOptions](docs/DeleteFileOptions.md) - [DeployKey](docs/DeployKey.md) - [EditAttachmentOptions](docs/EditAttachmentOptions.md) + - [EditBranchProtectionOption](docs/EditBranchProtectionOption.md) - [EditDeadlineOption](docs/EditDeadlineOption.md) - [EditGitHookOption](docs/EditGitHookOption.md) - [EditHookOption](docs/EditHookOption.md) @@ -343,6 +400,7 @@ Class | Method | HTTP request | Description - [EditMilestoneOption](docs/EditMilestoneOption.md) - [EditOrgOption](docs/EditOrgOption.md) - [EditPullRequestOption](docs/EditPullRequestOption.md) + - [EditReactionOption](docs/EditReactionOption.md) - [EditReleaseOption](docs/EditReleaseOption.md) - [EditRepoOption](docs/EditRepoOption.md) - [EditTeamOption](docs/EditTeamOption.md) @@ -374,6 +432,10 @@ Class | Method | HTTP request | Description - [MergePullRequestOption](docs/MergePullRequestOption.md) - [MigrateRepoForm](docs/MigrateRepoForm.md) - [Milestone](docs/Milestone.md) + - [NotificationCount](docs/NotificationCount.md) + - [NotificationSubject](docs/NotificationSubject.md) + - [NotificationThread](docs/NotificationThread.md) + - [OAuth2Application](docs/OAuth2Application.md) - [Organization](docs/Organization.md) - [PRBranchInfo](docs/PRBranchInfo.md) - [PayloadCommit](docs/PayloadCommit.md) @@ -383,22 +445,30 @@ Class | Method | HTTP request | Description - [PublicKey](docs/PublicKey.md) - [PullRequest](docs/PullRequest.md) - [PullRequestMeta](docs/PullRequestMeta.md) + - [PullReview](docs/PullReview.md) + - [PullReviewComment](docs/PullReviewComment.md) + - [Reaction](docs/Reaction.md) - [Reference](docs/Reference.md) - [Release](docs/Release.md) - [RepoCommit](docs/RepoCommit.md) - [RepoTopicOptions](docs/RepoTopicOptions.md) - [Repository](docs/Repository.md) + - [RepositoryMeta](docs/RepositoryMeta.md) + - [ReviewStateType](docs/ReviewStateType.md) - [SearchResults](docs/SearchResults.md) - [ServerVersion](docs/ServerVersion.md) - [StateType](docs/StateType.md) - [Status](docs/Status.md) - [StatusState](docs/StatusState.md) + - [StopWatch](docs/StopWatch.md) + - [SubmitPullReviewOptions](docs/SubmitPullReviewOptions.md) - [Tag](docs/Tag.md) - [Team](docs/Team.md) - [TimeStamp](docs/TimeStamp.md) - [TopicName](docs/TopicName.md) - [TopicResponse](docs/TopicResponse.md) - [TrackedTime](docs/TrackedTime.md) + - [TransferRepoOption](docs/TransferRepoOption.md) - [UpdateFileOptions](docs/UpdateFileOptions.md) - [User](docs/User.md) - [UserHeatmapData](docs/UserHeatmapData.md) diff --git a/docs/APIError.md b/docs/APIError.md index 8f68675..9f8d507 100755 --- a/docs/APIError.md +++ b/docs/APIError.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**message** | **str** | | [optional] -**url** | **str** | | [optional] +**message** | **str** | | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AccessToken.md b/docs/AccessToken.md index 57c010b..41511ce 100755 --- a/docs/AccessToken.md +++ b/docs/AccessToken.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | | +**name** | **str** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AddCollaboratorOption.md b/docs/AddCollaboratorOption.md index c490957..3264de3 100755 --- a/docs/AddCollaboratorOption.md +++ b/docs/AddCollaboratorOption.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**permission** | **str** | | [optional] +**permission** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AddTimeOption.md b/docs/AddTimeOption.md index dc7c234..6ebdf31 100755 --- a/docs/AddTimeOption.md +++ b/docs/AddTimeOption.md @@ -3,7 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**time** | **int** | time in seconds | +**created** | **datetime** | | [optional] +**time** | **int** | time in seconds | +**user_name** | **str** | User who spent the time (optional) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AdminApi.md b/docs/AdminApi.md index 17e9a3c..00fa1e3 100755 --- a/docs/AdminApi.md +++ b/docs/AdminApi.md @@ -6,7 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**admin_create_org**](AdminApi.md#admin_create_org) | **POST** /admin/users/{username}/orgs | Create an organization [**admin_create_public_key**](AdminApi.md#admin_create_public_key) | **POST** /admin/users/{username}/keys | Add a public key on behalf of a user -[**admin_create_repo**](AdminApi.md#admin_create_repo) | **POST** /admin/users/{username}/repos | Create a repository on behalf a user +[**admin_create_repo**](AdminApi.md#admin_create_repo) | **POST** /admin/users/{username}/repos | Create a repository on behalf of a user [**admin_create_user**](AdminApi.md#admin_create_user) | **POST** /admin/users | Create a user [**admin_delete_user**](AdminApi.md#admin_delete_user) | **DELETE** /admin/users/{username} | Delete a user [**admin_delete_user_public_key**](AdminApi.md#admin_delete_user_public_key) | **DELETE** /admin/users/{username}/keys/{id} | Delete a user's public key @@ -174,7 +174,7 @@ Name | Type | Description | Notes # **admin_create_repo** > Repository admin_create_repo(username, repository) -Create a repository on behalf a user +Create a repository on behalf of a user ### Example ```python @@ -220,7 +220,7 @@ username = 'username_example' # str | username of the user. This user will own t repository = giteapy.CreateRepoOption() # CreateRepoOption | try: - # Create a repository on behalf a user + # Create a repository on behalf of a user api_response = api_instance.admin_create_repo(username, repository) pprint(api_response) except ApiException as e: @@ -634,7 +634,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **admin_get_all_users** -> list[User] admin_get_all_users() +> list[User] admin_get_all_users(page=page, limit=limit) List all users @@ -678,17 +678,23 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.AdminApi(giteapy.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List all users - api_response = api_instance.admin_get_all_users() + api_response = api_instance.admin_get_all_users(page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling AdminApi->admin_get_all_users: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type diff --git a/docs/AnnotatedTag.md b/docs/AnnotatedTag.md index e57846d..305189f 100755 --- a/docs/AnnotatedTag.md +++ b/docs/AnnotatedTag.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**message** | **str** | | [optional] -**object** | [**AnnotatedTagObject**](AnnotatedTagObject.md) | | [optional] -**sha** | **str** | | [optional] -**tag** | **str** | | [optional] -**tagger** | [**CommitUser**](CommitUser.md) | | [optional] -**url** | **str** | | [optional] -**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional] +**message** | **str** | | [optional] +**object** | [**AnnotatedTagObject**](AnnotatedTagObject.md) | | [optional] +**sha** | **str** | | [optional] +**tag** | **str** | | [optional] +**tagger** | [**CommitUser**](CommitUser.md) | | [optional] +**url** | **str** | | [optional] +**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/AnnotatedTagObject.md b/docs/AnnotatedTagObject.md index 34ae757..fb328d1 100755 --- a/docs/AnnotatedTagObject.md +++ b/docs/AnnotatedTagObject.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sha** | **str** | | [optional] -**type** | **str** | | [optional] -**url** | **str** | | [optional] +**sha** | **str** | | [optional] +**type** | **str** | | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Attachment.md b/docs/Attachment.md index d5ea21c..8957815 100755 --- a/docs/Attachment.md +++ b/docs/Attachment.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**browser_download_url** | **str** | | [optional] -**created_at** | **datetime** | | [optional] -**download_count** | **int** | | [optional] -**id** | **int** | | [optional] -**name** | **str** | | [optional] -**size** | **int** | | [optional] -**uuid** | **str** | | [optional] +**browser_download_url** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**download_count** | **int** | | [optional] +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**size** | **int** | | [optional] +**uuid** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Branch.md b/docs/Branch.md index e2add78..a73214b 100755 --- a/docs/Branch.md +++ b/docs/Branch.md @@ -3,8 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**commit** | [**PayloadCommit**](PayloadCommit.md) | | [optional] -**name** | **str** | | [optional] +**commit** | [**PayloadCommit**](PayloadCommit.md) | | [optional] +**effective_branch_protection_name** | **str** | | [optional] +**enable_status_check** | **bool** | | [optional] +**name** | **str** | | [optional] +**protected** | **bool** | | [optional] +**required_approvals** | **int** | | [optional] +**status_check_contexts** | **list[str]** | | [optional] +**user_can_merge** | **bool** | | [optional] +**user_can_push** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BranchProtection.md b/docs/BranchProtection.md new file mode 100644 index 0000000..fe5a0a0 --- /dev/null +++ b/docs/BranchProtection.md @@ -0,0 +1,31 @@ +# BranchProtection + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**approvals_whitelist_teams** | **list[str]** | | [optional] +**approvals_whitelist_username** | **list[str]** | | [optional] +**block_on_outdated_branch** | **bool** | | [optional] +**block_on_rejected_reviews** | **bool** | | [optional] +**branch_name** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**dismiss_stale_approvals** | **bool** | | [optional] +**enable_approvals_whitelist** | **bool** | | [optional] +**enable_merge_whitelist** | **bool** | | [optional] +**enable_push** | **bool** | | [optional] +**enable_push_whitelist** | **bool** | | [optional] +**enable_status_check** | **bool** | | [optional] +**merge_whitelist_teams** | **list[str]** | | [optional] +**merge_whitelist_usernames** | **list[str]** | | [optional] +**protected_file_patterns** | **str** | | [optional] +**push_whitelist_deploy_keys** | **bool** | | [optional] +**push_whitelist_teams** | **list[str]** | | [optional] +**push_whitelist_usernames** | **list[str]** | | [optional] +**require_signed_commits** | **bool** | | [optional] +**required_approvals** | **int** | | [optional] +**status_check_contexts** | **list[str]** | | [optional] +**updated_at** | **datetime** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Comment.md b/docs/Comment.md index 8c4e605..7702591 100755 --- a/docs/Comment.md +++ b/docs/Comment.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**body** | **str** | | [optional] -**created_at** | **datetime** | | [optional] -**html_url** | **str** | | [optional] -**id** | **int** | | [optional] -**issue_url** | **str** | | [optional] -**original_author** | **str** | | [optional] -**original_author_id** | **int** | | [optional] -**pull_request_url** | **str** | | [optional] -**updated_at** | **datetime** | | [optional] -**user** | [**User**](User.md) | | [optional] +**body** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**issue_url** | **str** | | [optional] +**original_author** | **str** | | [optional] +**original_author_id** | **int** | | [optional] +**pull_request_url** | **str** | | [optional] +**updated_at** | **datetime** | | [optional] +**user** | [**User**](User.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Commit.md b/docs/Commit.md index 537eda0..5697c55 100755 --- a/docs/Commit.md +++ b/docs/Commit.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**author** | [**User**](User.md) | | [optional] -**commit** | [**RepoCommit**](RepoCommit.md) | | [optional] -**committer** | [**User**](User.md) | | [optional] -**html_url** | **str** | | [optional] -**parents** | [**list[CommitMeta]**](CommitMeta.md) | | [optional] -**sha** | **str** | | [optional] -**url** | **str** | | [optional] +**author** | [**User**](User.md) | | [optional] +**commit** | [**RepoCommit**](RepoCommit.md) | | [optional] +**committer** | [**User**](User.md) | | [optional] +**html_url** | **str** | | [optional] +**parents** | [**list[CommitMeta]**](CommitMeta.md) | | [optional] +**sha** | **str** | | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CommitDateOptions.md b/docs/CommitDateOptions.md new file mode 100644 index 0000000..adc9745 --- /dev/null +++ b/docs/CommitDateOptions.md @@ -0,0 +1,11 @@ +# CommitDateOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | **datetime** | | [optional] +**committer** | **datetime** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CommitMeta.md b/docs/CommitMeta.md index 8086ce4..3cdf90c 100755 --- a/docs/CommitMeta.md +++ b/docs/CommitMeta.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sha** | **str** | | [optional] -**url** | **str** | | [optional] +**sha** | **str** | | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CommitUser.md b/docs/CommitUser.md index a5325f9..84f42d7 100755 --- a/docs/CommitUser.md +++ b/docs/CommitUser.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**_date** | **str** | | [optional] -**email** | **str** | | [optional] -**name** | **str** | | [optional] +**_date** | **str** | | [optional] +**email** | **str** | | [optional] +**name** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ContentsResponse.md b/docs/ContentsResponse.md index 9c16343..1bd12d5 100755 --- a/docs/ContentsResponse.md +++ b/docs/ContentsResponse.md @@ -3,20 +3,20 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**links** | [**FileLinksResponse**](FileLinksResponse.md) | | [optional] -**content** | **str** | `content` is populated when `type` is `file`, otherwise null | [optional] -**download_url** | **str** | | [optional] -**encoding** | **str** | `encoding` is populated when `type` is `file`, otherwise null | [optional] -**git_url** | **str** | | [optional] -**html_url** | **str** | | [optional] -**name** | **str** | | [optional] -**path** | **str** | | [optional] -**sha** | **str** | | [optional] -**size** | **int** | | [optional] -**submodule_git_url** | **str** | `submodule_git_url` is populated when `type` is `submodule`, otherwise null | [optional] -**target** | **str** | `target` is populated when `type` is `symlink`, otherwise null | [optional] -**type** | **str** | `type` will be `file`, `dir`, `symlink`, or `submodule` | [optional] -**url** | **str** | | [optional] +**links** | [**FileLinksResponse**](FileLinksResponse.md) | | [optional] +**content** | **str** | `content` is populated when `type` is `file`, otherwise null | [optional] +**download_url** | **str** | | [optional] +**encoding** | **str** | `encoding` is populated when `type` is `file`, otherwise null | [optional] +**git_url** | **str** | | [optional] +**html_url** | **str** | | [optional] +**name** | **str** | | [optional] +**path** | **str** | | [optional] +**sha** | **str** | | [optional] +**size** | **int** | | [optional] +**submodule_git_url** | **str** | `submodule_git_url` is populated when `type` is `submodule`, otherwise null | [optional] +**target** | **str** | `target` is populated when `type` is `symlink`, otherwise null | [optional] +**type** | **str** | `type` will be `file`, `dir`, `symlink`, or `submodule` | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateBranchProtectionOption.md b/docs/CreateBranchProtectionOption.md new file mode 100644 index 0000000..f17689c --- /dev/null +++ b/docs/CreateBranchProtectionOption.md @@ -0,0 +1,29 @@ +# CreateBranchProtectionOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**approvals_whitelist_teams** | **list[str]** | | [optional] +**approvals_whitelist_username** | **list[str]** | | [optional] +**block_on_outdated_branch** | **bool** | | [optional] +**block_on_rejected_reviews** | **bool** | | [optional] +**branch_name** | **str** | | [optional] +**dismiss_stale_approvals** | **bool** | | [optional] +**enable_approvals_whitelist** | **bool** | | [optional] +**enable_merge_whitelist** | **bool** | | [optional] +**enable_push** | **bool** | | [optional] +**enable_push_whitelist** | **bool** | | [optional] +**enable_status_check** | **bool** | | [optional] +**merge_whitelist_teams** | **list[str]** | | [optional] +**merge_whitelist_usernames** | **list[str]** | | [optional] +**protected_file_patterns** | **str** | | [optional] +**push_whitelist_deploy_keys** | **bool** | | [optional] +**push_whitelist_teams** | **list[str]** | | [optional] +**push_whitelist_usernames** | **list[str]** | | [optional] +**require_signed_commits** | **bool** | | [optional] +**required_approvals** | **int** | | [optional] +**status_check_contexts** | **list[str]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateEmailOption.md b/docs/CreateEmailOption.md index 9d48586..f669f70 100755 --- a/docs/CreateEmailOption.md +++ b/docs/CreateEmailOption.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**emails** | **list[str]** | email addresses to add | [optional] +**emails** | **list[str]** | email addresses to add | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateFileOptions.md b/docs/CreateFileOptions.md index 3a2125b..61e4f6a 100755 --- a/docs/CreateFileOptions.md +++ b/docs/CreateFileOptions.md @@ -3,12 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**author** | [**Identity**](Identity.md) | | [optional] -**branch** | **str** | branch (optional) to base this file from. if not given, the default branch is used | [optional] -**committer** | [**Identity**](Identity.md) | | [optional] -**content** | **str** | content must be base64 encoded | -**message** | **str** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] -**new_branch** | **str** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**author** | [**Identity**](Identity.md) | | [optional] +**branch** | **str** | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**committer** | [**Identity**](Identity.md) | | [optional] +**content** | **str** | content must be base64 encoded | +**dates** | [**CommitDateOptions**](CommitDateOptions.md) | | [optional] +**message** | **str** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] +**new_branch** | **str** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateForkOption.md b/docs/CreateForkOption.md index a7a9286..0818408 100755 --- a/docs/CreateForkOption.md +++ b/docs/CreateForkOption.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**organization** | **str** | organization name, if forking into an organization | [optional] +**organization** | **str** | organization name, if forking into an organization | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateGPGKeyOption.md b/docs/CreateGPGKeyOption.md index 2b1ce73..1157508 100755 --- a/docs/CreateGPGKeyOption.md +++ b/docs/CreateGPGKeyOption.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**armored_public_key** | **str** | An armored GPG key to add | +**armored_public_key** | **str** | An armored GPG key to add | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateHookOption.md b/docs/CreateHookOption.md index 6381205..b6f5f5f 100755 --- a/docs/CreateHookOption.md +++ b/docs/CreateHookOption.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **bool** | | [optional] [default to False] -**branch_filter** | **str** | | [optional] -**config** | **dict(str, str)** | | -**events** | **list[str]** | | [optional] -**type** | **str** | | +**branch_filter** | **str** | | [optional] +**config** | [**CreateHookOptionConfig**](CreateHookOptionConfig.md) | | +**events** | **list[str]** | | [optional] +**type** | **str** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateHookOptionConfig.md b/docs/CreateHookOptionConfig.md new file mode 100644 index 0000000..8b73bf5 --- /dev/null +++ b/docs/CreateHookOptionConfig.md @@ -0,0 +1,9 @@ +# CreateHookOptionConfig + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateIssueCommentOption.md b/docs/CreateIssueCommentOption.md index 734f961..6698488 100755 --- a/docs/CreateIssueCommentOption.md +++ b/docs/CreateIssueCommentOption.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**body** | **str** | | +**body** | **str** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateIssueOption.md b/docs/CreateIssueOption.md index 132a223..5077dfc 100755 --- a/docs/CreateIssueOption.md +++ b/docs/CreateIssueOption.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**assignee** | **str** | username of assignee | [optional] -**assignees** | **list[str]** | | [optional] -**body** | **str** | | [optional] -**closed** | **bool** | | [optional] -**due_date** | **datetime** | | [optional] -**labels** | **list[int]** | list of label ids | [optional] -**milestone** | **int** | milestone id | [optional] -**title** | **str** | | +**assignee** | **str** | username of assignee | [optional] +**assignees** | **list[str]** | | [optional] +**body** | **str** | | [optional] +**closed** | **bool** | | [optional] +**due_date** | **datetime** | | [optional] +**labels** | **list[int]** | list of label ids | [optional] +**milestone** | **int** | milestone id | [optional] +**title** | **str** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateKeyOption.md b/docs/CreateKeyOption.md index 24a05fe..fe9a1af 100755 --- a/docs/CreateKeyOption.md +++ b/docs/CreateKeyOption.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**key** | **str** | An armored SSH key to add | -**read_only** | **bool** | Describe if the key has only read access or read/write | [optional] -**title** | **str** | Title of the key to add | +**key** | **str** | An armored SSH key to add | +**read_only** | **bool** | Describe if the key has only read access or read/write | [optional] +**title** | **str** | Title of the key to add | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateLabelOption.md b/docs/CreateLabelOption.md index ca36d21..2e15b21 100755 --- a/docs/CreateLabelOption.md +++ b/docs/CreateLabelOption.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**color** | **str** | | -**description** | **str** | | [optional] -**name** | **str** | | +**color** | **str** | | +**description** | **str** | | [optional] +**name** | **str** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateMilestoneOption.md b/docs/CreateMilestoneOption.md index 9344912..a60d124 100755 --- a/docs/CreateMilestoneOption.md +++ b/docs/CreateMilestoneOption.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**due_on** | **datetime** | | [optional] -**title** | **str** | | [optional] +**description** | **str** | | [optional] +**due_on** | **datetime** | | [optional] +**title** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateOAuth2ApplicationOptions.md b/docs/CreateOAuth2ApplicationOptions.md new file mode 100644 index 0000000..c67494c --- /dev/null +++ b/docs/CreateOAuth2ApplicationOptions.md @@ -0,0 +1,11 @@ +# CreateOAuth2ApplicationOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | | [optional] +**redirect_uris** | **list[str]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateOrgOption.md b/docs/CreateOrgOption.md index 8c52e3e..729fd2a 100755 --- a/docs/CreateOrgOption.md +++ b/docs/CreateOrgOption.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**full_name** | **str** | | [optional] -**location** | **str** | | [optional] -**repo_admin_change_team_access** | **bool** | | [optional] -**username** | **str** | | -**visibility** | **str** | possible values are `public` (default), `limited` or `private` | [optional] -**website** | **str** | | [optional] +**description** | **str** | | [optional] +**full_name** | **str** | | [optional] +**location** | **str** | | [optional] +**repo_admin_change_team_access** | **bool** | | [optional] +**username** | **str** | | +**visibility** | **str** | possible values are `public` (default), `limited` or `private` | [optional] +**website** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreatePullRequestOption.md b/docs/CreatePullRequestOption.md index 809043b..89bc55d 100755 --- a/docs/CreatePullRequestOption.md +++ b/docs/CreatePullRequestOption.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**assignee** | **str** | | [optional] -**assignees** | **list[str]** | | [optional] -**base** | **str** | | [optional] -**body** | **str** | | [optional] -**due_date** | **datetime** | | [optional] -**head** | **str** | | [optional] -**labels** | **list[int]** | | [optional] -**milestone** | **int** | | [optional] -**title** | **str** | | [optional] +**assignee** | **str** | | [optional] +**assignees** | **list[str]** | | [optional] +**base** | **str** | | [optional] +**body** | **str** | | [optional] +**due_date** | **datetime** | | [optional] +**head** | **str** | | [optional] +**labels** | **list[int]** | | [optional] +**milestone** | **int** | | [optional] +**title** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreatePullReviewComment.md b/docs/CreatePullReviewComment.md new file mode 100644 index 0000000..26e89e1 --- /dev/null +++ b/docs/CreatePullReviewComment.md @@ -0,0 +1,13 @@ +# CreatePullReviewComment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | [optional] +**new_position** | **int** | if comment to new file line or 0 | [optional] +**old_position** | **int** | if comment to old file line or 0 | [optional] +**path** | **str** | the tree path | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreatePullReviewOptions.md b/docs/CreatePullReviewOptions.md new file mode 100644 index 0000000..f6aa0f3 --- /dev/null +++ b/docs/CreatePullReviewOptions.md @@ -0,0 +1,13 @@ +# CreatePullReviewOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | [optional] +**comments** | [**list[CreatePullReviewComment]**](CreatePullReviewComment.md) | | [optional] +**commit_id** | **str** | | [optional] +**event** | [**ReviewStateType**](ReviewStateType.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateReleaseOption.md b/docs/CreateReleaseOption.md index 2a05830..3790845 100755 --- a/docs/CreateReleaseOption.md +++ b/docs/CreateReleaseOption.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**body** | **str** | | [optional] -**draft** | **bool** | | [optional] -**name** | **str** | | [optional] -**prerelease** | **bool** | | [optional] -**tag_name** | **str** | | -**target_commitish** | **str** | | [optional] +**body** | **str** | | [optional] +**draft** | **bool** | | [optional] +**name** | **str** | | [optional] +**prerelease** | **bool** | | [optional] +**tag_name** | **str** | | +**target_commitish** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateRepoOption.md b/docs/CreateRepoOption.md index 64455f9..a7e6af9 100755 --- a/docs/CreateRepoOption.md +++ b/docs/CreateRepoOption.md @@ -3,14 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**auto_init** | **bool** | Whether the repository should be auto-intialized? | [optional] -**description** | **str** | Description of the repository to create | [optional] -**gitignores** | **str** | Gitignores to use | [optional] -**issue_labels** | **str** | Issue Label set to use | [optional] -**license** | **str** | License to use | [optional] -**name** | **str** | Name of the repository to create | -**private** | **bool** | Whether the repository is private | [optional] -**readme** | **str** | Readme of the repository to create | [optional] +**auto_init** | **bool** | Whether the repository should be auto-intialized? | [optional] +**default_branch** | **str** | DefaultBranch of the repository (used when initializes and in template) | [optional] +**description** | **str** | Description of the repository to create | [optional] +**gitignores** | **str** | Gitignores to use | [optional] +**issue_labels** | **str** | Issue Label set to use | [optional] +**license** | **str** | License to use | [optional] +**name** | **str** | Name of the repository to create | +**private** | **bool** | Whether the repository is private | [optional] +**readme** | **str** | Readme of the repository to create | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateStatusOption.md b/docs/CreateStatusOption.md index 41537c9..0071984 100755 --- a/docs/CreateStatusOption.md +++ b/docs/CreateStatusOption.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**context** | **str** | | [optional] -**description** | **str** | | [optional] -**state** | [**StatusState**](StatusState.md) | | [optional] -**target_url** | **str** | | [optional] +**context** | **str** | | [optional] +**description** | **str** | | [optional] +**state** | [**StatusState**](StatusState.md) | | [optional] +**target_url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateTeamOption.md b/docs/CreateTeamOption.md index 08850ef..465d4fd 100755 --- a/docs/CreateTeamOption.md +++ b/docs/CreateTeamOption.md @@ -3,10 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**name** | **str** | | -**permission** | **str** | | [optional] -**units** | **list[str]** | | [optional] +**can_create_org_repo** | **bool** | | [optional] +**description** | **str** | | [optional] +**includes_all_repositories** | **bool** | | [optional] +**name** | **str** | | +**permission** | **str** | | [optional] +**units** | **list[str]** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateUserOption.md b/docs/CreateUserOption.md index d898697..de51fa3 100755 --- a/docs/CreateUserOption.md +++ b/docs/CreateUserOption.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**email** | **str** | | -**full_name** | **str** | | [optional] -**login_name** | **str** | | [optional] -**must_change_password** | **bool** | | [optional] -**password** | **str** | | -**send_notify** | **bool** | | [optional] -**source_id** | **int** | | [optional] -**username** | **str** | | +**email** | **str** | | +**full_name** | **str** | | [optional] +**login_name** | **str** | | [optional] +**must_change_password** | **bool** | | [optional] +**password** | **str** | | +**send_notify** | **bool** | | [optional] +**source_id** | **int** | | [optional] +**username** | **str** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeleteEmailOption.md b/docs/DeleteEmailOption.md index 9d5ab95..8b28c0f 100755 --- a/docs/DeleteEmailOption.md +++ b/docs/DeleteEmailOption.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**emails** | **list[str]** | email addresses to delete | [optional] +**emails** | **list[str]** | email addresses to delete | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeleteFileOptions.md b/docs/DeleteFileOptions.md index 6a33d79..5a2adba 100755 --- a/docs/DeleteFileOptions.md +++ b/docs/DeleteFileOptions.md @@ -3,12 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**author** | [**Identity**](Identity.md) | | [optional] -**branch** | **str** | branch (optional) to base this file from. if not given, the default branch is used | [optional] -**committer** | [**Identity**](Identity.md) | | [optional] -**message** | **str** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] -**new_branch** | **str** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] -**sha** | **str** | sha is the SHA for the file that already exists | +**author** | [**Identity**](Identity.md) | | [optional] +**branch** | **str** | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**committer** | [**Identity**](Identity.md) | | [optional] +**dates** | [**CommitDateOptions**](CommitDateOptions.md) | | [optional] +**message** | **str** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] +**new_branch** | **str** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**sha** | **str** | sha is the SHA for the file that already exists | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/DeployKey.md b/docs/DeployKey.md index 14d1c6b..597f6ba 100755 --- a/docs/DeployKey.md +++ b/docs/DeployKey.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**created_at** | **datetime** | | [optional] -**fingerprint** | **str** | | [optional] -**id** | **int** | | [optional] -**key** | **str** | | [optional] -**key_id** | **int** | | [optional] -**read_only** | **bool** | | [optional] -**repository** | [**Repository**](Repository.md) | | [optional] -**title** | **str** | | [optional] -**url** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**fingerprint** | **str** | | [optional] +**id** | **int** | | [optional] +**key** | **str** | | [optional] +**key_id** | **int** | | [optional] +**read_only** | **bool** | | [optional] +**repository** | [**Repository**](Repository.md) | | [optional] +**title** | **str** | | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EditAttachmentOptions.md b/docs/EditAttachmentOptions.md index 00cac9b..d1cc435 100755 --- a/docs/EditAttachmentOptions.md +++ b/docs/EditAttachmentOptions.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **str** | | [optional] +**name** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EditBranchProtectionOption.md b/docs/EditBranchProtectionOption.md new file mode 100644 index 0000000..fee97cd --- /dev/null +++ b/docs/EditBranchProtectionOption.md @@ -0,0 +1,28 @@ +# EditBranchProtectionOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**approvals_whitelist_teams** | **list[str]** | | [optional] +**approvals_whitelist_username** | **list[str]** | | [optional] +**block_on_outdated_branch** | **bool** | | [optional] +**block_on_rejected_reviews** | **bool** | | [optional] +**dismiss_stale_approvals** | **bool** | | [optional] +**enable_approvals_whitelist** | **bool** | | [optional] +**enable_merge_whitelist** | **bool** | | [optional] +**enable_push** | **bool** | | [optional] +**enable_push_whitelist** | **bool** | | [optional] +**enable_status_check** | **bool** | | [optional] +**merge_whitelist_teams** | **list[str]** | | [optional] +**merge_whitelist_usernames** | **list[str]** | | [optional] +**protected_file_patterns** | **str** | | [optional] +**push_whitelist_deploy_keys** | **bool** | | [optional] +**push_whitelist_teams** | **list[str]** | | [optional] +**push_whitelist_usernames** | **list[str]** | | [optional] +**require_signed_commits** | **bool** | | [optional] +**required_approvals** | **int** | | [optional] +**status_check_contexts** | **list[str]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditDeadlineOption.md b/docs/EditDeadlineOption.md index 3e7522c..1333695 100755 --- a/docs/EditDeadlineOption.md +++ b/docs/EditDeadlineOption.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**due_date** | **datetime** | | +**due_date** | **datetime** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EditGitHookOption.md b/docs/EditGitHookOption.md index 80a4a66..b731bed 100755 --- a/docs/EditGitHookOption.md +++ b/docs/EditGitHookOption.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | **str** | | [optional] +**content** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EditHookOption.md b/docs/EditHookOption.md index 901c0a6..65e52eb 100755 --- a/docs/EditHookOption.md +++ b/docs/EditHookOption.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**active** | **bool** | | [optional] -**branch_filter** | **str** | | [optional] -**config** | **dict(str, str)** | | [optional] -**events** | **list[str]** | | [optional] +**active** | **bool** | | [optional] +**branch_filter** | **str** | | [optional] +**config** | **dict(str, str)** | | [optional] +**events** | **list[str]** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EditIssueCommentOption.md b/docs/EditIssueCommentOption.md index 7641825..c5ac07b 100755 --- a/docs/EditIssueCommentOption.md +++ b/docs/EditIssueCommentOption.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**body** | **str** | | +**body** | **str** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EditIssueOption.md b/docs/EditIssueOption.md index 13702e9..6b0ca2c 100755 --- a/docs/EditIssueOption.md +++ b/docs/EditIssueOption.md @@ -3,13 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**assignee** | **str** | | [optional] -**assignees** | **list[str]** | | [optional] -**body** | **str** | | [optional] -**due_date** | **datetime** | | [optional] -**milestone** | **int** | | [optional] -**state** | **str** | | [optional] -**title** | **str** | | [optional] +**assignee** | **str** | | [optional] +**assignees** | **list[str]** | | [optional] +**body** | **str** | | [optional] +**due_date** | **datetime** | | [optional] +**milestone** | **int** | | [optional] +**state** | **str** | | [optional] +**title** | **str** | | [optional] +**unset_due_date** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EditLabelOption.md b/docs/EditLabelOption.md index c0322c0..1720ccf 100755 --- a/docs/EditLabelOption.md +++ b/docs/EditLabelOption.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**color** | **str** | | [optional] -**description** | **str** | | [optional] -**name** | **str** | | [optional] +**color** | **str** | | [optional] +**description** | **str** | | [optional] +**name** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EditMilestoneOption.md b/docs/EditMilestoneOption.md index d6dba97..abfe426 100755 --- a/docs/EditMilestoneOption.md +++ b/docs/EditMilestoneOption.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**due_on** | **datetime** | | [optional] -**state** | **str** | | [optional] -**title** | **str** | | [optional] +**description** | **str** | | [optional] +**due_on** | **datetime** | | [optional] +**state** | **str** | | [optional] +**title** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EditOrgOption.md b/docs/EditOrgOption.md index ec16abe..3e4ea8c 100755 --- a/docs/EditOrgOption.md +++ b/docs/EditOrgOption.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**full_name** | **str** | | [optional] -**location** | **str** | | [optional] -**repo_admin_change_team_access** | **bool** | | [optional] -**visibility** | **str** | possible values are `public`, `limited` or `private` | [optional] -**website** | **str** | | [optional] +**description** | **str** | | [optional] +**full_name** | **str** | | [optional] +**location** | **str** | | [optional] +**repo_admin_change_team_access** | **bool** | | [optional] +**visibility** | **str** | possible values are `public`, `limited` or `private` | [optional] +**website** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EditPullRequestOption.md b/docs/EditPullRequestOption.md index 393261d..d3b13ee 100755 --- a/docs/EditPullRequestOption.md +++ b/docs/EditPullRequestOption.md @@ -3,14 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**assignee** | **str** | | [optional] -**assignees** | **list[str]** | | [optional] -**body** | **str** | | [optional] -**due_date** | **datetime** | | [optional] -**labels** | **list[int]** | | [optional] -**milestone** | **int** | | [optional] -**state** | **str** | | [optional] -**title** | **str** | | [optional] +**assignee** | **str** | | [optional] +**assignees** | **list[str]** | | [optional] +**body** | **str** | | [optional] +**due_date** | **datetime** | | [optional] +**labels** | **list[int]** | | [optional] +**milestone** | **int** | | [optional] +**state** | **str** | | [optional] +**title** | **str** | | [optional] +**unset_due_date** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EditReactionOption.md b/docs/EditReactionOption.md new file mode 100644 index 0000000..b713549 --- /dev/null +++ b/docs/EditReactionOption.md @@ -0,0 +1,10 @@ +# EditReactionOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EditReleaseOption.md b/docs/EditReleaseOption.md index 8a29e5a..76b2b9c 100755 --- a/docs/EditReleaseOption.md +++ b/docs/EditReleaseOption.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**body** | **str** | | [optional] -**draft** | **bool** | | [optional] -**name** | **str** | | [optional] -**prerelease** | **bool** | | [optional] -**tag_name** | **str** | | [optional] -**target_commitish** | **str** | | [optional] +**body** | **str** | | [optional] +**draft** | **bool** | | [optional] +**name** | **str** | | [optional] +**prerelease** | **bool** | | [optional] +**tag_name** | **str** | | [optional] +**target_commitish** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EditRepoOption.md b/docs/EditRepoOption.md index e26d27a..4b7f22c 100755 --- a/docs/EditRepoOption.md +++ b/docs/EditRepoOption.md @@ -3,23 +3,24 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**allow_merge_commits** | **bool** | either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`. | [optional] -**allow_rebase** | **bool** | either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`. | [optional] -**allow_rebase_explicit** | **bool** | either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`. | [optional] -**allow_squash_merge** | **bool** | either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`. | [optional] -**archived** | **bool** | set to `true` to archive this repository. | [optional] -**default_branch** | **str** | sets the default branch for this repository. | [optional] -**description** | **str** | a short description of the repository. | [optional] -**external_tracker** | [**ExternalTracker**](ExternalTracker.md) | | [optional] -**external_wiki** | [**ExternalWiki**](ExternalWiki.md) | | [optional] -**has_issues** | **bool** | either `true` to enable issues for this repository or `false` to disable them. | [optional] -**has_pull_requests** | **bool** | either `true` to allow pull requests, or `false` to prevent pull request. | [optional] -**has_wiki** | **bool** | either `true` to enable the wiki for this repository or `false` to disable it. | [optional] -**ignore_whitespace_conflicts** | **bool** | either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`. | [optional] -**internal_tracker** | [**InternalTracker**](InternalTracker.md) | | [optional] -**name** | **str** | name of the repository | [optional] -**private** | **bool** | either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. | [optional] -**website** | **str** | a URL with more information about the repository. | [optional] +**allow_merge_commits** | **bool** | either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`. | [optional] +**allow_rebase** | **bool** | either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`. | [optional] +**allow_rebase_explicit** | **bool** | either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`. | [optional] +**allow_squash_merge** | **bool** | either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`. | [optional] +**archived** | **bool** | set to `true` to archive this repository. | [optional] +**default_branch** | **str** | sets the default branch for this repository. | [optional] +**description** | **str** | a short description of the repository. | [optional] +**external_tracker** | [**ExternalTracker**](ExternalTracker.md) | | [optional] +**external_wiki** | [**ExternalWiki**](ExternalWiki.md) | | [optional] +**has_issues** | **bool** | either `true` to enable issues for this repository or `false` to disable them. | [optional] +**has_pull_requests** | **bool** | either `true` to allow pull requests, or `false` to prevent pull request. | [optional] +**has_wiki** | **bool** | either `true` to enable the wiki for this repository or `false` to disable it. | [optional] +**ignore_whitespace_conflicts** | **bool** | either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`. | [optional] +**internal_tracker** | [**InternalTracker**](InternalTracker.md) | | [optional] +**name** | **str** | name of the repository | [optional] +**private** | **bool** | either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. | [optional] +**template** | **bool** | either `true` to make this repository a template or `false` to make it a normal repository | [optional] +**website** | **str** | a URL with more information about the repository. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EditTeamOption.md b/docs/EditTeamOption.md index dd884db..809bd99 100755 --- a/docs/EditTeamOption.md +++ b/docs/EditTeamOption.md @@ -3,10 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**name** | **str** | | -**permission** | **str** | | [optional] -**units** | **list[str]** | | [optional] +**can_create_org_repo** | **bool** | | [optional] +**description** | **str** | | [optional] +**includes_all_repositories** | **bool** | | [optional] +**name** | **str** | | +**permission** | **str** | | [optional] +**units** | **list[str]** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/EditUserOption.md b/docs/EditUserOption.md index b019d85..5ca34e9 100755 --- a/docs/EditUserOption.md +++ b/docs/EditUserOption.md @@ -3,21 +3,21 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**active** | **bool** | | [optional] -**admin** | **bool** | | [optional] -**allow_create_organization** | **bool** | | [optional] -**allow_git_hook** | **bool** | | [optional] -**allow_import_local** | **bool** | | [optional] -**email** | **str** | | -**full_name** | **str** | | [optional] -**location** | **str** | | [optional] -**login_name** | **str** | | [optional] -**max_repo_creation** | **int** | | [optional] -**must_change_password** | **bool** | | [optional] -**password** | **str** | | [optional] -**prohibit_login** | **bool** | | [optional] -**source_id** | **int** | | [optional] -**website** | **str** | | [optional] +**active** | **bool** | | [optional] +**admin** | **bool** | | [optional] +**allow_create_organization** | **bool** | | [optional] +**allow_git_hook** | **bool** | | [optional] +**allow_import_local** | **bool** | | [optional] +**email** | **str** | | +**full_name** | **str** | | [optional] +**location** | **str** | | [optional] +**login_name** | **str** | | [optional] +**max_repo_creation** | **int** | | [optional] +**must_change_password** | **bool** | | [optional] +**password** | **str** | | [optional] +**prohibit_login** | **bool** | | [optional] +**source_id** | **int** | | [optional] +**website** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Email.md b/docs/Email.md index 104694e..b46d854 100755 --- a/docs/Email.md +++ b/docs/Email.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**primary** | **bool** | | [optional] -**verified** | **bool** | | [optional] +**email** | **str** | | [optional] +**primary** | **bool** | | [optional] +**verified** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ExternalTracker.md b/docs/ExternalTracker.md index 4a68230..f81baba 100755 --- a/docs/ExternalTracker.md +++ b/docs/ExternalTracker.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**external_tracker_format** | **str** | External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. | [optional] -**external_tracker_style** | **str** | External Issue Tracker Number Format, either `numeric` or `alphanumeric` | [optional] -**external_tracker_url** | **str** | URL of external issue tracker. | [optional] +**external_tracker_format** | **str** | External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. | [optional] +**external_tracker_style** | **str** | External Issue Tracker Number Format, either `numeric` or `alphanumeric` | [optional] +**external_tracker_url** | **str** | URL of external issue tracker. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ExternalWiki.md b/docs/ExternalWiki.md index 461befb..1b34e2b 100755 --- a/docs/ExternalWiki.md +++ b/docs/ExternalWiki.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**external_wiki_url** | **str** | URL of external wiki. | [optional] +**external_wiki_url** | **str** | URL of external wiki. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FileCommitResponse.md b/docs/FileCommitResponse.md index 27acbbe..17dbd5e 100755 --- a/docs/FileCommitResponse.md +++ b/docs/FileCommitResponse.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**author** | [**CommitUser**](CommitUser.md) | | [optional] -**committer** | [**CommitUser**](CommitUser.md) | | [optional] -**html_url** | **str** | | [optional] -**message** | **str** | | [optional] -**parents** | [**list[CommitMeta]**](CommitMeta.md) | | [optional] -**sha** | **str** | | [optional] -**tree** | [**CommitMeta**](CommitMeta.md) | | [optional] -**url** | **str** | | [optional] +**author** | [**CommitUser**](CommitUser.md) | | [optional] +**committer** | [**CommitUser**](CommitUser.md) | | [optional] +**html_url** | **str** | | [optional] +**message** | **str** | | [optional] +**parents** | [**list[CommitMeta]**](CommitMeta.md) | | [optional] +**sha** | **str** | | [optional] +**tree** | [**CommitMeta**](CommitMeta.md) | | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FileDeleteResponse.md b/docs/FileDeleteResponse.md index 78cc5c2..0eca893 100755 --- a/docs/FileDeleteResponse.md +++ b/docs/FileDeleteResponse.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**commit** | [**FileCommitResponse**](FileCommitResponse.md) | | [optional] -**content** | **object** | | [optional] -**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional] +**commit** | [**FileCommitResponse**](FileCommitResponse.md) | | [optional] +**content** | **object** | | [optional] +**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FileLinksResponse.md b/docs/FileLinksResponse.md index ab11063..1dccae6 100755 --- a/docs/FileLinksResponse.md +++ b/docs/FileLinksResponse.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**git** | **str** | | [optional] -**html** | **str** | | [optional] -**_self** | **str** | | [optional] +**git** | **str** | | [optional] +**html** | **str** | | [optional] +**_self** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FileResponse.md b/docs/FileResponse.md index 2126c2a..8484b60 100755 --- a/docs/FileResponse.md +++ b/docs/FileResponse.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**commit** | [**FileCommitResponse**](FileCommitResponse.md) | | [optional] -**content** | [**ContentsResponse**](ContentsResponse.md) | | [optional] -**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional] +**commit** | [**FileCommitResponse**](FileCommitResponse.md) | | [optional] +**content** | [**ContentsResponse**](ContentsResponse.md) | | [optional] +**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GPGKey.md b/docs/GPGKey.md index 264a52e..464caf2 100755 --- a/docs/GPGKey.md +++ b/docs/GPGKey.md @@ -3,18 +3,18 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**can_certify** | **bool** | | [optional] -**can_encrypt_comms** | **bool** | | [optional] -**can_encrypt_storage** | **bool** | | [optional] -**can_sign** | **bool** | | [optional] -**created_at** | **datetime** | | [optional] -**emails** | [**list[GPGKeyEmail]**](GPGKeyEmail.md) | | [optional] -**expires_at** | **datetime** | | [optional] -**id** | **int** | | [optional] -**key_id** | **str** | | [optional] -**primary_key_id** | **str** | | [optional] -**public_key** | **str** | | [optional] -**subkeys** | [**list[GPGKey]**](GPGKey.md) | | [optional] +**can_certify** | **bool** | | [optional] +**can_encrypt_comms** | **bool** | | [optional] +**can_encrypt_storage** | **bool** | | [optional] +**can_sign** | **bool** | | [optional] +**created_at** | **datetime** | | [optional] +**emails** | [**list[GPGKeyEmail]**](GPGKeyEmail.md) | | [optional] +**expires_at** | **datetime** | | [optional] +**id** | **int** | | [optional] +**key_id** | **str** | | [optional] +**primary_key_id** | **str** | | [optional] +**public_key** | **str** | | [optional] +**subkeys** | [**list[GPGKey]**](GPGKey.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GPGKeyEmail.md b/docs/GPGKeyEmail.md index 25ad93f..830d17b 100755 --- a/docs/GPGKeyEmail.md +++ b/docs/GPGKeyEmail.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**verified** | **bool** | | [optional] +**email** | **str** | | [optional] +**verified** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GitBlobResponse.md b/docs/GitBlobResponse.md index 656e59a..838dc16 100755 --- a/docs/GitBlobResponse.md +++ b/docs/GitBlobResponse.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | **str** | | [optional] -**encoding** | **str** | | [optional] -**sha** | **str** | | [optional] -**size** | **int** | | [optional] -**url** | **str** | | [optional] +**content** | **str** | | [optional] +**encoding** | **str** | | [optional] +**sha** | **str** | | [optional] +**size** | **int** | | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GitEntry.md b/docs/GitEntry.md index 2be3cc0..cd371e0 100755 --- a/docs/GitEntry.md +++ b/docs/GitEntry.md @@ -3,13 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mode** | **str** | | [optional] -**path** | **str** | | [optional] -**sha** | **str** | | [optional] -**size** | **int** | | [optional] -**type** | **str** | | [optional] -**url** | **str** | | [optional] -**modified_at** | **str** | | [optional] +**mode** | **str** | | [optional] +**path** | **str** | | [optional] +**sha** | **str** | | [optional] +**size** | **int** | | [optional] +**type** | **str** | | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GitHook.md b/docs/GitHook.md index 89d3d9f..22504d7 100755 --- a/docs/GitHook.md +++ b/docs/GitHook.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**content** | **str** | | [optional] -**is_active** | **bool** | | [optional] -**name** | **str** | | [optional] +**content** | **str** | | [optional] +**is_active** | **bool** | | [optional] +**name** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GitObject.md b/docs/GitObject.md index 5052dd5..0afce87 100755 --- a/docs/GitObject.md +++ b/docs/GitObject.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sha** | **str** | | [optional] -**type** | **str** | | [optional] -**url** | **str** | | [optional] +**sha** | **str** | | [optional] +**type** | **str** | | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/GitTreeResponse.md b/docs/GitTreeResponse.md index 58b4e3a..6620d4c 100755 --- a/docs/GitTreeResponse.md +++ b/docs/GitTreeResponse.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**page** | **int** | | [optional] -**sha** | **str** | | [optional] -**total_count** | **int** | | [optional] -**tree** | [**list[GitEntry]**](GitEntry.md) | | [optional] -**truncated** | **bool** | | [optional] -**url** | **str** | | [optional] +**page** | **int** | | [optional] +**sha** | **str** | | [optional] +**total_count** | **int** | | [optional] +**tree** | [**list[GitEntry]**](GitEntry.md) | | [optional] +**truncated** | **bool** | | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Hook.md b/docs/Hook.md index d05a31b..df76751 100755 --- a/docs/Hook.md +++ b/docs/Hook.md @@ -3,13 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**active** | **bool** | | [optional] -**config** | **dict(str, str)** | | [optional] -**created_at** | **datetime** | | [optional] -**events** | **list[str]** | | [optional] -**id** | **int** | | [optional] -**type** | **str** | | [optional] -**updated_at** | **datetime** | | [optional] +**active** | **bool** | | [optional] +**config** | **dict(str, str)** | | [optional] +**created_at** | **datetime** | | [optional] +**events** | **list[str]** | | [optional] +**id** | **int** | | [optional] +**type** | **str** | | [optional] +**updated_at** | **datetime** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Identity.md b/docs/Identity.md index dbef0da..aa74bc9 100755 --- a/docs/Identity.md +++ b/docs/Identity.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**name** | **str** | | [optional] +**email** | **str** | | [optional] +**name** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md index f026037..fe294b9 100755 --- a/docs/InlineResponse200.md +++ b/docs/InlineResponse200.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**list[Team]**](Team.md) | | [optional] -**ok** | **bool** | | [optional] +**data** | [**list[Team]**](Team.md) | | [optional] +**ok** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse2001.md b/docs/InlineResponse2001.md index cac11ce..f6bbc0a 100755 --- a/docs/InlineResponse2001.md +++ b/docs/InlineResponse2001.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**list[User]**](User.md) | | [optional] -**ok** | **bool** | | [optional] +**data** | [**list[User]**](User.md) | | [optional] +**ok** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InternalTracker.md b/docs/InternalTracker.md index 098357f..e42bdb1 100755 --- a/docs/InternalTracker.md +++ b/docs/InternalTracker.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**allow_only_contributors_to_track_time** | **bool** | Let only contributors track time (Built-in issue tracker) | [optional] -**enable_issue_dependencies** | **bool** | Enable dependencies for issues and pull requests (Built-in issue tracker) | [optional] -**enable_time_tracker** | **bool** | Enable time tracking (Built-in issue tracker) | [optional] +**allow_only_contributors_to_track_time** | **bool** | Let only contributors track time (Built-in issue tracker) | [optional] +**enable_issue_dependencies** | **bool** | Enable dependencies for issues and pull requests (Built-in issue tracker) | [optional] +**enable_time_tracker** | **bool** | Enable time tracking (Built-in issue tracker) | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Issue.md b/docs/Issue.md index 3c0e9bf..443dca5 100755 --- a/docs/Issue.md +++ b/docs/Issue.md @@ -3,25 +3,27 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**assignee** | [**User**](User.md) | | [optional] -**assignees** | [**list[User]**](User.md) | | [optional] -**body** | **str** | | [optional] -**closed_at** | **datetime** | | [optional] -**comments** | **int** | | [optional] -**created_at** | **datetime** | | [optional] -**due_date** | **datetime** | | [optional] -**id** | **int** | | [optional] -**labels** | [**list[Label]**](Label.md) | | [optional] -**milestone** | [**Milestone**](Milestone.md) | | [optional] -**number** | **int** | | [optional] -**original_author** | **str** | | [optional] -**original_author_id** | **int** | | [optional] -**pull_request** | [**PullRequestMeta**](PullRequestMeta.md) | | [optional] -**state** | [**StateType**](StateType.md) | | [optional] -**title** | **str** | | [optional] -**updated_at** | **datetime** | | [optional] -**url** | **str** | | [optional] -**user** | [**User**](User.md) | | [optional] +**assignee** | [**User**](User.md) | | [optional] +**assignees** | [**list[User]**](User.md) | | [optional] +**body** | **str** | | [optional] +**closed_at** | **datetime** | | [optional] +**comments** | **int** | | [optional] +**created_at** | **datetime** | | [optional] +**due_date** | **datetime** | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**labels** | [**list[Label]**](Label.md) | | [optional] +**milestone** | [**Milestone**](Milestone.md) | | [optional] +**number** | **int** | | [optional] +**original_author** | **str** | | [optional] +**original_author_id** | **int** | | [optional] +**pull_request** | [**PullRequestMeta**](PullRequestMeta.md) | | [optional] +**repository** | [**RepositoryMeta**](RepositoryMeta.md) | | [optional] +**state** | [**StateType**](StateType.md) | | [optional] +**title** | **str** | | [optional] +**updated_at** | **datetime** | | [optional] +**url** | **str** | | [optional] +**user** | [**User**](User.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IssueApi.md b/docs/IssueApi.md index 5bd8dff..8016a2e 100755 --- a/docs/IssueApi.md +++ b/docs/IssueApi.md @@ -5,7 +5,9 @@ All URIs are relative to *http://localhost:3000/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**issue_add_label**](IssueApi.md#issue_add_label) | **POST** /repos/{owner}/{repo}/issues/{index}/labels | Add a label to an issue -[**issue_add_time**](IssueApi.md#issue_add_time) | **POST** /repos/{owner}/{repo}/issues/{id}/times | Add a tracked time to a issue +[**issue_add_subscription**](IssueApi.md#issue_add_subscription) | **PUT** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Subscribe user to issue +[**issue_add_time**](IssueApi.md#issue_add_time) | **POST** /repos/{owner}/{repo}/issues/{index}/times | Add tracked time to a issue +[**issue_check_subscription**](IssueApi.md#issue_check_subscription) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions/check | Check if user is subscribed to an issue [**issue_clear_labels**](IssueApi.md#issue_clear_labels) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels | Remove all labels from an issue [**issue_create_comment**](IssueApi.md#issue_create_comment) | **POST** /repos/{owner}/{repo}/issues/{index}/comments | Add a comment to an issue [**issue_create_issue**](IssueApi.md#issue_create_issue) | **POST** /repos/{owner}/{repo}/issues | Create an issue. If using deadline only the date will be taken into account, and time of day ignored. @@ -13,16 +15,24 @@ Method | HTTP request | Description [**issue_create_milestone**](IssueApi.md#issue_create_milestone) | **POST** /repos/{owner}/{repo}/milestones | Create a milestone [**issue_delete_comment**](IssueApi.md#issue_delete_comment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id} | Delete a comment [**issue_delete_comment_deprecated**](IssueApi.md#issue_delete_comment_deprecated) | **DELETE** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Delete a comment +[**issue_delete_comment_reaction**](IssueApi.md#issue_delete_comment_reaction) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Remove a reaction from a comment of an issue +[**issue_delete_issue_reaction**](IssueApi.md#issue_delete_issue_reaction) | **DELETE** /repos/{owner}/{repo}/issues/{index}/reactions | Remove a reaction from an issue [**issue_delete_label**](IssueApi.md#issue_delete_label) | **DELETE** /repos/{owner}/{repo}/labels/{id} | Delete a label [**issue_delete_milestone**](IssueApi.md#issue_delete_milestone) | **DELETE** /repos/{owner}/{repo}/milestones/{id} | Delete a milestone +[**issue_delete_stop_watch**](IssueApi.md#issue_delete_stop_watch) | **DELETE** /repos/{owner}/{repo}/issues/{index}/stopwatch/delete | Delete an issue's existing stopwatch. +[**issue_delete_subscription**](IssueApi.md#issue_delete_subscription) | **DELETE** /repos/{owner}/{repo}/issues/{index}/subscriptions/{user} | Unsubscribe user from issue +[**issue_delete_time**](IssueApi.md#issue_delete_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times/{id} | Delete specific tracked time [**issue_edit_comment**](IssueApi.md#issue_edit_comment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id} | Edit a comment [**issue_edit_comment_deprecated**](IssueApi.md#issue_edit_comment_deprecated) | **PATCH** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Edit a comment [**issue_edit_issue**](IssueApi.md#issue_edit_issue) | **PATCH** /repos/{owner}/{repo}/issues/{index} | Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. [**issue_edit_issue_deadline**](IssueApi.md#issue_edit_issue_deadline) | **POST** /repos/{owner}/{repo}/issues/{index}/deadline | Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. [**issue_edit_label**](IssueApi.md#issue_edit_label) | **PATCH** /repos/{owner}/{repo}/labels/{id} | Update a label [**issue_edit_milestone**](IssueApi.md#issue_edit_milestone) | **PATCH** /repos/{owner}/{repo}/milestones/{id} | Update a milestone +[**issue_get_comment**](IssueApi.md#issue_get_comment) | **GET** /repos/{owner}/{repo}/issues/comments/{id} | Get a comment +[**issue_get_comment_reactions**](IssueApi.md#issue_get_comment_reactions) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Get a list of reactions from a comment of an issue [**issue_get_comments**](IssueApi.md#issue_get_comments) | **GET** /repos/{owner}/{repo}/issues/{index}/comments | List all comments on an issue [**issue_get_issue**](IssueApi.md#issue_get_issue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get an issue +[**issue_get_issue_reactions**](IssueApi.md#issue_get_issue_reactions) | **GET** /repos/{owner}/{repo}/issues/{index}/reactions | Get a list reactions of an issue [**issue_get_label**](IssueApi.md#issue_get_label) | **GET** /repos/{owner}/{repo}/labels/{id} | Get a single label [**issue_get_labels**](IssueApi.md#issue_get_labels) | **GET** /repos/{owner}/{repo}/issues/{index}/labels | Get an issue's labels [**issue_get_milestone**](IssueApi.md#issue_get_milestone) | **GET** /repos/{owner}/{repo}/milestones/{id} | Get a milestone @@ -30,11 +40,16 @@ Method | HTTP request | Description [**issue_get_repo_comments**](IssueApi.md#issue_get_repo_comments) | **GET** /repos/{owner}/{repo}/issues/comments | List all comments in a repository [**issue_list_issues**](IssueApi.md#issue_list_issues) | **GET** /repos/{owner}/{repo}/issues | List a repository's issues [**issue_list_labels**](IssueApi.md#issue_list_labels) | **GET** /repos/{owner}/{repo}/labels | Get all of a repository's labels +[**issue_post_comment_reaction**](IssueApi.md#issue_post_comment_reaction) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Add a reaction to a comment of an issue +[**issue_post_issue_reaction**](IssueApi.md#issue_post_issue_reaction) | **POST** /repos/{owner}/{repo}/issues/{index}/reactions | Add a reaction to an issue [**issue_remove_label**](IssueApi.md#issue_remove_label) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels/{id} | Remove a label from an issue [**issue_replace_labels**](IssueApi.md#issue_replace_labels) | **PUT** /repos/{owner}/{repo}/issues/{index}/labels | Replace an issue's labels +[**issue_reset_time**](IssueApi.md#issue_reset_time) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times | Reset a tracked time of an issue +[**issue_search_issues**](IssueApi.md#issue_search_issues) | **GET** /repos/issues/search | Search for issues across the repositories that the user has access to [**issue_start_stop_watch**](IssueApi.md#issue_start_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/start | Start stopwatch on an issue. -[**issue_stop_watch**](IssueApi.md#issue_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch. -[**issue_tracked_times**](IssueApi.md#issue_tracked_times) | **GET** /repos/{owner}/{repo}/issues/{id}/times | List an issue's tracked times +[**issue_stop_stop_watch**](IssueApi.md#issue_stop_stop_watch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch. +[**issue_subscriptions**](IssueApi.md#issue_subscriptions) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions | Get users who subscribed on an issue. +[**issue_tracked_times**](IssueApi.md#issue_tracked_times) | **GET** /repos/{owner}/{repo}/issues/{index}/times | List an issue's tracked times # **issue_add_label** @@ -119,10 +134,91 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **issue_add_subscription** +> issue_add_subscription(owner, repo, index, user) + +Subscribe user to issue + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue +user = 'user_example' # str | user to subscribe + +try: + # Subscribe user to issue + api_instance.issue_add_subscription(owner, repo, index, user) +except ApiException as e: + print("Exception when calling IssueApi->issue_add_subscription: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue | + **user** | **str**| user to subscribe | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **issue_add_time** -> TrackedTime issue_add_time(owner, repo, id, body=body) +> TrackedTime issue_add_time(owner, repo, index, body=body) -Add a tracked time to a issue +Add tracked time to a issue ### Example ```python @@ -166,12 +262,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | index of the issue to add tracked time to +index = 789 # int | index of the issue body = giteapy.AddTimeOption() # AddTimeOption | (optional) try: - # Add a tracked time to a issue - api_response = api_instance.issue_add_time(owner, repo, id, body=body) + # Add tracked time to a issue + api_response = api_instance.issue_add_time(owner, repo, index, body=body) pprint(api_response) except ApiException as e: print("Exception when calling IssueApi->issue_add_time: %s\n" % e) @@ -183,7 +279,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| index of the issue to add tracked time to | + **index** | **int**| index of the issue | **body** | [**AddTimeOption**](AddTimeOption.md)| | [optional] ### Return type @@ -201,6 +297,86 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **issue_check_subscription** +> WatchInfo issue_check_subscription(owner, repo, index) + +Check if user is subscribed to an issue + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue + +try: + # Check if user is subscribed to an issue + api_response = api_instance.issue_check_subscription(owner, repo, index) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_check_subscription: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue | + +### Return type + +[**WatchInfo**](WatchInfo.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **issue_clear_labels** > issue_clear_labels(owner, repo, index) @@ -762,10 +938,10 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_delete_label** -> issue_delete_label(owner, repo, id) +# **issue_delete_comment_reaction** +> issue_delete_comment_reaction(owner, repo, id, content=content) -Delete a label +Remove a reaction from a comment of an issue ### Example ```python @@ -809,13 +985,14 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the label to delete +id = 789 # int | id of the comment to edit +content = giteapy.EditReactionOption() # EditReactionOption | (optional) try: - # Delete a label - api_instance.issue_delete_label(owner, repo, id) + # Remove a reaction from a comment of an issue + api_instance.issue_delete_comment_reaction(owner, repo, id, content=content) except ApiException as e: - print("Exception when calling IssueApi->issue_delete_label: %s\n" % e) + print("Exception when calling IssueApi->issue_delete_comment_reaction: %s\n" % e) ``` ### Parameters @@ -824,7 +1001,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| id of the label to delete | + **id** | **int**| id of the comment to edit | + **content** | [**EditReactionOption**](EditReactionOption.md)| | [optional] ### Return type @@ -836,15 +1014,15 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json, text/plain - - **Accept**: application/json, text/html + - **Content-Type**: application/json + - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_delete_milestone** -> issue_delete_milestone(owner, repo, id) +# **issue_delete_issue_reaction** +> issue_delete_issue_reaction(owner, repo, index, content=content) -Delete a milestone +Remove a reaction from an issue ### Example ```python @@ -888,13 +1066,14 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the milestone to delete +index = 789 # int | index of the issue +content = giteapy.EditReactionOption() # EditReactionOption | (optional) try: - # Delete a milestone - api_instance.issue_delete_milestone(owner, repo, id) + # Remove a reaction from an issue + api_instance.issue_delete_issue_reaction(owner, repo, index, content=content) except ApiException as e: - print("Exception when calling IssueApi->issue_delete_milestone: %s\n" % e) + print("Exception when calling IssueApi->issue_delete_issue_reaction: %s\n" % e) ``` ### Parameters @@ -903,7 +1082,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| id of the milestone to delete | + **index** | **int**| index of the issue | + **content** | [**EditReactionOption**](EditReactionOption.md)| | [optional] ### Return type @@ -915,15 +1095,15 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json, text/plain - - **Accept**: application/json, text/html + - **Content-Type**: application/json + - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_edit_comment** -> Comment issue_edit_comment(owner, repo, id, body=body) +# **issue_delete_label** +> issue_delete_label(owner, repo, id) -Edit a comment +Delete a label ### Example ```python @@ -967,15 +1147,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the comment to edit -body = giteapy.EditIssueCommentOption() # EditIssueCommentOption | (optional) +id = 789 # int | id of the label to delete try: - # Edit a comment - api_response = api_instance.issue_edit_comment(owner, repo, id, body=body) - pprint(api_response) + # Delete a label + api_instance.issue_delete_label(owner, repo, id) except ApiException as e: - print("Exception when calling IssueApi->issue_edit_comment: %s\n" % e) + print("Exception when calling IssueApi->issue_delete_label: %s\n" % e) ``` ### Parameters @@ -984,12 +1162,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| id of the comment to edit | - **body** | [**EditIssueCommentOption**](EditIssueCommentOption.md)| | [optional] + **id** | **int**| id of the label to delete | ### Return type -[**Comment**](Comment.md) +void (empty response body) ### Authorization @@ -997,15 +1174,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_edit_comment_deprecated** -> Comment issue_edit_comment_deprecated(owner, repo, index, id, body=body) +# **issue_delete_milestone** +> issue_delete_milestone(owner, repo, id) -Edit a comment +Delete a milestone ### Example ```python @@ -1049,16 +1226,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -index = 56 # int | this parameter is ignored -id = 789 # int | id of the comment to edit -body = giteapy.EditIssueCommentOption() # EditIssueCommentOption | (optional) +id = 789 # int | id of the milestone to delete try: - # Edit a comment - api_response = api_instance.issue_edit_comment_deprecated(owner, repo, index, id, body=body) - pprint(api_response) + # Delete a milestone + api_instance.issue_delete_milestone(owner, repo, id) except ApiException as e: - print("Exception when calling IssueApi->issue_edit_comment_deprecated: %s\n" % e) + print("Exception when calling IssueApi->issue_delete_milestone: %s\n" % e) ``` ### Parameters @@ -1067,13 +1241,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **index** | **int**| this parameter is ignored | - **id** | **int**| id of the comment to edit | - **body** | [**EditIssueCommentOption**](EditIssueCommentOption.md)| | [optional] + **id** | **int**| id of the milestone to delete | ### Return type -[**Comment**](Comment.md) +void (empty response body) ### Authorization @@ -1081,15 +1253,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_edit_issue** -> Issue issue_edit_issue(owner, repo, index, body=body) +# **issue_delete_stop_watch** +> issue_delete_stop_watch(owner, repo, index) -Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. +Delete an issue's existing stopwatch. ### Example ```python @@ -1133,15 +1305,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -index = 789 # int | index of the issue to edit -body = giteapy.EditIssueOption() # EditIssueOption | (optional) +index = 789 # int | index of the issue to stop the stopwatch on try: - # Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. - api_response = api_instance.issue_edit_issue(owner, repo, index, body=body) - pprint(api_response) + # Delete an issue's existing stopwatch. + api_instance.issue_delete_stop_watch(owner, repo, index) except ApiException as e: - print("Exception when calling IssueApi->issue_edit_issue: %s\n" % e) + print("Exception when calling IssueApi->issue_delete_stop_watch: %s\n" % e) ``` ### Parameters @@ -1150,12 +1320,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **index** | **int**| index of the issue to edit | - **body** | [**EditIssueOption**](EditIssueOption.md)| | [optional] + **index** | **int**| index of the issue to stop the stopwatch on | ### Return type -[**Issue**](Issue.md) +void (empty response body) ### Authorization @@ -1168,10 +1337,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_edit_issue_deadline** -> IssueDeadline issue_edit_issue_deadline(owner, repo, index, body=body) +# **issue_delete_subscription** +> issue_delete_subscription(owner, repo, index, user) -Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. +Unsubscribe user from issue ### Example ```python @@ -1215,15 +1384,1078 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -index = 789 # int | index of the issue to create or update a deadline on -body = giteapy.EditDeadlineOption() # EditDeadlineOption | (optional) +index = 789 # int | index of the issue +user = 'user_example' # str | user witch unsubscribe + +try: + # Unsubscribe user from issue + api_instance.issue_delete_subscription(owner, repo, index, user) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_subscription: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue | + **user** | **str**| user witch unsubscribe | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_delete_time** +> issue_delete_time(owner, repo, index, id) + +Delete specific tracked time + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue +id = 789 # int | id of time to delete + +try: + # Delete specific tracked time + api_instance.issue_delete_time(owner, repo, index, id) +except ApiException as e: + print("Exception when calling IssueApi->issue_delete_time: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue | + **id** | **int**| id of time to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_edit_comment** +> Comment issue_edit_comment(owner, repo, id, body=body) + +Edit a comment + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the comment to edit +body = giteapy.EditIssueCommentOption() # EditIssueCommentOption | (optional) + +try: + # Edit a comment + api_response = api_instance.issue_edit_comment(owner, repo, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_edit_comment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the comment to edit | + **body** | [**EditIssueCommentOption**](EditIssueCommentOption.md)| | [optional] + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_edit_comment_deprecated** +> Comment issue_edit_comment_deprecated(owner, repo, index, id, body=body) + +Edit a comment + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 56 # int | this parameter is ignored +id = 789 # int | id of the comment to edit +body = giteapy.EditIssueCommentOption() # EditIssueCommentOption | (optional) + +try: + # Edit a comment + api_response = api_instance.issue_edit_comment_deprecated(owner, repo, index, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_edit_comment_deprecated: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| this parameter is ignored | + **id** | **int**| id of the comment to edit | + **body** | [**EditIssueCommentOption**](EditIssueCommentOption.md)| | [optional] + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_edit_issue** +> Issue issue_edit_issue(owner, repo, index, body=body) + +Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue to edit +body = giteapy.EditIssueOption() # EditIssueOption | (optional) + +try: + # Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. + api_response = api_instance.issue_edit_issue(owner, repo, index, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_edit_issue: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue to edit | + **body** | [**EditIssueOption**](EditIssueOption.md)| | [optional] + +### Return type + +[**Issue**](Issue.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_edit_issue_deadline** +> IssueDeadline issue_edit_issue_deadline(owner, repo, index, body=body) + +Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue to create or update a deadline on +body = giteapy.EditDeadlineOption() # EditDeadlineOption | (optional) + +try: + # Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. + api_response = api_instance.issue_edit_issue_deadline(owner, repo, index, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_edit_issue_deadline: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue to create or update a deadline on | + **body** | [**EditDeadlineOption**](EditDeadlineOption.md)| | [optional] + +### Return type + +[**IssueDeadline**](IssueDeadline.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_edit_label** +> Label issue_edit_label(owner, repo, id, body=body) + +Update a label + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the label to edit +body = giteapy.EditLabelOption() # EditLabelOption | (optional) + +try: + # Update a label + api_response = api_instance.issue_edit_label(owner, repo, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_edit_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the label to edit | + **body** | [**EditLabelOption**](EditLabelOption.md)| | [optional] + +### Return type + +[**Label**](Label.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_edit_milestone** +> Milestone issue_edit_milestone(owner, repo, id, body=body) + +Update a milestone + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the milestone +body = giteapy.EditMilestoneOption() # EditMilestoneOption | (optional) + +try: + # Update a milestone + api_response = api_instance.issue_edit_milestone(owner, repo, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_edit_milestone: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the milestone | + **body** | [**EditMilestoneOption**](EditMilestoneOption.md)| | [optional] + +### Return type + +[**Milestone**](Milestone.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_get_comment** +> Comment issue_get_comment(owner, repo, id) + +Get a comment + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the comment + +try: + # Get a comment + api_response = api_instance.issue_get_comment(owner, repo, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_comment: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the comment | + +### Return type + +[**Comment**](Comment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_get_comment_reactions** +> list[Reaction] issue_get_comment_reactions(owner, repo, id) + +Get a list of reactions from a comment of an issue + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the comment to edit + +try: + # Get a list of reactions from a comment of an issue + api_response = api_instance.issue_get_comment_reactions(owner, repo, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_comment_reactions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the comment to edit | + +### Return type + +[**list[Reaction]**](Reaction.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_get_comments** +> list[Comment] issue_get_comments(owner, repo, index, since=since, before=before) + +List all comments on an issue + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue +since = '2013-10-20T19:20:30+01:00' # datetime | if provided, only comments updated since the specified time are returned. (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | if provided, only comments updated before the provided time are returned. (optional) + +try: + # List all comments on an issue + api_response = api_instance.issue_get_comments(owner, repo, index, since=since, before=before) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_comments: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue | + **since** | **datetime**| if provided, only comments updated since the specified time are returned. | [optional] + **before** | **datetime**| if provided, only comments updated before the provided time are returned. | [optional] + +### Return type + +[**list[Comment]**](Comment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_get_issue** +> Issue issue_get_issue(owner, repo, index) + +Get an issue + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue to get + +try: + # Get an issue + api_response = api_instance.issue_get_issue(owner, repo, index) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_issue: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue to get | + +### Return type + +[**Issue**](Issue.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_get_issue_reactions** +> list[Reaction] issue_get_issue_reactions(owner, repo, index, page=page, limit=limit) + +Get a list reactions of an issue + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) + +try: + # Get a list reactions of an issue + api_response = api_instance.issue_get_issue_reactions(owner, repo, index, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling IssueApi->issue_get_issue_reactions: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the issue | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] + +### Return type + +[**list[Reaction]**](Reaction.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **issue_get_label** +> Label issue_get_label(owner, repo, id) + +Get a single label + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the label to get try: - # Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. - api_response = api_instance.issue_edit_issue_deadline(owner, repo, index, body=body) + # Get a single label + api_response = api_instance.issue_get_label(owner, repo, id) pprint(api_response) except ApiException as e: - print("Exception when calling IssueApi->issue_edit_issue_deadline: %s\n" % e) + print("Exception when calling IssueApi->issue_get_label: %s\n" % e) ``` ### Parameters @@ -1232,12 +2464,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **index** | **int**| index of the issue to create or update a deadline on | - **body** | [**EditDeadlineOption**](EditDeadlineOption.md)| | [optional] + **id** | **int**| id of the label to get | ### Return type -[**IssueDeadline**](IssueDeadline.md) +[**Label**](Label.md) ### Authorization @@ -1245,15 +2476,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/json, text/plain - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_edit_label** -> Label issue_edit_label(owner, repo, id, body=body) +# **issue_get_labels** +> list[Label] issue_get_labels(owner, repo, index) -Update a label +Get an issue's labels ### Example ```python @@ -1297,15 +2528,14 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the label to edit -body = giteapy.EditLabelOption() # EditLabelOption | (optional) +index = 789 # int | index of the issue try: - # Update a label - api_response = api_instance.issue_edit_label(owner, repo, id, body=body) + # Get an issue's labels + api_response = api_instance.issue_get_labels(owner, repo, index) pprint(api_response) except ApiException as e: - print("Exception when calling IssueApi->issue_edit_label: %s\n" % e) + print("Exception when calling IssueApi->issue_get_labels: %s\n" % e) ``` ### Parameters @@ -1314,12 +2544,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| id of the label to edit | - **body** | [**EditLabelOption**](EditLabelOption.md)| | [optional] + **index** | **int**| index of the issue | ### Return type -[**Label**](Label.md) +[**list[Label]**](Label.md) ### Authorization @@ -1327,15 +2556,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/json, text/plain - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_edit_milestone** -> Milestone issue_edit_milestone(owner, repo, id, body=body) +# **issue_get_milestone** +> Milestone issue_get_milestone(owner, repo, id) -Update a milestone +Get a milestone ### Example ```python @@ -1380,14 +2609,13 @@ api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo id = 789 # int | id of the milestone -body = giteapy.EditMilestoneOption() # EditMilestoneOption | (optional) try: - # Update a milestone - api_response = api_instance.issue_edit_milestone(owner, repo, id, body=body) + # Get a milestone + api_response = api_instance.issue_get_milestone(owner, repo, id) pprint(api_response) except ApiException as e: - print("Exception when calling IssueApi->issue_edit_milestone: %s\n" % e) + print("Exception when calling IssueApi->issue_get_milestone: %s\n" % e) ``` ### Parameters @@ -1397,7 +2625,6 @@ Name | Type | Description | Notes **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | **id** | **int**| id of the milestone | - **body** | [**EditMilestoneOption**](EditMilestoneOption.md)| | [optional] ### Return type @@ -1409,15 +2636,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/json, text/plain - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_get_comments** -> list[Comment] issue_get_comments(owner, repo, index, since=since) +# **issue_get_milestones_list** +> list[Milestone] issue_get_milestones_list(owner, repo, state=state, page=page, limit=limit) -List all comments on an issue +Get all of a repository's opened milestones ### Example ```python @@ -1461,15 +2688,16 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -index = 789 # int | index of the issue -since = 'since_example' # str | if provided, only comments updated since the specified time are returned. (optional) +state = 'state_example' # str | Milestone state, Recognised values are open, closed and all. Defaults to \"open\" (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: - # List all comments on an issue - api_response = api_instance.issue_get_comments(owner, repo, index, since=since) + # Get all of a repository's opened milestones + api_response = api_instance.issue_get_milestones_list(owner, repo, state=state, page=page, limit=limit) pprint(api_response) except ApiException as e: - print("Exception when calling IssueApi->issue_get_comments: %s\n" % e) + print("Exception when calling IssueApi->issue_get_milestones_list: %s\n" % e) ``` ### Parameters @@ -1478,12 +2706,13 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **index** | **int**| index of the issue | - **since** | **str**| if provided, only comments updated since the specified time are returned. | [optional] + **state** | **str**| Milestone state, Recognised values are open, closed and all. Defaults to \"open\" | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type -[**list[Comment]**](Comment.md) +[**list[Milestone]**](Milestone.md) ### Authorization @@ -1496,10 +2725,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_get_issue** -> Issue issue_get_issue(owner, repo, index) +# **issue_get_repo_comments** +> list[Comment] issue_get_repo_comments(owner, repo, since=since, before=before, page=page, limit=limit) -Get an issue +List all comments in a repository ### Example ```python @@ -1543,14 +2772,17 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -index = 789 # int | index of the issue to get +since = '2013-10-20T19:20:30+01:00' # datetime | if provided, only comments updated since the provided time are returned. (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | if provided, only comments updated before the provided time are returned. (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: - # Get an issue - api_response = api_instance.issue_get_issue(owner, repo, index) + # List all comments in a repository + api_response = api_instance.issue_get_repo_comments(owner, repo, since=since, before=before, page=page, limit=limit) pprint(api_response) except ApiException as e: - print("Exception when calling IssueApi->issue_get_issue: %s\n" % e) + print("Exception when calling IssueApi->issue_get_repo_comments: %s\n" % e) ``` ### Parameters @@ -1559,11 +2791,14 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **index** | **int**| index of the issue to get | + **since** | **datetime**| if provided, only comments updated since the provided time are returned. | [optional] + **before** | **datetime**| if provided, only comments updated before the provided time are returned. | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type -[**Issue**](Issue.md) +[**list[Comment]**](Comment.md) ### Authorization @@ -1576,10 +2811,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_get_label** -> Label issue_get_label(owner, repo, id) +# **issue_list_issues** +> list[Issue] issue_list_issues(owner, repo, state=state, labels=labels, q=q, type=type, milestones=milestones, page=page, limit=limit) -Get a single label +List a repository's issues ### Example ```python @@ -1623,14 +2858,20 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the label to get +state = 'state_example' # str | whether issue is open or closed (optional) +labels = 'labels_example' # str | comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded (optional) +q = 'q_example' # str | search string (optional) +type = 'type_example' # str | filter by type (issues / pulls) if set (optional) +milestones = 'milestones_example' # str | comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: - # Get a single label - api_response = api_instance.issue_get_label(owner, repo, id) + # List a repository's issues + api_response = api_instance.issue_list_issues(owner, repo, state=state, labels=labels, q=q, type=type, milestones=milestones, page=page, limit=limit) pprint(api_response) except ApiException as e: - print("Exception when calling IssueApi->issue_get_label: %s\n" % e) + print("Exception when calling IssueApi->issue_list_issues: %s\n" % e) ``` ### Parameters @@ -1639,11 +2880,17 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| id of the label to get | + **state** | **str**| whether issue is open or closed | [optional] + **labels** | **str**| comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded | [optional] + **q** | **str**| search string | [optional] + **type** | **str**| filter by type (issues / pulls) if set | [optional] + **milestones** | **str**| comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type -[**Label**](Label.md) +[**list[Issue]**](Issue.md) ### Authorization @@ -1656,10 +2903,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_get_labels** -> list[Label] issue_get_labels(owner, repo, index) +# **issue_list_labels** +> list[Label] issue_list_labels(owner, repo, page=page, limit=limit) -Get an issue's labels +Get all of a repository's labels ### Example ```python @@ -1703,14 +2950,15 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -index = 789 # int | index of the issue +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: - # Get an issue's labels - api_response = api_instance.issue_get_labels(owner, repo, index) + # Get all of a repository's labels + api_response = api_instance.issue_list_labels(owner, repo, page=page, limit=limit) pprint(api_response) except ApiException as e: - print("Exception when calling IssueApi->issue_get_labels: %s\n" % e) + print("Exception when calling IssueApi->issue_list_labels: %s\n" % e) ``` ### Parameters @@ -1719,7 +2967,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **index** | **int**| index of the issue | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -1736,10 +2985,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_get_milestone** -> Milestone issue_get_milestone(owner, repo, id) +# **issue_post_comment_reaction** +> Reaction issue_post_comment_reaction(owner, repo, id, content=content) -Get a milestone +Add a reaction to a comment of an issue ### Example ```python @@ -1783,14 +3032,15 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the milestone +id = 789 # int | id of the comment to edit +content = giteapy.EditReactionOption() # EditReactionOption | (optional) try: - # Get a milestone - api_response = api_instance.issue_get_milestone(owner, repo, id) + # Add a reaction to a comment of an issue + api_response = api_instance.issue_post_comment_reaction(owner, repo, id, content=content) pprint(api_response) except ApiException as e: - print("Exception when calling IssueApi->issue_get_milestone: %s\n" % e) + print("Exception when calling IssueApi->issue_post_comment_reaction: %s\n" % e) ``` ### Parameters @@ -1799,11 +3049,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| id of the milestone | + **id** | **int**| id of the comment to edit | + **content** | [**EditReactionOption**](EditReactionOption.md)| | [optional] ### Return type -[**Milestone**](Milestone.md) +[**Reaction**](Reaction.md) ### Authorization @@ -1811,15 +3062,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json, text/plain + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_get_milestones_list** -> list[Milestone] issue_get_milestones_list(owner, repo, state=state) +# **issue_post_issue_reaction** +> Reaction issue_post_issue_reaction(owner, repo, index, content=content) -Get all of a repository's opened milestones +Add a reaction to an issue ### Example ```python @@ -1863,14 +3114,15 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -state = 'state_example' # str | Milestone state, Recognised values are open, closed and all. Defaults to \"open\" (optional) +index = 789 # int | index of the issue +content = giteapy.EditReactionOption() # EditReactionOption | (optional) try: - # Get all of a repository's opened milestones - api_response = api_instance.issue_get_milestones_list(owner, repo, state=state) + # Add a reaction to an issue + api_response = api_instance.issue_post_issue_reaction(owner, repo, index, content=content) pprint(api_response) except ApiException as e: - print("Exception when calling IssueApi->issue_get_milestones_list: %s\n" % e) + print("Exception when calling IssueApi->issue_post_issue_reaction: %s\n" % e) ``` ### Parameters @@ -1879,11 +3131,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **state** | **str**| Milestone state, Recognised values are open, closed and all. Defaults to \"open\" | [optional] + **index** | **int**| index of the issue | + **content** | [**EditReactionOption**](EditReactionOption.md)| | [optional] ### Return type -[**list[Milestone]**](Milestone.md) +[**Reaction**](Reaction.md) ### Authorization @@ -1891,15 +3144,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json, text/plain + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_get_repo_comments** -> list[Comment] issue_get_repo_comments(owner, repo, since=since) +# **issue_remove_label** +> issue_remove_label(owner, repo, index, id) -List all comments in a repository +Remove a label from an issue ### Example ```python @@ -1943,14 +3196,14 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -since = 'since_example' # str | if provided, only comments updated since the provided time are returned. (optional) +index = 789 # int | index of the issue +id = 789 # int | id of the label to remove try: - # List all comments in a repository - api_response = api_instance.issue_get_repo_comments(owner, repo, since=since) - pprint(api_response) + # Remove a label from an issue + api_instance.issue_remove_label(owner, repo, index, id) except ApiException as e: - print("Exception when calling IssueApi->issue_get_repo_comments: %s\n" % e) + print("Exception when calling IssueApi->issue_remove_label: %s\n" % e) ``` ### Parameters @@ -1959,11 +3212,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **since** | **str**| if provided, only comments updated since the provided time are returned. | [optional] + **index** | **int**| index of the issue | + **id** | **int**| id of the label to remove | ### Return type -[**list[Comment]**](Comment.md) +void (empty response body) ### Authorization @@ -1976,10 +3230,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_list_issues** -> list[Issue] issue_list_issues(owner, repo, state=state, labels=labels, page=page, q=q) +# **issue_replace_labels** +> list[Label] issue_replace_labels(owner, repo, index, body=body) -List a repository's issues +Replace an issue's labels ### Example ```python @@ -2023,17 +3277,15 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -state = 'state_example' # str | whether issue is open or closed (optional) -labels = 'labels_example' # str | comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded (optional) -page = 56 # int | page number of requested issues (optional) -q = 'q_example' # str | search string (optional) +index = 789 # int | index of the issue +body = giteapy.IssueLabelsOption() # IssueLabelsOption | (optional) try: - # List a repository's issues - api_response = api_instance.issue_list_issues(owner, repo, state=state, labels=labels, page=page, q=q) + # Replace an issue's labels + api_response = api_instance.issue_replace_labels(owner, repo, index, body=body) pprint(api_response) except ApiException as e: - print("Exception when calling IssueApi->issue_list_issues: %s\n" % e) + print("Exception when calling IssueApi->issue_replace_labels: %s\n" % e) ``` ### Parameters @@ -2042,14 +3294,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **state** | **str**| whether issue is open or closed | [optional] - **labels** | **str**| comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded | [optional] - **page** | **int**| page number of requested issues | [optional] - **q** | **str**| search string | [optional] + **index** | **int**| index of the issue | + **body** | [**IssueLabelsOption**](IssueLabelsOption.md)| | [optional] ### Return type -[**list[Issue]**](Issue.md) +[**list[Label]**](Label.md) ### Authorization @@ -2057,15 +3307,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json, text/plain + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_list_labels** -> list[Label] issue_list_labels(owner, repo) +# **issue_reset_time** +> issue_reset_time(owner, repo, index) -Get all of a repository's labels +Reset a tracked time of an issue ### Example ```python @@ -2109,13 +3359,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the issue to add tracked time to try: - # Get all of a repository's labels - api_response = api_instance.issue_list_labels(owner, repo) - pprint(api_response) + # Reset a tracked time of an issue + api_instance.issue_reset_time(owner, repo, index) except ApiException as e: - print("Exception when calling IssueApi->issue_list_labels: %s\n" % e) + print("Exception when calling IssueApi->issue_reset_time: %s\n" % e) ``` ### Parameters @@ -2124,10 +3374,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | + **index** | **int**| index of the issue to add tracked time to | ### Return type -[**list[Label]**](Label.md) +void (empty response body) ### Authorization @@ -2135,15 +3386,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json, text/plain + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_remove_label** -> issue_remove_label(owner, repo, index, id) +# **issue_search_issues** +> list[Issue] issue_search_issues(state=state, labels=labels, q=q, priority_repo_id=priority_repo_id, type=type, page=page) -Remove a label from an issue +Search for issues across the repositories that the user has access to ### Example ```python @@ -2185,30 +3436,35 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repo -repo = 'repo_example' # str | name of the repo -index = 789 # int | index of the issue -id = 789 # int | id of the label to remove +state = 'state_example' # str | whether issue is open or closed (optional) +labels = 'labels_example' # str | comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded (optional) +q = 'q_example' # str | search string (optional) +priority_repo_id = 789 # int | repository to prioritize in the results (optional) +type = 'type_example' # str | filter by type (issues / pulls) if set (optional) +page = 56 # int | page number of requested issues (optional) try: - # Remove a label from an issue - api_instance.issue_remove_label(owner, repo, index, id) + # Search for issues across the repositories that the user has access to + api_response = api_instance.issue_search_issues(state=state, labels=labels, q=q, priority_repo_id=priority_repo_id, type=type, page=page) + pprint(api_response) except ApiException as e: - print("Exception when calling IssueApi->issue_remove_label: %s\n" % e) + print("Exception when calling IssueApi->issue_search_issues: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repo | - **repo** | **str**| name of the repo | - **index** | **int**| index of the issue | - **id** | **int**| id of the label to remove | + **state** | **str**| whether issue is open or closed | [optional] + **labels** | **str**| comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded | [optional] + **q** | **str**| search string | [optional] + **priority_repo_id** | **int**| repository to prioritize in the results | [optional] + **type** | **str**| filter by type (issues / pulls) if set | [optional] + **page** | **int**| page number of requested issues | [optional] ### Return type -void (empty response body) +[**list[Issue]**](Issue.md) ### Authorization @@ -2221,10 +3477,10 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_replace_labels** -> list[Label] issue_replace_labels(owner, repo, index, body=body) +# **issue_start_stop_watch** +> issue_start_stop_watch(owner, repo, index) -Replace an issue's labels +Start stopwatch on an issue. ### Example ```python @@ -2268,15 +3524,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -index = 789 # int | index of the issue -body = giteapy.IssueLabelsOption() # IssueLabelsOption | (optional) +index = 789 # int | index of the issue to create the stopwatch on try: - # Replace an issue's labels - api_response = api_instance.issue_replace_labels(owner, repo, index, body=body) - pprint(api_response) + # Start stopwatch on an issue. + api_instance.issue_start_stop_watch(owner, repo, index) except ApiException as e: - print("Exception when calling IssueApi->issue_replace_labels: %s\n" % e) + print("Exception when calling IssueApi->issue_start_stop_watch: %s\n" % e) ``` ### Parameters @@ -2285,12 +3539,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **index** | **int**| index of the issue | - **body** | [**IssueLabelsOption**](IssueLabelsOption.md)| | [optional] + **index** | **int**| index of the issue to create the stopwatch on | ### Return type -[**list[Label]**](Label.md) +void (empty response body) ### Authorization @@ -2303,10 +3556,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_start_stop_watch** -> issue_start_stop_watch(owner, repo, index) +# **issue_stop_stop_watch** +> issue_stop_stop_watch(owner, repo, index) -Start stopwatch on an issue. +Stop an issue's existing stopwatch. ### Example ```python @@ -2350,13 +3603,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -index = 789 # int | index of the issue to create the stopwatch on +index = 789 # int | index of the issue to stop the stopwatch on try: - # Start stopwatch on an issue. - api_instance.issue_start_stop_watch(owner, repo, index) + # Stop an issue's existing stopwatch. + api_instance.issue_stop_stop_watch(owner, repo, index) except ApiException as e: - print("Exception when calling IssueApi->issue_start_stop_watch: %s\n" % e) + print("Exception when calling IssueApi->issue_stop_stop_watch: %s\n" % e) ``` ### Parameters @@ -2365,7 +3618,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **index** | **int**| index of the issue to create the stopwatch on | + **index** | **int**| index of the issue to stop the stopwatch on | ### Return type @@ -2382,10 +3635,10 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **issue_stop_watch** -> issue_stop_watch(owner, repo, index) +# **issue_subscriptions** +> list[User] issue_subscriptions(owner, repo, index, page=page, limit=limit) -Stop an issue's existing stopwatch. +Get users who subscribed on an issue. ### Example ```python @@ -2429,13 +3682,16 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -index = 789 # int | index of the issue to stop the stopwatch on +index = 789 # int | index of the issue +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: - # Stop an issue's existing stopwatch. - api_instance.issue_stop_watch(owner, repo, index) + # Get users who subscribed on an issue. + api_response = api_instance.issue_subscriptions(owner, repo, index, page=page, limit=limit) + pprint(api_response) except ApiException as e: - print("Exception when calling IssueApi->issue_stop_watch: %s\n" % e) + print("Exception when calling IssueApi->issue_subscriptions: %s\n" % e) ``` ### Parameters @@ -2444,11 +3700,13 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **index** | **int**| index of the issue to stop the stopwatch on | + **index** | **int**| index of the issue | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type -void (empty response body) +[**list[User]**](User.md) ### Authorization @@ -2462,7 +3720,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **issue_tracked_times** -> list[TrackedTime] issue_tracked_times(owner, repo, id) +> list[TrackedTime] issue_tracked_times(owner, repo, index, since=since, before=before, page=page, limit=limit) List an issue's tracked times @@ -2508,11 +3766,15 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.IssueApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | index of the issue +index = 789 # int | index of the issue +since = '2013-10-20T19:20:30+01:00' # datetime | Only show times updated after the given time. This is a timestamp in RFC 3339 format (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Only show times updated before the given time. This is a timestamp in RFC 3339 format (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List an issue's tracked times - api_response = api_instance.issue_tracked_times(owner, repo, id) + api_response = api_instance.issue_tracked_times(owner, repo, index, since=since, before=before, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling IssueApi->issue_tracked_times: %s\n" % e) @@ -2524,7 +3786,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| index of the issue | + **index** | **int**| index of the issue | + **since** | **datetime**| Only show times updated after the given time. This is a timestamp in RFC 3339 format | [optional] + **before** | **datetime**| Only show times updated before the given time. This is a timestamp in RFC 3339 format | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type diff --git a/docs/IssueDeadline.md b/docs/IssueDeadline.md index 962a655..9fb1d19 100755 --- a/docs/IssueDeadline.md +++ b/docs/IssueDeadline.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**due_date** | **datetime** | | [optional] +**due_date** | **datetime** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IssueLabelsOption.md b/docs/IssueLabelsOption.md index 07f00ff..7c24881 100755 --- a/docs/IssueLabelsOption.md +++ b/docs/IssueLabelsOption.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**labels** | **list[int]** | list of label IDs | [optional] +**labels** | **list[int]** | list of label IDs | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Label.md b/docs/Label.md index 84d41b0..5d383a9 100755 --- a/docs/Label.md +++ b/docs/Label.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**color** | **str** | | [optional] -**description** | **str** | | [optional] -**id** | **int** | | [optional] -**name** | **str** | | [optional] -**url** | **str** | | [optional] +**color** | **str** | | [optional] +**description** | **str** | | [optional] +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MarkdownOption.md b/docs/MarkdownOption.md index e2f51d6..924fc33 100755 --- a/docs/MarkdownOption.md +++ b/docs/MarkdownOption.md @@ -3,10 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**context** | **str** | Context to render in: body | [optional] -**mode** | **str** | Mode to render in: body | [optional] -**text** | **str** | Text markdown to render in: body | [optional] -**wiki** | **bool** | Is it a wiki page ? in: body | [optional] +**context** | **str** | Context to render in: body | [optional] +**mode** | **str** | Mode to render in: body | [optional] +**text** | **str** | Text markdown to render in: body | [optional] +**wiki** | **bool** | Is it a wiki page ? in: body | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MergePullRequestOption.md b/docs/MergePullRequestOption.md index 29317b0..9229a65 100755 --- a/docs/MergePullRequestOption.md +++ b/docs/MergePullRequestOption.md @@ -3,9 +3,10 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**do** | **str** | | -**merge_message_field** | **str** | | [optional] -**merge_title_field** | **str** | | [optional] +**do** | **str** | | +**merge_message_field** | **str** | | [optional] +**merge_title_field** | **str** | | [optional] +**force_merge** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MigrateRepoForm.md b/docs/MigrateRepoForm.md index feaad92..570d981 100755 --- a/docs/MigrateRepoForm.md +++ b/docs/MigrateRepoForm.md @@ -3,20 +3,20 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**auth_password** | **str** | | [optional] -**auth_username** | **str** | | [optional] -**clone_addr** | **str** | | -**description** | **str** | | [optional] -**issues** | **bool** | | [optional] -**labels** | **bool** | | [optional] -**milestones** | **bool** | | [optional] -**mirror** | **bool** | | [optional] -**private** | **bool** | | [optional] -**pull_requests** | **bool** | | [optional] -**releases** | **bool** | | [optional] -**repo_name** | **str** | | -**uid** | **int** | | -**wiki** | **bool** | | [optional] +**auth_password** | **str** | | [optional] +**auth_username** | **str** | | [optional] +**clone_addr** | **str** | | +**description** | **str** | | [optional] +**issues** | **bool** | | [optional] +**labels** | **bool** | | [optional] +**milestones** | **bool** | | [optional] +**mirror** | **bool** | | [optional] +**private** | **bool** | | [optional] +**pull_requests** | **bool** | | [optional] +**releases** | **bool** | | [optional] +**repo_name** | **str** | | +**uid** | **int** | | +**wiki** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Milestone.md b/docs/Milestone.md index 1275ee3..f4108fd 100755 --- a/docs/Milestone.md +++ b/docs/Milestone.md @@ -3,14 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**closed_at** | **datetime** | | [optional] -**closed_issues** | **int** | | [optional] -**description** | **str** | | [optional] -**due_on** | **datetime** | | [optional] -**id** | **int** | | [optional] -**open_issues** | **int** | | [optional] -**state** | [**StateType**](StateType.md) | | [optional] -**title** | **str** | | [optional] +**closed_at** | **datetime** | | [optional] +**closed_issues** | **int** | | [optional] +**description** | **str** | | [optional] +**due_on** | **datetime** | | [optional] +**id** | **int** | | [optional] +**open_issues** | **int** | | [optional] +**state** | [**StateType**](StateType.md) | | [optional] +**title** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NotificationApi.md b/docs/NotificationApi.md new file mode 100644 index 0000000..9696880 --- /dev/null +++ b/docs/NotificationApi.md @@ -0,0 +1,564 @@ +# giteapy.NotificationApi + +All URIs are relative to *http://localhost:3000/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**notify_get_list**](NotificationApi.md#notify_get_list) | **GET** /notifications | List users's notification threads +[**notify_get_repo_list**](NotificationApi.md#notify_get_repo_list) | **GET** /repos/{owner}/{repo}/notifications | List users's notification threads on a specific repo +[**notify_get_thread**](NotificationApi.md#notify_get_thread) | **GET** /notifications/threads/{id} | Get notification thread by ID +[**notify_new_available**](NotificationApi.md#notify_new_available) | **GET** /notifications/new | Check if unread notifications exist +[**notify_read_list**](NotificationApi.md#notify_read_list) | **PUT** /notifications | Mark notification threads as read +[**notify_read_repo_list**](NotificationApi.md#notify_read_repo_list) | **PUT** /repos/{owner}/{repo}/notifications | Mark notification threads as read on a specific repo +[**notify_read_thread**](NotificationApi.md#notify_read_thread) | **PATCH** /notifications/threads/{id} | Mark notification thread as read by ID + + +# **notify_get_list** +> list[NotificationThread] notify_get_list(all=all, since=since, before=before, page=page, limit=limit) + +List users's notification threads + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.NotificationApi(giteapy.ApiClient(configuration)) +all = 'all_example' # str | If true, show notifications marked as read. Default value is false (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Only show notifications updated after the given time. This is a timestamp in RFC 3339 format (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Only show notifications updated before the given time. This is a timestamp in RFC 3339 format (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) + +try: + # List users's notification threads + api_response = api_instance.notify_get_list(all=all, since=since, before=before, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling NotificationApi->notify_get_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **all** | **str**| If true, show notifications marked as read. Default value is false | [optional] + **since** | **datetime**| Only show notifications updated after the given time. This is a timestamp in RFC 3339 format | [optional] + **before** | **datetime**| Only show notifications updated before the given time. This is a timestamp in RFC 3339 format | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] + +### Return type + +[**list[NotificationThread]**](NotificationThread.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **notify_get_repo_list** +> list[NotificationThread] notify_get_repo_list(owner, repo, all=all, since=since, before=before, page=page, limit=limit) + +List users's notification threads on a specific repo + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.NotificationApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +all = 'all_example' # str | If true, show notifications marked as read. Default value is false (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Only show notifications updated after the given time. This is a timestamp in RFC 3339 format (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Only show notifications updated before the given time. This is a timestamp in RFC 3339 format (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) + +try: + # List users's notification threads on a specific repo + api_response = api_instance.notify_get_repo_list(owner, repo, all=all, since=since, before=before, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling NotificationApi->notify_get_repo_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **all** | **str**| If true, show notifications marked as read. Default value is false | [optional] + **since** | **datetime**| Only show notifications updated after the given time. This is a timestamp in RFC 3339 format | [optional] + **before** | **datetime**| Only show notifications updated before the given time. This is a timestamp in RFC 3339 format | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] + +### Return type + +[**list[NotificationThread]**](NotificationThread.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **notify_get_thread** +> NotificationThread notify_get_thread(id) + +Get notification thread by ID + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.NotificationApi(giteapy.ApiClient(configuration)) +id = 'id_example' # str | id of notification thread + +try: + # Get notification thread by ID + api_response = api_instance.notify_get_thread(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling NotificationApi->notify_get_thread: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| id of notification thread | + +### Return type + +[**NotificationThread**](NotificationThread.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **notify_new_available** +> NotificationCount notify_new_available() + +Check if unread notifications exist + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.NotificationApi(giteapy.ApiClient(configuration)) + +try: + # Check if unread notifications exist + api_response = api_instance.notify_new_available() + pprint(api_response) +except ApiException as e: + print("Exception when calling NotificationApi->notify_new_available: %s\n" % e) +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**NotificationCount**](NotificationCount.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **notify_read_list** +> notify_read_list(last_read_at=last_read_at) + +Mark notification threads as read + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.NotificationApi(giteapy.ApiClient(configuration)) +last_read_at = '2013-10-20T19:20:30+01:00' # datetime | Describes the last point that notifications were checked. Anything updated since this time will not be updated. (optional) + +try: + # Mark notification threads as read + api_instance.notify_read_list(last_read_at=last_read_at) +except ApiException as e: + print("Exception when calling NotificationApi->notify_read_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **last_read_at** | **datetime**| Describes the last point that notifications were checked. Anything updated since this time will not be updated. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **notify_read_repo_list** +> notify_read_repo_list(owner, repo, last_read_at=last_read_at) + +Mark notification threads as read on a specific repo + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.NotificationApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +last_read_at = '2013-10-20T19:20:30+01:00' # datetime | Describes the last point that notifications were checked. Anything updated since this time will not be updated. (optional) + +try: + # Mark notification threads as read on a specific repo + api_instance.notify_read_repo_list(owner, repo, last_read_at=last_read_at) +except ApiException as e: + print("Exception when calling NotificationApi->notify_read_repo_list: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **last_read_at** | **datetime**| Describes the last point that notifications were checked. Anything updated since this time will not be updated. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **notify_read_thread** +> notify_read_thread(id) + +Mark notification thread as read by ID + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.NotificationApi(giteapy.ApiClient(configuration)) +id = 'id_example' # str | id of notification thread + +try: + # Mark notification thread as read by ID + api_instance.notify_read_thread(id) +except ApiException as e: + print("Exception when calling NotificationApi->notify_read_thread: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| id of notification thread | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/NotificationCount.md b/docs/NotificationCount.md new file mode 100644 index 0000000..38bc9a7 --- /dev/null +++ b/docs/NotificationCount.md @@ -0,0 +1,10 @@ +# NotificationCount + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NotificationSubject.md b/docs/NotificationSubject.md new file mode 100644 index 0000000..0ad3dca --- /dev/null +++ b/docs/NotificationSubject.md @@ -0,0 +1,13 @@ +# NotificationSubject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**latest_comment_url** | **str** | | [optional] +**title** | **str** | | [optional] +**type** | **str** | | [optional] +**url** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NotificationThread.md b/docs/NotificationThread.md new file mode 100644 index 0000000..e19f79c --- /dev/null +++ b/docs/NotificationThread.md @@ -0,0 +1,16 @@ +# NotificationThread + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**pinned** | **bool** | | [optional] +**repository** | [**Repository**](Repository.md) | | [optional] +**subject** | [**NotificationSubject**](NotificationSubject.md) | | [optional] +**unread** | **bool** | | [optional] +**updated_at** | **datetime** | | [optional] +**url** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OAuth2Application.md b/docs/OAuth2Application.md new file mode 100644 index 0000000..3158408 --- /dev/null +++ b/docs/OAuth2Application.md @@ -0,0 +1,15 @@ +# OAuth2Application + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client_id** | **str** | | [optional] +**client_secret** | **str** | | [optional] +**created** | **datetime** | | [optional] +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**redirect_uris** | **list[str]** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Organization.md b/docs/Organization.md index 5827798..04aef00 100755 --- a/docs/Organization.md +++ b/docs/Organization.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**avatar_url** | **str** | | [optional] -**description** | **str** | | [optional] -**full_name** | **str** | | [optional] -**id** | **int** | | [optional] -**location** | **str** | | [optional] -**repo_admin_change_team_access** | **bool** | | [optional] -**username** | **str** | | [optional] -**visibility** | **str** | | [optional] -**website** | **str** | | [optional] +**avatar_url** | **str** | | [optional] +**description** | **str** | | [optional] +**full_name** | **str** | | [optional] +**id** | **int** | | [optional] +**location** | **str** | | [optional] +**repo_admin_change_team_access** | **bool** | | [optional] +**username** | **str** | | [optional] +**visibility** | **str** | | [optional] +**website** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md index df9ef3b..ca8d6c0 100755 --- a/docs/OrganizationApi.md +++ b/docs/OrganizationApi.md @@ -4,27 +4,34 @@ All URIs are relative to *http://localhost:3000/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_org_repo**](OrganizationApi.md#create_org_repo) | **POST** /org/{org}/repos | Create a repository in an organization +[**create_org_repo**](OrganizationApi.md#create_org_repo) | **POST** /orgs/{org}/repos | Create a repository in an organization +[**create_org_repo_deprecated**](OrganizationApi.md#create_org_repo_deprecated) | **POST** /org/{org}/repos | Create a repository in an organization [**org_add_team_member**](OrganizationApi.md#org_add_team_member) | **PUT** /teams/{id}/members/{username} | Add a team member [**org_add_team_repository**](OrganizationApi.md#org_add_team_repository) | **PUT** /teams/{id}/repos/{org}/{repo} | Add a repository to a team [**org_conceal_member**](OrganizationApi.md#org_conceal_member) | **DELETE** /orgs/{org}/public_members/{username} | Conceal a user's membership [**org_create**](OrganizationApi.md#org_create) | **POST** /orgs | Create an organization [**org_create_hook**](OrganizationApi.md#org_create_hook) | **POST** /orgs/{org}/hooks/ | Create a hook +[**org_create_label**](OrganizationApi.md#org_create_label) | **POST** /orgs/{org}/labels | Create a label for an organization [**org_create_team**](OrganizationApi.md#org_create_team) | **POST** /orgs/{org}/teams | Create a team [**org_delete**](OrganizationApi.md#org_delete) | **DELETE** /orgs/{org} | Delete an organization [**org_delete_hook**](OrganizationApi.md#org_delete_hook) | **DELETE** /orgs/{org}/hooks/{id} | Delete a hook +[**org_delete_label**](OrganizationApi.md#org_delete_label) | **DELETE** /orgs/{org}/labels/{id} | Delete a label [**org_delete_member**](OrganizationApi.md#org_delete_member) | **DELETE** /orgs/{org}/members/{username} | Remove a member from an organization [**org_delete_team**](OrganizationApi.md#org_delete_team) | **DELETE** /teams/{id} | Delete a team [**org_edit**](OrganizationApi.md#org_edit) | **PATCH** /orgs/{org} | Edit an organization [**org_edit_hook**](OrganizationApi.md#org_edit_hook) | **PATCH** /orgs/{org}/hooks/{id} | Update a hook +[**org_edit_label**](OrganizationApi.md#org_edit_label) | **PATCH** /orgs/{org}/labels/{id} | Update a label [**org_edit_team**](OrganizationApi.md#org_edit_team) | **PATCH** /teams/{id} | Edit a team [**org_get**](OrganizationApi.md#org_get) | **GET** /orgs/{org} | Get an organization +[**org_get_all**](OrganizationApi.md#org_get_all) | **GET** /orgs | Get list of organizations [**org_get_hook**](OrganizationApi.md#org_get_hook) | **GET** /orgs/{org}/hooks/{id} | Get a hook +[**org_get_label**](OrganizationApi.md#org_get_label) | **GET** /orgs/{org}/labels/{id} | Get a single label [**org_get_team**](OrganizationApi.md#org_get_team) | **GET** /teams/{id} | Get a team [**org_is_member**](OrganizationApi.md#org_is_member) | **GET** /orgs/{org}/members/{username} | Check if a user is a member of an organization [**org_is_public_member**](OrganizationApi.md#org_is_public_member) | **GET** /orgs/{org}/public_members/{username} | Check if a user is a public member of an organization [**org_list_current_user_orgs**](OrganizationApi.md#org_list_current_user_orgs) | **GET** /user/orgs | List the current user's organizations [**org_list_hooks**](OrganizationApi.md#org_list_hooks) | **GET** /orgs/{org}/hooks | List an organization's webhooks +[**org_list_labels**](OrganizationApi.md#org_list_labels) | **GET** /orgs/{org}/labels | List an organization's labels [**org_list_members**](OrganizationApi.md#org_list_members) | **GET** /orgs/{org}/members | List an organization's members [**org_list_public_members**](OrganizationApi.md#org_list_public_members) | **GET** /orgs/{org}/public_members | List an organization's public members [**org_list_repos**](OrganizationApi.md#org_list_repos) | **GET** /orgs/{org}/repos | List an organization's repos @@ -117,6 +124,84 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **create_org_repo_deprecated** +> Repository create_org_repo_deprecated(org, body=body) + +Create a repository in an organization + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) +org = 'org_example' # str | name of organization +body = giteapy.CreateRepoOption() # CreateRepoOption | (optional) + +try: + # Create a repository in an organization + api_response = api_instance.create_org_repo_deprecated(org, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->create_org_repo_deprecated: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of organization | + **body** | [**CreateRepoOption**](CreateRepoOption.md)| | [optional] + +### Return type + +[**Repository**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **org_add_team_member** > org_add_team_member(id, username) @@ -504,6 +589,84 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **org_create_label** +> Label org_create_label(org, body=body) + +Create a label for an organization + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +body = giteapy.CreateLabelOption() # CreateLabelOption | (optional) + +try: + # Create a label for an organization + api_response = api_instance.org_create_label(org, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_create_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **body** | [**CreateLabelOption**](CreateLabelOption.md)| | [optional] + +### Return type + +[**Label**](Label.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **org_create_team** > Team org_create_team(org, body=body) @@ -734,6 +897,83 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **org_delete_label** +> org_delete_label(org, id) + +Delete a label + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +id = 789 # int | id of the label to delete + +try: + # Delete a label + api_instance.org_delete_label(org, id) +except ApiException as e: + print("Exception when calling OrganizationApi->org_delete_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **id** | **int**| id of the label to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **org_delete_member** > org_delete_member(org, username) @@ -1044,6 +1284,86 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **org_edit_label** +> Label org_edit_label(org, id, body=body) + +Update a label + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +id = 789 # int | id of the label to edit +body = giteapy.EditLabelOption() # EditLabelOption | (optional) + +try: + # Update a label + api_response = api_instance.org_edit_label(org, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_edit_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **id** | **int**| id of the label to edit | + **body** | [**EditLabelOption**](EditLabelOption.md)| | [optional] + +### Return type + +[**Label**](Label.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **org_edit_team** > Team org_edit_team(id, body=body) @@ -1198,6 +1518,84 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **org_get_all** +> list[Organization] org_get_all(page=page, limit=limit) + +Get list of organizations + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) + +try: + # Get list of organizations + api_response = api_instance.org_get_all(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_get_all: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] + +### Return type + +[**list[Organization]**](Organization.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **org_get_hook** > Hook org_get_hook(org, id) @@ -1276,6 +1674,84 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **org_get_label** +> Label org_get_label(org, id) + +Get a single label + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +id = 789 # int | id of the label to get + +try: + # Get a single label + api_response = api_instance.org_get_label(org, id) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_get_label: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **id** | **int**| id of the label to get | + +### Return type + +[**Label**](Label.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **org_get_team** > Team org_get_team(id) @@ -1507,7 +1983,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **org_list_current_user_orgs** -> list[Organization] org_list_current_user_orgs() +> list[Organization] org_list_current_user_orgs(page=page, limit=limit) List the current user's organizations @@ -1551,17 +2027,23 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List the current user's organizations - api_response = api_instance.org_list_current_user_orgs() + api_response = api_instance.org_list_current_user_orgs(page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->org_list_current_user_orgs: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -1579,7 +2061,7 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **org_list_hooks** -> list[Hook] org_list_hooks(org) +> list[Hook] org_list_hooks(org, page=page, limit=limit) List an organization's webhooks @@ -1624,10 +2106,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) org = 'org_example' # str | name of the organization +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List an organization's webhooks - api_response = api_instance.org_list_hooks(org) + api_response = api_instance.org_list_hooks(org, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->org_list_hooks: %s\n" % e) @@ -1638,6 +2122,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **str**| name of the organization | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -1654,8 +2140,88 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **org_list_labels** +> list[Label] org_list_labels(org, page=page, limit=limit) + +List an organization's labels + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) +org = 'org_example' # str | name of the organization +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) + +try: + # List an organization's labels + api_response = api_instance.org_list_labels(org, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling OrganizationApi->org_list_labels: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **str**| name of the organization | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] + +### Return type + +[**list[Label]**](Label.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **org_list_members** -> list[User] org_list_members(org) +> list[User] org_list_members(org, page=page, limit=limit) List an organization's members @@ -1700,10 +2266,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) org = 'org_example' # str | name of the organization +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List an organization's members - api_response = api_instance.org_list_members(org) + api_response = api_instance.org_list_members(org, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->org_list_members: %s\n" % e) @@ -1714,6 +2282,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **str**| name of the organization | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -1731,7 +2301,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **org_list_public_members** -> list[User] org_list_public_members(org) +> list[User] org_list_public_members(org, page=page, limit=limit) List an organization's public members @@ -1776,10 +2346,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) org = 'org_example' # str | name of the organization +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List an organization's public members - api_response = api_instance.org_list_public_members(org) + api_response = api_instance.org_list_public_members(org, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->org_list_public_members: %s\n" % e) @@ -1790,6 +2362,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **str**| name of the organization | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -1807,7 +2381,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **org_list_repos** -> list[Repository] org_list_repos(org) +> list[Repository] org_list_repos(org, page=page, limit=limit) List an organization's repos @@ -1852,10 +2426,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) org = 'org_example' # str | name of the organization +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List an organization's repos - api_response = api_instance.org_list_repos(org) + api_response = api_instance.org_list_repos(org, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->org_list_repos: %s\n" % e) @@ -1866,6 +2442,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **str**| name of the organization | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -1961,7 +2539,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **org_list_team_members** -> list[User] org_list_team_members(id) +> list[User] org_list_team_members(id, page=page, limit=limit) List a team's members @@ -2006,10 +2584,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) id = 789 # int | id of the team +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List a team's members - api_response = api_instance.org_list_team_members(id) + api_response = api_instance.org_list_team_members(id, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->org_list_team_members: %s\n" % e) @@ -2020,6 +2600,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **int**| id of the team | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -2037,7 +2619,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **org_list_team_repos** -> list[Repository] org_list_team_repos(id) +> list[Repository] org_list_team_repos(id, page=page, limit=limit) List a team's repos @@ -2082,10 +2664,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) id = 789 # int | id of the team +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List a team's repos - api_response = api_instance.org_list_team_repos(id) + api_response = api_instance.org_list_team_repos(id, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->org_list_team_repos: %s\n" % e) @@ -2096,6 +2680,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **id** | **int**| id of the team | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -2113,7 +2699,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **org_list_teams** -> list[Team] org_list_teams(org) +> list[Team] org_list_teams(org, page=page, limit=limit) List an organization's teams @@ -2158,10 +2744,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) org = 'org_example' # str | name of the organization +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List an organization's teams - api_response = api_instance.org_list_teams(org) + api_response = api_instance.org_list_teams(org, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->org_list_teams: %s\n" % e) @@ -2172,6 +2760,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **str**| name of the organization | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -2189,7 +2779,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **org_list_user_orgs** -> list[Organization] org_list_user_orgs(username) +> list[Organization] org_list_user_orgs(username, page=page, limit=limit) List a user's organizations @@ -2234,10 +2824,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) username = 'username_example' # str | username of user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List a user's organizations - api_response = api_instance.org_list_user_orgs(username) + api_response = api_instance.org_list_user_orgs(username, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->org_list_user_orgs: %s\n" % e) @@ -2248,6 +2840,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **str**| username of user | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -2500,7 +3094,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **team_search** -> InlineResponse200 team_search(org, q=q, include_desc=include_desc, limit=limit, page=page) +> InlineResponse200 team_search(org, q=q, include_desc=include_desc, page=page, limit=limit) Search for teams within an organization @@ -2547,12 +3141,12 @@ api_instance = giteapy.OrganizationApi(giteapy.ApiClient(configuration)) org = 'org_example' # str | name of the organization q = 'q_example' # str | keywords to search (optional) include_desc = true # bool | include search within team description (defaults to true) (optional) -limit = 56 # int | limit size of results (optional) page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # Search for teams within an organization - api_response = api_instance.team_search(org, q=q, include_desc=include_desc, limit=limit, page=page) + api_response = api_instance.team_search(org, q=q, include_desc=include_desc, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling OrganizationApi->team_search: %s\n" % e) @@ -2565,8 +3159,8 @@ Name | Type | Description | Notes **org** | **str**| name of the organization | **q** | **str**| keywords to search | [optional] **include_desc** | **bool**| include search within team description (defaults to true) | [optional] - **limit** | **int**| limit size of results | [optional] **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type diff --git a/docs/PRBranchInfo.md b/docs/PRBranchInfo.md index a62f2f7..08da01a 100755 --- a/docs/PRBranchInfo.md +++ b/docs/PRBranchInfo.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**label** | **str** | | [optional] -**ref** | **str** | | [optional] -**repo** | [**Repository**](Repository.md) | | [optional] -**repo_id** | **int** | | [optional] -**sha** | **str** | | [optional] +**label** | **str** | | [optional] +**ref** | **str** | | [optional] +**repo** | [**Repository**](Repository.md) | | [optional] +**repo_id** | **int** | | [optional] +**sha** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PayloadCommit.md b/docs/PayloadCommit.md index aadcb9d..46d19dd 100755 --- a/docs/PayloadCommit.md +++ b/docs/PayloadCommit.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**added** | **list[str]** | | [optional] -**author** | [**PayloadUser**](PayloadUser.md) | | [optional] -**committer** | [**PayloadUser**](PayloadUser.md) | | [optional] -**id** | **str** | sha1 hash of the commit | [optional] -**message** | **str** | | [optional] -**modified** | **list[str]** | | [optional] -**removed** | **list[str]** | | [optional] -**timestamp** | **datetime** | | [optional] -**url** | **str** | | [optional] -**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional] +**added** | **list[str]** | | [optional] +**author** | [**PayloadUser**](PayloadUser.md) | | [optional] +**committer** | [**PayloadUser**](PayloadUser.md) | | [optional] +**id** | **str** | sha1 hash of the commit | [optional] +**message** | **str** | | [optional] +**modified** | **list[str]** | | [optional] +**removed** | **list[str]** | | [optional] +**timestamp** | **datetime** | | [optional] +**url** | **str** | | [optional] +**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PayloadCommitVerification.md b/docs/PayloadCommitVerification.md index 7380798..8b71b40 100755 --- a/docs/PayloadCommitVerification.md +++ b/docs/PayloadCommitVerification.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**payload** | **str** | | [optional] -**reason** | **str** | | [optional] -**signature** | **str** | | [optional] -**signer** | [**PayloadUser**](PayloadUser.md) | | [optional] -**verified** | **bool** | | [optional] +**payload** | **str** | | [optional] +**reason** | **str** | | [optional] +**signature** | **str** | | [optional] +**signer** | [**PayloadUser**](PayloadUser.md) | | [optional] +**verified** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PayloadUser.md b/docs/PayloadUser.md index 7189554..a8215d0 100755 --- a/docs/PayloadUser.md +++ b/docs/PayloadUser.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**name** | **str** | Full name of the commit author | [optional] -**username** | **str** | | [optional] +**email** | **str** | | [optional] +**name** | **str** | Full name of the commit author | [optional] +**username** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Permission.md b/docs/Permission.md index 123f583..c7ece55 100755 --- a/docs/Permission.md +++ b/docs/Permission.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**admin** | **bool** | | [optional] -**pull** | **bool** | | [optional] -**push** | **bool** | | [optional] +**admin** | **bool** | | [optional] +**pull** | **bool** | | [optional] +**push** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PublicKey.md b/docs/PublicKey.md index b6ba83d..13cb77a 100755 --- a/docs/PublicKey.md +++ b/docs/PublicKey.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**created_at** | **datetime** | | [optional] -**fingerprint** | **str** | | [optional] -**id** | **int** | | [optional] -**key** | **str** | | [optional] -**key_type** | **str** | | [optional] -**read_only** | **bool** | | [optional] -**title** | **str** | | [optional] -**url** | **str** | | [optional] -**user** | [**User**](User.md) | | [optional] +**created_at** | **datetime** | | [optional] +**fingerprint** | **str** | | [optional] +**id** | **int** | | [optional] +**key** | **str** | | [optional] +**key_type** | **str** | | [optional] +**read_only** | **bool** | | [optional] +**title** | **str** | | [optional] +**url** | **str** | | [optional] +**user** | [**User**](User.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PullRequest.md b/docs/PullRequest.md index 7eb1569..6d9fef3 100755 --- a/docs/PullRequest.md +++ b/docs/PullRequest.md @@ -3,33 +3,33 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**assignee** | [**User**](User.md) | | [optional] -**assignees** | [**list[User]**](User.md) | | [optional] -**base** | [**PRBranchInfo**](PRBranchInfo.md) | | [optional] -**body** | **str** | | [optional] -**closed_at** | **datetime** | | [optional] -**comments** | **int** | | [optional] -**created_at** | **datetime** | | [optional] -**diff_url** | **str** | | [optional] -**due_date** | **datetime** | | [optional] -**head** | [**PRBranchInfo**](PRBranchInfo.md) | | [optional] -**html_url** | **str** | | [optional] -**id** | **int** | | [optional] -**labels** | [**list[Label]**](Label.md) | | [optional] -**merge_base** | **str** | | [optional] -**merge_commit_sha** | **str** | | [optional] -**mergeable** | **bool** | | [optional] -**merged** | **bool** | | [optional] -**merged_at** | **datetime** | | [optional] -**merged_by** | [**User**](User.md) | | [optional] -**milestone** | [**Milestone**](Milestone.md) | | [optional] -**number** | **int** | | [optional] -**patch_url** | **str** | | [optional] -**state** | [**StateType**](StateType.md) | | [optional] -**title** | **str** | | [optional] -**updated_at** | **datetime** | | [optional] -**url** | **str** | | [optional] -**user** | [**User**](User.md) | | [optional] +**assignee** | [**User**](User.md) | | [optional] +**assignees** | [**list[User]**](User.md) | | [optional] +**base** | [**PRBranchInfo**](PRBranchInfo.md) | | [optional] +**body** | **str** | | [optional] +**closed_at** | **datetime** | | [optional] +**comments** | **int** | | [optional] +**created_at** | **datetime** | | [optional] +**diff_url** | **str** | | [optional] +**due_date** | **datetime** | | [optional] +**head** | [**PRBranchInfo**](PRBranchInfo.md) | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**labels** | [**list[Label]**](Label.md) | | [optional] +**merge_base** | **str** | | [optional] +**merge_commit_sha** | **str** | | [optional] +**mergeable** | **bool** | | [optional] +**merged** | **bool** | | [optional] +**merged_at** | **datetime** | | [optional] +**merged_by** | [**User**](User.md) | | [optional] +**milestone** | [**Milestone**](Milestone.md) | | [optional] +**number** | **int** | | [optional] +**patch_url** | **str** | | [optional] +**state** | [**StateType**](StateType.md) | | [optional] +**title** | **str** | | [optional] +**updated_at** | **datetime** | | [optional] +**url** | **str** | | [optional] +**user** | [**User**](User.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PullRequestMeta.md b/docs/PullRequestMeta.md index 53ba426..7b692b6 100755 --- a/docs/PullRequestMeta.md +++ b/docs/PullRequestMeta.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**merged** | **bool** | | [optional] -**merged_at** | **datetime** | | [optional] +**merged** | **bool** | | [optional] +**merged_at** | **datetime** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/PullReview.md b/docs/PullReview.md new file mode 100644 index 0000000..bb2d538 --- /dev/null +++ b/docs/PullReview.md @@ -0,0 +1,20 @@ +# PullReview + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | [optional] +**comments_count** | **int** | | [optional] +**commit_id** | **str** | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**official** | **bool** | | [optional] +**pull_request_url** | **str** | | [optional] +**stale** | **bool** | | [optional] +**state** | [**ReviewStateType**](ReviewStateType.md) | | [optional] +**submitted_at** | **datetime** | | [optional] +**user** | [**User**](User.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PullReviewComment.md b/docs/PullReviewComment.md new file mode 100644 index 0000000..777c192 --- /dev/null +++ b/docs/PullReviewComment.md @@ -0,0 +1,23 @@ +# PullReviewComment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | [optional] +**commit_id** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**diff_hunk** | **str** | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**original_commit_id** | **str** | | [optional] +**original_position** | **int** | | [optional] +**path** | **str** | | [optional] +**position** | **int** | | [optional] +**pull_request_review_id** | **int** | | [optional] +**pull_request_url** | **str** | | [optional] +**updated_at** | **datetime** | | [optional] +**user** | [**User**](User.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Reaction.md b/docs/Reaction.md new file mode 100644 index 0000000..281342d --- /dev/null +++ b/docs/Reaction.md @@ -0,0 +1,12 @@ +# Reaction + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**user** | [**User**](User.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Reference.md b/docs/Reference.md index c31e370..2fab807 100755 --- a/docs/Reference.md +++ b/docs/Reference.md @@ -3,9 +3,9 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**object** | [**GitObject**](GitObject.md) | | [optional] -**ref** | **str** | | [optional] -**url** | **str** | | [optional] +**object** | [**GitObject**](GitObject.md) | | [optional] +**ref** | **str** | | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Release.md b/docs/Release.md index 6126836..24545c0 100755 --- a/docs/Release.md +++ b/docs/Release.md @@ -3,20 +3,21 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**assets** | [**list[Attachment]**](Attachment.md) | | [optional] -**author** | [**User**](User.md) | | [optional] -**body** | **str** | | [optional] -**created_at** | **datetime** | | [optional] -**draft** | **bool** | | [optional] -**id** | **int** | | [optional] -**name** | **str** | | [optional] -**prerelease** | **bool** | | [optional] -**published_at** | **datetime** | | [optional] -**tag_name** | **str** | | [optional] -**tarball_url** | **str** | | [optional] -**target_commitish** | **str** | | [optional] -**url** | **str** | | [optional] -**zipball_url** | **str** | | [optional] +**assets** | [**list[Attachment]**](Attachment.md) | | [optional] +**author** | [**User**](User.md) | | [optional] +**body** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**draft** | **bool** | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**prerelease** | **bool** | | [optional] +**published_at** | **datetime** | | [optional] +**tag_name** | **str** | | [optional] +**tarball_url** | **str** | | [optional] +**target_commitish** | **str** | | [optional] +**url** | **str** | | [optional] +**zipball_url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepoCommit.md b/docs/RepoCommit.md index b826fb7..4f287fb 100755 --- a/docs/RepoCommit.md +++ b/docs/RepoCommit.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**author** | [**CommitUser**](CommitUser.md) | | [optional] -**committer** | [**CommitUser**](CommitUser.md) | | [optional] -**message** | **str** | | [optional] -**tree** | [**CommitMeta**](CommitMeta.md) | | [optional] -**url** | **str** | | [optional] +**author** | [**CommitUser**](CommitUser.md) | | [optional] +**committer** | [**CommitUser**](CommitUser.md) | | [optional] +**message** | **str** | | [optional] +**tree** | [**CommitMeta**](CommitMeta.md) | | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepoTopicOptions.md b/docs/RepoTopicOptions.md index 44a62b9..2331864 100755 --- a/docs/RepoTopicOptions.md +++ b/docs/RepoTopicOptions.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**topics** | **list[str]** | list of topic names | [optional] +**topics** | **list[str]** | list of topic names | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Repository.md b/docs/Repository.md index d5c70c7..9d33a1b 100755 --- a/docs/Repository.md +++ b/docs/Repository.md @@ -3,43 +3,46 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**allow_merge_commits** | **bool** | | [optional] -**allow_rebase** | **bool** | | [optional] -**allow_rebase_explicit** | **bool** | | [optional] -**allow_squash_merge** | **bool** | | [optional] -**archived** | **bool** | | [optional] -**avatar_url** | **str** | | [optional] -**clone_url** | **str** | | [optional] -**created_at** | **datetime** | | [optional] -**default_branch** | **str** | | [optional] -**description** | **str** | | [optional] -**empty** | **bool** | | [optional] -**external_tracker** | [**ExternalTracker**](ExternalTracker.md) | | [optional] -**external_wiki** | [**ExternalWiki**](ExternalWiki.md) | | [optional] -**fork** | **bool** | | [optional] -**forks_count** | **int** | | [optional] -**full_name** | **str** | | [optional] -**has_issues** | **bool** | | [optional] -**has_pull_requests** | **bool** | | [optional] -**has_wiki** | **bool** | | [optional] -**html_url** | **str** | | [optional] -**id** | **int** | | [optional] -**ignore_whitespace_conflicts** | **bool** | | [optional] -**internal_tracker** | [**InternalTracker**](InternalTracker.md) | | [optional] -**mirror** | **bool** | | [optional] -**name** | **str** | | [optional] -**open_issues_count** | **int** | | [optional] -**original_url** | **str** | | [optional] -**owner** | [**User**](User.md) | | [optional] -**parent** | [**Repository**](Repository.md) | | [optional] -**permissions** | [**Permission**](Permission.md) | | [optional] -**private** | **bool** | | [optional] -**size** | **int** | | [optional] -**ssh_url** | **str** | | [optional] -**stars_count** | **int** | | [optional] -**updated_at** | **datetime** | | [optional] -**watchers_count** | **int** | | [optional] -**website** | **str** | | [optional] +**allow_merge_commits** | **bool** | | [optional] +**allow_rebase** | **bool** | | [optional] +**allow_rebase_explicit** | **bool** | | [optional] +**allow_squash_merge** | **bool** | | [optional] +**archived** | **bool** | | [optional] +**avatar_url** | **str** | | [optional] +**clone_url** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**default_branch** | **str** | | [optional] +**description** | **str** | | [optional] +**empty** | **bool** | | [optional] +**external_tracker** | [**ExternalTracker**](ExternalTracker.md) | | [optional] +**external_wiki** | [**ExternalWiki**](ExternalWiki.md) | | [optional] +**fork** | **bool** | | [optional] +**forks_count** | **int** | | [optional] +**full_name** | **str** | | [optional] +**has_issues** | **bool** | | [optional] +**has_pull_requests** | **bool** | | [optional] +**has_wiki** | **bool** | | [optional] +**html_url** | **str** | | [optional] +**id** | **int** | | [optional] +**ignore_whitespace_conflicts** | **bool** | | [optional] +**internal_tracker** | [**InternalTracker**](InternalTracker.md) | | [optional] +**mirror** | **bool** | | [optional] +**name** | **str** | | [optional] +**open_issues_count** | **int** | | [optional] +**open_pr_counter** | **int** | | [optional] +**original_url** | **str** | | [optional] +**owner** | [**User**](User.md) | | [optional] +**parent** | [**Repository**](Repository.md) | | [optional] +**permissions** | [**Permission**](Permission.md) | | [optional] +**private** | **bool** | | [optional] +**release_counter** | **int** | | [optional] +**size** | **int** | | [optional] +**ssh_url** | **str** | | [optional] +**stars_count** | **int** | | [optional] +**template** | **bool** | | [optional] +**updated_at** | **datetime** | | [optional] +**watchers_count** | **int** | | [optional] +**website** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RepositoryApi.md b/docs/RepositoryApi.md index cdd7796..dfde939 100755 --- a/docs/RepositoryApi.md +++ b/docs/RepositoryApi.md @@ -13,32 +13,39 @@ Method | HTTP request | Description [**repo_add_collaborator**](RepositoryApi.md#repo_add_collaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add a collaborator to a repository [**repo_add_topc**](RepositoryApi.md#repo_add_topc) | **PUT** /repos/{owner}/{repo}/topics/{topic} | Add a topic to a repository [**repo_check_collaborator**](RepositoryApi.md#repo_check_collaborator) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator} | Check if a user is a collaborator of a repository +[**repo_create_branch_protection**](RepositoryApi.md#repo_create_branch_protection) | **POST** /repos/{owner}/{repo}/branch_protections | Create a branch protections for a repository [**repo_create_file**](RepositoryApi.md#repo_create_file) | **POST** /repos/{owner}/{repo}/contents/{filepath} | Create a file in a repository [**repo_create_hook**](RepositoryApi.md#repo_create_hook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook [**repo_create_key**](RepositoryApi.md#repo_create_key) | **POST** /repos/{owner}/{repo}/keys | Add a key to a repository [**repo_create_pull_request**](RepositoryApi.md#repo_create_pull_request) | **POST** /repos/{owner}/{repo}/pulls | Create a pull request +[**repo_create_pull_review**](RepositoryApi.md#repo_create_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews | Create a review to an pull request [**repo_create_release**](RepositoryApi.md#repo_create_release) | **POST** /repos/{owner}/{repo}/releases | Create a release [**repo_create_release_attachment**](RepositoryApi.md#repo_create_release_attachment) | **POST** /repos/{owner}/{repo}/releases/{id}/assets | Create a release attachment [**repo_create_status**](RepositoryApi.md#repo_create_status) | **POST** /repos/{owner}/{repo}/statuses/{sha} | Create a commit status [**repo_delete**](RepositoryApi.md#repo_delete) | **DELETE** /repos/{owner}/{repo} | Delete a repository +[**repo_delete_branch**](RepositoryApi.md#repo_delete_branch) | **DELETE** /repos/{owner}/{repo}/branches/{branch} | Delete a specific branch from a repository +[**repo_delete_branch_protection**](RepositoryApi.md#repo_delete_branch_protection) | **DELETE** /repos/{owner}/{repo}/branch_protections/{name} | Delete a specific branch protection for the repository [**repo_delete_collaborator**](RepositoryApi.md#repo_delete_collaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete a collaborator from a repository [**repo_delete_file**](RepositoryApi.md#repo_delete_file) | **DELETE** /repos/{owner}/{repo}/contents/{filepath} | Delete a file in a repository [**repo_delete_git_hook**](RepositoryApi.md#repo_delete_git_hook) | **DELETE** /repos/{owner}/{repo}/hooks/git/{id} | Delete a Git hook in a repository [**repo_delete_hook**](RepositoryApi.md#repo_delete_hook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook in a repository [**repo_delete_key**](RepositoryApi.md#repo_delete_key) | **DELETE** /repos/{owner}/{repo}/keys/{id} | Delete a key from a repository +[**repo_delete_pull_review**](RepositoryApi.md#repo_delete_pull_review) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Delete a specific review from a pull request [**repo_delete_release**](RepositoryApi.md#repo_delete_release) | **DELETE** /repos/{owner}/{repo}/releases/{id} | Delete a release [**repo_delete_release_attachment**](RepositoryApi.md#repo_delete_release_attachment) | **DELETE** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Delete a release attachment [**repo_delete_topic**](RepositoryApi.md#repo_delete_topic) | **DELETE** /repos/{owner}/{repo}/topics/{topic} | Delete a topic from a repository [**repo_edit**](RepositoryApi.md#repo_edit) | **PATCH** /repos/{owner}/{repo} | Edit a repository's properties. Only fields that are set will be changed. +[**repo_edit_branch_protection**](RepositoryApi.md#repo_edit_branch_protection) | **PATCH** /repos/{owner}/{repo}/branch_protections/{name} | Edit a branch protections for a repository. Only fields that are set will be changed [**repo_edit_git_hook**](RepositoryApi.md#repo_edit_git_hook) | **PATCH** /repos/{owner}/{repo}/hooks/git/{id} | Edit a Git hook in a repository [**repo_edit_hook**](RepositoryApi.md#repo_edit_hook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook in a repository -[**repo_edit_pull_request**](RepositoryApi.md#repo_edit_pull_request) | **PATCH** /repos/{owner}/{repo}/pulls/{index} | Update a pull request +[**repo_edit_pull_request**](RepositoryApi.md#repo_edit_pull_request) | **PATCH** /repos/{owner}/{repo}/pulls/{index} | Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. [**repo_edit_release**](RepositoryApi.md#repo_edit_release) | **PATCH** /repos/{owner}/{repo}/releases/{id} | Update a release [**repo_edit_release_attachment**](RepositoryApi.md#repo_edit_release_attachment) | **PATCH** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Edit a release attachment [**repo_get**](RepositoryApi.md#repo_get) | **GET** /repos/{owner}/{repo} | Get a repository [**repo_get_all_commits**](RepositoryApi.md#repo_get_all_commits) | **GET** /repos/{owner}/{repo}/commits | Get a list of all commits from a repository [**repo_get_archive**](RepositoryApi.md#repo_get_archive) | **GET** /repos/{owner}/{repo}/archive/{archive} | Get an archive of a repository -[**repo_get_branch**](RepositoryApi.md#repo_get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Retrieve a specific branch from a repository +[**repo_get_branch**](RepositoryApi.md#repo_get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Retrieve a specific branch from a repository, including its effective branch protection +[**repo_get_branch_protection**](RepositoryApi.md#repo_get_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections/{name} | Get a specific branch protection for the repository [**repo_get_by_id**](RepositoryApi.md#repo_get_by_id) | **GET** /repositories/{id} | Get a repository by id [**repo_get_combined_status_by_ref**](RepositoryApi.md#repo_get_combined_status_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref}/statuses | Get a commit's combined status, by branch/tag/commit reference [**repo_get_contents**](RepositoryApi.md#repo_get_contents) | **GET** /repos/{owner}/{repo}/contents/{filepath} | Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir @@ -48,11 +55,15 @@ Method | HTTP request | Description [**repo_get_hook**](RepositoryApi.md#repo_get_hook) | **GET** /repos/{owner}/{repo}/hooks/{id} | Get a hook [**repo_get_key**](RepositoryApi.md#repo_get_key) | **GET** /repos/{owner}/{repo}/keys/{id} | Get a repository's key by id [**repo_get_pull_request**](RepositoryApi.md#repo_get_pull_request) | **GET** /repos/{owner}/{repo}/pulls/{index} | Get a pull request +[**repo_get_pull_review**](RepositoryApi.md#repo_get_pull_review) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Get a specific review for a pull request +[**repo_get_pull_review_comments**](RepositoryApi.md#repo_get_pull_review_comments) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments | Get a specific review for a pull request [**repo_get_raw_file**](RepositoryApi.md#repo_get_raw_file) | **GET** /repos/{owner}/{repo}/raw/{filepath} | Get a file from a repository [**repo_get_release**](RepositoryApi.md#repo_get_release) | **GET** /repos/{owner}/{repo}/releases/{id} | Get a release [**repo_get_release_attachment**](RepositoryApi.md#repo_get_release_attachment) | **GET** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Get a release attachment -[**repo_get_single_commit**](RepositoryApi.md#repo_get_single_commit) | **GET** /repos/{owner}/{repo}/git/commits/{sha} | Get a single commit from a repository +[**repo_get_single_commit_by_ref**](RepositoryApi.md#repo_get_single_commit_by_ref) | **GET** /repos/{owner}/{repo}/commits/{ref} | Get a single commit from a repository +[**repo_get_single_commit_by_sha**](RepositoryApi.md#repo_get_single_commit_by_sha) | **GET** /repos/{owner}/{repo}/git/commits/{sha} | Get a single commit from a repository [**repo_list_all_git_refs**](RepositoryApi.md#repo_list_all_git_refs) | **GET** /repos/{owner}/{repo}/git/refs | Get specified ref or filtered repository's refs +[**repo_list_branch_protection**](RepositoryApi.md#repo_list_branch_protection) | **GET** /repos/{owner}/{repo}/branch_protections | List branch protections for a repository [**repo_list_branches**](RepositoryApi.md#repo_list_branches) | **GET** /repos/{owner}/{repo}/branches | List a repository's branches [**repo_list_collaborators**](RepositoryApi.md#repo_list_collaborators) | **GET** /repos/{owner}/{repo}/collaborators | List a repository's collaborators [**repo_list_git_hooks**](RepositoryApi.md#repo_list_git_hooks) | **GET** /repos/{owner}/{repo}/hooks/git | List the Git hooks in a repository @@ -60,6 +71,7 @@ Method | HTTP request | Description [**repo_list_hooks**](RepositoryApi.md#repo_list_hooks) | **GET** /repos/{owner}/{repo}/hooks | List the hooks in a repository [**repo_list_keys**](RepositoryApi.md#repo_list_keys) | **GET** /repos/{owner}/{repo}/keys | List a repository's keys [**repo_list_pull_requests**](RepositoryApi.md#repo_list_pull_requests) | **GET** /repos/{owner}/{repo}/pulls | List a repo's pull requests +[**repo_list_pull_reviews**](RepositoryApi.md#repo_list_pull_reviews) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews | List all reviews for a pull request [**repo_list_release_attachments**](RepositoryApi.md#repo_list_release_attachments) | **GET** /repos/{owner}/{repo}/releases/{id}/assets | List release's attachments [**repo_list_releases**](RepositoryApi.md#repo_list_releases) | **GET** /repos/{owner}/{repo}/releases | List a repo's releases [**repo_list_stargazers**](RepositoryApi.md#repo_list_stargazers) | **GET** /repos/{owner}/{repo}/stargazers | List a repo's stargazers @@ -73,14 +85,17 @@ Method | HTTP request | Description [**repo_pull_request_is_merged**](RepositoryApi.md#repo_pull_request_is_merged) | **GET** /repos/{owner}/{repo}/pulls/{index}/merge | Check if a pull request has been merged [**repo_search**](RepositoryApi.md#repo_search) | **GET** /repos/search | Search for repositories [**repo_signing_key**](RepositoryApi.md#repo_signing_key) | **GET** /repos/{owner}/{repo}/signing-key.gpg | Get signing-key.gpg for given repository +[**repo_submit_pull_review**](RepositoryApi.md#repo_submit_pull_review) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id} | Submit a pending review to an pull request [**repo_test_hook**](RepositoryApi.md#repo_test_hook) | **POST** /repos/{owner}/{repo}/hooks/{id}/tests | Test a push webhook [**repo_tracked_times**](RepositoryApi.md#repo_tracked_times) | **GET** /repos/{owner}/{repo}/times | List a repo's tracked times +[**repo_transfer**](RepositoryApi.md#repo_transfer) | **POST** /repos/{owner}/{repo}/transfer | Transfer a repo ownership [**repo_update_file**](RepositoryApi.md#repo_update_file) | **PUT** /repos/{owner}/{repo}/contents/{filepath} | Update a file in a repository [**repo_update_topics**](RepositoryApi.md#repo_update_topics) | **PUT** /repos/{owner}/{repo}/topics | Replace list of topics for a repository [**topic_search**](RepositoryApi.md#topic_search) | **GET** /topics/search | search topics via keyword [**user_current_check_subscription**](RepositoryApi.md#user_current_check_subscription) | **GET** /repos/{owner}/{repo}/subscription | Check if the current user is watching a repo [**user_current_delete_subscription**](RepositoryApi.md#user_current_delete_subscription) | **DELETE** /repos/{owner}/{repo}/subscription | Unwatch a repo [**user_current_put_subscription**](RepositoryApi.md#user_current_put_subscription) | **PUT** /repos/{owner}/{repo}/subscription | Watch a repo +[**user_tracked_times**](RepositoryApi.md#user_tracked_times) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo # **create_current_user_repo** @@ -486,7 +501,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **list_forks** -> list[Repository] list_forks(owner, repo) +> list[Repository] list_forks(owner, repo, page=page, limit=limit) List a repository's forks @@ -532,10 +547,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List a repository's forks - api_response = api_instance.list_forks(owner, repo) + api_response = api_instance.list_forks(owner, repo, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling RepositoryApi->list_forks: %s\n" % e) @@ -547,6 +564,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -802,6 +821,86 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **repo_create_branch_protection** +> BranchProtection repo_create_branch_protection(owner, repo, body=body) + +Create a branch protections for a repository + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +body = giteapy.CreateBranchProtectionOption() # CreateBranchProtectionOption | (optional) + +try: + # Create a branch protections for a repository + api_response = api_instance.repo_create_branch_protection(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_branch_protection: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **body** | [**CreateBranchProtectionOption**](CreateBranchProtectionOption.md)| | [optional] + +### Return type + +[**BranchProtection**](BranchProtection.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **repo_create_file** > FileResponse repo_create_file(owner, repo, filepath, body) @@ -1124,6 +1223,88 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **repo_create_pull_review** +> PullReview repo_create_pull_review(owner, repo, index, body) + +Create a review to an pull request + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the pull request +body = giteapy.CreatePullReviewOptions() # CreatePullReviewOptions | + +try: + # Create a review to an pull request + api_response = api_instance.repo_create_pull_review(owner, repo, index, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_create_pull_review: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the pull request | + **body** | [**CreatePullReviewOptions**](CreatePullReviewOptions.md)| | + +### Return type + +[**PullReview**](PullReview.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **repo_create_release** > Release repo_create_release(owner, repo, body=body) @@ -1289,7 +1470,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repo_create_status** -> list[Status] repo_create_status(owner, repo, sha, body=body) +> Status repo_create_status(owner, repo, sha, body=body) Create a commit status @@ -1357,7 +1538,7 @@ Name | Type | Description | Notes ### Return type -[**list[Status]**](Status.md) +[**Status**](Status.md) ### Authorization @@ -1447,10 +1628,10 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_delete_collaborator** -> repo_delete_collaborator(owner, repo, collaborator) +# **repo_delete_branch** +> repo_delete_branch(owner, repo, branch) -Delete a collaborator from a repository +Delete a specific branch from a repository ### Example ```python @@ -1494,13 +1675,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -collaborator = 'collaborator_example' # str | username of the collaborator to delete +branch = 'branch_example' # str | branch to delete try: - # Delete a collaborator from a repository - api_instance.repo_delete_collaborator(owner, repo, collaborator) + # Delete a specific branch from a repository + api_instance.repo_delete_branch(owner, repo, branch) except ApiException as e: - print("Exception when calling RepositoryApi->repo_delete_collaborator: %s\n" % e) + print("Exception when calling RepositoryApi->repo_delete_branch: %s\n" % e) ``` ### Parameters @@ -1509,7 +1690,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **collaborator** | **str**| username of the collaborator to delete | + **branch** | **str**| branch to delete | ### Return type @@ -1526,10 +1707,10 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_delete_file** -> FileDeleteResponse repo_delete_file(owner, repo, filepath, body) +# **repo_delete_branch_protection** +> repo_delete_branch_protection(owner, repo, name) -Delete a file in a repository +Delete a specific branch protection for the repository ### Example ```python @@ -1573,15 +1754,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -filepath = 'filepath_example' # str | path of the file to delete -body = giteapy.DeleteFileOptions() # DeleteFileOptions | +name = 'name_example' # str | name of protected branch try: - # Delete a file in a repository - api_response = api_instance.repo_delete_file(owner, repo, filepath, body) - pprint(api_response) + # Delete a specific branch protection for the repository + api_instance.repo_delete_branch_protection(owner, repo, name) except ApiException as e: - print("Exception when calling RepositoryApi->repo_delete_file: %s\n" % e) + print("Exception when calling RepositoryApi->repo_delete_branch_protection: %s\n" % e) ``` ### Parameters @@ -1590,12 +1769,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **filepath** | **str**| path of the file to delete | - **body** | [**DeleteFileOptions**](DeleteFileOptions.md)| | + **name** | **str**| name of protected branch | ### Return type -[**FileDeleteResponse**](FileDeleteResponse.md) +void (empty response body) ### Authorization @@ -1603,15 +1781,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/json, text/plain - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_delete_git_hook** -> repo_delete_git_hook(owner, repo, id) +# **repo_delete_collaborator** +> repo_delete_collaborator(owner, repo, collaborator) -Delete a Git hook in a repository +Delete a collaborator from a repository ### Example ```python @@ -1655,13 +1833,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 'id_example' # str | id of the hook to get +collaborator = 'collaborator_example' # str | username of the collaborator to delete try: - # Delete a Git hook in a repository - api_instance.repo_delete_git_hook(owner, repo, id) + # Delete a collaborator from a repository + api_instance.repo_delete_collaborator(owner, repo, collaborator) except ApiException as e: - print("Exception when calling RepositoryApi->repo_delete_git_hook: %s\n" % e) + print("Exception when calling RepositoryApi->repo_delete_collaborator: %s\n" % e) ``` ### Parameters @@ -1670,7 +1848,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **str**| id of the hook to get | + **collaborator** | **str**| username of the collaborator to delete | ### Return type @@ -1687,10 +1865,10 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_delete_hook** -> repo_delete_hook(owner, repo, id) +# **repo_delete_file** +> FileDeleteResponse repo_delete_file(owner, repo, filepath, body) -Delete a hook in a repository +Delete a file in a repository ### Example ```python @@ -1734,13 +1912,15 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the hook to delete +filepath = 'filepath_example' # str | path of the file to delete +body = giteapy.DeleteFileOptions() # DeleteFileOptions | try: - # Delete a hook in a repository - api_instance.repo_delete_hook(owner, repo, id) + # Delete a file in a repository + api_response = api_instance.repo_delete_file(owner, repo, filepath, body) + pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_delete_hook: %s\n" % e) + print("Exception when calling RepositoryApi->repo_delete_file: %s\n" % e) ``` ### Parameters @@ -1749,11 +1929,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| id of the hook to delete | + **filepath** | **str**| path of the file to delete | + **body** | [**DeleteFileOptions**](DeleteFileOptions.md)| | ### Return type -void (empty response body) +[**FileDeleteResponse**](FileDeleteResponse.md) ### Authorization @@ -1761,15 +1942,15 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/json, text/plain + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_delete_key** -> repo_delete_key(owner, repo, id) +# **repo_delete_git_hook** +> repo_delete_git_hook(owner, repo, id) -Delete a key from a repository +Delete a Git hook in a repository ### Example ```python @@ -1813,13 +1994,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the key to delete +id = 'id_example' # str | id of the hook to get try: - # Delete a key from a repository - api_instance.repo_delete_key(owner, repo, id) + # Delete a Git hook in a repository + api_instance.repo_delete_git_hook(owner, repo, id) except ApiException as e: - print("Exception when calling RepositoryApi->repo_delete_key: %s\n" % e) + print("Exception when calling RepositoryApi->repo_delete_git_hook: %s\n" % e) ``` ### Parameters @@ -1828,7 +2009,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| id of the key to delete | + **id** | **str**| id of the hook to get | ### Return type @@ -1841,14 +2022,14 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json, text/plain - - **Accept**: application/json, text/html + - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_delete_release** -> repo_delete_release(owner, repo, id) +# **repo_delete_hook** +> repo_delete_hook(owner, repo, id) -Delete a release +Delete a hook in a repository ### Example ```python @@ -1892,13 +2073,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the release to delete +id = 789 # int | id of the hook to delete try: - # Delete a release - api_instance.repo_delete_release(owner, repo, id) + # Delete a hook in a repository + api_instance.repo_delete_hook(owner, repo, id) except ApiException as e: - print("Exception when calling RepositoryApi->repo_delete_release: %s\n" % e) + print("Exception when calling RepositoryApi->repo_delete_hook: %s\n" % e) ``` ### Parameters @@ -1907,7 +2088,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| id of the release to delete | + **id** | **int**| id of the hook to delete | ### Return type @@ -1920,14 +2101,14 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json, text/plain - - **Accept**: application/json, text/html + - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_delete_release_attachment** -> repo_delete_release_attachment(owner, repo, id, attachment_id) +# **repo_delete_key** +> repo_delete_key(owner, repo, id) -Delete a release attachment +Delete a key from a repository ### Example ```python @@ -1971,8 +2152,247 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the release -attachment_id = 789 # int | id of the attachment to delete +id = 789 # int | id of the key to delete + +try: + # Delete a key from a repository + api_instance.repo_delete_key(owner, repo, id) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_key: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the key to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_delete_pull_review** +> repo_delete_pull_review(owner, repo, index, id) + +Delete a specific review from a pull request + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the pull request +id = 789 # int | id of the review + +try: + # Delete a specific review from a pull request + api_instance.repo_delete_pull_review(owner, repo, index, id) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_pull_review: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the pull request | + **id** | **int**| id of the review | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_delete_release** +> repo_delete_release(owner, repo, id) + +Delete a release + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the release to delete + +try: + # Delete a release + api_instance.repo_delete_release(owner, repo, id) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_delete_release: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the release to delete | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_delete_release_attachment** +> repo_delete_release_attachment(owner, repo, id, attachment_id) + +Delete a release attachment + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the release +attachment_id = 789 # int | id of the attachment to delete try: # Delete a release attachment @@ -2134,24 +2554,518 @@ repo = 'repo_example' # str | name of the repo to edit body = giteapy.EditRepoOption() # EditRepoOption | Properties of a repo that you can edit (optional) try: - # Edit a repository's properties. Only fields that are set will be changed. - api_response = api_instance.repo_edit(owner, repo, body=body) + # Edit a repository's properties. Only fields that are set will be changed. + api_response = api_instance.repo_edit(owner, repo, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_edit: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to edit | + **repo** | **str**| name of the repo to edit | + **body** | [**EditRepoOption**](EditRepoOption.md)| Properties of a repo that you can edit | [optional] + +### Return type + +[**Repository**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_edit_branch_protection** +> BranchProtection repo_edit_branch_protection(owner, repo, name, body=body) + +Edit a branch protections for a repository. Only fields that are set will be changed + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +name = 'name_example' # str | name of protected branch +body = giteapy.EditBranchProtectionOption() # EditBranchProtectionOption | (optional) + +try: + # Edit a branch protections for a repository. Only fields that are set will be changed + api_response = api_instance.repo_edit_branch_protection(owner, repo, name, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_edit_branch_protection: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **name** | **str**| name of protected branch | + **body** | [**EditBranchProtectionOption**](EditBranchProtectionOption.md)| | [optional] + +### Return type + +[**BranchProtection**](BranchProtection.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_edit_git_hook** +> GitHook repo_edit_git_hook(owner, repo, id, body=body) + +Edit a Git hook in a repository + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 'id_example' # str | id of the hook to get +body = giteapy.EditGitHookOption() # EditGitHookOption | (optional) + +try: + # Edit a Git hook in a repository + api_response = api_instance.repo_edit_git_hook(owner, repo, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_edit_git_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **str**| id of the hook to get | + **body** | [**EditGitHookOption**](EditGitHookOption.md)| | [optional] + +### Return type + +[**GitHook**](GitHook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_edit_hook** +> Hook repo_edit_hook(owner, repo, id, body=body) + +Edit a hook in a repository + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | index of the hook +body = giteapy.EditHookOption() # EditHookOption | (optional) + +try: + # Edit a hook in a repository + api_response = api_instance.repo_edit_hook(owner, repo, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_edit_hook: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| index of the hook | + **body** | [**EditHookOption**](EditHookOption.md)| | [optional] + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_edit_pull_request** +> PullRequest repo_edit_pull_request(owner, repo, index, body=body) + +Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the pull request to edit +body = giteapy.EditPullRequestOption() # EditPullRequestOption | (optional) + +try: + # Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. + api_response = api_instance.repo_edit_pull_request(owner, repo, index, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_edit_pull_request: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the pull request to edit | + **body** | [**EditPullRequestOption**](EditPullRequestOption.md)| | [optional] + +### Return type + +[**PullRequest**](PullRequest.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_edit_release** +> Release repo_edit_release(owner, repo, id, body=body) + +Update a release + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the release to edit +body = giteapy.EditReleaseOption() # EditReleaseOption | (optional) + +try: + # Update a release + api_response = api_instance.repo_edit_release(owner, repo, id, body=body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_edit_release: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the release to edit | + **body** | [**EditReleaseOption**](EditReleaseOption.md)| | [optional] + +### Return type + +[**Release**](Release.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_edit_release_attachment** +> Attachment repo_edit_release_attachment(owner, repo, id, attachment_id, body=body) + +Edit a release attachment + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the release +attachment_id = 789 # int | id of the attachment to edit +body = giteapy.EditAttachmentOptions() # EditAttachmentOptions | (optional) + +try: + # Edit a release attachment + api_response = api_instance.repo_edit_release_attachment(owner, repo, id, attachment_id, body=body) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_edit: %s\n" % e) + print("Exception when calling RepositoryApi->repo_edit_release_attachment: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repo to edit | - **repo** | **str**| name of the repo to edit | - **body** | [**EditRepoOption**](EditRepoOption.md)| Properties of a repo that you can edit | [optional] + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **id** | **int**| id of the release | + **attachment_id** | **int**| id of the attachment to edit | + **body** | [**EditAttachmentOptions**](EditAttachmentOptions.md)| | [optional] ### Return type -[**Repository**](Repository.md) +[**Attachment**](Attachment.md) ### Authorization @@ -2159,15 +3073,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json, text/plain + - **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_edit_git_hook** -> GitHook repo_edit_git_hook(owner, repo, id, body=body) +# **repo_get** +> Repository repo_get(owner, repo) -Edit a Git hook in a repository +Get a repository ### Example ```python @@ -2211,15 +3125,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 'id_example' # str | id of the hook to get -body = giteapy.EditGitHookOption() # EditGitHookOption | (optional) try: - # Edit a Git hook in a repository - api_response = api_instance.repo_edit_git_hook(owner, repo, id, body=body) + # Get a repository + api_response = api_instance.repo_get(owner, repo) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_edit_git_hook: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get: %s\n" % e) ``` ### Parameters @@ -2228,12 +3140,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **str**| id of the hook to get | - **body** | [**EditGitHookOption**](EditGitHookOption.md)| | [optional] ### Return type -[**GitHook**](GitHook.md) +[**Repository**](Repository.md) ### Authorization @@ -2246,10 +3156,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_edit_hook** -> Hook repo_edit_hook(owner, repo, id, body=body) +# **repo_get_all_commits** +> list[Commit] repo_get_all_commits(owner, repo, sha=sha, page=page, limit=limit) -Edit a hook in a repository +Get a list of all commits from a repository ### Example ```python @@ -2293,15 +3203,16 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | index of the hook -body = giteapy.EditHookOption() # EditHookOption | (optional) +sha = 'sha_example' # str | SHA or branch to start listing commits from (usually 'master') (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: - # Edit a hook in a repository - api_response = api_instance.repo_edit_hook(owner, repo, id, body=body) + # Get a list of all commits from a repository + api_response = api_instance.repo_get_all_commits(owner, repo, sha=sha, page=page, limit=limit) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_edit_hook: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_all_commits: %s\n" % e) ``` ### Parameters @@ -2310,12 +3221,13 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| index of the hook | - **body** | [**EditHookOption**](EditHookOption.md)| | [optional] + **sha** | **str**| SHA or branch to start listing commits from (usually 'master') | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type -[**Hook**](Hook.md) +[**list[Commit]**](Commit.md) ### Authorization @@ -2328,10 +3240,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_edit_pull_request** -> PullRequest repo_edit_pull_request(owner, repo, index, body=body) +# **repo_get_archive** +> repo_get_archive(owner, repo, archive) -Update a pull request +Get an archive of a repository ### Example ```python @@ -2375,15 +3287,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -index = 789 # int | index of the pull request to edit -body = giteapy.EditPullRequestOption() # EditPullRequestOption | (optional) +archive = 'archive_example' # str | archive to download, consisting of a git reference and archive try: - # Update a pull request - api_response = api_instance.repo_edit_pull_request(owner, repo, index, body=body) - pprint(api_response) + # Get an archive of a repository + api_instance.repo_get_archive(owner, repo, archive) except ApiException as e: - print("Exception when calling RepositoryApi->repo_edit_pull_request: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_archive: %s\n" % e) ``` ### Parameters @@ -2392,12 +3302,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **index** | **int**| index of the pull request to edit | - **body** | [**EditPullRequestOption**](EditPullRequestOption.md)| | [optional] + **archive** | **str**| archive to download, consisting of a git reference and archive | ### Return type -[**PullRequest**](PullRequest.md) +void (empty response body) ### Authorization @@ -2405,15 +3314,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/json, text/plain - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_edit_release** -> Release repo_edit_release(owner, repo, id, body=body) +# **repo_get_branch** +> Branch repo_get_branch(owner, repo, branch) -Update a release +Retrieve a specific branch from a repository, including its effective branch protection ### Example ```python @@ -2457,15 +3366,14 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the release to edit -body = giteapy.EditReleaseOption() # EditReleaseOption | (optional) +branch = 'branch_example' # str | branch to get try: - # Update a release - api_response = api_instance.repo_edit_release(owner, repo, id, body=body) + # Retrieve a specific branch from a repository, including its effective branch protection + api_response = api_instance.repo_get_branch(owner, repo, branch) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_edit_release: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_branch: %s\n" % e) ``` ### Parameters @@ -2474,12 +3382,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| id of the release to edit | - **body** | [**EditReleaseOption**](EditReleaseOption.md)| | [optional] + **branch** | **str**| branch to get | ### Return type -[**Release**](Release.md) +[**Branch**](Branch.md) ### Authorization @@ -2487,15 +3394,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/json, text/plain - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_edit_release_attachment** -> Attachment repo_edit_release_attachment(owner, repo, id, attachment_id, body=body) +# **repo_get_branch_protection** +> BranchProtection repo_get_branch_protection(owner, repo, name) -Edit a release attachment +Get a specific branch protection for the repository ### Example ```python @@ -2539,16 +3446,14 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the release -attachment_id = 789 # int | id of the attachment to edit -body = giteapy.EditAttachmentOptions() # EditAttachmentOptions | (optional) +name = 'name_example' # str | name of protected branch try: - # Edit a release attachment - api_response = api_instance.repo_edit_release_attachment(owner, repo, id, attachment_id, body=body) + # Get a specific branch protection for the repository + api_response = api_instance.repo_get_branch_protection(owner, repo, name) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_edit_release_attachment: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_branch_protection: %s\n" % e) ``` ### Parameters @@ -2557,13 +3462,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| id of the release | - **attachment_id** | **int**| id of the attachment to edit | - **body** | [**EditAttachmentOptions**](EditAttachmentOptions.md)| | [optional] + **name** | **str**| name of protected branch | ### Return type -[**Attachment**](Attachment.md) +[**BranchProtection**](BranchProtection.md) ### Authorization @@ -2571,15 +3474,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/json, text/plain - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get** -> Repository repo_get(owner, repo) +# **repo_get_by_id** +> Repository repo_get_by_id(id) -Get a repository +Get a repository by id ### Example ```python @@ -2621,23 +3524,21 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repo -repo = 'repo_example' # str | name of the repo +id = 789 # int | id of the repo to get try: - # Get a repository - api_response = api_instance.repo_get(owner, repo) + # Get a repository by id + api_response = api_instance.repo_get_by_id(id) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_by_id: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repo | - **repo** | **str**| name of the repo | + **id** | **int**| id of the repo to get | ### Return type @@ -2654,10 +3555,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_all_commits** -> list[Commit] repo_get_all_commits(owner, repo, sha=sha, page=page) +# **repo_get_combined_status_by_ref** +> Status repo_get_combined_status_by_ref(owner, repo, ref, page=page) -Get a list of all commits from a repository +Get a commit's combined status, by branch/tag/commit reference ### Example ```python @@ -2701,15 +3602,15 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -sha = 'sha_example' # str | SHA or branch to start listing commits from (usually 'master') (optional) -page = 56 # int | page number of requested commits (optional) +ref = 'ref_example' # str | name of branch/tag/commit +page = 56 # int | page number of results (optional) try: - # Get a list of all commits from a repository - api_response = api_instance.repo_get_all_commits(owner, repo, sha=sha, page=page) + # Get a commit's combined status, by branch/tag/commit reference + api_response = api_instance.repo_get_combined_status_by_ref(owner, repo, ref, page=page) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_all_commits: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_combined_status_by_ref: %s\n" % e) ``` ### Parameters @@ -2718,12 +3619,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **sha** | **str**| SHA or branch to start listing commits from (usually 'master') | [optional] - **page** | **int**| page number of requested commits | [optional] + **ref** | **str**| name of branch/tag/commit | + **page** | **int**| page number of results | [optional] ### Return type -[**list[Commit]**](Commit.md) +[**Status**](Status.md) ### Authorization @@ -2736,10 +3637,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_archive** -> repo_get_archive(owner, repo, archive) +# **repo_get_contents** +> ContentsResponse repo_get_contents(owner, repo, filepath, ref=ref) -Get an archive of a repository +Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir ### Example ```python @@ -2783,13 +3684,15 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -archive = 'archive_example' # str | archive to download, consisting of a git reference and archive +filepath = 'filepath_example' # str | path of the dir, file, symlink or submodule in the repo +ref = 'ref_example' # str | The name of the commit/branch/tag. Default the repository’s default branch (usually master) (optional) try: - # Get an archive of a repository - api_instance.repo_get_archive(owner, repo, archive) + # Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir + api_response = api_instance.repo_get_contents(owner, repo, filepath, ref=ref) + pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_archive: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_contents: %s\n" % e) ``` ### Parameters @@ -2798,11 +3701,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **archive** | **str**| archive to download, consisting of a git reference and archive | + **filepath** | **str**| path of the dir, file, symlink or submodule in the repo | + **ref** | **str**| The name of the commit/branch/tag. Default the repository’s default branch (usually master) | [optional] ### Return type -void (empty response body) +[**ContentsResponse**](ContentsResponse.md) ### Authorization @@ -2815,10 +3719,10 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_branch** -> Branch repo_get_branch(owner, repo, branch) +# **repo_get_contents_list** +> list[ContentsResponse] repo_get_contents_list(owner, repo, ref=ref) -Retrieve a specific branch from a repository +Gets the metadata of all the entries of the root dir ### Example ```python @@ -2862,14 +3766,14 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -branch = 'branch_example' # str | branch to get +ref = 'ref_example' # str | The name of the commit/branch/tag. Default the repository’s default branch (usually master) (optional) try: - # Retrieve a specific branch from a repository - api_response = api_instance.repo_get_branch(owner, repo, branch) + # Gets the metadata of all the entries of the root dir + api_response = api_instance.repo_get_contents_list(owner, repo, ref=ref) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_branch: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_contents_list: %s\n" % e) ``` ### Parameters @@ -2878,11 +3782,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **branch** | **str**| branch to get | + **ref** | **str**| The name of the commit/branch/tag. Default the repository’s default branch (usually master) | [optional] ### Return type -[**Branch**](Branch.md) +[**list[ContentsResponse]**](ContentsResponse.md) ### Authorization @@ -2895,10 +3799,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_by_id** -> Repository repo_get_by_id(id) +# **repo_get_editor_config** +> repo_get_editor_config(owner, repo, filepath) -Get a repository by id +Get the EditorConfig definitions of a file in a repository ### Example ```python @@ -2940,25 +3844,28 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) -id = 789 # int | id of the repo to get +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +filepath = 'filepath_example' # str | filepath of file to get try: - # Get a repository by id - api_response = api_instance.repo_get_by_id(id) - pprint(api_response) + # Get the EditorConfig definitions of a file in a repository + api_instance.repo_get_editor_config(owner, repo, filepath) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_by_id: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_editor_config: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **int**| id of the repo to get | + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **filepath** | **str**| filepath of file to get | ### Return type -[**Repository**](Repository.md) +void (empty response body) ### Authorization @@ -2971,10 +3878,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_combined_status_by_ref** -> Status repo_get_combined_status_by_ref(owner, repo, ref, page=page) +# **repo_get_git_hook** +> GitHook repo_get_git_hook(owner, repo, id) -Get a commit's combined status, by branch/tag/commit reference +Get a Git hook ### Example ```python @@ -3018,15 +3925,14 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -ref = 'ref_example' # str | name of branch/tag/commit -page = 56 # int | page number of results (optional) +id = 'id_example' # str | id of the hook to get try: - # Get a commit's combined status, by branch/tag/commit reference - api_response = api_instance.repo_get_combined_status_by_ref(owner, repo, ref, page=page) + # Get a Git hook + api_response = api_instance.repo_get_git_hook(owner, repo, id) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_combined_status_by_ref: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_git_hook: %s\n" % e) ``` ### Parameters @@ -3035,12 +3941,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **ref** | **str**| name of branch/tag/commit | - **page** | **int**| page number of results | [optional] + **id** | **str**| id of the hook to get | ### Return type -[**Status**](Status.md) +[**GitHook**](GitHook.md) ### Authorization @@ -3053,10 +3958,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_contents** -> ContentsResponse repo_get_contents(owner, repo, filepath, ref=ref) +# **repo_get_hook** +> Hook repo_get_hook(owner, repo, id) -Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir +Get a hook ### Example ```python @@ -3100,15 +4005,14 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -filepath = 'filepath_example' # str | path of the dir, file, symlink or submodule in the repo -ref = 'ref_example' # str | The name of the commit/branch/tag. Default the repository’s default branch (usually master) (optional) +id = 789 # int | id of the hook to get try: - # Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir - api_response = api_instance.repo_get_contents(owner, repo, filepath, ref=ref) + # Get a hook + api_response = api_instance.repo_get_hook(owner, repo, id) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_contents: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_hook: %s\n" % e) ``` ### Parameters @@ -3117,12 +4021,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **filepath** | **str**| path of the dir, file, symlink or submodule in the repo | - **ref** | **str**| The name of the commit/branch/tag. Default the repository’s default branch (usually master) | [optional] + **id** | **int**| id of the hook to get | ### Return type -[**ContentsResponse**](ContentsResponse.md) +[**Hook**](Hook.md) ### Authorization @@ -3135,10 +4038,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_contents_list** -> list[ContentsResponse] repo_get_contents_list(owner, repo, ref=ref) +# **repo_get_key** +> DeployKey repo_get_key(owner, repo, id) -Gets the metadata of all the entries of the root dir +Get a repository's key by id ### Example ```python @@ -3182,14 +4085,14 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -ref = 'ref_example' # str | The name of the commit/branch/tag. Default the repository’s default branch (usually master) (optional) +id = 789 # int | id of the key to get try: - # Gets the metadata of all the entries of the root dir - api_response = api_instance.repo_get_contents_list(owner, repo, ref=ref) + # Get a repository's key by id + api_response = api_instance.repo_get_key(owner, repo, id) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_contents_list: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_key: %s\n" % e) ``` ### Parameters @@ -3198,11 +4101,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **ref** | **str**| The name of the commit/branch/tag. Default the repository’s default branch (usually master) | [optional] + **id** | **int**| id of the key to get | ### Return type -[**list[ContentsResponse]**](ContentsResponse.md) +[**DeployKey**](DeployKey.md) ### Authorization @@ -3215,10 +4118,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_editor_config** -> repo_get_editor_config(owner, repo, filepath) +# **repo_get_pull_request** +> PullRequest repo_get_pull_request(owner, repo, index) -Get the EditorConfig definitions of a file in a repository +Get a pull request ### Example ```python @@ -3262,13 +4165,14 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -filepath = 'filepath_example' # str | filepath of file to get +index = 789 # int | index of the pull request to get try: - # Get the EditorConfig definitions of a file in a repository - api_instance.repo_get_editor_config(owner, repo, filepath) + # Get a pull request + api_response = api_instance.repo_get_pull_request(owner, repo, index) + pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_editor_config: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_pull_request: %s\n" % e) ``` ### Parameters @@ -3277,11 +4181,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **filepath** | **str**| filepath of file to get | + **index** | **int**| index of the pull request to get | ### Return type -void (empty response body) +[**PullRequest**](PullRequest.md) ### Authorization @@ -3294,10 +4198,10 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_git_hook** -> GitHook repo_get_git_hook(owner, repo, id) +# **repo_get_pull_review** +> PullReview repo_get_pull_review(owner, repo, index, id) -Get a Git hook +Get a specific review for a pull request ### Example ```python @@ -3341,14 +4245,15 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 'id_example' # str | id of the hook to get +index = 789 # int | index of the pull request +id = 789 # int | id of the review try: - # Get a Git hook - api_response = api_instance.repo_get_git_hook(owner, repo, id) + # Get a specific review for a pull request + api_response = api_instance.repo_get_pull_review(owner, repo, index, id) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_git_hook: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_pull_review: %s\n" % e) ``` ### Parameters @@ -3357,11 +4262,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **str**| id of the hook to get | + **index** | **int**| index of the pull request | + **id** | **int**| id of the review | ### Return type -[**GitHook**](GitHook.md) +[**PullReview**](PullReview.md) ### Authorization @@ -3374,10 +4280,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_hook** -> Hook repo_get_hook(owner, repo, id) +# **repo_get_pull_review_comments** +> list[PullReviewComment] repo_get_pull_review_comments(owner, repo, index, id) -Get a hook +Get a specific review for a pull request ### Example ```python @@ -3421,14 +4327,15 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the hook to get +index = 789 # int | index of the pull request +id = 789 # int | id of the review try: - # Get a hook - api_response = api_instance.repo_get_hook(owner, repo, id) + # Get a specific review for a pull request + api_response = api_instance.repo_get_pull_review_comments(owner, repo, index, id) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_hook: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_pull_review_comments: %s\n" % e) ``` ### Parameters @@ -3437,11 +4344,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| id of the hook to get | + **index** | **int**| index of the pull request | + **id** | **int**| id of the review | ### Return type -[**Hook**](Hook.md) +[**list[PullReviewComment]**](PullReviewComment.md) ### Authorization @@ -3454,10 +4362,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_key** -> DeployKey repo_get_key(owner, repo, id) +# **repo_get_raw_file** +> repo_get_raw_file(owner, repo, filepath) -Get a repository's key by id +Get a file from a repository ### Example ```python @@ -3501,14 +4409,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the key to get +filepath = 'filepath_example' # str | filepath of the file to get try: - # Get a repository's key by id - api_response = api_instance.repo_get_key(owner, repo, id) - pprint(api_response) + # Get a file from a repository + api_instance.repo_get_raw_file(owner, repo, filepath) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_key: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_raw_file: %s\n" % e) ``` ### Parameters @@ -3517,11 +4424,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| id of the key to get | + **filepath** | **str**| filepath of the file to get | ### Return type -[**DeployKey**](DeployKey.md) +void (empty response body) ### Authorization @@ -3534,10 +4441,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_pull_request** -> PullRequest repo_get_pull_request(owner, repo, index) +# **repo_get_release** +> Release repo_get_release(owner, repo, id) -Get a pull request +Get a release ### Example ```python @@ -3581,14 +4488,14 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -index = 789 # int | index of the pull request to get +id = 789 # int | id of the release to get try: - # Get a pull request - api_response = api_instance.repo_get_pull_request(owner, repo, index) + # Get a release + api_response = api_instance.repo_get_release(owner, repo, id) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_pull_request: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_release: %s\n" % e) ``` ### Parameters @@ -3597,11 +4504,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **index** | **int**| index of the pull request to get | + **id** | **int**| id of the release to get | ### Return type -[**PullRequest**](PullRequest.md) +[**Release**](Release.md) ### Authorization @@ -3614,10 +4521,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_raw_file** -> repo_get_raw_file(owner, repo, filepath) +# **repo_get_release_attachment** +> Attachment repo_get_release_attachment(owner, repo, id, attachment_id) -Get a file from a repository +Get a release attachment ### Example ```python @@ -3661,13 +4568,15 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -filepath = 'filepath_example' # str | filepath of the file to get +id = 789 # int | id of the release +attachment_id = 789 # int | id of the attachment to get try: - # Get a file from a repository - api_instance.repo_get_raw_file(owner, repo, filepath) + # Get a release attachment + api_response = api_instance.repo_get_release_attachment(owner, repo, id, attachment_id) + pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_raw_file: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_release_attachment: %s\n" % e) ``` ### Parameters @@ -3676,11 +4585,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **filepath** | **str**| filepath of the file to get | + **id** | **int**| id of the release | + **attachment_id** | **int**| id of the attachment to get | ### Return type -void (empty response body) +[**Attachment**](Attachment.md) ### Authorization @@ -3693,10 +4603,10 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_release** -> Release repo_get_release(owner, repo, id) +# **repo_get_single_commit_by_ref** +> Commit repo_get_single_commit_by_ref(owner, repo, ref) -Get a release +Get a single commit from a repository ### Example ```python @@ -3740,14 +4650,14 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the release to get +ref = 'ref_example' # str | a git ref try: - # Get a release - api_response = api_instance.repo_get_release(owner, repo, id) + # Get a single commit from a repository + api_response = api_instance.repo_get_single_commit_by_ref(owner, repo, ref) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_release: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_single_commit_by_ref: %s\n" % e) ``` ### Parameters @@ -3756,11 +4666,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| id of the release to get | + **ref** | **str**| a git ref | ### Return type -[**Release**](Release.md) +[**Commit**](Commit.md) ### Authorization @@ -3773,10 +4683,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_release_attachment** -> Attachment repo_get_release_attachment(owner, repo, id, attachment_id) +# **repo_get_single_commit_by_sha** +> Commit repo_get_single_commit_by_sha(owner, repo, sha) -Get a release attachment +Get a single commit from a repository ### Example ```python @@ -3820,15 +4730,14 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -id = 789 # int | id of the release -attachment_id = 789 # int | id of the attachment to get +sha = 'sha_example' # str | the commit hash try: - # Get a release attachment - api_response = api_instance.repo_get_release_attachment(owner, repo, id, attachment_id) + # Get a single commit from a repository + api_response = api_instance.repo_get_single_commit_by_sha(owner, repo, sha) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_release_attachment: %s\n" % e) + print("Exception when calling RepositoryApi->repo_get_single_commit_by_sha: %s\n" % e) ``` ### Parameters @@ -3837,12 +4746,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **id** | **int**| id of the release | - **attachment_id** | **int**| id of the attachment to get | + **sha** | **str**| the commit hash | ### Return type -[**Attachment**](Attachment.md) +[**Commit**](Commit.md) ### Authorization @@ -3855,10 +4763,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_get_single_commit** -> Commit repo_get_single_commit(owner, repo, sha) +# **repo_list_all_git_refs** +> list[Reference] repo_list_all_git_refs(owner, repo) -Get a single commit from a repository +Get specified ref or filtered repository's refs ### Example ```python @@ -3902,14 +4810,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -sha = 'sha_example' # str | the commit hash try: - # Get a single commit from a repository - api_response = api_instance.repo_get_single_commit(owner, repo, sha) + # Get specified ref or filtered repository's refs + api_response = api_instance.repo_list_all_git_refs(owner, repo) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_get_single_commit: %s\n" % e) + print("Exception when calling RepositoryApi->repo_list_all_git_refs: %s\n" % e) ``` ### Parameters @@ -3918,11 +4825,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **sha** | **str**| the commit hash | ### Return type -[**Commit**](Commit.md) +[**list[Reference]**](Reference.md) ### Authorization @@ -3935,10 +4841,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **repo_list_all_git_refs** -> list[Reference] repo_list_all_git_refs(owner, repo) +# **repo_list_branch_protection** +> list[BranchProtection] repo_list_branch_protection(owner, repo) -Get specified ref or filtered repository's refs +List branch protections for a repository ### Example ```python @@ -3984,11 +4890,11 @@ owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo try: - # Get specified ref or filtered repository's refs - api_response = api_instance.repo_list_all_git_refs(owner, repo) + # List branch protections for a repository + api_response = api_instance.repo_list_branch_protection(owner, repo) pprint(api_response) except ApiException as e: - print("Exception when calling RepositoryApi->repo_list_all_git_refs: %s\n" % e) + print("Exception when calling RepositoryApi->repo_list_branch_protection: %s\n" % e) ``` ### Parameters @@ -4000,7 +4906,7 @@ Name | Type | Description | Notes ### Return type -[**list[Reference]**](Reference.md) +[**list[BranchProtection]**](BranchProtection.md) ### Authorization @@ -4092,7 +4998,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repo_list_collaborators** -> list[User] repo_list_collaborators(owner, repo) +> list[User] repo_list_collaborators(owner, repo, page=page, limit=limit) List a repository's collaborators @@ -4138,10 +5044,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List a repository's collaborators - api_response = api_instance.repo_list_collaborators(owner, repo) + api_response = api_instance.repo_list_collaborators(owner, repo, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling RepositoryApi->repo_list_collaborators: %s\n" % e) @@ -4153,6 +5061,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -4328,7 +5238,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repo_list_hooks** -> list[Hook] repo_list_hooks(owner, repo) +> list[Hook] repo_list_hooks(owner, repo, page=page, limit=limit) List the hooks in a repository @@ -4374,10 +5284,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List the hooks in a repository - api_response = api_instance.repo_list_hooks(owner, repo) + api_response = api_instance.repo_list_hooks(owner, repo, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling RepositoryApi->repo_list_hooks: %s\n" % e) @@ -4389,6 +5301,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -4406,7 +5320,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repo_list_keys** -> list[DeployKey] repo_list_keys(owner, repo, key_id=key_id, fingerprint=fingerprint) +> list[DeployKey] repo_list_keys(owner, repo, key_id=key_id, fingerprint=fingerprint, page=page, limit=limit) List a repository's keys @@ -4454,10 +5368,12 @@ owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo key_id = 56 # int | the key_id to search for (optional) fingerprint = 'fingerprint_example' # str | fingerprint of the key (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List a repository's keys - api_response = api_instance.repo_list_keys(owner, repo, key_id=key_id, fingerprint=fingerprint) + api_response = api_instance.repo_list_keys(owner, repo, key_id=key_id, fingerprint=fingerprint, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling RepositoryApi->repo_list_keys: %s\n" % e) @@ -4471,6 +5387,8 @@ Name | Type | Description | Notes **repo** | **str**| name of the repo | **key_id** | **int**| the key_id to search for | [optional] **fingerprint** | **str**| fingerprint of the key | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -4488,7 +5406,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repo_list_pull_requests** -> list[PullRequest] repo_list_pull_requests(owner, repo, page=page, state=state, sort=sort, milestone=milestone, labels=labels) +> list[PullRequest] repo_list_pull_requests(owner, repo, state=state, sort=sort, milestone=milestone, labels=labels, page=page, limit=limit) List a repo's pull requests @@ -4534,15 +5452,16 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -page = 56 # int | Page number (optional) state = 'state_example' # str | State of pull request: open or closed (optional) (optional) sort = 'sort_example' # str | Type of sort (optional) milestone = 789 # int | ID of the milestone (optional) labels = [56] # list[int] | Label IDs (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List a repo's pull requests - api_response = api_instance.repo_list_pull_requests(owner, repo, page=page, state=state, sort=sort, milestone=milestone, labels=labels) + api_response = api_instance.repo_list_pull_requests(owner, repo, state=state, sort=sort, milestone=milestone, labels=labels, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling RepositoryApi->repo_list_pull_requests: %s\n" % e) @@ -4554,15 +5473,100 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **page** | **int**| Page number | [optional] **state** | **str**| State of pull request: open or closed (optional) | [optional] **sort** | **str**| Type of sort | [optional] **milestone** | **int**| ID of the milestone | [optional] **labels** | [**list[int]**](int.md)| Label IDs | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] + +### Return type + +[**list[PullRequest]**](PullRequest.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **repo_list_pull_reviews** +> list[PullReview] repo_list_pull_reviews(owner, repo, index, page=page, limit=limit) + +List all reviews for a pull request + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the pull request +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) + +try: + # List all reviews for a pull request + api_response = api_instance.repo_list_pull_reviews(owner, repo, index, page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_list_pull_reviews: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the pull request | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type -[**list[PullRequest]**](PullRequest.md) +[**list[PullReview]**](PullReview.md) ### Authorization @@ -4656,7 +5660,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repo_list_releases** -> list[Release] repo_list_releases(owner, repo, page=page, per_page=per_page) +> list[Release] repo_list_releases(owner, repo, per_page=per_page, page=page, limit=limit) List a repo's releases @@ -4702,12 +5706,13 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo -page = 56 # int | page wants to load (optional) per_page = 56 # int | items count every page wants to load (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List a repo's releases - api_response = api_instance.repo_list_releases(owner, repo, page=page, per_page=per_page) + api_response = api_instance.repo_list_releases(owner, repo, per_page=per_page, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling RepositoryApi->repo_list_releases: %s\n" % e) @@ -4719,8 +5724,9 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | - **page** | **int**| page wants to load | [optional] **per_page** | **int**| items count every page wants to load | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -4738,7 +5744,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repo_list_stargazers** -> list[User] repo_list_stargazers(owner, repo) +> list[User] repo_list_stargazers(owner, repo, page=page, limit=limit) List a repo's stargazers @@ -4784,10 +5790,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List a repo's stargazers - api_response = api_instance.repo_list_stargazers(owner, repo) + api_response = api_instance.repo_list_stargazers(owner, repo, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling RepositoryApi->repo_list_stargazers: %s\n" % e) @@ -4799,6 +5807,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -4816,7 +5826,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repo_list_statuses** -> list[Status] repo_list_statuses(owner, repo, sha, page=page, sort=sort, state=state) +> list[Status] repo_list_statuses(owner, repo, sha, sort=sort, state=state, page=page, limit=limit) Get a commit's statuses @@ -4863,13 +5873,14 @@ api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo sha = 'sha_example' # str | sha of the commit -page = 56 # int | page number of results (optional) sort = 'sort_example' # str | type of sort (optional) state = 'state_example' # str | type of state (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # Get a commit's statuses - api_response = api_instance.repo_list_statuses(owner, repo, sha, page=page, sort=sort, state=state) + api_response = api_instance.repo_list_statuses(owner, repo, sha, sort=sort, state=state, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling RepositoryApi->repo_list_statuses: %s\n" % e) @@ -4882,9 +5893,10 @@ Name | Type | Description | Notes **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | **sha** | **str**| sha of the commit | - **page** | **int**| page number of results | [optional] **sort** | **str**| type of sort | [optional] **state** | **str**| type of state | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -4902,7 +5914,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repo_list_subscribers** -> list[User] repo_list_subscribers(owner, repo) +> list[User] repo_list_subscribers(owner, repo, page=page, limit=limit) List a repo's watchers @@ -4948,10 +5960,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List a repo's watchers - api_response = api_instance.repo_list_subscribers(owner, repo) + api_response = api_instance.repo_list_subscribers(owner, repo, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling RepositoryApi->repo_list_subscribers: %s\n" % e) @@ -4963,6 +5977,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -4980,7 +5996,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repo_list_tags** -> list[Tag] repo_list_tags(owner, repo) +> list[Tag] repo_list_tags(owner, repo, page=page, limit=limit) List a repository's tags @@ -5026,10 +6042,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, default maximum page size is 50 (optional) try: # List a repository's tags - api_response = api_instance.repo_list_tags(owner, repo) + api_response = api_instance.repo_list_tags(owner, repo, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling RepositoryApi->repo_list_tags: %s\n" % e) @@ -5041,6 +6059,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, default maximum page size is 50 | [optional] ### Return type @@ -5058,7 +6078,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repo_list_topics** -> TopicName repo_list_topics(owner, repo) +> TopicName repo_list_topics(owner, repo, page=page, limit=limit) Get list of topics that a repository has @@ -5104,10 +6124,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # Get list of topics that a repository has - api_response = api_instance.repo_list_topics(owner, repo) + api_response = api_instance.repo_list_topics(owner, repo, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling RepositoryApi->repo_list_topics: %s\n" % e) @@ -5119,6 +6141,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -5449,7 +6473,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repo_search** -> SearchResults repo_search(q=q, topic=topic, include_desc=include_desc, uid=uid, starred_by=starred_by, private=private, page=page, limit=limit, mode=mode, exclusive=exclusive, sort=sort, order=order) +> SearchResults repo_search(q=q, topic=topic, include_desc=include_desc, uid=uid, priority_owner_id=priority_owner_id, starred_by=starred_by, private=private, template=template, mode=mode, exclusive=exclusive, sort=sort, order=order, page=page, limit=limit) Search for repositories @@ -5497,18 +6521,20 @@ q = 'q_example' # str | keyword (optional) topic = true # bool | Limit search to repositories with keyword as topic (optional) include_desc = true # bool | include search of keyword within repository description (optional) uid = 789 # int | search only for repos that the user with the given id owns or contributes to (optional) +priority_owner_id = 789 # int | repo owner to prioritize in the results (optional) starred_by = 789 # int | search only for repos that the user with the given id has starred (optional) private = true # bool | include private repositories this user has access to (defaults to true) (optional) -page = 56 # int | page number of results to return (1-based) (optional) -limit = 56 # int | page size of results, maximum page size is 50 (optional) +template = true # bool | include template repositories this user has access to (defaults to true) (optional) mode = 'mode_example' # str | type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" (optional) exclusive = true # bool | if `uid` is given, search only for repos that the user owns (optional) sort = 'sort_example' # str | sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\" (optional) order = 'order_example' # str | sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # Search for repositories - api_response = api_instance.repo_search(q=q, topic=topic, include_desc=include_desc, uid=uid, starred_by=starred_by, private=private, page=page, limit=limit, mode=mode, exclusive=exclusive, sort=sort, order=order) + api_response = api_instance.repo_search(q=q, topic=topic, include_desc=include_desc, uid=uid, priority_owner_id=priority_owner_id, starred_by=starred_by, private=private, template=template, mode=mode, exclusive=exclusive, sort=sort, order=order, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling RepositoryApi->repo_search: %s\n" % e) @@ -5522,14 +6548,16 @@ Name | Type | Description | Notes **topic** | **bool**| Limit search to repositories with keyword as topic | [optional] **include_desc** | **bool**| include search of keyword within repository description | [optional] **uid** | **int**| search only for repos that the user with the given id owns or contributes to | [optional] + **priority_owner_id** | **int**| repo owner to prioritize in the results | [optional] **starred_by** | **int**| search only for repos that the user with the given id has starred | [optional] **private** | **bool**| include private repositories this user has access to (defaults to true) | [optional] - **page** | **int**| page number of results to return (1-based) | [optional] - **limit** | **int**| page size of results, maximum page size is 50 | [optional] + **template** | **bool**| include template repositories this user has access to (defaults to true) | [optional] **mode** | **str**| type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" | [optional] **exclusive** | **bool**| if `uid` is given, search only for repos that the user owns | [optional] **sort** | **str**| sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\" | [optional] **order** | **str**| sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -5624,6 +6652,90 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **repo_submit_pull_review** +> PullReview repo_submit_pull_review(owner, repo, index, id, body) + +Submit a pending review to an pull request + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +index = 789 # int | index of the pull request +id = 789 # int | id of the review +body = giteapy.SubmitPullReviewOptions() # SubmitPullReviewOptions | + +try: + # Submit a pending review to an pull request + api_response = api_instance.repo_submit_pull_review(owner, repo, index, id, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_submit_pull_review: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **index** | **int**| index of the pull request | + **id** | **int**| id of the review | + **body** | [**SubmitPullReviewOptions**](SubmitPullReviewOptions.md)| | + +### Return type + +[**PullReview**](PullReview.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **repo_test_hook** > repo_test_hook(owner, repo, id) @@ -5704,7 +6816,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **repo_tracked_times** -> list[TrackedTime] repo_tracked_times(owner, repo) +> list[TrackedTime] repo_tracked_times(owner, repo, user=user, since=since, before=before, page=page, limit=limit) List a repo's tracked times @@ -5750,10 +6862,15 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repo repo = 'repo_example' # str | name of the repo +user = 'user_example' # str | optional filter by user (optional) +since = '2013-10-20T19:20:30+01:00' # datetime | Only show times updated after the given time. This is a timestamp in RFC 3339 format (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Only show times updated before the given time. This is a timestamp in RFC 3339 format (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List a repo's tracked times - api_response = api_instance.repo_tracked_times(owner, repo) + api_response = api_instance.repo_tracked_times(owner, repo, user=user, since=since, before=before, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling RepositoryApi->repo_tracked_times: %s\n" % e) @@ -5765,6 +6882,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **str**| owner of the repo | **repo** | **str**| name of the repo | + **user** | **str**| optional filter by user | [optional] + **since** | **datetime**| Only show times updated after the given time. This is a timestamp in RFC 3339 format | [optional] + **before** | **datetime**| Only show times updated before the given time. This is a timestamp in RFC 3339 format | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -5781,6 +6903,86 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **repo_transfer** +> Repository repo_transfer(owner, repo, body) + +Transfer a repo ownership + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo to transfer +repo = 'repo_example' # str | name of the repo to transfer +body = giteapy.TransferRepoOption() # TransferRepoOption | Transfer Options + +try: + # Transfer a repo ownership + api_response = api_instance.repo_transfer(owner, repo, body) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->repo_transfer: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo to transfer | + **repo** | **str**| name of the repo to transfer | + **body** | [**TransferRepoOption**](TransferRepoOption.md)| Transfer Options | + +### Return type + +[**Repository**](Repository.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **repo_update_file** > FileResponse repo_update_file(owner, repo, filepath, body) @@ -5943,7 +7145,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **topic_search** -> list[TopicResponse] topic_search(q) +> list[TopicResponse] topic_search(q, page=page, limit=limit) search topics via keyword @@ -5988,10 +7190,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) q = 'q_example' # str | keywords to search +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # search topics via keyword - api_response = api_instance.topic_search(q) + api_response = api_instance.topic_search(q, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling RepositoryApi->topic_search: %s\n" % e) @@ -6002,6 +7206,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q** | **str**| keywords to search | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -6251,3 +7457,83 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **user_tracked_times** +> list[TrackedTime] user_tracked_times(owner, repo, user) + +List a user's tracked times in a repo + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.RepositoryApi(giteapy.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repo +repo = 'repo_example' # str | name of the repo +user = 'user_example' # str | username of user + +try: + # List a user's tracked times in a repo + api_response = api_instance.user_tracked_times(owner, repo, user) + pprint(api_response) +except ApiException as e: + print("Exception when calling RepositoryApi->user_tracked_times: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repo | + **repo** | **str**| name of the repo | + **user** | **str**| username of user | + +### Return type + +[**list[TrackedTime]**](TrackedTime.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/RepositoryMeta.md b/docs/RepositoryMeta.md new file mode 100644 index 0000000..e24d947 --- /dev/null +++ b/docs/RepositoryMeta.md @@ -0,0 +1,13 @@ +# RepositoryMeta + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**full_name** | **str** | | [optional] +**id** | **int** | | [optional] +**name** | **str** | | [optional] +**owner** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ReviewStateType.md b/docs/ReviewStateType.md new file mode 100644 index 0000000..e821757 --- /dev/null +++ b/docs/ReviewStateType.md @@ -0,0 +1,9 @@ +# ReviewStateType + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SearchResults.md b/docs/SearchResults.md index 876e635..3b7b034 100755 --- a/docs/SearchResults.md +++ b/docs/SearchResults.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**data** | [**list[Repository]**](Repository.md) | | [optional] -**ok** | **bool** | | [optional] +**data** | [**list[Repository]**](Repository.md) | | [optional] +**ok** | **bool** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ServerVersion.md b/docs/ServerVersion.md index 76b84cd..58c54e8 100755 --- a/docs/ServerVersion.md +++ b/docs/ServerVersion.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**version** | **str** | | [optional] +**version** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Status.md b/docs/Status.md index 98c4d4c..4e58391 100755 --- a/docs/Status.md +++ b/docs/Status.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**context** | **str** | | [optional] -**created_at** | **datetime** | | [optional] -**creator** | [**User**](User.md) | | [optional] -**description** | **str** | | [optional] -**id** | **int** | | [optional] -**status** | [**StatusState**](StatusState.md) | | [optional] -**target_url** | **str** | | [optional] -**updated_at** | **datetime** | | [optional] -**url** | **str** | | [optional] +**context** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**creator** | [**User**](User.md) | | [optional] +**description** | **str** | | [optional] +**id** | **int** | | [optional] +**status** | [**StatusState**](StatusState.md) | | [optional] +**target_url** | **str** | | [optional] +**updated_at** | **datetime** | | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StopWatch.md b/docs/StopWatch.md new file mode 100644 index 0000000..50842ad --- /dev/null +++ b/docs/StopWatch.md @@ -0,0 +1,11 @@ +# StopWatch + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **datetime** | | [optional] +**issue_index** | **int** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubmitPullReviewOptions.md b/docs/SubmitPullReviewOptions.md new file mode 100644 index 0000000..9241ed8 --- /dev/null +++ b/docs/SubmitPullReviewOptions.md @@ -0,0 +1,11 @@ +# SubmitPullReviewOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **str** | | [optional] +**event** | [**ReviewStateType**](ReviewStateType.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Tag.md b/docs/Tag.md index 08fd49b..07c2d02 100755 --- a/docs/Tag.md +++ b/docs/Tag.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**commit** | [**CommitMeta**](CommitMeta.md) | | [optional] -**id** | **str** | | [optional] -**name** | **str** | | [optional] -**tarball_url** | **str** | | [optional] -**zipball_url** | **str** | | [optional] +**commit** | [**CommitMeta**](CommitMeta.md) | | [optional] +**id** | **str** | | [optional] +**name** | **str** | | [optional] +**tarball_url** | **str** | | [optional] +**zipball_url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Team.md b/docs/Team.md index 981ec7d..3dcc93d 100755 --- a/docs/Team.md +++ b/docs/Team.md @@ -3,12 +3,14 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**id** | **int** | | [optional] -**name** | **str** | | [optional] -**organization** | [**Organization**](Organization.md) | | [optional] -**permission** | **str** | | [optional] -**units** | **list[str]** | | [optional] +**can_create_org_repo** | **bool** | | [optional] +**description** | **str** | | [optional] +**id** | **int** | | [optional] +**includes_all_repositories** | **bool** | | [optional] +**name** | **str** | | [optional] +**organization** | [**Organization**](Organization.md) | | [optional] +**permission** | **str** | | [optional] +**units** | **list[str]** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TopicName.md b/docs/TopicName.md index ca4b554..d56af92 100755 --- a/docs/TopicName.md +++ b/docs/TopicName.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**topics** | **list[str]** | | [optional] +**topics** | **list[str]** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TopicResponse.md b/docs/TopicResponse.md index 1014faf..c8a8c81 100755 --- a/docs/TopicResponse.md +++ b/docs/TopicResponse.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**created** | **datetime** | | [optional] -**id** | **int** | | [optional] -**repo_count** | **int** | | [optional] -**topic_name** | **str** | | [optional] -**updated** | **datetime** | | [optional] +**created** | **datetime** | | [optional] +**id** | **int** | | [optional] +**repo_count** | **int** | | [optional] +**topic_name** | **str** | | [optional] +**updated** | **datetime** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TrackedTime.md b/docs/TrackedTime.md index bb0c31f..03ec6d9 100755 --- a/docs/TrackedTime.md +++ b/docs/TrackedTime.md @@ -3,11 +3,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**created** | **datetime** | | [optional] -**id** | **int** | | [optional] -**issue_id** | **int** | | [optional] -**time** | **int** | Time in seconds | [optional] -**user_id** | **int** | | [optional] +**created** | **datetime** | | [optional] +**id** | **int** | | [optional] +**issue** | [**Issue**](Issue.md) | | [optional] +**issue_id** | **int** | deprecated (only for backwards compatibility) | [optional] +**time** | **int** | Time in seconds | [optional] +**user_id** | **int** | deprecated (only for backwards compatibility) | [optional] +**user_name** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TransferRepoOption.md b/docs/TransferRepoOption.md new file mode 100644 index 0000000..13ca242 --- /dev/null +++ b/docs/TransferRepoOption.md @@ -0,0 +1,11 @@ +# TransferRepoOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**new_owner** | **str** | | +**team_ids** | **list[int]** | ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateFileOptions.md b/docs/UpdateFileOptions.md index 17d482a..e0fab62 100755 --- a/docs/UpdateFileOptions.md +++ b/docs/UpdateFileOptions.md @@ -3,14 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**author** | [**Identity**](Identity.md) | | [optional] -**branch** | **str** | branch (optional) to base this file from. if not given, the default branch is used | [optional] -**committer** | [**Identity**](Identity.md) | | [optional] -**content** | **str** | content must be base64 encoded | -**from_path** | **str** | from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL | [optional] -**message** | **str** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] -**new_branch** | **str** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] -**sha** | **str** | sha is the SHA for the file that already exists | +**author** | [**Identity**](Identity.md) | | [optional] +**branch** | **str** | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**committer** | [**Identity**](Identity.md) | | [optional] +**content** | **str** | content must be base64 encoded | +**dates** | [**CommitDateOptions**](CommitDateOptions.md) | | [optional] +**from_path** | **str** | from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL | [optional] +**message** | **str** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] +**new_branch** | **str** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**sha** | **str** | sha is the SHA for the file that already exists | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/User.md b/docs/User.md index 217bd69..5f9c360 100755 --- a/docs/User.md +++ b/docs/User.md @@ -3,15 +3,15 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**avatar_url** | **str** | URL to the user's avatar | [optional] -**created** | **datetime** | | [optional] -**email** | **str** | | [optional] -**full_name** | **str** | the user's full name | [optional] -**id** | **int** | the user's id | [optional] -**is_admin** | **bool** | Is the user an administrator | [optional] -**language** | **str** | User locale | [optional] -**last_login** | **datetime** | | [optional] -**login** | **str** | the user's username | [optional] +**avatar_url** | **str** | URL to the user's avatar | [optional] +**created** | **datetime** | | [optional] +**email** | **str** | | [optional] +**full_name** | **str** | the user's full name | [optional] +**id** | **int** | the user's id | [optional] +**is_admin** | **bool** | Is the user an administrator | [optional] +**language** | **str** | User locale | [optional] +**last_login** | **datetime** | | [optional] +**login** | **str** | the user's username | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserApi.md b/docs/UserApi.md index 4f71bdc..d5d16f4 100755 --- a/docs/UserApi.md +++ b/docs/UserApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**create_current_user_repo**](UserApi.md#create_current_user_repo) | **POST** /user/repos | Create a repository [**user_add_email**](UserApi.md#user_add_email) | **POST** /user/emails | Add email addresses [**user_check_following**](UserApi.md#user_check_following) | **GET** /users/{follower}/following/{followee} | Check if one user is following another user +[**user_create_o_auth2_application**](UserApi.md#user_create_o_auth2_application) | **POST** /user/applications/oauth2 | creates a new OAuth2 application [**user_create_token**](UserApi.md#user_create_token) | **POST** /users/{username}/tokens | Create an access token [**user_current_check_following**](UserApi.md#user_current_check_following) | **GET** /user/following/{username} | Check whether a user is followed by the authenticated user [**user_current_check_starring**](UserApi.md#user_current_check_starring) | **GET** /user/starred/{owner}/{repo} | Whether the authenticated is starring the repo @@ -30,9 +31,13 @@ Method | HTTP request | Description [**user_current_tracked_times**](UserApi.md#user_current_tracked_times) | **GET** /user/times | List the current user's tracked times [**user_delete_access_token**](UserApi.md#user_delete_access_token) | **DELETE** /users/{username}/tokens/{token} | delete an access token [**user_delete_email**](UserApi.md#user_delete_email) | **DELETE** /user/emails | Delete email addresses +[**user_delete_o_auth2_application**](UserApi.md#user_delete_o_auth2_application) | **DELETE** /user/applications/oauth2/{id} | delete an OAuth2 Application [**user_get**](UserApi.md#user_get) | **GET** /users/{username} | Get a user [**user_get_current**](UserApi.md#user_get_current) | **GET** /user | Get the authenticated user [**user_get_heatmap_data**](UserApi.md#user_get_heatmap_data) | **GET** /users/{username}/heatmap | Get a user's heatmap +[**user_get_o_auth2_application**](UserApi.md#user_get_o_auth2_application) | **GET** /user/applications/oauth2/{id} | get an OAuth2 Application +[**user_get_oauth2_application**](UserApi.md#user_get_oauth2_application) | **GET** /user/applications/oauth2 | List the authenticated user's oauth2 applications +[**user_get_stop_watches**](UserApi.md#user_get_stop_watches) | **GET** /user/stopwatches | Get list of all existing stopwatches [**user_get_tokens**](UserApi.md#user_get_tokens) | **GET** /users/{username}/tokens | List the authenticated user's access tokens [**user_list_emails**](UserApi.md#user_list_emails) | **GET** /user/emails | List the authenticated user's email addresses [**user_list_followers**](UserApi.md#user_list_followers) | **GET** /users/{username}/followers | List the given user's followers @@ -44,7 +49,7 @@ Method | HTTP request | Description [**user_list_subscriptions**](UserApi.md#user_list_subscriptions) | **GET** /users/{username}/subscriptions | List the repositories watched by a user [**user_list_teams**](UserApi.md#user_list_teams) | **GET** /user/teams | List all the teams a user belongs to [**user_search**](UserApi.md#user_search) | **GET** /users/search | Search for users -[**user_tracked_times**](UserApi.md#user_tracked_times) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo +[**user_update_o_auth2_application**](UserApi.md#user_update_o_auth2_application) | **PATCH** /user/applications/oauth2/{id} | update an OAuth2 Application, this includes regenerating the client secret # **create_current_user_repo** @@ -276,6 +281,82 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **user_create_o_auth2_application** +> OAuth2Application user_create_o_auth2_application(body) + +creates a new OAuth2 application + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) +body = giteapy.CreateOAuth2ApplicationOptions() # CreateOAuth2ApplicationOptions | + +try: + # creates a new OAuth2 application + api_response = api_instance.user_create_o_auth2_application(body) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_create_o_auth2_application: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateOAuth2ApplicationOptions**](CreateOAuth2ApplicationOptions.md)| | + +### Return type + +[**OAuth2Application**](OAuth2Application.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **user_create_token** > user_create_token(username, access_token=access_token) @@ -960,7 +1041,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_current_list_followers** -> list[User] user_current_list_followers() +> list[User] user_current_list_followers(page=page, limit=limit) List the authenticated user's followers @@ -1004,17 +1085,23 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List the authenticated user's followers - api_response = api_instance.user_current_list_followers() + api_response = api_instance.user_current_list_followers(page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_current_list_followers: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -1032,7 +1119,7 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_current_list_following** -> list[User] user_current_list_following() +> list[User] user_current_list_following(page=page, limit=limit) List the users that the authenticated user is following @@ -1076,17 +1163,23 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List the users that the authenticated user is following - api_response = api_instance.user_current_list_following() + api_response = api_instance.user_current_list_following(page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_current_list_following: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -1104,7 +1197,7 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_current_list_gpg_keys** -> list[GPGKey] user_current_list_gpg_keys() +> list[GPGKey] user_current_list_gpg_keys(page=page, limit=limit) List the authenticated user's GPG keys @@ -1148,17 +1241,23 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List the authenticated user's GPG keys - api_response = api_instance.user_current_list_gpg_keys() + api_response = api_instance.user_current_list_gpg_keys(page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_current_list_gpg_keys: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -1176,7 +1275,7 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_current_list_keys** -> list[PublicKey] user_current_list_keys(fingerprint=fingerprint) +> list[PublicKey] user_current_list_keys(fingerprint=fingerprint, page=page, limit=limit) List the authenticated user's public keys @@ -1221,10 +1320,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) fingerprint = 'fingerprint_example' # str | fingerprint of the key (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List the authenticated user's public keys - api_response = api_instance.user_current_list_keys(fingerprint=fingerprint) + api_response = api_instance.user_current_list_keys(fingerprint=fingerprint, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_current_list_keys: %s\n" % e) @@ -1235,6 +1336,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **fingerprint** | **str**| fingerprint of the key | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -1252,7 +1355,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_current_list_repos** -> list[Repository] user_current_list_repos() +> list[Repository] user_current_list_repos(page=page, limit=limit) List the repos that the authenticated user owns or has access to @@ -1296,17 +1399,23 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List the repos that the authenticated user owns or has access to - api_response = api_instance.user_current_list_repos() + api_response = api_instance.user_current_list_repos(page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_current_list_repos: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -1324,7 +1433,7 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_current_list_starred** -> list[Repository] user_current_list_starred() +> list[Repository] user_current_list_starred(page=page, limit=limit) The repos that the authenticated user has starred @@ -1368,17 +1477,23 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # The repos that the authenticated user has starred - api_response = api_instance.user_current_list_starred() + api_response = api_instance.user_current_list_starred(page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_current_list_starred: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -1396,7 +1511,7 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_current_list_subscriptions** -> list[Repository] user_current_list_subscriptions() +> list[Repository] user_current_list_subscriptions(page=page, limit=limit) List repositories watched by the authenticated user @@ -1440,17 +1555,23 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List repositories watched by the authenticated user - api_response = api_instance.user_current_list_subscriptions() + api_response = api_instance.user_current_list_subscriptions(page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_current_list_subscriptions: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -1772,7 +1893,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_current_tracked_times** -> list[TrackedTime] user_current_tracked_times() +> list[TrackedTime] user_current_tracked_times(since=since, before=before) List the current user's tracked times @@ -1816,17 +1937,23 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) +since = '2013-10-20T19:20:30+01:00' # datetime | Only show times updated after the given time. This is a timestamp in RFC 3339 format (optional) +before = '2013-10-20T19:20:30+01:00' # datetime | Only show times updated before the given time. This is a timestamp in RFC 3339 format (optional) try: # List the current user's tracked times - api_response = api_instance.user_current_tracked_times() + api_response = api_instance.user_current_tracked_times(since=since, before=before) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_current_tracked_times: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **since** | **datetime**| Only show times updated after the given time. This is a timestamp in RFC 3339 format | [optional] + **before** | **datetime**| Only show times updated before the given time. This is a timestamp in RFC 3339 format | [optional] ### Return type @@ -1995,6 +2122,81 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **user_delete_o_auth2_application** +> user_delete_o_auth2_application(id) + +delete an OAuth2 Application + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) +id = 789 # int | token to be deleted + +try: + # delete an OAuth2 Application + api_instance.user_delete_o_auth2_application(id) +except ApiException as e: + print("Exception when calling UserApi->user_delete_o_auth2_application: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| token to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **user_get** > User user_get(username) @@ -2219,8 +2421,240 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **user_get_o_auth2_application** +> OAuth2Application user_get_o_auth2_application(id) + +get an OAuth2 Application + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) +id = 789 # int | Application ID to be found + +try: + # get an OAuth2 Application + api_response = api_instance.user_get_o_auth2_application(id) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_get_o_auth2_application: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **int**| Application ID to be found | + +### Return type + +[**OAuth2Application**](OAuth2Application.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_get_oauth2_application** +> list[OAuth2Application] user_get_oauth2_application(page=page, limit=limit) + +List the authenticated user's oauth2 applications + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) + +try: + # List the authenticated user's oauth2 applications + api_response = api_instance.user_get_oauth2_application(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_get_oauth2_application: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] + +### Return type + +[**list[OAuth2Application]**](OAuth2Application.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **user_get_stop_watches** +> list[StopWatch] user_get_stop_watches(page=page, limit=limit) + +Get list of all existing stopwatches + +### Example +```python +from __future__ import print_function +import time +import giteapy +from giteapy.rest import ApiException +from pprint import pprint + +# Configure API key authorization: AccessToken +configuration = giteapy.Configuration() +configuration.api_key['access_token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['access_token'] = 'Bearer' +# Configure API key authorization: AuthorizationHeaderToken +configuration = giteapy.Configuration() +configuration.api_key['Authorization'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Authorization'] = 'Bearer' +# Configure HTTP basic authorization: BasicAuth +configuration = giteapy.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: SudoHeader +configuration = giteapy.Configuration() +configuration.api_key['Sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['Sudo'] = 'Bearer' +# Configure API key authorization: SudoParam +configuration = giteapy.Configuration() +configuration.api_key['sudo'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['sudo'] = 'Bearer' +# Configure API key authorization: Token +configuration = giteapy.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) + +try: + # Get list of all existing stopwatches + api_response = api_instance.user_get_stop_watches(page=page, limit=limit) + pprint(api_response) +except ApiException as e: + print("Exception when calling UserApi->user_get_stop_watches: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] + +### Return type + +[**list[StopWatch]**](StopWatch.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **user_get_tokens** -> list[AccessToken] user_get_tokens(username) +> list[AccessToken] user_get_tokens(username, page=page, limit=limit) List the authenticated user's access tokens @@ -2265,10 +2699,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) username = 'username_example' # str | username of user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List the authenticated user's access tokens - api_response = api_instance.user_get_tokens(username) + api_response = api_instance.user_get_tokens(username, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_get_tokens: %s\n" % e) @@ -2279,6 +2715,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **str**| username of user | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -2368,7 +2806,7 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_list_followers** -> list[User] user_list_followers(username) +> list[User] user_list_followers(username, page=page, limit=limit) List the given user's followers @@ -2413,10 +2851,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) username = 'username_example' # str | username of user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List the given user's followers - api_response = api_instance.user_list_followers(username) + api_response = api_instance.user_list_followers(username, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_list_followers: %s\n" % e) @@ -2427,6 +2867,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **str**| username of user | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -2444,7 +2886,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_list_following** -> list[User] user_list_following(username) +> list[User] user_list_following(username, page=page, limit=limit) List the users that the given user is following @@ -2489,10 +2931,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) username = 'username_example' # str | username of user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List the users that the given user is following - api_response = api_instance.user_list_following(username) + api_response = api_instance.user_list_following(username, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_list_following: %s\n" % e) @@ -2503,6 +2947,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **str**| username of user | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -2520,7 +2966,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_list_gpg_keys** -> list[GPGKey] user_list_gpg_keys(username) +> list[GPGKey] user_list_gpg_keys(username, page=page, limit=limit) List the given user's GPG keys @@ -2565,10 +3011,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) username = 'username_example' # str | username of user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List the given user's GPG keys - api_response = api_instance.user_list_gpg_keys(username) + api_response = api_instance.user_list_gpg_keys(username, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_list_gpg_keys: %s\n" % e) @@ -2579,6 +3027,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **str**| username of user | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -2596,7 +3046,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_list_keys** -> list[PublicKey] user_list_keys(username, fingerprint=fingerprint) +> list[PublicKey] user_list_keys(username, fingerprint=fingerprint, page=page, limit=limit) List the given user's public keys @@ -2642,10 +3092,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) username = 'username_example' # str | username of user fingerprint = 'fingerprint_example' # str | fingerprint of the key (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List the given user's public keys - api_response = api_instance.user_list_keys(username, fingerprint=fingerprint) + api_response = api_instance.user_list_keys(username, fingerprint=fingerprint, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_list_keys: %s\n" % e) @@ -2657,6 +3109,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **str**| username of user | **fingerprint** | **str**| fingerprint of the key | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -2674,7 +3128,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_list_repos** -> list[Repository] user_list_repos(username) +> list[Repository] user_list_repos(username, page=page, limit=limit) List the repos owned by the given user @@ -2719,10 +3173,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) username = 'username_example' # str | username of user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List the repos owned by the given user - api_response = api_instance.user_list_repos(username) + api_response = api_instance.user_list_repos(username, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_list_repos: %s\n" % e) @@ -2733,6 +3189,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **str**| username of user | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -2750,7 +3208,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_list_starred** -> list[Repository] user_list_starred(username) +> list[Repository] user_list_starred(username, page=page, limit=limit) The repos that the given user has starred @@ -2795,10 +3253,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) username = 'username_example' # str | username of user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # The repos that the given user has starred - api_response = api_instance.user_list_starred(username) + api_response = api_instance.user_list_starred(username, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_list_starred: %s\n" % e) @@ -2809,6 +3269,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **str**| username of user | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -2826,7 +3288,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_list_subscriptions** -> list[Repository] user_list_subscriptions(username) +> list[Repository] user_list_subscriptions(username, page=page, limit=limit) List the repositories watched by a user @@ -2871,10 +3333,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) username = 'username_example' # str | username of the user +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List the repositories watched by a user - api_response = api_instance.user_list_subscriptions(username) + api_response = api_instance.user_list_subscriptions(username, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_list_subscriptions: %s\n" % e) @@ -2885,6 +3349,8 @@ except ApiException as e: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **str**| username of the user | + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -2902,7 +3368,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_list_teams** -> list[Team] user_list_teams() +> list[Team] user_list_teams(page=page, limit=limit) List all the teams a user belongs to @@ -2946,17 +3412,23 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # List all the teams a user belongs to - api_response = api_instance.user_list_teams() + api_response = api_instance.user_list_teams(page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_list_teams: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -2974,7 +3446,7 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **user_search** -> InlineResponse2001 user_search(q=q, uid=uid, limit=limit) +> InlineResponse2001 user_search(q=q, uid=uid, page=page, limit=limit) Search for users @@ -3020,11 +3492,12 @@ configuration.api_key['token'] = 'YOUR_API_KEY' api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) q = 'q_example' # str | keyword (optional) uid = 789 # int | ID of the user to search for (optional) -limit = 56 # int | maximum number of users to return (optional) +page = 56 # int | page number of results to return (1-based) (optional) +limit = 56 # int | page size of results, maximum page size is 50 (optional) try: # Search for users - api_response = api_instance.user_search(q=q, uid=uid, limit=limit) + api_response = api_instance.user_search(q=q, uid=uid, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling UserApi->user_search: %s\n" % e) @@ -3036,7 +3509,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q** | **str**| keyword | [optional] **uid** | **int**| ID of the user to search for | [optional] - **limit** | **int**| maximum number of users to return | [optional] + **page** | **int**| page number of results to return (1-based) | [optional] + **limit** | **int**| page size of results, maximum page size is 50 | [optional] ### Return type @@ -3053,10 +3527,10 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **user_tracked_times** -> list[TrackedTime] user_tracked_times(owner, repo, user) +# **user_update_o_auth2_application** +> OAuth2Application user_update_o_auth2_application(id, body) -List a user's tracked times in a repo +update an OAuth2 Application, this includes regenerating the client secret ### Example ```python @@ -3098,29 +3572,27 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # create an instance of the API class api_instance = giteapy.UserApi(giteapy.ApiClient(configuration)) -owner = 'owner_example' # str | owner of the repo -repo = 'repo_example' # str | name of the repo -user = 'user_example' # str | username of user +id = 789 # int | application to be updated +body = giteapy.CreateOAuth2ApplicationOptions() # CreateOAuth2ApplicationOptions | try: - # List a user's tracked times in a repo - api_response = api_instance.user_tracked_times(owner, repo, user) + # update an OAuth2 Application, this includes regenerating the client secret + api_response = api_instance.user_update_o_auth2_application(id, body) pprint(api_response) except ApiException as e: - print("Exception when calling UserApi->user_tracked_times: %s\n" % e) + print("Exception when calling UserApi->user_update_o_auth2_application: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **owner** | **str**| owner of the repo | - **repo** | **str**| name of the repo | - **user** | **str**| username of user | + **id** | **int**| application to be updated | + **body** | [**CreateOAuth2ApplicationOptions**](CreateOAuth2ApplicationOptions.md)| | ### Return type -[**list[TrackedTime]**](TrackedTime.md) +[**OAuth2Application**](OAuth2Application.md) ### Authorization diff --git a/docs/UserHeatmapData.md b/docs/UserHeatmapData.md index 8aaba2b..584c1fb 100755 --- a/docs/UserHeatmapData.md +++ b/docs/UserHeatmapData.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**contributions** | **int** | | [optional] -**timestamp** | [**TimeStamp**](TimeStamp.md) | | [optional] +**contributions** | **int** | | [optional] +**timestamp** | [**TimeStamp**](TimeStamp.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/WatchInfo.md b/docs/WatchInfo.md index ce71b23..117c123 100755 --- a/docs/WatchInfo.md +++ b/docs/WatchInfo.md @@ -3,12 +3,12 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**created_at** | **datetime** | | [optional] -**ignored** | **bool** | | [optional] -**reason** | **object** | | [optional] -**repository_url** | **str** | | [optional] -**subscribed** | **bool** | | [optional] -**url** | **str** | | [optional] +**created_at** | **datetime** | | [optional] +**ignored** | **bool** | | [optional] +**reason** | **object** | | [optional] +**repository_url** | **str** | | [optional] +**subscribed** | **bool** | | [optional] +**url** | **str** | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/giteapy/__init__.py b/giteapy/__init__.py old mode 100755 new mode 100644 index d7d5750..45b1d56 --- a/giteapy/__init__.py +++ b/giteapy/__init__.py @@ -8,7 +8,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -19,6 +19,7 @@ from giteapy.api.admin_api import AdminApi from giteapy.api.issue_api import IssueApi from giteapy.api.miscellaneous_api import MiscellaneousApi +from giteapy.api.notification_api import NotificationApi from giteapy.api.organization_api import OrganizationApi from giteapy.api.repository_api import RepositoryApi from giteapy.api.user_api import UserApi @@ -35,23 +36,30 @@ from giteapy.models.annotated_tag_object import AnnotatedTagObject from giteapy.models.attachment import Attachment from giteapy.models.branch import Branch +from giteapy.models.branch_protection import BranchProtection from giteapy.models.comment import Comment from giteapy.models.commit import Commit +from giteapy.models.commit_date_options import CommitDateOptions from giteapy.models.commit_meta import CommitMeta from giteapy.models.commit_user import CommitUser from giteapy.models.contents_response import ContentsResponse +from giteapy.models.create_branch_protection_option import CreateBranchProtectionOption from giteapy.models.create_email_option import CreateEmailOption from giteapy.models.create_file_options import CreateFileOptions from giteapy.models.create_fork_option import CreateForkOption from giteapy.models.create_gpg_key_option import CreateGPGKeyOption from giteapy.models.create_hook_option import CreateHookOption +from giteapy.models.create_hook_option_config import CreateHookOptionConfig from giteapy.models.create_issue_comment_option import CreateIssueCommentOption from giteapy.models.create_issue_option import CreateIssueOption from giteapy.models.create_key_option import CreateKeyOption from giteapy.models.create_label_option import CreateLabelOption from giteapy.models.create_milestone_option import CreateMilestoneOption +from giteapy.models.create_o_auth2_application_options import CreateOAuth2ApplicationOptions from giteapy.models.create_org_option import CreateOrgOption from giteapy.models.create_pull_request_option import CreatePullRequestOption +from giteapy.models.create_pull_review_comment import CreatePullReviewComment +from giteapy.models.create_pull_review_options import CreatePullReviewOptions from giteapy.models.create_release_option import CreateReleaseOption from giteapy.models.create_repo_option import CreateRepoOption from giteapy.models.create_status_option import CreateStatusOption @@ -61,6 +69,7 @@ from giteapy.models.delete_file_options import DeleteFileOptions from giteapy.models.deploy_key import DeployKey from giteapy.models.edit_attachment_options import EditAttachmentOptions +from giteapy.models.edit_branch_protection_option import EditBranchProtectionOption from giteapy.models.edit_deadline_option import EditDeadlineOption from giteapy.models.edit_git_hook_option import EditGitHookOption from giteapy.models.edit_hook_option import EditHookOption @@ -70,6 +79,7 @@ from giteapy.models.edit_milestone_option import EditMilestoneOption from giteapy.models.edit_org_option import EditOrgOption from giteapy.models.edit_pull_request_option import EditPullRequestOption +from giteapy.models.edit_reaction_option import EditReactionOption from giteapy.models.edit_release_option import EditReleaseOption from giteapy.models.edit_repo_option import EditRepoOption from giteapy.models.edit_team_option import EditTeamOption @@ -101,6 +111,10 @@ from giteapy.models.merge_pull_request_option import MergePullRequestOption from giteapy.models.migrate_repo_form import MigrateRepoForm from giteapy.models.milestone import Milestone +from giteapy.models.notification_count import NotificationCount +from giteapy.models.notification_subject import NotificationSubject +from giteapy.models.notification_thread import NotificationThread +from giteapy.models.o_auth2_application import OAuth2Application from giteapy.models.organization import Organization from giteapy.models.pr_branch_info import PRBranchInfo from giteapy.models.payload_commit import PayloadCommit @@ -110,22 +124,30 @@ from giteapy.models.public_key import PublicKey from giteapy.models.pull_request import PullRequest from giteapy.models.pull_request_meta import PullRequestMeta +from giteapy.models.pull_review import PullReview +from giteapy.models.pull_review_comment import PullReviewComment +from giteapy.models.reaction import Reaction from giteapy.models.reference import Reference from giteapy.models.release import Release from giteapy.models.repo_commit import RepoCommit from giteapy.models.repo_topic_options import RepoTopicOptions from giteapy.models.repository import Repository +from giteapy.models.repository_meta import RepositoryMeta +from giteapy.models.review_state_type import ReviewStateType from giteapy.models.search_results import SearchResults from giteapy.models.server_version import ServerVersion from giteapy.models.state_type import StateType from giteapy.models.status import Status from giteapy.models.status_state import StatusState +from giteapy.models.stop_watch import StopWatch +from giteapy.models.submit_pull_review_options import SubmitPullReviewOptions from giteapy.models.tag import Tag from giteapy.models.team import Team from giteapy.models.time_stamp import TimeStamp from giteapy.models.topic_name import TopicName from giteapy.models.topic_response import TopicResponse from giteapy.models.tracked_time import TrackedTime +from giteapy.models.transfer_repo_option import TransferRepoOption from giteapy.models.update_file_options import UpdateFileOptions from giteapy.models.user import User from giteapy.models.user_heatmap_data import UserHeatmapData diff --git a/giteapy/api/__init__.py b/giteapy/api/__init__.py old mode 100755 new mode 100644 index bba35a0..334ebc9 --- a/giteapy/api/__init__.py +++ b/giteapy/api/__init__.py @@ -6,6 +6,7 @@ from giteapy.api.admin_api import AdminApi from giteapy.api.issue_api import IssueApi from giteapy.api.miscellaneous_api import MiscellaneousApi +from giteapy.api.notification_api import NotificationApi from giteapy.api.organization_api import OrganizationApi from giteapy.api.repository_api import RepositoryApi from giteapy.api.user_api import UserApi diff --git a/giteapy/api/admin_api.py b/giteapy/api/admin_api.py old mode 100755 new mode 100644 index f3f2318..43f9daa --- a/giteapy/api/admin_api.py +++ b/giteapy/api/admin_api.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -240,7 +240,7 @@ def admin_create_public_key_with_http_info(self, username, **kwargs): # noqa: E collection_formats=collection_formats) def admin_create_repo(self, username, repository, **kwargs): # noqa: E501 - """Create a repository on behalf a user # noqa: E501 + """Create a repository on behalf of a user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -262,7 +262,7 @@ def admin_create_repo(self, username, repository, **kwargs): # noqa: E501 return data def admin_create_repo_with_http_info(self, username, repository, **kwargs): # noqa: E501 - """Create a repository on behalf a user # noqa: E501 + """Create a repository on behalf of a user # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -846,6 +846,8 @@ def admin_get_all_users(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. @@ -866,12 +868,14 @@ def admin_get_all_users_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -892,6 +896,10 @@ def admin_get_all_users_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} diff --git a/giteapy/api/issue_api.py b/giteapy/api/issue_api.py old mode 100755 new mode 100644 index c7597f3..612b001 --- a/giteapy/api/issue_api.py +++ b/giteapy/api/issue_api.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -150,18 +150,139 @@ def issue_add_label_with_http_info(self, owner, repo, index, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_add_time(self, owner, repo, id, **kwargs): # noqa: E501 - """Add a tracked time to a issue # noqa: E501 + def issue_add_subscription(self, owner, repo, index, user, **kwargs): # noqa: E501 + """Subscribe user to issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_add_subscription(owner, repo, index, user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param str user: user to subscribe (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_add_subscription_with_http_info(owner, repo, index, user, **kwargs) # noqa: E501 + else: + (data) = self.issue_add_subscription_with_http_info(owner, repo, index, user, **kwargs) # noqa: E501 + return data + + def issue_add_subscription_with_http_info(self, owner, repo, index, user, **kwargs): # noqa: E501 + """Subscribe user to issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_add_subscription_with_http_info(owner, repo, index, user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param str user: user to subscribe (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'user'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method issue_add_subscription" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_add_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_add_subscription`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_add_subscription`") # noqa: E501 + # verify the required parameter 'user' is set + if ('user' not in params or + params['user'] is None): + raise ValueError("Missing the required parameter `user` when calling `issue_add_subscription`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + if 'user' in params: + path_params['user'] = params['user'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def issue_add_time(self, owner, repo, index, **kwargs): # noqa: E501 + """Add tracked time to a issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_add_time(owner, repo, id, async_req=True) + >>> thread = api.issue_add_time(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: index of the issue to add tracked time to (required) + :param int index: index of the issue (required) :param AddTimeOption body: :return: TrackedTime If the method is called asynchronously, @@ -169,30 +290,30 @@ def issue_add_time(self, owner, repo, id, **kwargs): # noqa: E501 """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_add_time_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.issue_add_time_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: - (data) = self.issue_add_time_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.issue_add_time_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data - def issue_add_time_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Add a tracked time to a issue # noqa: E501 + def issue_add_time_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Add tracked time to a issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_add_time_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.issue_add_time_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: index of the issue to add tracked time to (required) + :param int index: index of the issue (required) :param AddTimeOption body: :return: TrackedTime If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 + all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -215,10 +336,10 @@ def issue_add_time_with_http_info(self, owner, repo, id, **kwargs): # noqa: E50 if ('repo' not in params or params['repo'] is None): raise ValueError("Missing the required parameter `repo` when calling `issue_add_time`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `issue_add_time`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_add_time`") # noqa: E501 collection_formats = {} @@ -227,8 +348,8 @@ def issue_add_time_with_http_info(self, owner, repo, id, **kwargs): # noqa: E50 path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 query_params = [] @@ -252,7 +373,7 @@ def issue_add_time_with_http_info(self, owner, repo, id, **kwargs): # noqa: E50 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/issues/{id}/times', 'POST', + '/repos/{owner}/{repo}/issues/{index}/times', 'POST', path_params, query_params, header_params, @@ -267,6 +388,119 @@ def issue_add_time_with_http_info(self, owner, repo, id, **kwargs): # noqa: E50 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def issue_check_subscription(self, owner, repo, index, **kwargs): # noqa: E501 + """Check if user is subscribed to an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_check_subscription(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: WatchInfo + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_check_subscription_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_check_subscription_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_check_subscription_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Check if user is subscribed to an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_check_subscription_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: WatchInfo + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method issue_check_subscription" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_check_subscription`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_check_subscription`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_check_subscription`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/subscriptions/check', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='WatchInfo', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def issue_clear_labels(self, owner, repo, index, **kwargs): # noqa: E501 """Remove all labels from an issue # noqa: E501 @@ -1058,47 +1292,49 @@ def issue_delete_comment_deprecated_with_http_info(self, owner, repo, index, id, _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_delete_label(self, owner, repo, id, **kwargs): # noqa: E501 - """Delete a label # noqa: E501 + def issue_delete_comment_reaction(self, owner, repo, id, **kwargs): # noqa: E501 + """Remove a reaction from a comment of an issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_delete_label(owner, repo, id, async_req=True) + >>> thread = api.issue_delete_comment_reaction(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the label to delete (required) + :param int id: id of the comment to edit (required) + :param EditReactionOption content: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_delete_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.issue_delete_comment_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: - (data) = self.issue_delete_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.issue_delete_comment_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data - def issue_delete_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Delete a label # noqa: E501 + def issue_delete_comment_reaction_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Remove a reaction from a comment of an issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_delete_label_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.issue_delete_comment_reaction_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the label to delete (required) + :param int id: id of the comment to edit (required) + :param EditReactionOption content: :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params = ['owner', 'repo', 'id', 'content'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1109,22 +1345,22 @@ def issue_delete_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_delete_label" % key + " to method issue_delete_comment_reaction" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_delete_label`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_comment_reaction`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_delete_label`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_comment_reaction`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `issue_delete_label`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_delete_comment_reaction`") # noqa: E501 collection_formats = {} @@ -1144,19 +1380,21 @@ def issue_delete_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: local_var_files = {} body_params = None + if 'content' in params: + body_params = params['content'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'text/html']) # noqa: E501 + ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json', 'text/plain']) # noqa: E501 + ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/labels/{id}', 'DELETE', + '/repos/{owner}/{repo}/issues/comments/{id}/reactions', 'DELETE', path_params, query_params, header_params, @@ -1171,47 +1409,49 @@ def issue_delete_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_delete_milestone(self, owner, repo, id, **kwargs): # noqa: E501 - """Delete a milestone # noqa: E501 + def issue_delete_issue_reaction(self, owner, repo, index, **kwargs): # noqa: E501 + """Remove a reaction from an issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_delete_milestone(owner, repo, id, async_req=True) + >>> thread = api.issue_delete_issue_reaction(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the milestone to delete (required) + :param int index: index of the issue (required) + :param EditReactionOption content: :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_delete_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.issue_delete_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: - (data) = self.issue_delete_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.issue_delete_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data - def issue_delete_milestone_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Delete a milestone # noqa: E501 + def issue_delete_issue_reaction_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Remove a reaction from an issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_delete_milestone_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.issue_delete_issue_reaction_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the milestone to delete (required) + :param int index: index of the issue (required) + :param EditReactionOption content: :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params = ['owner', 'repo', 'index', 'content'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1222,22 +1462,22 @@ def issue_delete_milestone_with_http_info(self, owner, repo, id, **kwargs): # n if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_delete_milestone" % key + " to method issue_delete_issue_reaction" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_delete_milestone`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_issue_reaction`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_delete_milestone`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `issue_delete_milestone`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_issue_reaction`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_delete_issue_reaction`") # noqa: E501 collection_formats = {} @@ -1246,8 +1486,8 @@ def issue_delete_milestone_with_http_info(self, owner, repo, id, **kwargs): # n path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 query_params = [] @@ -1257,19 +1497,21 @@ def issue_delete_milestone_with_http_info(self, owner, repo, id, **kwargs): # n local_var_files = {} body_params = None + if 'content' in params: + body_params = params['content'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'text/html']) # noqa: E501 + ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json', 'text/plain']) # noqa: E501 + ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/milestones/{id}', 'DELETE', + '/repos/{owner}/{repo}/issues/{index}/reactions', 'DELETE', path_params, query_params, header_params, @@ -1284,49 +1526,47 @@ def issue_delete_milestone_with_http_info(self, owner, repo, id, **kwargs): # n _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_edit_comment(self, owner, repo, id, **kwargs): # noqa: E501 - """Edit a comment # noqa: E501 + def issue_delete_label(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a label # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_edit_comment(owner, repo, id, async_req=True) + >>> thread = api.issue_delete_label(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the comment to edit (required) - :param EditIssueCommentOption body: - :return: Comment + :param int id: id of the label to delete (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_edit_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.issue_delete_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: - (data) = self.issue_edit_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.issue_delete_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data - def issue_edit_comment_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Edit a comment # noqa: E501 + def issue_delete_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a label # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_edit_comment_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.issue_delete_label_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the comment to edit (required) - :param EditIssueCommentOption body: - :return: Comment + :param int id: id of the label to delete (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 + all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1337,22 +1577,22 @@ def issue_edit_comment_with_http_info(self, owner, repo, id, **kwargs): # noqa: if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_edit_comment" % key + " to method issue_delete_label" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_edit_comment`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_label`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_edit_comment`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_label`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `issue_edit_comment`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_delete_label`") # noqa: E501 collection_formats = {} @@ -1372,28 +1612,26 @@ def issue_edit_comment_with_http_info(self, owner, repo, id, **kwargs): # noqa: local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 + ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/issues/comments/{id}', 'PATCH', + '/repos/{owner}/{repo}/labels/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Comment', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1401,51 +1639,47 @@ def issue_edit_comment_with_http_info(self, owner, repo, id, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_edit_comment_deprecated(self, owner, repo, index, id, **kwargs): # noqa: E501 - """Edit a comment # noqa: E501 + def issue_delete_milestone(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a milestone # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_edit_comment_deprecated(owner, repo, index, id, async_req=True) + >>> thread = api.issue_delete_milestone(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: this parameter is ignored (required) - :param int id: id of the comment to edit (required) - :param EditIssueCommentOption body: - :return: Comment + :param int id: id of the milestone to delete (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_edit_comment_deprecated_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return self.issue_delete_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: - (data) = self.issue_edit_comment_deprecated_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + (data) = self.issue_delete_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data - def issue_edit_comment_deprecated_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 - """Edit a comment # noqa: E501 + def issue_delete_milestone_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a milestone # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_edit_comment_deprecated_with_http_info(owner, repo, index, id, async_req=True) + >>> thread = api.issue_delete_milestone_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: this parameter is ignored (required) - :param int id: id of the comment to edit (required) - :param EditIssueCommentOption body: - :return: Comment + :param int id: id of the milestone to delete (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'index', 'id', 'body'] # noqa: E501 + all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1456,26 +1690,22 @@ def issue_edit_comment_deprecated_with_http_info(self, owner, repo, index, id, * if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_edit_comment_deprecated" % key + " to method issue_delete_milestone" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_edit_comment_deprecated`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_milestone`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_edit_comment_deprecated`") # noqa: E501 - # verify the required parameter 'index' is set - if ('index' not in params or - params['index'] is None): - raise ValueError("Missing the required parameter `index` when calling `issue_edit_comment_deprecated`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_milestone`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `issue_edit_comment_deprecated`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_delete_milestone`") # noqa: E501 collection_formats = {} @@ -1484,8 +1714,6 @@ def issue_edit_comment_deprecated_with_http_info(self, owner, repo, index, id, * path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'index' in params: - path_params['index'] = params['index'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 @@ -1497,28 +1725,26 @@ def issue_edit_comment_deprecated_with_http_info(self, owner, repo, index, id, * local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 + ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/issues/{index}/comments/{id}', 'PATCH', + '/repos/{owner}/{repo}/milestones/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Comment', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1526,49 +1752,47 @@ def issue_edit_comment_deprecated_with_http_info(self, owner, repo, index, id, * _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_edit_issue(self, owner, repo, index, **kwargs): # noqa: E501 - """Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + def issue_delete_stop_watch(self, owner, repo, index, **kwargs): # noqa: E501 + """Delete an issue's existing stopwatch. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_edit_issue(owner, repo, index, async_req=True) + >>> thread = api.issue_delete_stop_watch(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue to edit (required) - :param EditIssueOption body: - :return: Issue + :param int index: index of the issue to stop the stopwatch on (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_edit_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return self.issue_delete_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: - (data) = self.issue_edit_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + (data) = self.issue_delete_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data - def issue_edit_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 - """Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + def issue_delete_stop_watch_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Delete an issue's existing stopwatch. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_edit_issue_with_http_info(owner, repo, index, async_req=True) + >>> thread = api.issue_delete_stop_watch_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue to edit (required) - :param EditIssueOption body: - :return: Issue + :param int index: index of the issue to stop the stopwatch on (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501 + all_params = ['owner', 'repo', 'index'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1579,22 +1803,22 @@ def issue_edit_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_edit_issue" % key + " to method issue_delete_stop_watch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_edit_issue`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_stop_watch`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_edit_issue`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_stop_watch`") # noqa: E501 # verify the required parameter 'index' is set if ('index' not in params or params['index'] is None): - raise ValueError("Missing the required parameter `index` when calling `issue_edit_issue`") # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_delete_stop_watch`") # noqa: E501 collection_formats = {} @@ -1614,8 +1838,6 @@ def issue_edit_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -1628,14 +1850,14 @@ def issue_edit_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/issues/{index}', 'PATCH', + '/repos/{owner}/{repo}/issues/{index}/stopwatch/delete', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Issue', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1643,49 +1865,49 @@ def issue_edit_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_edit_issue_deadline(self, owner, repo, index, **kwargs): # noqa: E501 - """Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + def issue_delete_subscription(self, owner, repo, index, user, **kwargs): # noqa: E501 + """Unsubscribe user from issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_edit_issue_deadline(owner, repo, index, async_req=True) + >>> thread = api.issue_delete_subscription(owner, repo, index, user, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue to create or update a deadline on (required) - :param EditDeadlineOption body: - :return: IssueDeadline + :param int index: index of the issue (required) + :param str user: user witch unsubscribe (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_edit_issue_deadline_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return self.issue_delete_subscription_with_http_info(owner, repo, index, user, **kwargs) # noqa: E501 else: - (data) = self.issue_edit_issue_deadline_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + (data) = self.issue_delete_subscription_with_http_info(owner, repo, index, user, **kwargs) # noqa: E501 return data - def issue_edit_issue_deadline_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 - """Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + def issue_delete_subscription_with_http_info(self, owner, repo, index, user, **kwargs): # noqa: E501 + """Unsubscribe user from issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_edit_issue_deadline_with_http_info(owner, repo, index, async_req=True) + >>> thread = api.issue_delete_subscription_with_http_info(owner, repo, index, user, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue to create or update a deadline on (required) - :param EditDeadlineOption body: - :return: IssueDeadline + :param int index: index of the issue (required) + :param str user: user witch unsubscribe (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501 + all_params = ['owner', 'repo', 'index', 'user'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1696,22 +1918,26 @@ def issue_edit_issue_deadline_with_http_info(self, owner, repo, index, **kwargs) if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_edit_issue_deadline" % key + " to method issue_delete_subscription" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_edit_issue_deadline`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_subscription`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_edit_issue_deadline`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_subscription`") # noqa: E501 # verify the required parameter 'index' is set if ('index' not in params or params['index'] is None): - raise ValueError("Missing the required parameter `index` when calling `issue_edit_issue_deadline`") # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_delete_subscription`") # noqa: E501 + # verify the required parameter 'user' is set + if ('user' not in params or + params['user'] is None): + raise ValueError("Missing the required parameter `user` when calling `issue_delete_subscription`") # noqa: E501 collection_formats = {} @@ -1722,6 +1948,8 @@ def issue_edit_issue_deadline_with_http_info(self, owner, repo, index, **kwargs) path_params['repo'] = params['repo'] # noqa: E501 if 'index' in params: path_params['index'] = params['index'] # noqa: E501 + if 'user' in params: + path_params['user'] = params['user'] # noqa: E501 query_params = [] @@ -1731,8 +1959,6 @@ def issue_edit_issue_deadline_with_http_info(self, owner, repo, index, **kwargs) local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -1745,14 +1971,14 @@ def issue_edit_issue_deadline_with_http_info(self, owner, repo, index, **kwargs) auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/issues/{index}/deadline', 'POST', + '/repos/{owner}/{repo}/issues/{index}/subscriptions/{user}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='IssueDeadline', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1760,49 +1986,49 @@ def issue_edit_issue_deadline_with_http_info(self, owner, repo, index, **kwargs) _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_edit_label(self, owner, repo, id, **kwargs): # noqa: E501 - """Update a label # noqa: E501 + def issue_delete_time(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete specific tracked time # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_edit_label(owner, repo, id, async_req=True) + >>> thread = api.issue_delete_time(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the label to edit (required) - :param EditLabelOption body: - :return: Label + :param int index: index of the issue (required) + :param int id: id of time to delete (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_edit_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.issue_delete_time_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 else: - (data) = self.issue_edit_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.issue_delete_time_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 return data - def issue_edit_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Update a label # noqa: E501 + def issue_delete_time_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete specific tracked time # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_edit_label_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.issue_delete_time_with_http_info(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the label to edit (required) - :param EditLabelOption body: - :return: Label + :param int index: index of the issue (required) + :param int id: id of time to delete (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 + all_params = ['owner', 'repo', 'index', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1813,22 +2039,26 @@ def issue_edit_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_edit_label" % key + " to method issue_delete_time" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_edit_label`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_delete_time`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_edit_label`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_delete_time`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_delete_time`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `issue_edit_label`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_delete_time`") # noqa: E501 collection_formats = {} @@ -1837,6 +2067,8 @@ def issue_edit_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 @@ -1848,8 +2080,6 @@ def issue_edit_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -1862,14 +2092,14 @@ def issue_edit_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/labels/{id}', 'PATCH', + '/repos/{owner}/{repo}/issues/{index}/times/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Label', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1877,44 +2107,44 @@ def issue_edit_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_edit_milestone(self, owner, repo, id, **kwargs): # noqa: E501 - """Update a milestone # noqa: E501 + def issue_edit_comment(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a comment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_edit_milestone(owner, repo, id, async_req=True) + >>> thread = api.issue_edit_comment(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the milestone (required) - :param EditMilestoneOption body: - :return: Milestone + :param int id: id of the comment to edit (required) + :param EditIssueCommentOption body: + :return: Comment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_edit_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.issue_edit_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: - (data) = self.issue_edit_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.issue_edit_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data - def issue_edit_milestone_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Update a milestone # noqa: E501 + def issue_edit_comment_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a comment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_edit_milestone_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.issue_edit_comment_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the milestone (required) - :param EditMilestoneOption body: - :return: Milestone + :param int id: id of the comment to edit (required) + :param EditIssueCommentOption body: + :return: Comment If the method is called asynchronously, returns the request thread. """ @@ -1930,22 +2160,22 @@ def issue_edit_milestone_with_http_info(self, owner, repo, id, **kwargs): # noq if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_edit_milestone" % key + " to method issue_edit_comment" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_edit_milestone`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_comment`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_edit_milestone`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_comment`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `issue_edit_milestone`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_edit_comment`") # noqa: E501 collection_formats = {} @@ -1979,14 +2209,14 @@ def issue_edit_milestone_with_http_info(self, owner, repo, id, **kwargs): # noq auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/milestones/{id}', 'PATCH', + '/repos/{owner}/{repo}/issues/comments/{id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Milestone', # noqa: E501 + response_type='Comment', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1994,28 +2224,848 @@ def issue_edit_milestone_with_http_info(self, owner, repo, id, **kwargs): # noq _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_get_comments(self, owner, repo, index, **kwargs): # noqa: E501 - """List all comments on an issue # noqa: E501 + def issue_edit_comment_deprecated(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Edit a comment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_get_comments(owner, repo, index, async_req=True) + >>> thread = api.issue_edit_comment_deprecated(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue (required) - :param str since: if provided, only comments updated since the specified time are returned. - :return: list[Comment] + :param int index: this parameter is ignored (required) + :param int id: id of the comment to edit (required) + :param EditIssueCommentOption body: + :return: Comment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_get_comments_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return self.issue_edit_comment_deprecated_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 else: - (data) = self.issue_get_comments_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + (data) = self.issue_edit_comment_deprecated_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return data + + def issue_edit_comment_deprecated_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Edit a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_comment_deprecated_with_http_info(owner, repo, index, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: this parameter is ignored (required) + :param int id: id of the comment to edit (required) + :param EditIssueCommentOption body: + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'id', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method issue_edit_comment_deprecated" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_comment_deprecated`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_comment_deprecated`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_edit_comment_deprecated`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `issue_edit_comment_deprecated`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/comments/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Comment', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def issue_edit_issue(self, owner, repo, index, **kwargs): # noqa: E501 + """Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to edit (required) + :param EditIssueOption body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_edit_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to edit (required) + :param EditIssueOption body: + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method issue_edit_issue" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_issue`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_edit_issue`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Issue', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def issue_edit_issue_deadline(self, owner, repo, index, **kwargs): # noqa: E501 + """Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue_deadline(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to create or update a deadline on (required) + :param EditDeadlineOption body: + :return: IssueDeadline + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_issue_deadline_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_issue_deadline_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_edit_issue_deadline_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_issue_deadline_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to create or update a deadline on (required) + :param EditDeadlineOption body: + :return: IssueDeadline + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method issue_edit_issue_deadline" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_issue_deadline`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_issue_deadline`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_edit_issue_deadline`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/deadline', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='IssueDeadline', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def issue_edit_label(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_label(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to edit (required) + :param EditLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_edit_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_label_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to edit (required) + :param EditLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method issue_edit_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_label`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `issue_edit_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/labels/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Label', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def issue_edit_milestone(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_milestone(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the milestone (required) + :param EditMilestoneOption body: + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_edit_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_edit_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_edit_milestone_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_edit_milestone_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the milestone (required) + :param EditMilestoneOption body: + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method issue_edit_milestone" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_edit_milestone`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_edit_milestone`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `issue_edit_milestone`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/milestones/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Milestone', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def issue_get_comment(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_comment(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment (required) + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_comment_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_get_comment_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a comment # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_comment_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment (required) + :return: Comment + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method issue_get_comment" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_get_comment`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_get_comment`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `issue_get_comment`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Comment', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def issue_get_comment_reactions(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a list of reactions from a comment of an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_comment_reactions(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment to edit (required) + :return: list[Reaction] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_comment_reactions_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_comment_reactions_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_get_comment_reactions_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a list of reactions from a comment of an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_comment_reactions_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the comment to edit (required) + :return: list[Reaction] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method issue_get_comment_reactions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_get_comment_reactions`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_get_comment_reactions`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `issue_get_comment_reactions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/comments/{id}/reactions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Reaction]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def issue_get_comments(self, owner, repo, index, **kwargs): # noqa: E501 + """List all comments on an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_comments(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param datetime since: if provided, only comments updated since the specified time are returned. + :param datetime before: if provided, only comments updated before the provided time are returned. + :return: list[Comment] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_comments_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_comments_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data def issue_get_comments_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 @@ -2023,20 +3073,715 @@ def issue_get_comments_with_http_info(self, owner, repo, index, **kwargs): # no This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_get_comments_with_http_info(owner, repo, index, async_req=True) + >>> thread = api.issue_get_comments_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param datetime since: if provided, only comments updated since the specified time are returned. + :param datetime before: if provided, only comments updated before the provided time are returned. + :return: list[Comment] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'since', 'before'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method issue_get_comments" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_get_comments`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_get_comments`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_get_comments`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/comments', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Comment]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def issue_get_issue(self, owner, repo, index, **kwargs): # noqa: E501 + """Get an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_issue(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to get (required) + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_get_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_issue_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue to get (required) + :return: Issue + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method issue_get_issue" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_get_issue`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_get_issue`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_get_issue`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Issue', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def issue_get_issue_reactions(self, owner, repo, index, **kwargs): # noqa: E501 + """Get a list reactions of an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_issue_reactions(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[Reaction] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_issue_reactions_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_issue_reactions_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_get_issue_reactions_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get a list reactions of an issue # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_issue_reactions_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[Reaction] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'page', 'limit'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method issue_get_issue_reactions" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_get_issue_reactions`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_get_issue_reactions`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_get_issue_reactions`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/reactions', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Reaction]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def issue_get_label(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a single label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_label(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to get (required) + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_get_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a single label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_label_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the label to get (required) + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method issue_get_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_get_label`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_get_label`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `issue_get_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/labels/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Label', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def issue_get_labels(self, owner, repo, index, **kwargs): # noqa: E501 + """Get an issue's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_labels(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return data + + def issue_get_labels_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get an issue's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_labels_with_http_info(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the issue (required) + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method issue_get_labels" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_get_labels`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_get_labels`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_get_labels`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/issues/{index}/labels', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Label]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def issue_get_milestone(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_milestone(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the milestone (required) + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def issue_get_milestone_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a milestone # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_milestone_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the milestone (required) + :return: Milestone + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method issue_get_milestone" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `issue_get_milestone`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `issue_get_milestone`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `issue_get_milestone`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/milestones/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Milestone', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def issue_get_milestones_list(self, owner, repo, **kwargs): # noqa: E501 + """Get all of a repository's opened milestones # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_milestones_list(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str state: Milestone state, Recognised values are open, closed and all. Defaults to \"open\" + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[Milestone] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.issue_get_milestones_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.issue_get_milestones_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def issue_get_milestones_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get all of a repository's opened milestones # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.issue_get_milestones_list_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue (required) - :param str since: if provided, only comments updated since the specified time are returned. - :return: list[Comment] + :param str state: Milestone state, Recognised values are open, closed and all. Defaults to \"open\" + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[Milestone] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'index', 'since'] # noqa: E501 + all_params = ['owner', 'repo', 'state', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2047,22 +3792,18 @@ def issue_get_comments_with_http_info(self, owner, repo, index, **kwargs): # no if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_get_comments" % key + " to method issue_get_milestones_list" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_get_comments`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_milestones_list`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_get_comments`") # noqa: E501 - # verify the required parameter 'index' is set - if ('index' not in params or - params['index'] is None): - raise ValueError("Missing the required parameter `index` when calling `issue_get_comments`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_milestones_list`") # noqa: E501 collection_formats = {} @@ -2071,12 +3812,14 @@ def issue_get_comments_with_http_info(self, owner, repo, index, **kwargs): # no path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'index' in params: - path_params['index'] = params['index'] # noqa: E501 query_params = [] - if 'since' in params: - query_params.append(('since', params['since'])) # noqa: E501 + if 'state' in params: + query_params.append(('state', params['state'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2096,14 +3839,14 @@ def issue_get_comments_with_http_info(self, owner, repo, index, **kwargs): # no auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/issues/{index}/comments', 'GET', + '/repos/{owner}/{repo}/milestones', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Comment]', # noqa: E501 + response_type='list[Milestone]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2111,47 +3854,53 @@ def issue_get_comments_with_http_info(self, owner, repo, index, **kwargs): # no _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_get_issue(self, owner, repo, index, **kwargs): # noqa: E501 - """Get an issue # noqa: E501 + def issue_get_repo_comments(self, owner, repo, **kwargs): # noqa: E501 + """List all comments in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_get_issue(owner, repo, index, async_req=True) + >>> thread = api.issue_get_repo_comments(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue to get (required) - :return: Issue + :param datetime since: if provided, only comments updated since the provided time are returned. + :param datetime before: if provided, only comments updated before the provided time are returned. + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[Comment] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_get_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return self.issue_get_repo_comments_with_http_info(owner, repo, **kwargs) # noqa: E501 else: - (data) = self.issue_get_issue_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + (data) = self.issue_get_repo_comments_with_http_info(owner, repo, **kwargs) # noqa: E501 return data - def issue_get_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 - """Get an issue # noqa: E501 + def issue_get_repo_comments_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List all comments in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_get_issue_with_http_info(owner, repo, index, async_req=True) + >>> thread = api.issue_get_repo_comments_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue to get (required) - :return: Issue + :param datetime since: if provided, only comments updated since the provided time are returned. + :param datetime before: if provided, only comments updated before the provided time are returned. + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[Comment] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'index'] # noqa: E501 + all_params = ['owner', 'repo', 'since', 'before', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2162,22 +3911,18 @@ def issue_get_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_get_issue" % key + " to method issue_get_repo_comments" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_get_issue`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_get_repo_comments`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_get_issue`") # noqa: E501 - # verify the required parameter 'index' is set - if ('index' not in params or - params['index'] is None): - raise ValueError("Missing the required parameter `index` when calling `issue_get_issue`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_get_repo_comments`") # noqa: E501 collection_formats = {} @@ -2186,10 +3931,16 @@ def issue_get_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'index' in params: - path_params['index'] = params['index'] # noqa: E501 query_params = [] + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2209,14 +3960,14 @@ def issue_get_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/issues/{index}', 'GET', + '/repos/{owner}/{repo}/issues/comments', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Issue', # noqa: E501 + response_type='list[Comment]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2224,47 +3975,59 @@ def issue_get_issue_with_http_info(self, owner, repo, index, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_get_label(self, owner, repo, id, **kwargs): # noqa: E501 - """Get a single label # noqa: E501 + def issue_list_issues(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's issues # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_get_label(owner, repo, id, async_req=True) + >>> thread = api.issue_list_issues(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the label to get (required) - :return: Label + :param str state: whether issue is open or closed + :param str labels: comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded + :param str q: search string + :param str type: filter by type (issues / pulls) if set + :param str milestones: comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[Issue] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_get_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.issue_list_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 else: - (data) = self.issue_get_label_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.issue_list_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 return data - def issue_get_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Get a single label # noqa: E501 + def issue_list_issues_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's issues # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_get_label_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.issue_list_issues_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the label to get (required) - :return: Label + :param str state: whether issue is open or closed + :param str labels: comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded + :param str q: search string + :param str type: filter by type (issues / pulls) if set + :param str milestones: comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[Issue] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params = ['owner', 'repo', 'state', 'labels', 'q', 'type', 'milestones', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2275,22 +4038,18 @@ def issue_get_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E5 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_get_label" % key + " to method issue_list_issues" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_get_label`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_list_issues`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_get_label`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `issue_get_label`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_list_issues`") # noqa: E501 collection_formats = {} @@ -2299,10 +4058,22 @@ def issue_get_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E5 path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 query_params = [] + if 'state' in params: + query_params.append(('state', params['state'])) # noqa: E501 + if 'labels' in params: + query_params.append(('labels', params['labels'])) # noqa: E501 + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 + if 'milestones' in params: + query_params.append(('milestones', params['milestones'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2322,14 +4093,14 @@ def issue_get_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E5 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/labels/{id}', 'GET', + '/repos/{owner}/{repo}/issues', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Label', # noqa: E501 + response_type='list[Issue]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2337,47 +4108,49 @@ def issue_get_label_with_http_info(self, owner, repo, id, **kwargs): # noqa: E5 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_get_labels(self, owner, repo, index, **kwargs): # noqa: E501 - """Get an issue's labels # noqa: E501 + def issue_list_labels(self, owner, repo, **kwargs): # noqa: E501 + """Get all of a repository's labels # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_get_labels(owner, repo, index, async_req=True) + >>> thread = api.issue_list_labels(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Label] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_get_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return self.issue_list_labels_with_http_info(owner, repo, **kwargs) # noqa: E501 else: - (data) = self.issue_get_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + (data) = self.issue_list_labels_with_http_info(owner, repo, **kwargs) # noqa: E501 return data - def issue_get_labels_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 - """Get an issue's labels # noqa: E501 + def issue_list_labels_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get all of a repository's labels # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_get_labels_with_http_info(owner, repo, index, async_req=True) + >>> thread = api.issue_list_labels_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Label] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'index'] # noqa: E501 + all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2388,22 +4161,18 @@ def issue_get_labels_with_http_info(self, owner, repo, index, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_get_labels" % key + " to method issue_list_labels" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_get_labels`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_list_labels`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_get_labels`") # noqa: E501 - # verify the required parameter 'index' is set - if ('index' not in params or - params['index'] is None): - raise ValueError("Missing the required parameter `index` when calling `issue_get_labels`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_list_labels`") # noqa: E501 collection_formats = {} @@ -2412,10 +4181,12 @@ def issue_get_labels_with_http_info(self, owner, repo, index, **kwargs): # noqa path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'index' in params: - path_params['index'] = params['index'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2435,7 +4206,7 @@ def issue_get_labels_with_http_info(self, owner, repo, index, **kwargs): # noqa auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/issues/{index}/labels', 'GET', + '/repos/{owner}/{repo}/labels', 'GET', path_params, query_params, header_params, @@ -2450,47 +4221,49 @@ def issue_get_labels_with_http_info(self, owner, repo, index, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_get_milestone(self, owner, repo, id, **kwargs): # noqa: E501 - """Get a milestone # noqa: E501 + def issue_post_comment_reaction(self, owner, repo, id, **kwargs): # noqa: E501 + """Add a reaction to a comment of an issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_get_milestone(owner, repo, id, async_req=True) + >>> thread = api.issue_post_comment_reaction(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the milestone (required) - :return: Milestone + :param int id: id of the comment to edit (required) + :param EditReactionOption content: + :return: Reaction If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_get_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.issue_post_comment_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: - (data) = self.issue_get_milestone_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.issue_post_comment_reaction_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data - def issue_get_milestone_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Get a milestone # noqa: E501 + def issue_post_comment_reaction_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Add a reaction to a comment of an issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_get_milestone_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.issue_post_comment_reaction_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the milestone (required) - :return: Milestone + :param int id: id of the comment to edit (required) + :param EditReactionOption content: + :return: Reaction If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params = ['owner', 'repo', 'id', 'content'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2501,22 +4274,22 @@ def issue_get_milestone_with_http_info(self, owner, repo, id, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_get_milestone" % key + " to method issue_post_comment_reaction" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_get_milestone`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_post_comment_reaction`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_get_milestone`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_post_comment_reaction`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `issue_get_milestone`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `issue_post_comment_reaction`") # noqa: E501 collection_formats = {} @@ -2536,26 +4309,28 @@ def issue_get_milestone_with_http_info(self, owner, repo, id, **kwargs): # noqa local_var_files = {} body_params = None + if 'content' in params: + body_params = params['content'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json', 'text/plain']) # noqa: E501 + ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/milestones/{id}', 'GET', + '/repos/{owner}/{repo}/issues/comments/{id}/reactions', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Milestone', # noqa: E501 + response_type='Reaction', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2563,47 +4338,49 @@ def issue_get_milestone_with_http_info(self, owner, repo, id, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_get_milestones_list(self, owner, repo, **kwargs): # noqa: E501 - """Get all of a repository's opened milestones # noqa: E501 + def issue_post_issue_reaction(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a reaction to an issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_get_milestones_list(owner, repo, async_req=True) + >>> thread = api.issue_post_issue_reaction(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str state: Milestone state, Recognised values are open, closed and all. Defaults to \"open\" - :return: list[Milestone] + :param int index: index of the issue (required) + :param EditReactionOption content: + :return: Reaction If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_get_milestones_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return self.issue_post_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: - (data) = self.issue_get_milestones_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + (data) = self.issue_post_issue_reaction_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data - def issue_get_milestones_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """Get all of a repository's opened milestones # noqa: E501 + def issue_post_issue_reaction_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Add a reaction to an issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_get_milestones_list_with_http_info(owner, repo, async_req=True) + >>> thread = api.issue_post_issue_reaction_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str state: Milestone state, Recognised values are open, closed and all. Defaults to \"open\" - :return: list[Milestone] + :param int index: index of the issue (required) + :param EditReactionOption content: + :return: Reaction If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'state'] # noqa: E501 + all_params = ['owner', 'repo', 'index', 'content'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2614,18 +4391,22 @@ def issue_get_milestones_list_with_http_info(self, owner, repo, **kwargs): # no if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_get_milestones_list" % key + " to method issue_post_issue_reaction" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_get_milestones_list`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_post_issue_reaction`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_get_milestones_list`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_post_issue_reaction`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_post_issue_reaction`") # noqa: E501 collection_formats = {} @@ -2634,10 +4415,10 @@ def issue_get_milestones_list_with_http_info(self, owner, repo, **kwargs): # no path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 query_params = [] - if 'state' in params: - query_params.append(('state', params['state'])) # noqa: E501 header_params = {} @@ -2645,26 +4426,28 @@ def issue_get_milestones_list_with_http_info(self, owner, repo, **kwargs): # no local_var_files = {} body_params = None + if 'content' in params: + body_params = params['content'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json', 'text/plain']) # noqa: E501 + ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/milestones', 'GET', + '/repos/{owner}/{repo}/issues/{index}/reactions', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Milestone]', # noqa: E501 + response_type='Reaction', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2672,47 +4455,49 @@ def issue_get_milestones_list_with_http_info(self, owner, repo, **kwargs): # no _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_get_repo_comments(self, owner, repo, **kwargs): # noqa: E501 - """List all comments in a repository # noqa: E501 + def issue_remove_label(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Remove a label from an issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_get_repo_comments(owner, repo, async_req=True) + >>> thread = api.issue_remove_label(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str since: if provided, only comments updated since the provided time are returned. - :return: list[Comment] + :param int index: index of the issue (required) + :param int id: id of the label to remove (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_get_repo_comments_with_http_info(owner, repo, **kwargs) # noqa: E501 + return self.issue_remove_label_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 else: - (data) = self.issue_get_repo_comments_with_http_info(owner, repo, **kwargs) # noqa: E501 + (data) = self.issue_remove_label_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 return data - def issue_get_repo_comments_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """List all comments in a repository # noqa: E501 + def issue_remove_label_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Remove a label from an issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_get_repo_comments_with_http_info(owner, repo, async_req=True) + >>> thread = api.issue_remove_label_with_http_info(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str since: if provided, only comments updated since the provided time are returned. - :return: list[Comment] + :param int index: index of the issue (required) + :param int id: id of the label to remove (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'since'] # noqa: E501 + all_params = ['owner', 'repo', 'index', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2723,18 +4508,26 @@ def issue_get_repo_comments_with_http_info(self, owner, repo, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_get_repo_comments" % key + " to method issue_remove_label" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_get_repo_comments`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_remove_label`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_get_repo_comments`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_remove_label`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_remove_label`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `issue_remove_label`") # noqa: E501 collection_formats = {} @@ -2743,10 +4536,12 @@ def issue_get_repo_comments_with_http_info(self, owner, repo, **kwargs): # noqa path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] - if 'since' in params: - query_params.append(('since', params['since'])) # noqa: E501 header_params = {} @@ -2766,14 +4561,14 @@ def issue_get_repo_comments_with_http_info(self, owner, repo, **kwargs): # noqa auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/issues/comments', 'GET', + '/repos/{owner}/{repo}/issues/{index}/labels/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Comment]', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2781,53 +4576,49 @@ def issue_get_repo_comments_with_http_info(self, owner, repo, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_list_issues(self, owner, repo, **kwargs): # noqa: E501 - """List a repository's issues # noqa: E501 + def issue_replace_labels(self, owner, repo, index, **kwargs): # noqa: E501 + """Replace an issue's labels # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_list_issues(owner, repo, async_req=True) + >>> thread = api.issue_replace_labels(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str state: whether issue is open or closed - :param str labels: comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded - :param int page: page number of requested issues - :param str q: search string - :return: list[Issue] + :param int index: index of the issue (required) + :param IssueLabelsOption body: + :return: list[Label] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_list_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 + return self.issue_replace_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: - (data) = self.issue_list_issues_with_http_info(owner, repo, **kwargs) # noqa: E501 + (data) = self.issue_replace_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data - def issue_list_issues_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """List a repository's issues # noqa: E501 + def issue_replace_labels_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Replace an issue's labels # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_list_issues_with_http_info(owner, repo, async_req=True) + >>> thread = api.issue_replace_labels_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str state: whether issue is open or closed - :param str labels: comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded - :param int page: page number of requested issues - :param str q: search string - :return: list[Issue] + :param int index: index of the issue (required) + :param IssueLabelsOption body: + :return: list[Label] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'state', 'labels', 'page', 'q'] # noqa: E501 + all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2838,18 +4629,22 @@ def issue_list_issues_with_http_info(self, owner, repo, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_list_issues" % key + " to method issue_replace_labels" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_list_issues`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_replace_labels`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_list_issues`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_replace_labels`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_replace_labels`") # noqa: E501 collection_formats = {} @@ -2858,16 +4653,10 @@ def issue_list_issues_with_http_info(self, owner, repo, **kwargs): # noqa: E501 path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 query_params = [] - if 'state' in params: - query_params.append(('state', params['state'])) # noqa: E501 - if 'labels' in params: - query_params.append(('labels', params['labels'])) # noqa: E501 - if 'page' in params: - query_params.append(('page', params['page'])) # noqa: E501 - if 'q' in params: - query_params.append(('q', params['q'])) # noqa: E501 header_params = {} @@ -2875,26 +4664,28 @@ def issue_list_issues_with_http_info(self, owner, repo, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json', 'text/plain']) # noqa: E501 + ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/issues', 'GET', + '/repos/{owner}/{repo}/issues/{index}/labels', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Issue]', # noqa: E501 + response_type='list[Label]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2902,45 +4693,47 @@ def issue_list_issues_with_http_info(self, owner, repo, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_list_labels(self, owner, repo, **kwargs): # noqa: E501 - """Get all of a repository's labels # noqa: E501 + def issue_reset_time(self, owner, repo, index, **kwargs): # noqa: E501 + """Reset a tracked time of an issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_list_labels(owner, repo, async_req=True) + >>> thread = api.issue_reset_time(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :return: list[Label] + :param int index: index of the issue to add tracked time to (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_list_labels_with_http_info(owner, repo, **kwargs) # noqa: E501 + return self.issue_reset_time_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: - (data) = self.issue_list_labels_with_http_info(owner, repo, **kwargs) # noqa: E501 + (data) = self.issue_reset_time_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data - def issue_list_labels_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """Get all of a repository's labels # noqa: E501 + def issue_reset_time_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Reset a tracked time of an issue # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_list_labels_with_http_info(owner, repo, async_req=True) + >>> thread = api.issue_reset_time_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :return: list[Label] + :param int index: index of the issue to add tracked time to (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo'] # noqa: E501 + all_params = ['owner', 'repo', 'index'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2951,18 +4744,22 @@ def issue_list_labels_with_http_info(self, owner, repo, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_list_labels" % key + " to method issue_reset_time" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_list_labels`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_reset_time`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_list_labels`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_reset_time`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_reset_time`") # noqa: E501 collection_formats = {} @@ -2971,6 +4768,8 @@ def issue_list_labels_with_http_info(self, owner, repo, **kwargs): # noqa: E501 path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 query_params = [] @@ -2986,20 +4785,20 @@ def issue_list_labels_with_http_info(self, owner, repo, **kwargs): # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json', 'text/plain']) # noqa: E501 + ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/labels', 'GET', + '/repos/{owner}/{repo}/issues/{index}/times', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Label]', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3007,49 +4806,53 @@ def issue_list_labels_with_http_info(self, owner, repo, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_remove_label(self, owner, repo, index, id, **kwargs): # noqa: E501 - """Remove a label from an issue # noqa: E501 + def issue_search_issues(self, **kwargs): # noqa: E501 + """Search for issues across the repositories that the user has access to # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_remove_label(owner, repo, index, id, async_req=True) + >>> thread = api.issue_search_issues(async_req=True) >>> result = thread.get() :param async_req bool - :param str owner: owner of the repo (required) - :param str repo: name of the repo (required) - :param int index: index of the issue (required) - :param int id: id of the label to remove (required) - :return: None + :param str state: whether issue is open or closed + :param str labels: comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded + :param str q: search string + :param int priority_repo_id: repository to prioritize in the results + :param str type: filter by type (issues / pulls) if set + :param int page: page number of requested issues + :return: list[Issue] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_remove_label_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + return self.issue_search_issues_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.issue_remove_label_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 + (data) = self.issue_search_issues_with_http_info(**kwargs) # noqa: E501 return data - def issue_remove_label_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 - """Remove a label from an issue # noqa: E501 + def issue_search_issues_with_http_info(self, **kwargs): # noqa: E501 + """Search for issues across the repositories that the user has access to # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_remove_label_with_http_info(owner, repo, index, id, async_req=True) + >>> thread = api.issue_search_issues_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param str owner: owner of the repo (required) - :param str repo: name of the repo (required) - :param int index: index of the issue (required) - :param int id: id of the label to remove (required) - :return: None + :param str state: whether issue is open or closed + :param str labels: comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded + :param str q: search string + :param int priority_repo_id: repository to prioritize in the results + :param str type: filter by type (issues / pulls) if set + :param int page: page number of requested issues + :return: list[Issue] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'index', 'id'] # noqa: E501 + all_params = ['state', 'labels', 'q', 'priority_repo_id', 'type', 'page'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3060,40 +4863,28 @@ def issue_remove_label_with_http_info(self, owner, repo, index, id, **kwargs): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_remove_label" % key + " to method issue_search_issues" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_remove_label`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_remove_label`") # noqa: E501 - # verify the required parameter 'index' is set - if ('index' not in params or - params['index'] is None): - raise ValueError("Missing the required parameter `index` when calling `issue_remove_label`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `issue_remove_label`") # noqa: E501 collection_formats = {} path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'index' in params: - path_params['index'] = params['index'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 query_params = [] + if 'state' in params: + query_params.append(('state', params['state'])) # noqa: E501 + if 'labels' in params: + query_params.append(('labels', params['labels'])) # noqa: E501 + if 'q' in params: + query_params.append(('q', params['q'])) # noqa: E501 + if 'priority_repo_id' in params: + query_params.append(('priority_repo_id', params['priority_repo_id'])) # noqa: E501 + if 'type' in params: + query_params.append(('type', params['type'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 header_params = {} @@ -3113,14 +4904,14 @@ def issue_remove_label_with_http_info(self, owner, repo, index, id, **kwargs): auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/issues/{index}/labels/{id}', 'DELETE', + '/repos/issues/search', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='list[Issue]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3128,49 +4919,47 @@ def issue_remove_label_with_http_info(self, owner, repo, index, id, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_replace_labels(self, owner, repo, index, **kwargs): # noqa: E501 - """Replace an issue's labels # noqa: E501 + def issue_start_stop_watch(self, owner, repo, index, **kwargs): # noqa: E501 + """Start stopwatch on an issue. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_replace_labels(owner, repo, index, async_req=True) + >>> thread = api.issue_start_stop_watch(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue (required) - :param IssueLabelsOption body: - :return: list[Label] + :param int index: index of the issue to create the stopwatch on (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_replace_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return self.issue_start_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: - (data) = self.issue_replace_labels_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + (data) = self.issue_start_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data - def issue_replace_labels_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 - """Replace an issue's labels # noqa: E501 + def issue_start_stop_watch_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Start stopwatch on an issue. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_replace_labels_with_http_info(owner, repo, index, async_req=True) + >>> thread = api.issue_start_stop_watch_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue (required) - :param IssueLabelsOption body: - :return: list[Label] + :param int index: index of the issue to create the stopwatch on (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501 + all_params = ['owner', 'repo', 'index'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3181,22 +4970,22 @@ def issue_replace_labels_with_http_info(self, owner, repo, index, **kwargs): # if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_replace_labels" % key + " to method issue_start_stop_watch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_replace_labels`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_start_stop_watch`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_replace_labels`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_start_stop_watch`") # noqa: E501 # verify the required parameter 'index' is set if ('index' not in params or params['index'] is None): - raise ValueError("Missing the required parameter `index` when calling `issue_replace_labels`") # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_start_stop_watch`") # noqa: E501 collection_formats = {} @@ -3216,8 +5005,6 @@ def issue_replace_labels_with_http_info(self, owner, repo, index, **kwargs): # local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -3230,14 +5017,14 @@ def issue_replace_labels_with_http_info(self, owner, repo, index, **kwargs): # auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/issues/{index}/labels', 'PUT', + '/repos/{owner}/{repo}/issues/{index}/stopwatch/start', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Label]', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3245,41 +5032,41 @@ def issue_replace_labels_with_http_info(self, owner, repo, index, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_start_stop_watch(self, owner, repo, index, **kwargs): # noqa: E501 - """Start stopwatch on an issue. # noqa: E501 + def issue_stop_stop_watch(self, owner, repo, index, **kwargs): # noqa: E501 + """Stop an issue's existing stopwatch. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_start_stop_watch(owner, repo, index, async_req=True) + >>> thread = api.issue_stop_stop_watch(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue to create the stopwatch on (required) + :param int index: index of the issue to stop the stopwatch on (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_start_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return self.issue_stop_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: - (data) = self.issue_start_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + (data) = self.issue_stop_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data - def issue_start_stop_watch_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 - """Start stopwatch on an issue. # noqa: E501 + def issue_stop_stop_watch_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Stop an issue's existing stopwatch. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_start_stop_watch_with_http_info(owner, repo, index, async_req=True) + >>> thread = api.issue_stop_stop_watch_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue to create the stopwatch on (required) + :param int index: index of the issue to stop the stopwatch on (required) :return: None If the method is called asynchronously, returns the request thread. @@ -3296,22 +5083,22 @@ def issue_start_stop_watch_with_http_info(self, owner, repo, index, **kwargs): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_start_stop_watch" % key + " to method issue_stop_stop_watch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_start_stop_watch`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_stop_stop_watch`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_start_stop_watch`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_stop_stop_watch`") # noqa: E501 # verify the required parameter 'index' is set if ('index' not in params or params['index'] is None): - raise ValueError("Missing the required parameter `index` when calling `issue_start_stop_watch`") # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_stop_stop_watch`") # noqa: E501 collection_formats = {} @@ -3343,7 +5130,7 @@ def issue_start_stop_watch_with_http_info(self, owner, repo, index, **kwargs): auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/issues/{index}/stopwatch/start', 'POST', + '/repos/{owner}/{repo}/issues/{index}/stopwatch/stop', 'POST', path_params, query_params, header_params, @@ -3358,47 +5145,51 @@ def issue_start_stop_watch_with_http_info(self, owner, repo, index, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_stop_watch(self, owner, repo, index, **kwargs): # noqa: E501 - """Stop an issue's existing stopwatch. # noqa: E501 + def issue_subscriptions(self, owner, repo, index, **kwargs): # noqa: E501 + """Get users who subscribed on an issue. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_stop_watch(owner, repo, index, async_req=True) + >>> thread = api.issue_subscriptions(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue to stop the stopwatch on (required) - :return: None + :param int index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[User] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return self.issue_subscriptions_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: - (data) = self.issue_stop_watch_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + (data) = self.issue_subscriptions_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data - def issue_stop_watch_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 - """Stop an issue's existing stopwatch. # noqa: E501 + def issue_subscriptions_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get users who subscribed on an issue. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_stop_watch_with_http_info(owner, repo, index, async_req=True) + >>> thread = api.issue_subscriptions_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the issue to stop the stopwatch on (required) - :return: None + :param int index: index of the issue (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[User] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'index'] # noqa: E501 + all_params = ['owner', 'repo', 'index', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3409,22 +5200,22 @@ def issue_stop_watch_with_http_info(self, owner, repo, index, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method issue_stop_watch" % key + " to method issue_subscriptions" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `issue_stop_watch`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `issue_subscriptions`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `issue_stop_watch`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `issue_subscriptions`") # noqa: E501 # verify the required parameter 'index' is set if ('index' not in params or params['index'] is None): - raise ValueError("Missing the required parameter `index` when calling `issue_stop_watch`") # noqa: E501 + raise ValueError("Missing the required parameter `index` when calling `issue_subscriptions`") # noqa: E501 collection_formats = {} @@ -3437,6 +5228,10 @@ def issue_stop_watch_with_http_info(self, owner, repo, index, **kwargs): # noqa path_params['index'] = params['index'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -3456,14 +5251,14 @@ def issue_stop_watch_with_http_info(self, owner, repo, index, **kwargs): # noqa auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/issues/{index}/stopwatch/stop', 'POST', + '/repos/{owner}/{repo}/issues/{index}/subscriptions', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='list[User]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3471,47 +5266,55 @@ def issue_stop_watch_with_http_info(self, owner, repo, index, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def issue_tracked_times(self, owner, repo, id, **kwargs): # noqa: E501 + def issue_tracked_times(self, owner, repo, index, **kwargs): # noqa: E501 """List an issue's tracked times # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_tracked_times(owner, repo, id, async_req=True) + >>> thread = api.issue_tracked_times(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: index of the issue (required) + :param int index: index of the issue (required) + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[TrackedTime] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.issue_tracked_times_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.issue_tracked_times_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: - (data) = self.issue_tracked_times_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.issue_tracked_times_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data - def issue_tracked_times_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + def issue_tracked_times_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 """List an issue's tracked times # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.issue_tracked_times_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.issue_tracked_times_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: index of the issue (required) + :param int index: index of the issue (required) + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[TrackedTime] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params = ['owner', 'repo', 'index', 'since', 'before', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3534,10 +5337,10 @@ def issue_tracked_times_with_http_info(self, owner, repo, id, **kwargs): # noqa if ('repo' not in params or params['repo'] is None): raise ValueError("Missing the required parameter `repo` when calling `issue_tracked_times`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `issue_tracked_times`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `issue_tracked_times`") # noqa: E501 collection_formats = {} @@ -3546,10 +5349,18 @@ def issue_tracked_times_with_http_info(self, owner, repo, id, **kwargs): # noqa path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 query_params = [] + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -3569,7 +5380,7 @@ def issue_tracked_times_with_http_info(self, owner, repo, id, **kwargs): # noqa auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/issues/{id}/times', 'GET', + '/repos/{owner}/{repo}/issues/{index}/times', 'GET', path_params, query_params, header_params, diff --git a/giteapy/api/miscellaneous_api.py b/giteapy/api/miscellaneous_api.py old mode 100755 new mode 100644 index c80c62c..56f6803 --- a/giteapy/api/miscellaneous_api.py +++ b/giteapy/api/miscellaneous_api.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/api/notification_api.py b/giteapy/api/notification_api.py new file mode 100644 index 0000000..07853dd --- /dev/null +++ b/giteapy/api/notification_api.py @@ -0,0 +1,753 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from giteapy.api_client import ApiClient + + +class NotificationApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def notify_get_list(self, **kwargs): # noqa: E501 + """List users's notification threads # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_get_list(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str all: If true, show notifications marked as read. Default value is false + :param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_get_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.notify_get_list_with_http_info(**kwargs) # noqa: E501 + return data + + def notify_get_list_with_http_info(self, **kwargs): # noqa: E501 + """List users's notification threads # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_get_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str all: If true, show notifications marked as read. Default value is false + :param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['all', 'since', 'before', 'page', 'limit'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method notify_get_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'all' in params: + query_params.append(('all', params['all'])) # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/notifications', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[NotificationThread]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def notify_get_repo_list(self, owner, repo, **kwargs): # noqa: E501 + """List users's notification threads on a specific repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_get_repo_list(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str all: If true, show notifications marked as read. Default value is false + :param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_get_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.notify_get_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def notify_get_repo_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List users's notification threads on a specific repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_get_repo_list_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str all: If true, show notifications marked as read. Default value is false + :param datetime since: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[NotificationThread] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'all', 'since', 'before', 'page', 'limit'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method notify_get_repo_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `notify_get_repo_list`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `notify_get_repo_list`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'all' in params: + query_params.append(('all', params['all'])) # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/notifications', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[NotificationThread]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def notify_get_thread(self, id, **kwargs): # noqa: E501 + """Get notification thread by ID # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_get_thread(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id of notification thread (required) + :return: NotificationThread + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_get_thread_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.notify_get_thread_with_http_info(id, **kwargs) # noqa: E501 + return data + + def notify_get_thread_with_http_info(self, id, **kwargs): # noqa: E501 + """Get notification thread by ID # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_get_thread_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id of notification thread (required) + :return: NotificationThread + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method notify_get_thread" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `notify_get_thread`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/notifications/threads/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationThread', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def notify_new_available(self, **kwargs): # noqa: E501 + """Check if unread notifications exist # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_new_available(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: NotificationCount + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_new_available_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.notify_new_available_with_http_info(**kwargs) # noqa: E501 + return data + + def notify_new_available_with_http_info(self, **kwargs): # noqa: E501 + """Check if unread notifications exist # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_new_available_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :return: NotificationCount + If the method is called asynchronously, + returns the request thread. + """ + + all_params = [] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method notify_new_available" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/notifications/new', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='NotificationCount', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def notify_read_list(self, **kwargs): # noqa: E501 + """Mark notification threads as read # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_read_list(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_read_list_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.notify_read_list_with_http_info(**kwargs) # noqa: E501 + return data + + def notify_read_list_with_http_info(self, **kwargs): # noqa: E501 + """Mark notification threads as read # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_read_list_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['last_read_at'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method notify_read_list" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'last_read_at' in params: + query_params.append(('last_read_at', params['last_read_at'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/notifications', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def notify_read_repo_list(self, owner, repo, **kwargs): # noqa: E501 + """Mark notification threads as read on a specific repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_read_repo_list(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_read_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.notify_read_repo_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def notify_read_repo_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Mark notification threads as read on a specific repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_read_repo_list_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param datetime last_read_at: Describes the last point that notifications were checked. Anything updated since this time will not be updated. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'last_read_at'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method notify_read_repo_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `notify_read_repo_list`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `notify_read_repo_list`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'last_read_at' in params: + query_params.append(('last_read_at', params['last_read_at'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/notifications', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def notify_read_thread(self, id, **kwargs): # noqa: E501 + """Mark notification thread as read by ID # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_read_thread(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id of notification thread (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.notify_read_thread_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.notify_read_thread_with_http_info(id, **kwargs) # noqa: E501 + return data + + def notify_read_thread_with_http_info(self, id, **kwargs): # noqa: E501 + """Mark notification thread as read by ID # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.notify_read_thread_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str id: id of notification thread (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method notify_read_thread" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `notify_read_thread`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/notifications/threads/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/giteapy/api/organization_api.py b/giteapy/api/organization_api.py old mode 100755 new mode 100644 index 0c86eb5..45aa610 --- a/giteapy/api/organization_api.py +++ b/giteapy/api/organization_api.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -118,6 +118,107 @@ def create_org_repo_with_http_info(self, org, **kwargs): # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + return self.api_client.call_api( + '/orgs/{org}/repos', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def create_org_repo_deprecated(self, org, **kwargs): # noqa: E501 + """Create a repository in an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_org_repo_deprecated(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param CreateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_org_repo_deprecated_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.create_org_repo_deprecated_with_http_info(org, **kwargs) # noqa: E501 + return data + + def create_org_repo_deprecated_with_http_info(self, org, **kwargs): # noqa: E501 + """Create a repository in an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_org_repo_deprecated_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of organization (required) + :param CreateRepoOption body: + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_org_repo_deprecated" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `create_org_repo_deprecated`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + return self.api_client.call_api( '/org/{org}/repos', 'POST', path_params, @@ -659,6 +760,107 @@ def org_create_hook_with_http_info(self, org, body, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def org_create_label(self, org, **kwargs): # noqa: E501 + """Create a label for an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_label(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_create_label_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_create_label_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_create_label_with_http_info(self, org, **kwargs): # noqa: E501 + """Create a label for an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_create_label_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param CreateLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method org_create_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_create_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/labels', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Label', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def org_create_team(self, org, **kwargs): # noqa: E501 """Create a team # noqa: E501 @@ -962,45 +1164,45 @@ def org_delete_hook_with_http_info(self, org, id, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def org_delete_member(self, org, username, **kwargs): # noqa: E501 - """Remove a member from an organization # noqa: E501 + def org_delete_label(self, org, id, **kwargs): # noqa: E501 + """Delete a label # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.org_delete_member(org, username, async_req=True) + >>> thread = api.org_delete_label(org, id, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) - :param str username: username of the user (required) + :param int id: id of the label to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.org_delete_member_with_http_info(org, username, **kwargs) # noqa: E501 + return self.org_delete_label_with_http_info(org, id, **kwargs) # noqa: E501 else: - (data) = self.org_delete_member_with_http_info(org, username, **kwargs) # noqa: E501 + (data) = self.org_delete_label_with_http_info(org, id, **kwargs) # noqa: E501 return data - def org_delete_member_with_http_info(self, org, username, **kwargs): # noqa: E501 - """Remove a member from an organization # noqa: E501 + def org_delete_label_with_http_info(self, org, id, **kwargs): # noqa: E501 + """Delete a label # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.org_delete_member_with_http_info(org, username, async_req=True) + >>> thread = api.org_delete_label_with_http_info(org, id, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) - :param str username: username of the user (required) + :param int id: id of the label to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['org', 'username'] # noqa: E501 + all_params = ['org', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1011,26 +1213,26 @@ def org_delete_member_with_http_info(self, org, username, **kwargs): # noqa: E5 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method org_delete_member" % key + " to method org_delete_label" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if ('org' not in params or params['org'] is None): - raise ValueError("Missing the required parameter `org` when calling `org_delete_member`") # noqa: E501 - # verify the required parameter 'username' is set - if ('username' not in params or - params['username'] is None): - raise ValueError("Missing the required parameter `username` when calling `org_delete_member`") # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_delete_label`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `org_delete_label`") # noqa: E501 collection_formats = {} path_params = {} if 'org' in params: path_params['org'] = params['org'] # noqa: E501 - if 'username' in params: - path_params['username'] = params['username'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] @@ -1042,7 +1244,7 @@ def org_delete_member_with_http_info(self, org, username, **kwargs): # noqa: E5 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 + ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 @@ -1052,7 +1254,7 @@ def org_delete_member_with_http_info(self, org, username, **kwargs): # noqa: E5 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/orgs/{org}/members/{username}', 'DELETE', + '/orgs/{org}/labels/{id}', 'DELETE', path_params, query_params, header_params, @@ -1067,43 +1269,45 @@ def org_delete_member_with_http_info(self, org, username, **kwargs): # noqa: E5 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def org_delete_team(self, id, **kwargs): # noqa: E501 - """Delete a team # noqa: E501 + def org_delete_member(self, org, username, **kwargs): # noqa: E501 + """Remove a member from an organization # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.org_delete_team(id, async_req=True) + >>> thread = api.org_delete_member(org, username, async_req=True) >>> result = thread.get() :param async_req bool - :param int id: id of the team to delete (required) + :param str org: name of the organization (required) + :param str username: username of the user (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.org_delete_team_with_http_info(id, **kwargs) # noqa: E501 + return self.org_delete_member_with_http_info(org, username, **kwargs) # noqa: E501 else: - (data) = self.org_delete_team_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.org_delete_member_with_http_info(org, username, **kwargs) # noqa: E501 return data - def org_delete_team_with_http_info(self, id, **kwargs): # noqa: E501 - """Delete a team # noqa: E501 + def org_delete_member_with_http_info(self, org, username, **kwargs): # noqa: E501 + """Remove a member from an organization # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.org_delete_team_with_http_info(id, async_req=True) + >>> thread = api.org_delete_member_with_http_info(org, username, async_req=True) >>> result = thread.get() :param async_req bool - :param int id: id of the team to delete (required) + :param str org: name of the organization (required) + :param str username: username of the user (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['id'] # noqa: E501 + all_params = ['org', 'username'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1114,20 +1318,26 @@ def org_delete_team_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method org_delete_team" % key + " to method org_delete_member" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `org_delete_team`") # noqa: E501 + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_delete_member`") # noqa: E501 + # verify the required parameter 'username' is set + if ('username' not in params or + params['username'] is None): + raise ValueError("Missing the required parameter `username` when calling `org_delete_member`") # noqa: E501 collection_formats = {} path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'username' in params: + path_params['username'] = params['username'] # noqa: E501 query_params = [] @@ -1139,7 +1349,7 @@ def org_delete_team_with_http_info(self, id, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'text/html']) # noqa: E501 + ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 @@ -1149,7 +1359,7 @@ def org_delete_team_with_http_info(self, id, **kwargs): # noqa: E501 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/teams/{id}', 'DELETE', + '/orgs/{org}/members/{username}', 'DELETE', path_params, query_params, header_params, @@ -1164,8 +1374,105 @@ def org_delete_team_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def org_edit(self, org, body, **kwargs): # noqa: E501 - """Edit an organization # noqa: E501 + def org_delete_team(self, id, **kwargs): # noqa: E501 + """Delete a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_team(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_delete_team_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_delete_team_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_delete_team_with_http_info(self, id, **kwargs): # noqa: E501 + """Delete a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_delete_team_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to delete (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method org_delete_team" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `org_delete_team`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json', 'text/html']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def org_edit(self, org, body, **kwargs): # noqa: E501 + """Edit an organization # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -1357,20 +1664,327 @@ def org_edit_hook_with_http_info(self, org, id, **kwargs): # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/hooks/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def org_edit_label(self, org, id, **kwargs): # noqa: E501 + """Update a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_label(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the label to edit (required) + :param EditLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_edit_label_with_http_info(org, id, **kwargs) # noqa: E501 + else: + (data) = self.org_edit_label_with_http_info(org, id, **kwargs) # noqa: E501 + return data + + def org_edit_label_with_http_info(self, org, id, **kwargs): # noqa: E501 + """Update a label # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_label_with_http_info(org, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int id: id of the label to edit (required) + :param EditLabelOption body: + :return: Label + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'id', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method org_edit_label" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_edit_label`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `org_edit_label`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/labels/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Label', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def org_edit_team(self, id, **kwargs): # noqa: E501 + """Edit a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_team(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to edit (required) + :param EditTeamOption body: + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_edit_team_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.org_edit_team_with_http_info(id, **kwargs) # noqa: E501 + return data + + def org_edit_team_with_http_info(self, id, **kwargs): # noqa: E501 + """Edit a team # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_edit_team_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the team to edit (required) + :param EditTeamOption body: + :return: Team + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method org_edit_team" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `org_edit_team`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/teams/{id}', 'PATCH', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Team', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def org_get(self, org, **kwargs): # noqa: E501 + """Get an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization to get (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_get_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_get_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_get_with_http_info(self, org, **kwargs): # noqa: E501 + """Get an organization # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_get_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization to get (required) + :return: Organization + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method org_get" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_get`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/orgs/{org}/hooks/{id}', 'PATCH', + '/orgs/{org}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Hook', # noqa: E501 + response_type='Organization', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1378,45 +1992,45 @@ def org_edit_hook_with_http_info(self, org, id, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def org_edit_team(self, id, **kwargs): # noqa: E501 - """Edit a team # noqa: E501 + def org_get_all(self, **kwargs): # noqa: E501 + """Get list of organizations # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.org_edit_team(id, async_req=True) + >>> thread = api.org_get_all(async_req=True) >>> result = thread.get() :param async_req bool - :param int id: id of the team to edit (required) - :param EditTeamOption body: - :return: Team + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[Organization] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.org_edit_team_with_http_info(id, **kwargs) # noqa: E501 + return self.org_get_all_with_http_info(**kwargs) # noqa: E501 else: - (data) = self.org_edit_team_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.org_get_all_with_http_info(**kwargs) # noqa: E501 return data - def org_edit_team_with_http_info(self, id, **kwargs): # noqa: E501 - """Edit a team # noqa: E501 + def org_get_all_with_http_info(self, **kwargs): # noqa: E501 + """Get list of organizations # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.org_edit_team_with_http_info(id, async_req=True) + >>> thread = api.org_get_all_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool - :param int id: id of the team to edit (required) - :param EditTeamOption body: - :return: Team + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[Organization] If the method is called asynchronously, returns the request thread. """ - all_params = ['id', 'body'] # noqa: E501 + all_params = ['page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1427,22 +2041,20 @@ def org_edit_team_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method org_edit_team" % key + " to method org_get_all" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `org_edit_team`") # noqa: E501 collection_formats = {} path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -1450,28 +2062,26 @@ def org_edit_team_with_http_info(self, id, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/teams/{id}', 'PATCH', + '/orgs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Team', # noqa: E501 + response_type='list[Organization]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1479,43 +2089,45 @@ def org_edit_team_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def org_get(self, org, **kwargs): # noqa: E501 - """Get an organization # noqa: E501 + def org_get_hook(self, org, id, **kwargs): # noqa: E501 + """Get a hook # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.org_get(org, async_req=True) + >>> thread = api.org_get_hook(org, id, async_req=True) >>> result = thread.get() :param async_req bool - :param str org: name of the organization to get (required) - :return: Organization + :param str org: name of the organization (required) + :param int id: id of the hook to get (required) + :return: Hook If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.org_get_with_http_info(org, **kwargs) # noqa: E501 + return self.org_get_hook_with_http_info(org, id, **kwargs) # noqa: E501 else: - (data) = self.org_get_with_http_info(org, **kwargs) # noqa: E501 + (data) = self.org_get_hook_with_http_info(org, id, **kwargs) # noqa: E501 return data - def org_get_with_http_info(self, org, **kwargs): # noqa: E501 - """Get an organization # noqa: E501 + def org_get_hook_with_http_info(self, org, id, **kwargs): # noqa: E501 + """Get a hook # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.org_get_with_http_info(org, async_req=True) + >>> thread = api.org_get_hook_with_http_info(org, id, async_req=True) >>> result = thread.get() :param async_req bool - :param str org: name of the organization to get (required) - :return: Organization + :param str org: name of the organization (required) + :param int id: id of the hook to get (required) + :return: Hook If the method is called asynchronously, returns the request thread. """ - all_params = ['org'] # noqa: E501 + all_params = ['org', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1526,20 +2138,26 @@ def org_get_with_http_info(self, org, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method org_get" % key + " to method org_get_hook" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if ('org' not in params or params['org'] is None): - raise ValueError("Missing the required parameter `org` when calling `org_get`") # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_get_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `org_get_hook`") # noqa: E501 collection_formats = {} path_params = {} if 'org' in params: path_params['org'] = params['org'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] @@ -1561,14 +2179,14 @@ def org_get_with_http_info(self, org, **kwargs): # noqa: E501 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/orgs/{org}', 'GET', + '/orgs/{org}/hooks/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Organization', # noqa: E501 + response_type='Hook', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1576,40 +2194,40 @@ def org_get_with_http_info(self, org, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def org_get_hook(self, org, id, **kwargs): # noqa: E501 - """Get a hook # noqa: E501 + def org_get_label(self, org, id, **kwargs): # noqa: E501 + """Get a single label # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.org_get_hook(org, id, async_req=True) + >>> thread = api.org_get_label(org, id, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) - :param int id: id of the hook to get (required) - :return: Hook + :param int id: id of the label to get (required) + :return: Label If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.org_get_hook_with_http_info(org, id, **kwargs) # noqa: E501 + return self.org_get_label_with_http_info(org, id, **kwargs) # noqa: E501 else: - (data) = self.org_get_hook_with_http_info(org, id, **kwargs) # noqa: E501 + (data) = self.org_get_label_with_http_info(org, id, **kwargs) # noqa: E501 return data - def org_get_hook_with_http_info(self, org, id, **kwargs): # noqa: E501 - """Get a hook # noqa: E501 + def org_get_label_with_http_info(self, org, id, **kwargs): # noqa: E501 + """Get a single label # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.org_get_hook_with_http_info(org, id, async_req=True) + >>> thread = api.org_get_label_with_http_info(org, id, async_req=True) >>> result = thread.get() :param async_req bool :param str org: name of the organization (required) - :param int id: id of the hook to get (required) - :return: Hook + :param int id: id of the label to get (required) + :return: Label If the method is called asynchronously, returns the request thread. """ @@ -1625,18 +2243,18 @@ def org_get_hook_with_http_info(self, org, id, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method org_get_hook" % key + " to method org_get_label" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'org' is set if ('org' not in params or params['org'] is None): - raise ValueError("Missing the required parameter `org` when calling `org_get_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `org` when calling `org_get_label`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `org_get_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `org_get_label`") # noqa: E501 collection_formats = {} @@ -1666,14 +2284,14 @@ def org_get_hook_with_http_info(self, org, id, **kwargs): # noqa: E501 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/orgs/{org}/hooks/{id}', 'GET', + '/orgs/{org}/labels/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Hook', # noqa: E501 + response_type='Label', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1997,6 +2615,8 @@ def org_list_current_user_orgs(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Organization] If the method is called asynchronously, returns the request thread. @@ -2017,12 +2637,14 @@ def org_list_current_user_orgs_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Organization] If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2043,6 +2665,10 @@ def org_list_current_user_orgs_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2087,6 +2713,8 @@ def org_list_hooks(self, org, **kwargs): # noqa: E501 :param async_req bool :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Hook] If the method is called asynchronously, returns the request thread. @@ -2108,12 +2736,14 @@ def org_list_hooks_with_http_info(self, org, **kwargs): # noqa: E501 :param async_req bool :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Hook] If the method is called asynchronously, returns the request thread. """ - all_params = ['org'] # noqa: E501 + all_params = ['org', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2140,6 +2770,10 @@ def org_list_hooks_with_http_info(self, org, **kwargs): # noqa: E501 path_params['org'] = params['org'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2174,6 +2808,111 @@ def org_list_hooks_with_http_info(self, org, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def org_list_labels(self, org, **kwargs): # noqa: E501 + """List an organization's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_labels(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.org_list_labels_with_http_info(org, **kwargs) # noqa: E501 + else: + (data) = self.org_list_labels_with_http_info(org, **kwargs) # noqa: E501 + return data + + def org_list_labels_with_http_info(self, org, **kwargs): # noqa: E501 + """List an organization's labels # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.org_list_labels_with_http_info(org, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[Label] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['org', 'page', 'limit'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method org_list_labels" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'org' is set + if ('org' not in params or + params['org'] is None): + raise ValueError("Missing the required parameter `org` when calling `org_list_labels`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'org' in params: + path_params['org'] = params['org'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/orgs/{org}/labels', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[Label]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def org_list_members(self, org, **kwargs): # noqa: E501 """List an organization's members # noqa: E501 @@ -2184,6 +2923,8 @@ def org_list_members(self, org, **kwargs): # noqa: E501 :param async_req bool :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. @@ -2205,12 +2946,14 @@ def org_list_members_with_http_info(self, org, **kwargs): # noqa: E501 :param async_req bool :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. """ - all_params = ['org'] # noqa: E501 + all_params = ['org', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2237,6 +2980,10 @@ def org_list_members_with_http_info(self, org, **kwargs): # noqa: E501 path_params['org'] = params['org'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2281,6 +3028,8 @@ def org_list_public_members(self, org, **kwargs): # noqa: E501 :param async_req bool :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. @@ -2302,12 +3051,14 @@ def org_list_public_members_with_http_info(self, org, **kwargs): # noqa: E501 :param async_req bool :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. """ - all_params = ['org'] # noqa: E501 + all_params = ['org', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2334,6 +3085,10 @@ def org_list_public_members_with_http_info(self, org, **kwargs): # noqa: E501 path_params['org'] = params['org'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2378,6 +3133,8 @@ def org_list_repos(self, org, **kwargs): # noqa: E501 :param async_req bool :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. @@ -2399,12 +3156,14 @@ def org_list_repos_with_http_info(self, org, **kwargs): # noqa: E501 :param async_req bool :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. """ - all_params = ['org'] # noqa: E501 + all_params = ['org', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2431,6 +3190,10 @@ def org_list_repos_with_http_info(self, org, **kwargs): # noqa: E501 path_params['org'] = params['org'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2580,6 +3343,8 @@ def org_list_team_members(self, id, **kwargs): # noqa: E501 :param async_req bool :param int id: id of the team (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. @@ -2601,12 +3366,14 @@ def org_list_team_members_with_http_info(self, id, **kwargs): # noqa: E501 :param async_req bool :param int id: id of the team (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. """ - all_params = ['id'] # noqa: E501 + all_params = ['id', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2633,6 +3400,10 @@ def org_list_team_members_with_http_info(self, id, **kwargs): # noqa: E501 path_params['id'] = params['id'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2677,6 +3448,8 @@ def org_list_team_repos(self, id, **kwargs): # noqa: E501 :param async_req bool :param int id: id of the team (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. @@ -2698,12 +3471,14 @@ def org_list_team_repos_with_http_info(self, id, **kwargs): # noqa: E501 :param async_req bool :param int id: id of the team (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. """ - all_params = ['id'] # noqa: E501 + all_params = ['id', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2730,6 +3505,10 @@ def org_list_team_repos_with_http_info(self, id, **kwargs): # noqa: E501 path_params['id'] = params['id'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2774,6 +3553,8 @@ def org_list_teams(self, org, **kwargs): # noqa: E501 :param async_req bool :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Team] If the method is called asynchronously, returns the request thread. @@ -2795,12 +3576,14 @@ def org_list_teams_with_http_info(self, org, **kwargs): # noqa: E501 :param async_req bool :param str org: name of the organization (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Team] If the method is called asynchronously, returns the request thread. """ - all_params = ['org'] # noqa: E501 + all_params = ['org', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2827,6 +3610,10 @@ def org_list_teams_with_http_info(self, org, **kwargs): # noqa: E501 path_params['org'] = params['org'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2871,6 +3658,8 @@ def org_list_user_orgs(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Organization] If the method is called asynchronously, returns the request thread. @@ -2892,12 +3681,14 @@ def org_list_user_orgs_with_http_info(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Organization] If the method is called asynchronously, returns the request thread. """ - all_params = ['username'] # noqa: E501 + all_params = ['username', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2924,6 +3715,10 @@ def org_list_user_orgs_with_http_info(self, username, **kwargs): # noqa: E501 path_params['username'] = params['username'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -3295,8 +4090,8 @@ def team_search(self, org, **kwargs): # noqa: E501 :param str org: name of the organization (required) :param str q: keywords to search :param bool include_desc: include search within team description (defaults to true) - :param int limit: limit size of results :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: InlineResponse200 If the method is called asynchronously, returns the request thread. @@ -3320,14 +4115,14 @@ def team_search_with_http_info(self, org, **kwargs): # noqa: E501 :param str org: name of the organization (required) :param str q: keywords to search :param bool include_desc: include search within team description (defaults to true) - :param int limit: limit size of results :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: InlineResponse200 If the method is called asynchronously, returns the request thread. """ - all_params = ['org', 'q', 'include_desc', 'limit', 'page'] # noqa: E501 + all_params = ['org', 'q', 'include_desc', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3358,10 +4153,10 @@ def team_search_with_http_info(self, org, **kwargs): # noqa: E501 query_params.append(('q', params['q'])) # noqa: E501 if 'include_desc' in params: query_params.append(('include_desc', params['include_desc'])) # noqa: E501 - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} diff --git a/giteapy/api/repository_api.py b/giteapy/api/repository_api.py old mode 100755 new mode 100644 index da98f36..b29d318 --- a/giteapy/api/repository_api.py +++ b/giteapy/api/repository_api.py @@ -597,6 +597,8 @@ def list_forks(self, owner, repo, **kwargs): # noqa: E501 :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. @@ -619,12 +621,14 @@ def list_forks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo'] # noqa: E501 + all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -657,6 +661,10 @@ def list_forks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 path_params['repo'] = params['repo'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -1034,6 +1042,115 @@ def repo_check_collaborator_with_http_info(self, owner, repo, collaborator, **kw _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def repo_create_branch_protection(self, owner, repo, **kwargs): # noqa: E501 + """Create a branch protections for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_branch_protection(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateBranchProtectionOption body: + :return: BranchProtection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_create_branch_protection_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Create a branch protections for a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_branch_protection_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param CreateBranchProtectionOption body: + :return: BranchProtection + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method repo_create_branch_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_create_branch_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_create_branch_protection`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branch_protections', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BranchProtection', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def repo_create_file(self, owner, repo, filepath, body, **kwargs): # noqa: E501 """Create a file in a repository # noqa: E501 @@ -1482,6 +1599,127 @@ def repo_create_pull_request_with_http_info(self, owner, repo, **kwargs): # noq _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def repo_create_pull_review(self, owner, repo, index, body, **kwargs): # noqa: E501 + """Create a review to an pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_pull_review(owner, repo, index, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param CreatePullReviewOptions body: (required) + :return: PullReview + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_create_pull_review_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_create_pull_review_with_http_info(owner, repo, index, body, **kwargs) # noqa: E501 + return data + + def repo_create_pull_review_with_http_info(self, owner, repo, index, body, **kwargs): # noqa: E501 + """Create a review to an pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_create_pull_review_with_http_info(owner, repo, index, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request (required) + :param CreatePullReviewOptions body: (required) + :return: PullReview + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method repo_create_pull_review" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_create_pull_review`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_create_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `repo_create_pull_review`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `repo_create_pull_review`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/pulls/{index}/reviews', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PullReview', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def repo_create_release(self, owner, repo, **kwargs): # noqa: E501 """Create a release # noqa: E501 @@ -1729,7 +1967,7 @@ def repo_create_status(self, owner, repo, sha, **kwargs): # noqa: E501 :param str repo: name of the repo (required) :param str sha: sha of the commit (required) :param CreateStatusOption body: - :return: list[Status] + :return: Status If the method is called asynchronously, returns the request thread. """ @@ -1753,7 +1991,7 @@ def repo_create_status_with_http_info(self, owner, repo, sha, **kwargs): # noqa :param str repo: name of the repo (required) :param str sha: sha of the commit (required) :param CreateStatusOption body: - :return: list[Status] + :return: Status If the method is called asynchronously, returns the request thread. """ @@ -1825,7 +2063,7 @@ def repo_create_status_with_http_info(self, owner, repo, sha, **kwargs): # noqa body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Status]', # noqa: E501 + response_type='Status', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -1938,47 +2176,47 @@ def repo_delete_with_http_info(self, owner, repo, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_delete_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 - """Delete a collaborator from a repository # noqa: E501 + def repo_delete_branch(self, owner, repo, branch, **kwargs): # noqa: E501 + """Delete a specific branch from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_collaborator(owner, repo, collaborator, async_req=True) + >>> thread = api.repo_delete_branch(owner, repo, branch, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str collaborator: username of the collaborator to delete (required) + :param str branch: branch to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_delete_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + return self.repo_delete_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 else: - (data) = self.repo_delete_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 + (data) = self.repo_delete_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 return data - def repo_delete_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 - """Delete a collaborator from a repository # noqa: E501 + def repo_delete_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa: E501 + """Delete a specific branch from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_collaborator_with_http_info(owner, repo, collaborator, async_req=True) + >>> thread = api.repo_delete_branch_with_http_info(owner, repo, branch, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str collaborator: username of the collaborator to delete (required) + :param str branch: branch to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'collaborator'] # noqa: E501 + all_params = ['owner', 'repo', 'branch'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1989,22 +2227,22 @@ def repo_delete_collaborator_with_http_info(self, owner, repo, collaborator, **k if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_delete_collaborator" % key + " to method repo_delete_branch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_delete_collaborator`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_branch`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_delete_collaborator`") # noqa: E501 - # verify the required parameter 'collaborator' is set - if ('collaborator' not in params or - params['collaborator'] is None): - raise ValueError("Missing the required parameter `collaborator` when calling `repo_delete_collaborator`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_branch`") # noqa: E501 + # verify the required parameter 'branch' is set + if ('branch' not in params or + params['branch'] is None): + raise ValueError("Missing the required parameter `branch` when calling `repo_delete_branch`") # noqa: E501 collection_formats = {} @@ -2013,8 +2251,8 @@ def repo_delete_collaborator_with_http_info(self, owner, repo, collaborator, **k path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'collaborator' in params: - path_params['collaborator'] = params['collaborator'] # noqa: E501 + if 'branch' in params: + path_params['branch'] = params['branch'] # noqa: E501 query_params = [] @@ -2036,7 +2274,7 @@ def repo_delete_collaborator_with_http_info(self, owner, repo, collaborator, **k auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/collaborators/{collaborator}', 'DELETE', + '/repos/{owner}/{repo}/branches/{branch}', 'DELETE', path_params, query_params, header_params, @@ -2051,49 +2289,47 @@ def repo_delete_collaborator_with_http_info(self, owner, repo, collaborator, **k _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_delete_file(self, owner, repo, filepath, body, **kwargs): # noqa: E501 - """Delete a file in a repository # noqa: E501 + def repo_delete_branch_protection(self, owner, repo, name, **kwargs): # noqa: E501 + """Delete a specific branch protection for the repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_file(owner, repo, filepath, body, async_req=True) + >>> thread = api.repo_delete_branch_protection(owner, repo, name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str filepath: path of the file to delete (required) - :param DeleteFileOptions body: (required) - :return: FileDeleteResponse + :param str name: name of protected branch (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_delete_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + return self.repo_delete_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 else: - (data) = self.repo_delete_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 + (data) = self.repo_delete_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 return data - def repo_delete_file_with_http_info(self, owner, repo, filepath, body, **kwargs): # noqa: E501 - """Delete a file in a repository # noqa: E501 + def repo_delete_branch_protection_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 + """Delete a specific branch protection for the repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_file_with_http_info(owner, repo, filepath, body, async_req=True) + >>> thread = api.repo_delete_branch_protection_with_http_info(owner, repo, name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str filepath: path of the file to delete (required) - :param DeleteFileOptions body: (required) - :return: FileDeleteResponse + :param str name: name of protected branch (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'filepath', 'body'] # noqa: E501 + all_params = ['owner', 'repo', 'name'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2104,26 +2340,22 @@ def repo_delete_file_with_http_info(self, owner, repo, filepath, body, **kwargs) if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_delete_file" % key + " to method repo_delete_branch_protection" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_delete_file`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_branch_protection`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_delete_file`") # noqa: E501 - # verify the required parameter 'filepath' is set - if ('filepath' not in params or - params['filepath'] is None): - raise ValueError("Missing the required parameter `filepath` when calling `repo_delete_file`") # noqa: E501 - # verify the required parameter 'body' is set - if ('body' not in params or - params['body'] is None): - raise ValueError("Missing the required parameter `body` when calling `repo_delete_file`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_branch_protection`") # noqa: E501 + # verify the required parameter 'name' is set + if ('name' not in params or + params['name'] is None): + raise ValueError("Missing the required parameter `name` when calling `repo_delete_branch_protection`") # noqa: E501 collection_formats = {} @@ -2132,8 +2364,8 @@ def repo_delete_file_with_http_info(self, owner, repo, filepath, body, **kwargs) path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'filepath' in params: - path_params['filepath'] = params['filepath'] # noqa: E501 + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 query_params = [] @@ -2143,28 +2375,26 @@ def repo_delete_file_with_http_info(self, owner, repo, filepath, body, **kwargs) local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/contents/{filepath}', 'DELETE', + '/repos/{owner}/{repo}/branch_protections/{name}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='FileDeleteResponse', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2172,47 +2402,47 @@ def repo_delete_file_with_http_info(self, owner, repo, filepath, body, **kwargs) _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_delete_git_hook(self, owner, repo, id, **kwargs): # noqa: E501 - """Delete a Git hook in a repository # noqa: E501 + def repo_delete_collaborator(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Delete a collaborator from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_git_hook(owner, repo, id, async_req=True) + >>> thread = api.repo_delete_collaborator(owner, repo, collaborator, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str id: id of the hook to get (required) + :param str collaborator: username of the collaborator to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_delete_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.repo_delete_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 else: - (data) = self.repo_delete_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.repo_delete_collaborator_with_http_info(owner, repo, collaborator, **kwargs) # noqa: E501 return data - def repo_delete_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Delete a Git hook in a repository # noqa: E501 + def repo_delete_collaborator_with_http_info(self, owner, repo, collaborator, **kwargs): # noqa: E501 + """Delete a collaborator from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_git_hook_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.repo_delete_collaborator_with_http_info(owner, repo, collaborator, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str id: id of the hook to get (required) + :param str collaborator: username of the collaborator to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params = ['owner', 'repo', 'collaborator'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2223,22 +2453,22 @@ def repo_delete_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noq if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_delete_git_hook" % key + " to method repo_delete_collaborator" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_delete_git_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_collaborator`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_delete_git_hook`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `repo_delete_git_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_collaborator`") # noqa: E501 + # verify the required parameter 'collaborator' is set + if ('collaborator' not in params or + params['collaborator'] is None): + raise ValueError("Missing the required parameter `collaborator` when calling `repo_delete_collaborator`") # noqa: E501 collection_formats = {} @@ -2247,8 +2477,8 @@ def repo_delete_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noq path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 + if 'collaborator' in params: + path_params['collaborator'] = params['collaborator'] # noqa: E501 query_params = [] @@ -2270,7 +2500,7 @@ def repo_delete_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noq auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/hooks/git/{id}', 'DELETE', + '/repos/{owner}/{repo}/collaborators/{collaborator}', 'DELETE', path_params, query_params, header_params, @@ -2285,47 +2515,49 @@ def repo_delete_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noq _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_delete_hook(self, owner, repo, id, **kwargs): # noqa: E501 - """Delete a hook in a repository # noqa: E501 + def repo_delete_file(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Delete a file in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_hook(owner, repo, id, async_req=True) + >>> thread = api.repo_delete_file(owner, repo, filepath, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the hook to delete (required) - :return: None + :param str filepath: path of the file to delete (required) + :param DeleteFileOptions body: (required) + :return: FileDeleteResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_delete_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.repo_delete_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 else: - (data) = self.repo_delete_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.repo_delete_file_with_http_info(owner, repo, filepath, body, **kwargs) # noqa: E501 return data - def repo_delete_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Delete a hook in a repository # noqa: E501 + def repo_delete_file_with_http_info(self, owner, repo, filepath, body, **kwargs): # noqa: E501 + """Delete a file in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_hook_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.repo_delete_file_with_http_info(owner, repo, filepath, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the hook to delete (required) - :return: None + :param str filepath: path of the file to delete (required) + :param DeleteFileOptions body: (required) + :return: FileDeleteResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params = ['owner', 'repo', 'filepath', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2336,22 +2568,26 @@ def repo_delete_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_delete_hook" % key + " to method repo_delete_file" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_delete_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_file`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_delete_hook`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `repo_delete_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_file`") # noqa: E501 + # verify the required parameter 'filepath' is set + if ('filepath' not in params or + params['filepath'] is None): + raise ValueError("Missing the required parameter `filepath` when calling `repo_delete_file`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `repo_delete_file`") # noqa: E501 collection_formats = {} @@ -2360,8 +2596,8 @@ def repo_delete_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 + if 'filepath' in params: + path_params['filepath'] = params['filepath'] # noqa: E501 query_params = [] @@ -2371,26 +2607,28 @@ def repo_delete_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json', 'text/plain']) # noqa: E501 + ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/hooks/{id}', 'DELETE', + '/repos/{owner}/{repo}/contents/{filepath}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='FileDeleteResponse', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2398,41 +2636,41 @@ def repo_delete_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_delete_key(self, owner, repo, id, **kwargs): # noqa: E501 - """Delete a key from a repository # noqa: E501 + def repo_delete_git_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a Git hook in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_key(owner, repo, id, async_req=True) + >>> thread = api.repo_delete_git_hook(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the key to delete (required) + :param str id: id of the hook to get (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_delete_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.repo_delete_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: - (data) = self.repo_delete_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.repo_delete_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data - def repo_delete_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Delete a key from a repository # noqa: E501 + def repo_delete_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a Git hook in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_key_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.repo_delete_git_hook_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the key to delete (required) + :param str id: id of the hook to get (required) :return: None If the method is called asynchronously, returns the request thread. @@ -2449,22 +2687,22 @@ def repo_delete_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E5 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_delete_key" % key + " to method repo_delete_git_hook" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_delete_key`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_git_hook`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_delete_key`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_git_hook`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `repo_delete_key`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_delete_git_hook`") # noqa: E501 collection_formats = {} @@ -2486,7 +2724,7 @@ def repo_delete_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E5 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'text/html']) # noqa: E501 + ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 @@ -2496,7 +2734,7 @@ def repo_delete_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E5 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/keys/{id}', 'DELETE', + '/repos/{owner}/{repo}/hooks/git/{id}', 'DELETE', path_params, query_params, header_params, @@ -2511,41 +2749,41 @@ def repo_delete_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E5 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_delete_release(self, owner, repo, id, **kwargs): # noqa: E501 - """Delete a release # noqa: E501 + def repo_delete_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a hook in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_release(owner, repo, id, async_req=True) + >>> thread = api.repo_delete_hook(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the release to delete (required) + :param int id: id of the hook to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_delete_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.repo_delete_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: - (data) = self.repo_delete_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.repo_delete_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data - def repo_delete_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Delete a release # noqa: E501 + def repo_delete_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a hook in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_release_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.repo_delete_hook_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the release to delete (required) + :param int id: id of the hook to delete (required) :return: None If the method is called asynchronously, returns the request thread. @@ -2562,22 +2800,22 @@ def repo_delete_release_with_http_info(self, owner, repo, id, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_delete_release" % key + " to method repo_delete_hook" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_hook`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_hook`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `repo_delete_release`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_delete_hook`") # noqa: E501 collection_formats = {} @@ -2599,7 +2837,7 @@ def repo_delete_release_with_http_info(self, owner, repo, id, **kwargs): # noqa body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'text/html']) # noqa: E501 + ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 @@ -2609,7 +2847,7 @@ def repo_delete_release_with_http_info(self, owner, repo, id, **kwargs): # noqa auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/releases/{id}', 'DELETE', + '/repos/{owner}/{repo}/hooks/{id}', 'DELETE', path_params, query_params, header_params, @@ -2624,49 +2862,47 @@ def repo_delete_release_with_http_info(self, owner, repo, id, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_delete_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 - """Delete a release attachment # noqa: E501 + def repo_delete_key(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a key from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_release_attachment(owner, repo, id, attachment_id, async_req=True) + >>> thread = api.repo_delete_key(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the release (required) - :param int attachment_id: id of the attachment to delete (required) + :param int id: id of the key to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + return self.repo_delete_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: - (data) = self.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + (data) = self.repo_delete_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data - def repo_delete_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 - """Delete a release attachment # noqa: E501 + def repo_delete_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a key from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) + >>> thread = api.repo_delete_key_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the release (required) - :param int attachment_id: id of the attachment to delete (required) + :param int id: id of the key to delete (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id', 'attachment_id'] # noqa: E501 + all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2677,26 +2913,22 @@ def repo_delete_release_attachment_with_http_info(self, owner, repo, id, attachm if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_delete_release_attachment" % key + " to method repo_delete_key" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release_attachment`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_key`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release_attachment`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_key`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `repo_delete_release_attachment`") # noqa: E501 - # verify the required parameter 'attachment_id' is set - if ('attachment_id' not in params or - params['attachment_id'] is None): - raise ValueError("Missing the required parameter `attachment_id` when calling `repo_delete_release_attachment`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_delete_key`") # noqa: E501 collection_formats = {} @@ -2707,8 +2939,6 @@ def repo_delete_release_attachment_with_http_info(self, owner, repo, id, attachm path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 - if 'attachment_id' in params: - path_params['attachment_id'] = params['attachment_id'] # noqa: E501 query_params = [] @@ -2720,7 +2950,7 @@ def repo_delete_release_attachment_with_http_info(self, owner, repo, id, attachm body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 + ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 @@ -2730,7 +2960,7 @@ def repo_delete_release_attachment_with_http_info(self, owner, repo, id, attachm auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'DELETE', + '/repos/{owner}/{repo}/keys/{id}', 'DELETE', path_params, query_params, header_params, @@ -2745,47 +2975,49 @@ def repo_delete_release_attachment_with_http_info(self, owner, repo, id, attachm _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_delete_topic(self, owner, repo, topic, **kwargs): # noqa: E501 - """Delete a topic from a repository # noqa: E501 + def repo_delete_pull_review(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete a specific review from a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_topic(owner, repo, topic, async_req=True) + >>> thread = api.repo_delete_pull_review(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str topic: name of the topic to delete (required) + :param int index: index of the pull request (required) + :param int id: id of the review (required) :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_delete_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 + return self.repo_delete_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 else: - (data) = self.repo_delete_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 + (data) = self.repo_delete_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 return data - def repo_delete_topic_with_http_info(self, owner, repo, topic, **kwargs): # noqa: E501 - """Delete a topic from a repository # noqa: E501 + def repo_delete_pull_review_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Delete a specific review from a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_delete_topic_with_http_info(owner, repo, topic, async_req=True) + >>> thread = api.repo_delete_pull_review_with_http_info(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str topic: name of the topic to delete (required) + :param int index: index of the pull request (required) + :param int id: id of the review (required) :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'topic'] # noqa: E501 + all_params = ['owner', 'repo', 'index', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2796,22 +3028,26 @@ def repo_delete_topic_with_http_info(self, owner, repo, topic, **kwargs): # noq if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_delete_topic" % key + " to method repo_delete_pull_review" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_delete_topic`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_pull_review`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_delete_topic`") # noqa: E501 - # verify the required parameter 'topic' is set - if ('topic' not in params or - params['topic'] is None): - raise ValueError("Missing the required parameter `topic` when calling `repo_delete_topic`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `repo_delete_pull_review`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `repo_delete_pull_review`") # noqa: E501 collection_formats = {} @@ -2820,8 +3056,10 @@ def repo_delete_topic_with_http_info(self, owner, repo, topic, **kwargs): # noq path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'topic' in params: - path_params['topic'] = params['topic'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] @@ -2843,7 +3081,7 @@ def repo_delete_topic_with_http_info(self, owner, repo, topic, **kwargs): # noq auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/topics/{topic}', 'DELETE', + '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}', 'DELETE', path_params, query_params, header_params, @@ -2858,47 +3096,47 @@ def repo_delete_topic_with_http_info(self, owner, repo, topic, **kwargs): # noq _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_edit(self, owner, repo, **kwargs): # noqa: E501 - """Edit a repository's properties. Only fields that are set will be changed. # noqa: E501 + def repo_delete_release(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_edit(owner, repo, async_req=True) + >>> thread = api.repo_delete_release(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool - :param str owner: owner of the repo to edit (required) - :param str repo: name of the repo to edit (required) - :param EditRepoOption body: Properties of a repo that you can edit - :return: Repository + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release to delete (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_edit_with_http_info(owner, repo, **kwargs) # noqa: E501 + return self.repo_delete_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: - (data) = self.repo_edit_with_http_info(owner, repo, **kwargs) # noqa: E501 + (data) = self.repo_delete_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data - def repo_edit_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """Edit a repository's properties. Only fields that are set will be changed. # noqa: E501 + def repo_delete_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Delete a release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_edit_with_http_info(owner, repo, async_req=True) + >>> thread = api.repo_delete_release_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool - :param str owner: owner of the repo to edit (required) - :param str repo: name of the repo to edit (required) - :param EditRepoOption body: Properties of a repo that you can edit - :return: Repository + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the release to delete (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'body'] # noqa: E501 + all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2909,18 +3147,22 @@ def repo_edit_with_http_info(self, owner, repo, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_edit" % key + " to method repo_delete_release" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_edit`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_edit`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `repo_delete_release`") # noqa: E501 collection_formats = {} @@ -2929,6 +3171,8 @@ def repo_edit_with_http_info(self, owner, repo, **kwargs): # noqa: E501 path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] @@ -2938,11 +3182,9 @@ def repo_edit_with_http_info(self, owner, repo, **kwargs): # noqa: E501 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 + ['application/json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 @@ -2952,14 +3194,14 @@ def repo_edit_with_http_info(self, owner, repo, **kwargs): # noqa: E501 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}', 'PATCH', + '/repos/{owner}/{repo}/releases/{id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Repository', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -2967,49 +3209,49 @@ def repo_edit_with_http_info(self, owner, repo, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_edit_git_hook(self, owner, repo, id, **kwargs): # noqa: E501 - """Edit a Git hook in a repository # noqa: E501 + def repo_delete_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Delete a release attachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_edit_git_hook(owner, repo, id, async_req=True) + >>> thread = api.repo_delete_release_attachment(owner, repo, id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str id: id of the hook to get (required) - :param EditGitHookOption body: - :return: GitHook + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to delete (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_edit_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 else: - (data) = self.repo_edit_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 return data - def repo_edit_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Edit a Git hook in a repository # noqa: E501 + def repo_delete_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Delete a release attachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_edit_git_hook_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.repo_delete_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str id: id of the hook to get (required) - :param EditGitHookOption body: - :return: GitHook + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to delete (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 + all_params = ['owner', 'repo', 'id', 'attachment_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3020,22 +3262,26 @@ def repo_edit_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_edit_git_hook" % key + " to method repo_delete_release_attachment" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_edit_git_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_release_attachment`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_edit_git_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_release_attachment`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `repo_edit_git_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_delete_release_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if ('attachment_id' not in params or + params['attachment_id'] is None): + raise ValueError("Missing the required parameter `attachment_id` when calling `repo_delete_release_attachment`") # noqa: E501 collection_formats = {} @@ -3046,6 +3292,8 @@ def repo_edit_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_id'] # noqa: E501 query_params = [] @@ -3055,8 +3303,6 @@ def repo_edit_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -3069,14 +3315,14 @@ def repo_edit_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/hooks/git/{id}', 'PATCH', + '/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='GitHook', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3084,49 +3330,47 @@ def repo_edit_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_edit_hook(self, owner, repo, id, **kwargs): # noqa: E501 - """Edit a hook in a repository # noqa: E501 + def repo_delete_topic(self, owner, repo, topic, **kwargs): # noqa: E501 + """Delete a topic from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_edit_hook(owner, repo, id, async_req=True) + >>> thread = api.repo_delete_topic(owner, repo, topic, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: index of the hook (required) - :param EditHookOption body: - :return: Hook + :param str topic: name of the topic to delete (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_edit_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.repo_delete_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 else: - (data) = self.repo_edit_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.repo_delete_topic_with_http_info(owner, repo, topic, **kwargs) # noqa: E501 return data - def repo_edit_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Edit a hook in a repository # noqa: E501 + def repo_delete_topic_with_http_info(self, owner, repo, topic, **kwargs): # noqa: E501 + """Delete a topic from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_edit_hook_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.repo_delete_topic_with_http_info(owner, repo, topic, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: index of the hook (required) - :param EditHookOption body: - :return: Hook + :param str topic: name of the topic to delete (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 + all_params = ['owner', 'repo', 'topic'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3137,22 +3381,22 @@ def repo_edit_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E50 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_edit_hook" % key + " to method repo_delete_topic" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_edit_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_delete_topic`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_edit_hook`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `repo_edit_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_delete_topic`") # noqa: E501 + # verify the required parameter 'topic' is set + if ('topic' not in params or + params['topic'] is None): + raise ValueError("Missing the required parameter `topic` when calling `repo_delete_topic`") # noqa: E501 collection_formats = {} @@ -3161,8 +3405,8 @@ def repo_edit_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E50 path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 + if 'topic' in params: + path_params['topic'] = params['topic'] # noqa: E501 query_params = [] @@ -3172,8 +3416,6 @@ def repo_edit_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E50 local_var_files = {} body_params = None - if 'body' in params: - body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -3186,14 +3428,14 @@ def repo_edit_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E50 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/hooks/{id}', 'PATCH', + '/repos/{owner}/{repo}/topics/{topic}', 'DELETE', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Hook', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3201,49 +3443,47 @@ def repo_edit_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E50 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_edit_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 - """Update a pull request # noqa: E501 + def repo_edit(self, owner, repo, **kwargs): # noqa: E501 + """Edit a repository's properties. Only fields that are set will be changed. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_edit_pull_request(owner, repo, index, async_req=True) + >>> thread = api.repo_edit(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool - :param str owner: owner of the repo (required) - :param str repo: name of the repo (required) - :param int index: index of the pull request to edit (required) - :param EditPullRequestOption body: - :return: PullRequest + :param str owner: owner of the repo to edit (required) + :param str repo: name of the repo to edit (required) + :param EditRepoOption body: Properties of a repo that you can edit + :return: Repository If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_edit_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return self.repo_edit_with_http_info(owner, repo, **kwargs) # noqa: E501 else: - (data) = self.repo_edit_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + (data) = self.repo_edit_with_http_info(owner, repo, **kwargs) # noqa: E501 return data - def repo_edit_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 - """Update a pull request # noqa: E501 + def repo_edit_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Edit a repository's properties. Only fields that are set will be changed. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_edit_pull_request_with_http_info(owner, repo, index, async_req=True) + >>> thread = api.repo_edit_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool - :param str owner: owner of the repo (required) - :param str repo: name of the repo (required) - :param int index: index of the pull request to edit (required) - :param EditPullRequestOption body: - :return: PullRequest + :param str owner: owner of the repo to edit (required) + :param str repo: name of the repo to edit (required) + :param EditRepoOption body: Properties of a repo that you can edit + :return: Repository If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501 + all_params = ['owner', 'repo', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3254,22 +3494,18 @@ def repo_edit_pull_request_with_http_info(self, owner, repo, index, **kwargs): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_edit_pull_request" % key + " to method repo_edit" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_edit_pull_request`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_edit_pull_request`") # noqa: E501 - # verify the required parameter 'index' is set - if ('index' not in params or - params['index'] is None): - raise ValueError("Missing the required parameter `index` when calling `repo_edit_pull_request`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit`") # noqa: E501 collection_formats = {} @@ -3278,8 +3514,6 @@ def repo_edit_pull_request_with_http_info(self, owner, repo, index, **kwargs): path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'index' in params: - path_params['index'] = params['index'] # noqa: E501 query_params = [] @@ -3297,20 +3531,20 @@ def repo_edit_pull_request_with_http_info(self, owner, repo, index, **kwargs): # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/pulls/{index}', 'PATCH', + '/repos/{owner}/{repo}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PullRequest', # noqa: E501 + response_type='Repository', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3318,49 +3552,49 @@ def repo_edit_pull_request_with_http_info(self, owner, repo, index, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_edit_release(self, owner, repo, id, **kwargs): # noqa: E501 - """Update a release # noqa: E501 + def repo_edit_branch_protection(self, owner, repo, name, **kwargs): # noqa: E501 + """Edit a branch protections for a repository. Only fields that are set will be changed # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_edit_release(owner, repo, id, async_req=True) + >>> thread = api.repo_edit_branch_protection(owner, repo, name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the release to edit (required) - :param EditReleaseOption body: - :return: Release + :param str name: name of protected branch (required) + :param EditBranchProtectionOption body: + :return: BranchProtection If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_edit_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.repo_edit_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 else: - (data) = self.repo_edit_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.repo_edit_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 return data - def repo_edit_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Update a release # noqa: E501 + def repo_edit_branch_protection_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 + """Edit a branch protections for a repository. Only fields that are set will be changed # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_edit_release_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.repo_edit_branch_protection_with_http_info(owner, repo, name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the release to edit (required) - :param EditReleaseOption body: - :return: Release + :param str name: name of protected branch (required) + :param EditBranchProtectionOption body: + :return: BranchProtection If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 + all_params = ['owner', 'repo', 'name', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3371,22 +3605,22 @@ def repo_edit_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_edit_release" % key + " to method repo_edit_branch_protection" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_edit_release`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_branch_protection`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_edit_release`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `repo_edit_release`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_branch_protection`") # noqa: E501 + # verify the required parameter 'name' is set + if ('name' not in params or + params['name'] is None): + raise ValueError("Missing the required parameter `name` when calling `repo_edit_branch_protection`") # noqa: E501 collection_formats = {} @@ -3395,8 +3629,8 @@ def repo_edit_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 query_params = [] @@ -3420,14 +3654,14 @@ def repo_edit_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/releases/{id}', 'PATCH', + '/repos/{owner}/{repo}/branch_protections/{name}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Release', # noqa: E501 + response_type='BranchProtection', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3435,51 +3669,49 @@ def repo_edit_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_edit_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 - """Edit a release attachment # noqa: E501 + def repo_edit_git_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a Git hook in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_edit_release_attachment(owner, repo, id, attachment_id, async_req=True) + >>> thread = api.repo_edit_git_hook(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the release (required) - :param int attachment_id: id of the attachment to edit (required) - :param EditAttachmentOptions body: - :return: Attachment + :param str id: id of the hook to get (required) + :param EditGitHookOption body: + :return: GitHook If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + return self.repo_edit_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: - (data) = self.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + (data) = self.repo_edit_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data - def repo_edit_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 - """Edit a release attachment # noqa: E501 - + def repo_edit_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a Git hook in a repository # noqa: E501 + This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) + >>> thread = api.repo_edit_git_hook_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the release (required) - :param int attachment_id: id of the attachment to edit (required) - :param EditAttachmentOptions body: - :return: Attachment + :param str id: id of the hook to get (required) + :param EditGitHookOption body: + :return: GitHook If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id', 'attachment_id', 'body'] # noqa: E501 + all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3490,26 +3722,22 @@ def repo_edit_release_attachment_with_http_info(self, owner, repo, id, attachmen if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_edit_release_attachment" % key + " to method repo_edit_git_hook" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_edit_release_attachment`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_git_hook`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_edit_release_attachment`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_git_hook`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `repo_edit_release_attachment`") # noqa: E501 - # verify the required parameter 'attachment_id' is set - if ('attachment_id' not in params or - params['attachment_id'] is None): - raise ValueError("Missing the required parameter `attachment_id` when calling `repo_edit_release_attachment`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_edit_git_hook`") # noqa: E501 collection_formats = {} @@ -3520,8 +3748,6 @@ def repo_edit_release_attachment_with_http_info(self, owner, repo, id, attachmen path_params['repo'] = params['repo'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 - if 'attachment_id' in params: - path_params['attachment_id'] = params['attachment_id'] # noqa: E501 query_params = [] @@ -3539,20 +3765,20 @@ def repo_edit_release_attachment_with_http_info(self, owner, repo, id, attachmen # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json']) # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'PATCH', + '/repos/{owner}/{repo}/hooks/git/{id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Attachment', # noqa: E501 + response_type='GitHook', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3560,45 +3786,49 @@ def repo_edit_release_attachment_with_http_info(self, owner, repo, id, attachmen _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get(self, owner, repo, **kwargs): # noqa: E501 - """Get a repository # noqa: E501 + def repo_edit_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a hook in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get(owner, repo, async_req=True) + >>> thread = api.repo_edit_hook(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :return: Repository + :param int id: index of the hook (required) + :param EditHookOption body: + :return: Hook If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_with_http_info(owner, repo, **kwargs) # noqa: E501 + return self.repo_edit_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: - (data) = self.repo_get_with_http_info(owner, repo, **kwargs) # noqa: E501 + (data) = self.repo_edit_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data - def repo_get_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """Get a repository # noqa: E501 + def repo_edit_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Edit a hook in a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_with_http_info(owner, repo, async_req=True) + >>> thread = api.repo_edit_hook_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :return: Repository + :param int id: index of the hook (required) + :param EditHookOption body: + :return: Hook If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo'] # noqa: E501 + all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3609,18 +3839,22 @@ def repo_get_with_http_info(self, owner, repo, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get" % key + " to method repo_edit_hook" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_hook`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `repo_edit_hook`") # noqa: E501 collection_formats = {} @@ -3629,6 +3863,8 @@ def repo_get_with_http_info(self, owner, repo, **kwargs): # noqa: E501 path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] @@ -3638,6 +3874,8 @@ def repo_get_with_http_info(self, owner, repo, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -3650,14 +3888,14 @@ def repo_get_with_http_info(self, owner, repo, **kwargs): # noqa: E501 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}', 'GET', + '/repos/{owner}/{repo}/hooks/{id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Repository', # noqa: E501 + response_type='Hook', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3665,49 +3903,49 @@ def repo_get_with_http_info(self, owner, repo, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_all_commits(self, owner, repo, **kwargs): # noqa: E501 - """Get a list of all commits from a repository # noqa: E501 + def repo_edit_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 + """Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_all_commits(owner, repo, async_req=True) + >>> thread = api.repo_edit_pull_request(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str sha: SHA or branch to start listing commits from (usually 'master') - :param int page: page number of requested commits - :return: list[Commit] + :param int index: index of the pull request to edit (required) + :param EditPullRequestOption body: + :return: PullRequest If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_all_commits_with_http_info(owner, repo, **kwargs) # noqa: E501 + return self.repo_edit_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: - (data) = self.repo_get_all_commits_with_http_info(owner, repo, **kwargs) # noqa: E501 + (data) = self.repo_edit_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data - def repo_get_all_commits_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """Get a list of all commits from a repository # noqa: E501 + def repo_edit_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_all_commits_with_http_info(owner, repo, async_req=True) + >>> thread = api.repo_edit_pull_request_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str sha: SHA or branch to start listing commits from (usually 'master') - :param int page: page number of requested commits - :return: list[Commit] + :param int index: index of the pull request to edit (required) + :param EditPullRequestOption body: + :return: PullRequest If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'sha', 'page'] # noqa: E501 + all_params = ['owner', 'repo', 'index', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3718,18 +3956,22 @@ def repo_get_all_commits_with_http_info(self, owner, repo, **kwargs): # noqa: E if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_all_commits" % key + " to method repo_edit_pull_request" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get_all_commits`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_pull_request`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get_all_commits`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_pull_request`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `repo_edit_pull_request`") # noqa: E501 collection_formats = {} @@ -3738,12 +3980,10 @@ def repo_get_all_commits_with_http_info(self, owner, repo, **kwargs): # noqa: E path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 query_params = [] - if 'sha' in params: - query_params.append(('sha', params['sha'])) # noqa: E501 - if 'page' in params: - query_params.append(('page', params['page'])) # noqa: E501 header_params = {} @@ -3751,26 +3991,28 @@ def repo_get_all_commits_with_http_info(self, owner, repo, **kwargs): # noqa: E local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json', 'text/plain']) # noqa: E501 + ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/commits', 'GET', + '/repos/{owner}/{repo}/pulls/{index}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Commit]', # noqa: E501 + response_type='PullRequest', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -3778,47 +4020,49 @@ def repo_get_all_commits_with_http_info(self, owner, repo, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_archive(self, owner, repo, archive, **kwargs): # noqa: E501 - """Get an archive of a repository # noqa: E501 + def repo_edit_release(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_archive(owner, repo, archive, async_req=True) + >>> thread = api.repo_edit_release(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str archive: archive to download, consisting of a git reference and archive (required) - :return: None + :param int id: id of the release to edit (required) + :param EditReleaseOption body: + :return: Release If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_archive_with_http_info(owner, repo, archive, **kwargs) # noqa: E501 + return self.repo_edit_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: - (data) = self.repo_get_archive_with_http_info(owner, repo, archive, **kwargs) # noqa: E501 + (data) = self.repo_edit_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data - def repo_get_archive_with_http_info(self, owner, repo, archive, **kwargs): # noqa: E501 - """Get an archive of a repository # noqa: E501 + def repo_edit_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Update a release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_archive_with_http_info(owner, repo, archive, async_req=True) + >>> thread = api.repo_edit_release_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str archive: archive to download, consisting of a git reference and archive (required) - :return: None + :param int id: id of the release to edit (required) + :param EditReleaseOption body: + :return: Release If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'archive'] # noqa: E501 + all_params = ['owner', 'repo', 'id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3829,22 +4073,22 @@ def repo_get_archive_with_http_info(self, owner, repo, archive, **kwargs): # no if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_archive" % key + " to method repo_edit_release" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get_archive`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_release`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get_archive`") # noqa: E501 - # verify the required parameter 'archive' is set - if ('archive' not in params or - params['archive'] is None): - raise ValueError("Missing the required parameter `archive` when calling `repo_get_archive`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_release`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `repo_edit_release`") # noqa: E501 collection_formats = {} @@ -3853,8 +4097,8 @@ def repo_get_archive_with_http_info(self, owner, repo, archive, **kwargs): # no path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'archive' in params: - path_params['archive'] = params['archive'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] @@ -3864,74 +4108,80 @@ def repo_get_archive_with_http_info(self, owner, repo, archive, **kwargs): # no local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json', 'application/octet-stream']) # noqa: E501 + ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json', 'text/plain']) # noqa: E501 + ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/archive/{archive}', 'GET', + '/repos/{owner}/{repo}/releases/{id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='Release', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', False), + _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_branch(self, owner, repo, branch, **kwargs): # noqa: E501 - """Retrieve a specific branch from a repository # noqa: E501 + def repo_edit_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Edit a release attachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_branch(owner, repo, branch, async_req=True) + >>> thread = api.repo_edit_release_attachment(owner, repo, id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str branch: branch to get (required) - :return: Branch + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to edit (required) + :param EditAttachmentOptions body: + :return: Attachment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + return self.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 else: - (data) = self.repo_get_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 + (data) = self.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 return data - def repo_get_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa: E501 - """Retrieve a specific branch from a repository # noqa: E501 + def repo_edit_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Edit a release attachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_branch_with_http_info(owner, repo, branch, async_req=True) + >>> thread = api.repo_edit_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str branch: branch to get (required) - :return: Branch + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to edit (required) + :param EditAttachmentOptions body: + :return: Attachment If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'branch'] # noqa: E501 + all_params = ['owner', 'repo', 'id', 'attachment_id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3942,22 +4192,26 @@ def repo_get_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_branch" % key + " to method repo_edit_release_attachment" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get_branch`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_edit_release_attachment`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get_branch`") # noqa: E501 - # verify the required parameter 'branch' is set - if ('branch' not in params or - params['branch'] is None): - raise ValueError("Missing the required parameter `branch` when calling `repo_get_branch`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_edit_release_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `repo_edit_release_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if ('attachment_id' not in params or + params['attachment_id'] is None): + raise ValueError("Missing the required parameter `attachment_id` when calling `repo_edit_release_attachment`") # noqa: E501 collection_formats = {} @@ -3966,8 +4220,10 @@ def repo_get_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'branch' in params: - path_params['branch'] = params['branch'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_id'] # noqa: E501 query_params = [] @@ -3977,26 +4233,28 @@ def repo_get_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 - ['application/json', 'text/plain']) # noqa: E501 + ['application/json']) # noqa: E501 # Authentication setting auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/branches/{branch}', 'GET', + '/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Branch', # noqa: E501 + response_type='Attachment', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -4004,43 +4262,45 @@ def repo_get_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_by_id(self, id, **kwargs): # noqa: E501 - """Get a repository by id # noqa: E501 + def repo_get(self, owner, repo, **kwargs): # noqa: E501 + """Get a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_by_id(id, async_req=True) + >>> thread = api.repo_get(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool - :param int id: id of the repo to get (required) + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) :return: Repository If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_by_id_with_http_info(id, **kwargs) # noqa: E501 + return self.repo_get_with_http_info(owner, repo, **kwargs) # noqa: E501 else: - (data) = self.repo_get_by_id_with_http_info(id, **kwargs) # noqa: E501 + (data) = self.repo_get_with_http_info(owner, repo, **kwargs) # noqa: E501 return data - def repo_get_by_id_with_http_info(self, id, **kwargs): # noqa: E501 - """Get a repository by id # noqa: E501 + def repo_get_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_by_id_with_http_info(id, async_req=True) + >>> thread = api.repo_get_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool - :param int id: id of the repo to get (required) + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) :return: Repository If the method is called asynchronously, returns the request thread. """ - all_params = ['id'] # noqa: E501 + all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -4051,20 +4311,26 @@ def repo_get_by_id_with_http_info(self, id, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_by_id" % key + " to method repo_get" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `repo_get_by_id`") # noqa: E501 + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get`") # noqa: E501 collection_formats = {} path_params = {} - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 query_params = [] @@ -4086,7 +4352,7 @@ def repo_get_by_id_with_http_info(self, id, **kwargs): # noqa: E501 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repositories/{id}', 'GET', + '/repos/{owner}/{repo}', 'GET', path_params, query_params, header_params, @@ -4101,49 +4367,51 @@ def repo_get_by_id_with_http_info(self, id, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_combined_status_by_ref(self, owner, repo, ref, **kwargs): # noqa: E501 - """Get a commit's combined status, by branch/tag/commit reference # noqa: E501 + def repo_get_all_commits(self, owner, repo, **kwargs): # noqa: E501 + """Get a list of all commits from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_combined_status_by_ref(owner, repo, ref, async_req=True) + >>> thread = api.repo_get_all_commits(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str ref: name of branch/tag/commit (required) - :param int page: page number of results - :return: Status + :param str sha: SHA or branch to start listing commits from (usually 'master') + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[Commit] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + return self.repo_get_all_commits_with_http_info(owner, repo, **kwargs) # noqa: E501 else: - (data) = self.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + (data) = self.repo_get_all_commits_with_http_info(owner, repo, **kwargs) # noqa: E501 return data - def repo_get_combined_status_by_ref_with_http_info(self, owner, repo, ref, **kwargs): # noqa: E501 - """Get a commit's combined status, by branch/tag/commit reference # noqa: E501 + def repo_get_all_commits_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get a list of all commits from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, async_req=True) + >>> thread = api.repo_get_all_commits_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str ref: name of branch/tag/commit (required) - :param int page: page number of results - :return: Status + :param str sha: SHA or branch to start listing commits from (usually 'master') + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[Commit] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'ref', 'page'] # noqa: E501 + all_params = ['owner', 'repo', 'sha', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -4154,22 +4422,18 @@ def repo_get_combined_status_by_ref_with_http_info(self, owner, repo, ref, **kwa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_combined_status_by_ref" % key + " to method repo_get_all_commits" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get_combined_status_by_ref`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_all_commits`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get_combined_status_by_ref`") # noqa: E501 - # verify the required parameter 'ref' is set - if ('ref' not in params or - params['ref'] is None): - raise ValueError("Missing the required parameter `ref` when calling `repo_get_combined_status_by_ref`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_all_commits`") # noqa: E501 collection_formats = {} @@ -4178,12 +4442,14 @@ def repo_get_combined_status_by_ref_with_http_info(self, owner, repo, ref, **kwa path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'ref' in params: - path_params['ref'] = params['ref'] # noqa: E501 query_params = [] + if 'sha' in params: + query_params.append(('sha', params['sha'])) # noqa: E501 if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -4203,14 +4469,14 @@ def repo_get_combined_status_by_ref_with_http_info(self, owner, repo, ref, **kwa auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/commits/{ref}/statuses', 'GET', + '/repos/{owner}/{repo}/commits', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Status', # noqa: E501 + response_type='list[Commit]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -4218,49 +4484,47 @@ def repo_get_combined_status_by_ref_with_http_info(self, owner, repo, ref, **kwa _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_contents(self, owner, repo, filepath, **kwargs): # noqa: E501 - """Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir # noqa: E501 + def repo_get_archive(self, owner, repo, archive, **kwargs): # noqa: E501 + """Get an archive of a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_contents(owner, repo, filepath, async_req=True) + >>> thread = api.repo_get_archive(owner, repo, archive, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str filepath: path of the dir, file, symlink or submodule in the repo (required) - :param str ref: The name of the commit/branch/tag. Default the repository’s default branch (usually master) - :return: ContentsResponse + :param str archive: archive to download, consisting of a git reference and archive (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_contents_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + return self.repo_get_archive_with_http_info(owner, repo, archive, **kwargs) # noqa: E501 else: - (data) = self.repo_get_contents_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + (data) = self.repo_get_archive_with_http_info(owner, repo, archive, **kwargs) # noqa: E501 return data - def repo_get_contents_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 - """Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir # noqa: E501 + def repo_get_archive_with_http_info(self, owner, repo, archive, **kwargs): # noqa: E501 + """Get an archive of a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_contents_with_http_info(owner, repo, filepath, async_req=True) + >>> thread = api.repo_get_archive_with_http_info(owner, repo, archive, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str filepath: path of the dir, file, symlink or submodule in the repo (required) - :param str ref: The name of the commit/branch/tag. Default the repository’s default branch (usually master) - :return: ContentsResponse + :param str archive: archive to download, consisting of a git reference and archive (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'filepath', 'ref'] # noqa: E501 + all_params = ['owner', 'repo', 'archive'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -4271,22 +4535,22 @@ def repo_get_contents_with_http_info(self, owner, repo, filepath, **kwargs): # if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_contents" % key + " to method repo_get_archive" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get_contents`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_archive`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get_contents`") # noqa: E501 - # verify the required parameter 'filepath' is set - if ('filepath' not in params or - params['filepath'] is None): - raise ValueError("Missing the required parameter `filepath` when calling `repo_get_contents`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_archive`") # noqa: E501 + # verify the required parameter 'archive' is set + if ('archive' not in params or + params['archive'] is None): + raise ValueError("Missing the required parameter `archive` when calling `repo_get_archive`") # noqa: E501 collection_formats = {} @@ -4295,12 +4559,10 @@ def repo_get_contents_with_http_info(self, owner, repo, filepath, **kwargs): # path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'filepath' in params: - path_params['filepath'] = params['filepath'] # noqa: E501 + if 'archive' in params: + path_params['archive'] = params['archive'] # noqa: E501 query_params = [] - if 'ref' in params: - query_params.append(('ref', params['ref'])) # noqa: E501 header_params = {} @@ -4320,14 +4582,14 @@ def repo_get_contents_with_http_info(self, owner, repo, filepath, **kwargs): # auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/contents/{filepath}', 'GET', + '/repos/{owner}/{repo}/archive/{archive}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ContentsResponse', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -4335,47 +4597,47 @@ def repo_get_contents_with_http_info(self, owner, repo, filepath, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_contents_list(self, owner, repo, **kwargs): # noqa: E501 - """Gets the metadata of all the entries of the root dir # noqa: E501 + def repo_get_branch(self, owner, repo, branch, **kwargs): # noqa: E501 + """Retrieve a specific branch from a repository, including its effective branch protection # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_contents_list(owner, repo, async_req=True) + >>> thread = api.repo_get_branch(owner, repo, branch, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str ref: The name of the commit/branch/tag. Default the repository’s default branch (usually master) - :return: list[ContentsResponse] + :param str branch: branch to get (required) + :return: Branch If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_contents_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return self.repo_get_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 else: - (data) = self.repo_get_contents_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + (data) = self.repo_get_branch_with_http_info(owner, repo, branch, **kwargs) # noqa: E501 return data - def repo_get_contents_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """Gets the metadata of all the entries of the root dir # noqa: E501 + def repo_get_branch_with_http_info(self, owner, repo, branch, **kwargs): # noqa: E501 + """Retrieve a specific branch from a repository, including its effective branch protection # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_contents_list_with_http_info(owner, repo, async_req=True) + >>> thread = api.repo_get_branch_with_http_info(owner, repo, branch, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str ref: The name of the commit/branch/tag. Default the repository’s default branch (usually master) - :return: list[ContentsResponse] + :param str branch: branch to get (required) + :return: Branch If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'ref'] # noqa: E501 + all_params = ['owner', 'repo', 'branch'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -4386,18 +4648,22 @@ def repo_get_contents_list_with_http_info(self, owner, repo, **kwargs): # noqa: if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_contents_list" % key + " to method repo_get_branch" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get_contents_list`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_branch`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get_contents_list`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_branch`") # noqa: E501 + # verify the required parameter 'branch' is set + if ('branch' not in params or + params['branch'] is None): + raise ValueError("Missing the required parameter `branch` when calling `repo_get_branch`") # noqa: E501 collection_formats = {} @@ -4406,10 +4672,10 @@ def repo_get_contents_list_with_http_info(self, owner, repo, **kwargs): # noqa: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 + if 'branch' in params: + path_params['branch'] = params['branch'] # noqa: E501 query_params = [] - if 'ref' in params: - query_params.append(('ref', params['ref'])) # noqa: E501 header_params = {} @@ -4429,14 +4695,14 @@ def repo_get_contents_list_with_http_info(self, owner, repo, **kwargs): # noqa: auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/contents', 'GET', + '/repos/{owner}/{repo}/branches/{branch}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[ContentsResponse]', # noqa: E501 + response_type='Branch', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -4444,47 +4710,1052 @@ def repo_get_contents_list_with_http_info(self, owner, repo, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_editor_config(self, owner, repo, filepath, **kwargs): # noqa: E501 - """Get the EditorConfig definitions of a file in a repository # noqa: E501 + def repo_get_branch_protection(self, owner, repo, name, **kwargs): # noqa: E501 + """Get a specific branch protection for the repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_editor_config(owner, repo, filepath, async_req=True) + >>> thread = api.repo_get_branch_protection(owner, repo, name, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str filepath: filepath of file to get (required) - :return: None + :param str name: name of protected branch (required) + :return: BranchProtection + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_branch_protection_with_http_info(owner, repo, name, **kwargs) # noqa: E501 + return data + + def repo_get_branch_protection_with_http_info(self, owner, repo, name, **kwargs): # noqa: E501 + """Get a specific branch protection for the repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_branch_protection_with_http_info(owner, repo, name, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str name: name of protected branch (required) + :return: BranchProtection + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'name'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method repo_get_branch_protection" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_branch_protection`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_branch_protection`") # noqa: E501 + # verify the required parameter 'name' is set + if ('name' not in params or + params['name'] is None): + raise ValueError("Missing the required parameter `name` when calling `repo_get_branch_protection`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'name' in params: + path_params['name'] = params['name'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/branch_protections/{name}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='BranchProtection', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_get_by_id(self, id, **kwargs): # noqa: E501 + """Get a repository by id # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_by_id(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the repo to get (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_by_id_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_by_id_with_http_info(id, **kwargs) # noqa: E501 + return data + + def repo_get_by_id_with_http_info(self, id, **kwargs): # noqa: E501 + """Get a repository by id # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_by_id_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: id of the repo to get (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method repo_get_by_id" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `repo_get_by_id`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repositories/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_get_combined_status_by_ref(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get a commit's combined status, by branch/tag/commit reference # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_combined_status_by_ref(owner, repo, ref, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: name of branch/tag/commit (required) + :param int page: page number of results + :return: Status + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 + return data + + def repo_get_combined_status_by_ref_with_http_info(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get a commit's combined status, by branch/tag/commit reference # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_combined_status_by_ref_with_http_info(owner, repo, ref, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: name of branch/tag/commit (required) + :param int page: page number of results + :return: Status + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'ref', 'page'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method repo_get_combined_status_by_ref" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_combined_status_by_ref`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_combined_status_by_ref`") # noqa: E501 + # verify the required parameter 'ref' is set + if ('ref' not in params or + params['ref'] is None): + raise ValueError("Missing the required parameter `ref` when calling `repo_get_combined_status_by_ref`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'ref' in params: + path_params['ref'] = params['ref'] # noqa: E501 + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/commits/{ref}/statuses', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Status', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_get_contents(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_contents(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the dir, file, symlink or submodule in the repo (required) + :param str ref: The name of the commit/branch/tag. Default the repository’s default branch (usually master) + :return: ContentsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_contents_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_contents_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + return data + + def repo_get_contents_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_contents_with_http_info(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: path of the dir, file, symlink or submodule in the repo (required) + :param str ref: The name of the commit/branch/tag. Default the repository’s default branch (usually master) + :return: ContentsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath', 'ref'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method repo_get_contents" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_contents`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_contents`") # noqa: E501 + # verify the required parameter 'filepath' is set + if ('filepath' not in params or + params['filepath'] is None): + raise ValueError("Missing the required parameter `filepath` when calling `repo_get_contents`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'filepath' in params: + path_params['filepath'] = params['filepath'] # noqa: E501 + + query_params = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/contents/{filepath}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ContentsResponse', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_get_contents_list(self, owner, repo, **kwargs): # noqa: E501 + """Gets the metadata of all the entries of the root dir # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_contents_list(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: The name of the commit/branch/tag. Default the repository’s default branch (usually master) + :return: list[ContentsResponse] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_contents_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_contents_list_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_get_contents_list_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Gets the metadata of all the entries of the root dir # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_contents_list_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str ref: The name of the commit/branch/tag. Default the repository’s default branch (usually master) + :return: list[ContentsResponse] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'ref'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method repo_get_contents_list" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_contents_list`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_contents_list`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'ref' in params: + query_params.append(('ref', params['ref'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/contents', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[ContentsResponse]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_get_editor_config(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get the EditorConfig definitions of a file in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_editor_config(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: filepath of file to get (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_editor_config_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_editor_config_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + return data + + def repo_get_editor_config_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get the EditorConfig definitions of a file in a repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_editor_config_with_http_info(owner, repo, filepath, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str filepath: filepath of file to get (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'filepath'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method repo_get_editor_config" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_editor_config`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_editor_config`") # noqa: E501 + # verify the required parameter 'filepath' is set + if ('filepath' not in params or + params['filepath'] is None): + raise ValueError("Missing the required parameter `filepath` when calling `repo_get_editor_config`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'filepath' in params: + path_params['filepath'] = params['filepath'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/editorconfig/{filepath}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_get_git_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a Git hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_git_hook(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str id: id of the hook to get (required) + :return: GitHook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_get_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a Git hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_git_hook_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str id: id of the hook to get (required) + :return: GitHook + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method repo_get_git_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_git_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_git_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `repo_get_git_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/git/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='GitHook', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_get_hook(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_hook(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the hook to get (required) + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_get_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a hook # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_hook_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the hook to get (required) + :return: Hook + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method repo_get_hook" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_hook`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_hook`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `repo_get_hook`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/hooks/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Hook', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_get_key(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a repository's key by id # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_key(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the key to get (required) + :return: DeployKey + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_get_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + else: + (data) = self.repo_get_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return data + + def repo_get_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a repository's key by id # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_key_with_http_info(owner, repo, id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int id: id of the key to get (required) + :return: DeployKey + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method repo_get_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_get_key`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_get_key`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `repo_get_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/keys/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='DeployKey', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_get_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 + """Get a pull request # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_get_pull_request(owner, repo, index, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int index: index of the pull request to get (required) + :return: PullRequest If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_editor_config_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + return self.repo_get_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: - (data) = self.repo_get_editor_config_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + (data) = self.repo_get_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data - def repo_get_editor_config_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 - """Get the EditorConfig definitions of a file in a repository # noqa: E501 + def repo_get_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """Get a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_editor_config_with_http_info(owner, repo, filepath, async_req=True) + >>> thread = api.repo_get_pull_request_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str filepath: filepath of file to get (required) - :return: None + :param int index: index of the pull request to get (required) + :return: PullRequest If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'filepath'] # noqa: E501 + all_params = ['owner', 'repo', 'index'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -4495,22 +5766,22 @@ def repo_get_editor_config_with_http_info(self, owner, repo, filepath, **kwargs) if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_editor_config" % key + " to method repo_get_pull_request" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get_editor_config`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get_editor_config`") # noqa: E501 - # verify the required parameter 'filepath' is set - if ('filepath' not in params or - params['filepath'] is None): - raise ValueError("Missing the required parameter `filepath` when calling `repo_get_editor_config`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_request`") # noqa: E501 collection_formats = {} @@ -4519,8 +5790,8 @@ def repo_get_editor_config_with_http_info(self, owner, repo, filepath, **kwargs) path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'filepath' in params: - path_params['filepath'] = params['filepath'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 query_params = [] @@ -4542,14 +5813,14 @@ def repo_get_editor_config_with_http_info(self, owner, repo, filepath, **kwargs) auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/editorconfig/{filepath}', 'GET', + '/repos/{owner}/{repo}/pulls/{index}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='PullRequest', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -4557,47 +5828,49 @@ def repo_get_editor_config_with_http_info(self, owner, repo, filepath, **kwargs) _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_git_hook(self, owner, repo, id, **kwargs): # noqa: E501 - """Get a Git hook # noqa: E501 + def repo_get_pull_review(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Get a specific review for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_git_hook(owner, repo, id, async_req=True) + >>> thread = api.repo_get_pull_review(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str id: id of the hook to get (required) - :return: GitHook + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :return: PullReview If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.repo_get_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 else: - (data) = self.repo_get_git_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.repo_get_pull_review_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 return data - def repo_get_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Get a Git hook # noqa: E501 + def repo_get_pull_review_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Get a specific review for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_git_hook_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.repo_get_pull_review_with_http_info(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str id: id of the hook to get (required) - :return: GitHook + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :return: PullReview If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params = ['owner', 'repo', 'index', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -4608,22 +5881,26 @@ def repo_get_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_git_hook" % key + " to method repo_get_pull_review" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get_git_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_review`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get_git_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_review`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `repo_get_git_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_pull_review`") # noqa: E501 collection_formats = {} @@ -4632,6 +5909,8 @@ def repo_get_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 @@ -4655,14 +5934,14 @@ def repo_get_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/hooks/git/{id}', 'GET', + '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='GitHook', # noqa: E501 + response_type='PullReview', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -4670,47 +5949,49 @@ def repo_get_git_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_hook(self, owner, repo, id, **kwargs): # noqa: E501 - """Get a hook # noqa: E501 + def repo_get_pull_review_comments(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Get a specific review for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_hook(owner, repo, id, async_req=True) + >>> thread = api.repo_get_pull_review_comments(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the hook to get (required) - :return: Hook + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :return: list[PullReviewComment] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.repo_get_pull_review_comments_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 else: - (data) = self.repo_get_hook_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.repo_get_pull_review_comments_with_http_info(owner, repo, index, id, **kwargs) # noqa: E501 return data - def repo_get_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Get a hook # noqa: E501 + def repo_get_pull_review_comments_with_http_info(self, owner, repo, index, id, **kwargs): # noqa: E501 + """Get a specific review for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_hook_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.repo_get_pull_review_comments_with_http_info(owner, repo, index, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the hook to get (required) - :return: Hook + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :return: list[PullReviewComment] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params = ['owner', 'repo', 'index', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -4721,22 +6002,26 @@ def repo_get_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_hook" % key + " to method repo_get_pull_review_comments" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_review_comments`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_review_comments`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_review_comments`") # noqa: E501 # verify the required parameter 'id' is set if ('id' not in params or params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `repo_get_hook`") # noqa: E501 + raise ValueError("Missing the required parameter `id` when calling `repo_get_pull_review_comments`") # noqa: E501 collection_formats = {} @@ -4745,6 +6030,8 @@ def repo_get_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 if 'id' in params: path_params['id'] = params['id'] # noqa: E501 @@ -4768,14 +6055,14 @@ def repo_get_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/hooks/{id}', 'GET', + '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Hook', # noqa: E501 + response_type='list[PullReviewComment]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -4783,47 +6070,47 @@ def repo_get_hook_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_key(self, owner, repo, id, **kwargs): # noqa: E501 - """Get a repository's key by id # noqa: E501 + def repo_get_raw_file(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get a file from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_key(owner, repo, id, async_req=True) + >>> thread = api.repo_get_raw_file(owner, repo, filepath, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the key to get (required) - :return: DeployKey + :param str filepath: filepath of the file to get (required) + :return: None If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.repo_get_raw_file_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 else: - (data) = self.repo_get_key_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.repo_get_raw_file_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 return data - def repo_get_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Get a repository's key by id # noqa: E501 + def repo_get_raw_file_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 + """Get a file from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_key_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.repo_get_raw_file_with_http_info(owner, repo, filepath, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the key to get (required) - :return: DeployKey + :param str filepath: filepath of the file to get (required) + :return: None If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params = ['owner', 'repo', 'filepath'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -4834,22 +6121,22 @@ def repo_get_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_key" % key + " to method repo_get_raw_file" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get_key`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_raw_file`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get_key`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `repo_get_key`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_raw_file`") # noqa: E501 + # verify the required parameter 'filepath' is set + if ('filepath' not in params or + params['filepath'] is None): + raise ValueError("Missing the required parameter `filepath` when calling `repo_get_raw_file`") # noqa: E501 collection_formats = {} @@ -4858,8 +6145,8 @@ def repo_get_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 + if 'filepath' in params: + path_params['filepath'] = params['filepath'] # noqa: E501 query_params = [] @@ -4881,14 +6168,14 @@ def repo_get_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/keys/{id}', 'GET', + '/repos/{owner}/{repo}/raw/{filepath}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='DeployKey', # noqa: E501 + response_type=None, # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -4896,47 +6183,47 @@ def repo_get_key_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_pull_request(self, owner, repo, index, **kwargs): # noqa: E501 - """Get a pull request # noqa: E501 + def repo_get_release(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_pull_request(owner, repo, index, async_req=True) + >>> thread = api.repo_get_release(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the pull request to get (required) - :return: PullRequest + :param int id: id of the release to get (required) + :return: Release If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + return self.repo_get_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 else: - (data) = self.repo_get_pull_request_with_http_info(owner, repo, index, **kwargs) # noqa: E501 + (data) = self.repo_get_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 return data - def repo_get_pull_request_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 - """Get a pull request # noqa: E501 + def repo_get_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 + """Get a release # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_pull_request_with_http_info(owner, repo, index, async_req=True) + >>> thread = api.repo_get_release_with_http_info(owner, repo, id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int index: index of the pull request to get (required) - :return: PullRequest + :param int id: id of the release to get (required) + :return: Release If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'index'] # noqa: E501 + all_params = ['owner', 'repo', 'id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -4947,22 +6234,22 @@ def repo_get_pull_request_with_http_info(self, owner, repo, index, **kwargs): # if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_pull_request" % key + " to method repo_get_release" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get_pull_request`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_release`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get_pull_request`") # noqa: E501 - # verify the required parameter 'index' is set - if ('index' not in params or - params['index'] is None): - raise ValueError("Missing the required parameter `index` when calling `repo_get_pull_request`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_release`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `repo_get_release`") # noqa: E501 collection_formats = {} @@ -4971,8 +6258,8 @@ def repo_get_pull_request_with_http_info(self, owner, repo, index, **kwargs): # path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'index' in params: - path_params['index'] = params['index'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] @@ -4994,14 +6281,14 @@ def repo_get_pull_request_with_http_info(self, owner, repo, index, **kwargs): # auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/pulls/{index}', 'GET', + '/repos/{owner}/{repo}/releases/{id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='PullRequest', # noqa: E501 + response_type='Release', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -5009,47 +6296,49 @@ def repo_get_pull_request_with_http_info(self, owner, repo, index, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_raw_file(self, owner, repo, filepath, **kwargs): # noqa: E501 - """Get a file from a repository # noqa: E501 + def repo_get_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Get a release attachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_raw_file(owner, repo, filepath, async_req=True) + >>> thread = api.repo_get_release_attachment(owner, repo, id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str filepath: filepath of the file to get (required) - :return: None + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to get (required) + :return: Attachment If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_raw_file_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + return self.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 else: - (data) = self.repo_get_raw_file_with_http_info(owner, repo, filepath, **kwargs) # noqa: E501 + (data) = self.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 return data - def repo_get_raw_file_with_http_info(self, owner, repo, filepath, **kwargs): # noqa: E501 - """Get a file from a repository # noqa: E501 + def repo_get_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 + """Get a release attachment # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_raw_file_with_http_info(owner, repo, filepath, async_req=True) + >>> thread = api.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str filepath: filepath of the file to get (required) - :return: None + :param int id: id of the release (required) + :param int attachment_id: id of the attachment to get (required) + :return: Attachment If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'filepath'] # noqa: E501 + all_params = ['owner', 'repo', 'id', 'attachment_id'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -5060,22 +6349,26 @@ def repo_get_raw_file_with_http_info(self, owner, repo, filepath, **kwargs): # if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_raw_file" % key + " to method repo_get_release_attachment" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get_raw_file`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_release_attachment`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get_raw_file`") # noqa: E501 - # verify the required parameter 'filepath' is set - if ('filepath' not in params or - params['filepath'] is None): - raise ValueError("Missing the required parameter `filepath` when calling `repo_get_raw_file`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_release_attachment`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `repo_get_release_attachment`") # noqa: E501 + # verify the required parameter 'attachment_id' is set + if ('attachment_id' not in params or + params['attachment_id'] is None): + raise ValueError("Missing the required parameter `attachment_id` when calling `repo_get_release_attachment`") # noqa: E501 collection_formats = {} @@ -5084,8 +6377,10 @@ def repo_get_raw_file_with_http_info(self, owner, repo, filepath, **kwargs): # path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'filepath' in params: - path_params['filepath'] = params['filepath'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + if 'attachment_id' in params: + path_params['attachment_id'] = params['attachment_id'] # noqa: E501 query_params = [] @@ -5107,62 +6402,62 @@ def repo_get_raw_file_with_http_info(self, owner, repo, filepath, **kwargs): # auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/raw/{filepath}', 'GET', + '/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type=None, # noqa: E501 + response_type='Attachment', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), - _preload_content=params.get('_preload_content', False), + _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_release(self, owner, repo, id, **kwargs): # noqa: E501 - """Get a release # noqa: E501 + def repo_get_single_commit_by_ref(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get a single commit from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_release(owner, repo, id, async_req=True) + >>> thread = api.repo_get_single_commit_by_ref(owner, repo, ref, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the release to get (required) - :return: Release + :param str ref: a git ref (required) + :return: Commit If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + return self.repo_get_single_commit_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 else: - (data) = self.repo_get_release_with_http_info(owner, repo, id, **kwargs) # noqa: E501 + (data) = self.repo_get_single_commit_by_ref_with_http_info(owner, repo, ref, **kwargs) # noqa: E501 return data - def repo_get_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E501 - """Get a release # noqa: E501 + def repo_get_single_commit_by_ref_with_http_info(self, owner, repo, ref, **kwargs): # noqa: E501 + """Get a single commit from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_release_with_http_info(owner, repo, id, async_req=True) + >>> thread = api.repo_get_single_commit_by_ref_with_http_info(owner, repo, ref, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the release to get (required) - :return: Release + :param str ref: a git ref (required) + :return: Commit If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id'] # noqa: E501 + all_params = ['owner', 'repo', 'ref'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -5173,22 +6468,22 @@ def repo_get_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_release" % key + " to method repo_get_single_commit_by_ref" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get_release`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_single_commit_by_ref`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get_release`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `repo_get_release`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_single_commit_by_ref`") # noqa: E501 + # verify the required parameter 'ref' is set + if ('ref' not in params or + params['ref'] is None): + raise ValueError("Missing the required parameter `ref` when calling `repo_get_single_commit_by_ref`") # noqa: E501 collection_formats = {} @@ -5197,8 +6492,8 @@ def repo_get_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 + if 'ref' in params: + path_params['ref'] = params['ref'] # noqa: E501 query_params = [] @@ -5220,14 +6515,14 @@ def repo_get_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/releases/{id}', 'GET', + '/repos/{owner}/{repo}/commits/{ref}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Release', # noqa: E501 + response_type='Commit', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -5235,49 +6530,47 @@ def repo_get_release_with_http_info(self, owner, repo, id, **kwargs): # noqa: E _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_release_attachment(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 - """Get a release attachment # noqa: E501 + def repo_get_single_commit_by_sha(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a single commit from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_release_attachment(owner, repo, id, attachment_id, async_req=True) + >>> thread = api.repo_get_single_commit_by_sha(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the release (required) - :param int attachment_id: id of the attachment to get (required) - :return: Attachment + :param str sha: the commit hash (required) + :return: Commit If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + return self.repo_get_single_commit_by_sha_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 else: - (data) = self.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, **kwargs) # noqa: E501 + (data) = self.repo_get_single_commit_by_sha_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 return data - def repo_get_release_attachment_with_http_info(self, owner, repo, id, attachment_id, **kwargs): # noqa: E501 - """Get a release attachment # noqa: E501 + def repo_get_single_commit_by_sha_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 + """Get a single commit from a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_release_attachment_with_http_info(owner, repo, id, attachment_id, async_req=True) + >>> thread = api.repo_get_single_commit_by_sha_with_http_info(owner, repo, sha, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int id: id of the release (required) - :param int attachment_id: id of the attachment to get (required) - :return: Attachment + :param str sha: the commit hash (required) + :return: Commit If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'id', 'attachment_id'] # noqa: E501 + all_params = ['owner', 'repo', 'sha'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -5288,26 +6581,22 @@ def repo_get_release_attachment_with_http_info(self, owner, repo, id, attachment if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_release_attachment" % key + " to method repo_get_single_commit_by_sha" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get_release_attachment`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_get_single_commit_by_sha`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get_release_attachment`") # noqa: E501 - # verify the required parameter 'id' is set - if ('id' not in params or - params['id'] is None): - raise ValueError("Missing the required parameter `id` when calling `repo_get_release_attachment`") # noqa: E501 - # verify the required parameter 'attachment_id' is set - if ('attachment_id' not in params or - params['attachment_id'] is None): - raise ValueError("Missing the required parameter `attachment_id` when calling `repo_get_release_attachment`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_get_single_commit_by_sha`") # noqa: E501 + # verify the required parameter 'sha' is set + if ('sha' not in params or + params['sha'] is None): + raise ValueError("Missing the required parameter `sha` when calling `repo_get_single_commit_by_sha`") # noqa: E501 collection_formats = {} @@ -5316,10 +6605,8 @@ def repo_get_release_attachment_with_http_info(self, owner, repo, id, attachment path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'id' in params: - path_params['id'] = params['id'] # noqa: E501 - if 'attachment_id' in params: - path_params['attachment_id'] = params['attachment_id'] # noqa: E501 + if 'sha' in params: + path_params['sha'] = params['sha'] # noqa: E501 query_params = [] @@ -5341,14 +6628,14 @@ def repo_get_release_attachment_with_http_info(self, owner, repo, id, attachment auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}', 'GET', + '/repos/{owner}/{repo}/git/commits/{sha}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Attachment', # noqa: E501 + response_type='Commit', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -5356,47 +6643,45 @@ def repo_get_release_attachment_with_http_info(self, owner, repo, id, attachment _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_get_single_commit(self, owner, repo, sha, **kwargs): # noqa: E501 - """Get a single commit from a repository # noqa: E501 + def repo_list_all_git_refs(self, owner, repo, **kwargs): # noqa: E501 + """Get specified ref or filtered repository's refs # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_single_commit(owner, repo, sha, async_req=True) + >>> thread = api.repo_list_all_git_refs(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str sha: the commit hash (required) - :return: Commit + :return: list[Reference] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_get_single_commit_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + return self.repo_list_all_git_refs_with_http_info(owner, repo, **kwargs) # noqa: E501 else: - (data) = self.repo_get_single_commit_with_http_info(owner, repo, sha, **kwargs) # noqa: E501 + (data) = self.repo_list_all_git_refs_with_http_info(owner, repo, **kwargs) # noqa: E501 return data - def repo_get_single_commit_with_http_info(self, owner, repo, sha, **kwargs): # noqa: E501 - """Get a single commit from a repository # noqa: E501 + def repo_list_all_git_refs_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get specified ref or filtered repository's refs # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_get_single_commit_with_http_info(owner, repo, sha, async_req=True) + >>> thread = api.repo_list_all_git_refs_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param str sha: the commit hash (required) - :return: Commit + :return: list[Reference] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'sha'] # noqa: E501 + all_params = ['owner', 'repo'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -5407,22 +6692,18 @@ def repo_get_single_commit_with_http_info(self, owner, repo, sha, **kwargs): # if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_get_single_commit" % key + " to method repo_list_all_git_refs" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_get_single_commit`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_all_git_refs`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_get_single_commit`") # noqa: E501 - # verify the required parameter 'sha' is set - if ('sha' not in params or - params['sha'] is None): - raise ValueError("Missing the required parameter `sha` when calling `repo_get_single_commit`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_all_git_refs`") # noqa: E501 collection_formats = {} @@ -5431,8 +6712,6 @@ def repo_get_single_commit_with_http_info(self, owner, repo, sha, **kwargs): # path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 - if 'sha' in params: - path_params['sha'] = params['sha'] # noqa: E501 query_params = [] @@ -5454,14 +6733,14 @@ def repo_get_single_commit_with_http_info(self, owner, repo, sha, **kwargs): # auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/git/commits/{sha}', 'GET', + '/repos/{owner}/{repo}/git/refs', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='Commit', # noqa: E501 + response_type='list[Reference]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -5469,40 +6748,40 @@ def repo_get_single_commit_with_http_info(self, owner, repo, sha, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_list_all_git_refs(self, owner, repo, **kwargs): # noqa: E501 - """Get specified ref or filtered repository's refs # noqa: E501 + def repo_list_branch_protection(self, owner, repo, **kwargs): # noqa: E501 + """List branch protections for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_list_all_git_refs(owner, repo, async_req=True) + >>> thread = api.repo_list_branch_protection(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :return: list[Reference] + :return: list[BranchProtection] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_list_all_git_refs_with_http_info(owner, repo, **kwargs) # noqa: E501 + return self.repo_list_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 else: - (data) = self.repo_list_all_git_refs_with_http_info(owner, repo, **kwargs) # noqa: E501 + (data) = self.repo_list_branch_protection_with_http_info(owner, repo, **kwargs) # noqa: E501 return data - def repo_list_all_git_refs_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """Get specified ref or filtered repository's refs # noqa: E501 + def repo_list_branch_protection_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List branch protections for a repository # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_list_all_git_refs_with_http_info(owner, repo, async_req=True) + >>> thread = api.repo_list_branch_protection_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :return: list[Reference] + :return: list[BranchProtection] If the method is called asynchronously, returns the request thread. """ @@ -5518,18 +6797,18 @@ def repo_list_all_git_refs_with_http_info(self, owner, repo, **kwargs): # noqa: if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_list_all_git_refs" % key + " to method repo_list_branch_protection" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_list_all_git_refs`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_branch_protection`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_list_all_git_refs`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_branch_protection`") # noqa: E501 collection_formats = {} @@ -5559,14 +6838,14 @@ def repo_list_all_git_refs_with_http_info(self, owner, repo, **kwargs): # noqa: auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/git/refs', 'GET', + '/repos/{owner}/{repo}/branch_protections', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[Reference]', # noqa: E501 + response_type='list[BranchProtection]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -5690,6 +6969,8 @@ def repo_list_collaborators(self, owner, repo, **kwargs): # noqa: E501 :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. @@ -5712,12 +6993,14 @@ def repo_list_collaborators_with_http_info(self, owner, repo, **kwargs): # noqa :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo'] # noqa: E501 + all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -5750,6 +7033,10 @@ def repo_list_collaborators_with_http_info(self, owner, repo, **kwargs): # noqa path_params['repo'] = params['repo'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -6013,6 +7300,8 @@ def repo_list_hooks(self, owner, repo, **kwargs): # noqa: E501 :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Hook] If the method is called asynchronously, returns the request thread. @@ -6035,12 +7324,14 @@ def repo_list_hooks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Hook] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo'] # noqa: E501 + all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -6073,6 +7364,10 @@ def repo_list_hooks_with_http_info(self, owner, repo, **kwargs): # noqa: E501 path_params['repo'] = params['repo'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -6120,6 +7415,8 @@ def repo_list_keys(self, owner, repo, **kwargs): # noqa: E501 :param str repo: name of the repo (required) :param int key_id: the key_id to search for :param str fingerprint: fingerprint of the key + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[DeployKey] If the method is called asynchronously, returns the request thread. @@ -6128,28 +7425,155 @@ def repo_list_keys(self, owner, repo, **kwargs): # noqa: E501 if kwargs.get('async_req'): return self.repo_list_keys_with_http_info(owner, repo, **kwargs) # noqa: E501 else: - (data) = self.repo_list_keys_with_http_info(owner, repo, **kwargs) # noqa: E501 + (data) = self.repo_list_keys_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_list_keys_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repository's keys # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_keys_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param int key_id: the key_id to search for + :param str fingerprint: fingerprint of the key + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[DeployKey] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'key_id', 'fingerprint', 'page', 'limit'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method repo_list_keys" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_list_keys`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_list_keys`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'key_id' in params: + query_params.append(('key_id', params['key_id'])) # noqa: E501 + if 'fingerprint' in params: + query_params.append(('fingerprint', params['fingerprint'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/keys', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[DeployKey]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_list_pull_requests(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's pull requests # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_list_pull_requests(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str state: State of pull request: open or closed (optional) + :param str sort: Type of sort + :param int milestone: ID of the milestone + :param list[int] labels: Label IDs + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[PullRequest] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_list_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_list_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 return data - def repo_list_keys_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """List a repository's keys # noqa: E501 + def repo_list_pull_requests_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List a repo's pull requests # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_list_keys_with_http_info(owner, repo, async_req=True) + >>> thread = api.repo_list_pull_requests_with_http_info(owner, repo, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int key_id: the key_id to search for - :param str fingerprint: fingerprint of the key - :return: list[DeployKey] + :param str state: State of pull request: open or closed (optional) + :param str sort: Type of sort + :param int milestone: ID of the milestone + :param list[int] labels: Label IDs + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[PullRequest] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'key_id', 'fingerprint'] # noqa: E501 + all_params = ['owner', 'repo', 'state', 'sort', 'milestone', 'labels', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -6160,18 +7584,18 @@ def repo_list_keys_with_http_info(self, owner, repo, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_list_keys" % key + " to method repo_list_pull_requests" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_list_keys`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_pull_requests`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_list_keys`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_pull_requests`") # noqa: E501 collection_formats = {} @@ -6182,10 +7606,19 @@ def repo_list_keys_with_http_info(self, owner, repo, **kwargs): # noqa: E501 path_params['repo'] = params['repo'] # noqa: E501 query_params = [] - if 'key_id' in params: - query_params.append(('key_id', params['key_id'])) # noqa: E501 - if 'fingerprint' in params: - query_params.append(('fingerprint', params['fingerprint'])) # noqa: E501 + if 'state' in params: + query_params.append(('state', params['state'])) # noqa: E501 + if 'sort' in params: + query_params.append(('sort', params['sort'])) # noqa: E501 + if 'milestone' in params: + query_params.append(('milestone', params['milestone'])) # noqa: E501 + if 'labels' in params: + query_params.append(('labels', params['labels'])) # noqa: E501 + collection_formats['labels'] = 'multi' # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -6205,14 +7638,14 @@ def repo_list_keys_with_http_info(self, owner, repo, **kwargs): # noqa: E501 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/keys', 'GET', + '/repos/{owner}/{repo}/pulls', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[DeployKey]', # noqa: E501 + response_type='list[PullRequest]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -6220,55 +7653,51 @@ def repo_list_keys_with_http_info(self, owner, repo, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_list_pull_requests(self, owner, repo, **kwargs): # noqa: E501 - """List a repo's pull requests # noqa: E501 + def repo_list_pull_reviews(self, owner, repo, index, **kwargs): # noqa: E501 + """List all reviews for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_list_pull_requests(owner, repo, async_req=True) + >>> thread = api.repo_list_pull_reviews(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int page: Page number - :param str state: State of pull request: open or closed (optional) - :param str sort: Type of sort - :param int milestone: ID of the milestone - :param list[int] labels: Label IDs - :return: list[PullRequest] + :param int index: index of the pull request (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[PullReview] If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_list_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 + return self.repo_list_pull_reviews_with_http_info(owner, repo, index, **kwargs) # noqa: E501 else: - (data) = self.repo_list_pull_requests_with_http_info(owner, repo, **kwargs) # noqa: E501 + (data) = self.repo_list_pull_reviews_with_http_info(owner, repo, index, **kwargs) # noqa: E501 return data - def repo_list_pull_requests_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """List a repo's pull requests # noqa: E501 + def repo_list_pull_reviews_with_http_info(self, owner, repo, index, **kwargs): # noqa: E501 + """List all reviews for a pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_list_pull_requests_with_http_info(owner, repo, async_req=True) + >>> thread = api.repo_list_pull_reviews_with_http_info(owner, repo, index, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int page: Page number - :param str state: State of pull request: open or closed (optional) - :param str sort: Type of sort - :param int milestone: ID of the milestone - :param list[int] labels: Label IDs - :return: list[PullRequest] + :param int index: index of the pull request (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[PullReview] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'page', 'state', 'sort', 'milestone', 'labels'] # noqa: E501 + all_params = ['owner', 'repo', 'index', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -6279,18 +7708,22 @@ def repo_list_pull_requests_with_http_info(self, owner, repo, **kwargs): # noqa if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_list_pull_requests" % key + " to method repo_list_pull_reviews" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_list_pull_requests`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_list_pull_reviews`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_list_pull_requests`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_list_pull_reviews`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `repo_list_pull_reviews`") # noqa: E501 collection_formats = {} @@ -6299,19 +7732,14 @@ def repo_list_pull_requests_with_http_info(self, owner, repo, **kwargs): # noqa path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 query_params = [] if 'page' in params: query_params.append(('page', params['page'])) # noqa: E501 - if 'state' in params: - query_params.append(('state', params['state'])) # noqa: E501 - if 'sort' in params: - query_params.append(('sort', params['sort'])) # noqa: E501 - if 'milestone' in params: - query_params.append(('milestone', params['milestone'])) # noqa: E501 - if 'labels' in params: - query_params.append(('labels', params['labels'])) # noqa: E501 - collection_formats['labels'] = 'multi' # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -6331,14 +7759,14 @@ def repo_list_pull_requests_with_http_info(self, owner, repo, **kwargs): # noqa auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/pulls', 'GET', + '/repos/{owner}/{repo}/pulls/{index}/reviews', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[PullRequest]', # noqa: E501 + response_type='list[PullReview]', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -6470,8 +7898,9 @@ def repo_list_releases(self, owner, repo, **kwargs): # noqa: E501 :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int page: page wants to load :param int per_page: items count every page wants to load + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Release] If the method is called asynchronously, returns the request thread. @@ -6494,14 +7923,15 @@ def repo_list_releases_with_http_info(self, owner, repo, **kwargs): # noqa: E50 :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :param int page: page wants to load :param int per_page: items count every page wants to load + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Release] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'page', 'per_page'] # noqa: E501 + all_params = ['owner', 'repo', 'per_page', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -6534,10 +7964,12 @@ def repo_list_releases_with_http_info(self, owner, repo, **kwargs): # noqa: E50 path_params['repo'] = params['repo'] # noqa: E501 query_params = [] - if 'page' in params: - query_params.append(('page', params['page'])) # noqa: E501 if 'per_page' in params: query_params.append(('per_page', params['per_page'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -6583,6 +8015,8 @@ def repo_list_stargazers(self, owner, repo, **kwargs): # noqa: E501 :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. @@ -6605,12 +8039,14 @@ def repo_list_stargazers_with_http_info(self, owner, repo, **kwargs): # noqa: E :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo'] # noqa: E501 + all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -6643,6 +8079,10 @@ def repo_list_stargazers_with_http_info(self, owner, repo, **kwargs): # noqa: E path_params['repo'] = params['repo'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -6689,9 +8129,10 @@ def repo_list_statuses(self, owner, repo, sha, **kwargs): # noqa: E501 :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: sha of the commit (required) - :param int page: page number of results :param str sort: type of sort :param str state: type of state + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Status] If the method is called asynchronously, returns the request thread. @@ -6715,15 +8156,16 @@ def repo_list_statuses_with_http_info(self, owner, repo, sha, **kwargs): # noqa :param str owner: owner of the repo (required) :param str repo: name of the repo (required) :param str sha: sha of the commit (required) - :param int page: page number of results :param str sort: type of sort :param str state: type of state + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Status] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'sha', 'page', 'sort', 'state'] # noqa: E501 + all_params = ['owner', 'repo', 'sha', 'sort', 'state', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -6762,12 +8204,14 @@ def repo_list_statuses_with_http_info(self, owner, repo, sha, **kwargs): # noqa path_params['sha'] = params['sha'] # noqa: E501 query_params = [] - if 'page' in params: - query_params.append(('page', params['page'])) # noqa: E501 if 'sort' in params: query_params.append(('sort', params['sort'])) # noqa: E501 if 'state' in params: query_params.append(('state', params['state'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -6813,6 +8257,8 @@ def repo_list_subscribers(self, owner, repo, **kwargs): # noqa: E501 :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. @@ -6835,12 +8281,14 @@ def repo_list_subscribers_with_http_info(self, owner, repo, **kwargs): # noqa: :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo'] # noqa: E501 + all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -6873,6 +8321,10 @@ def repo_list_subscribers_with_http_info(self, owner, repo, **kwargs): # noqa: path_params['repo'] = params['repo'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -6918,6 +8370,8 @@ def repo_list_tags(self, owner, repo, **kwargs): # noqa: E501 :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, default maximum page size is 50 :return: list[Tag] If the method is called asynchronously, returns the request thread. @@ -6940,12 +8394,14 @@ def repo_list_tags_with_http_info(self, owner, repo, **kwargs): # noqa: E501 :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, default maximum page size is 50 :return: list[Tag] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo'] # noqa: E501 + all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -6978,6 +8434,10 @@ def repo_list_tags_with_http_info(self, owner, repo, **kwargs): # noqa: E501 path_params['repo'] = params['repo'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -7023,6 +8483,8 @@ def repo_list_topics(self, owner, repo, **kwargs): # noqa: E501 :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: TopicName If the method is called asynchronously, returns the request thread. @@ -7045,12 +8507,14 @@ def repo_list_topics_with_http_info(self, owner, repo, **kwargs): # noqa: E501 :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: TopicName If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo'] # noqa: E501 + all_params = ['owner', 'repo', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -7083,6 +8547,10 @@ def repo_list_topics_with_http_info(self, owner, repo, **kwargs): # noqa: E501 path_params['repo'] = params['repo'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -7558,14 +9026,16 @@ def repo_search(self, **kwargs): # noqa: E501 :param bool topic: Limit search to repositories with keyword as topic :param bool include_desc: include search of keyword within repository description :param int uid: search only for repos that the user with the given id owns or contributes to + :param int priority_owner_id: repo owner to prioritize in the results :param int starred_by: search only for repos that the user with the given id has starred :param bool private: include private repositories this user has access to (defaults to true) - :param int page: page number of results to return (1-based) - :param int limit: page size of results, maximum page size is 50 + :param bool template: include template repositories this user has access to (defaults to true) :param str mode: type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" :param bool exclusive: if `uid` is given, search only for repos that the user owns :param str sort: sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\" :param str order: sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: SearchResults If the method is called asynchronously, returns the request thread. @@ -7590,20 +9060,22 @@ def repo_search_with_http_info(self, **kwargs): # noqa: E501 :param bool topic: Limit search to repositories with keyword as topic :param bool include_desc: include search of keyword within repository description :param int uid: search only for repos that the user with the given id owns or contributes to + :param int priority_owner_id: repo owner to prioritize in the results :param int starred_by: search only for repos that the user with the given id has starred :param bool private: include private repositories this user has access to (defaults to true) - :param int page: page number of results to return (1-based) - :param int limit: page size of results, maximum page size is 50 + :param bool template: include template repositories this user has access to (defaults to true) :param str mode: type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" :param bool exclusive: if `uid` is given, search only for repos that the user owns :param str sort: sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\" :param str order: sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: SearchResults If the method is called asynchronously, returns the request thread. """ - all_params = ['q', 'topic', 'include_desc', 'uid', 'starred_by', 'private', 'page', 'limit', 'mode', 'exclusive', 'sort', 'order'] # noqa: E501 + all_params = ['q', 'topic', 'include_desc', 'uid', 'priority_owner_id', 'starred_by', 'private', 'template', 'mode', 'exclusive', 'sort', 'order', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -7632,14 +9104,14 @@ def repo_search_with_http_info(self, **kwargs): # noqa: E501 query_params.append(('includeDesc', params['include_desc'])) # noqa: E501 if 'uid' in params: query_params.append(('uid', params['uid'])) # noqa: E501 + if 'priority_owner_id' in params: + query_params.append(('priority_owner_id', params['priority_owner_id'])) # noqa: E501 if 'starred_by' in params: query_params.append(('starredBy', params['starred_by'])) # noqa: E501 if 'private' in params: query_params.append(('private', params['private'])) # noqa: E501 - if 'page' in params: - query_params.append(('page', params['page'])) # noqa: E501 - if 'limit' in params: - query_params.append(('limit', params['limit'])) # noqa: E501 + if 'template' in params: + query_params.append(('template', params['template'])) # noqa: E501 if 'mode' in params: query_params.append(('mode', params['mode'])) # noqa: E501 if 'exclusive' in params: @@ -7648,6 +9120,115 @@ def repo_search_with_http_info(self, **kwargs): # noqa: E501 query_params.append(('sort', params['sort'])) # noqa: E501 if 'order' in params: query_params.append(('order', params['order'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/search', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SearchResults', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def repo_signing_key(self, owner, repo, **kwargs): # noqa: E501 + """Get signing-key.gpg for given repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_signing_key(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_signing_key_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.repo_signing_key_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def repo_signing_key_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """Get signing-key.gpg for given repository # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_signing_key_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :return: str + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method repo_signing_key" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_signing_key`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_signing_key`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] header_params = {} @@ -7657,7 +9238,7 @@ def repo_search_with_http_info(self, **kwargs): # noqa: E501 body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['application/json']) # noqa: E501 + ['text/plain']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 @@ -7667,14 +9248,14 @@ def repo_search_with_http_info(self, **kwargs): # noqa: E501 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/search', 'GET', + '/repos/{owner}/{repo}/signing-key.gpg', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='SearchResults', # noqa: E501 + response_type='str', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -7682,45 +9263,51 @@ def repo_search_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def repo_signing_key(self, owner, repo, **kwargs): # noqa: E501 - """Get signing-key.gpg for given repository # noqa: E501 + def repo_submit_pull_review(self, owner, repo, index, id, body, **kwargs): # noqa: E501 + """Submit a pending review to an pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_signing_key(owner, repo, async_req=True) + >>> thread = api.repo_submit_pull_review(owner, repo, index, id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :return: str + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :param SubmitPullReviewOptions body: (required) + :return: PullReview If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.repo_signing_key_with_http_info(owner, repo, **kwargs) # noqa: E501 + return self.repo_submit_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 else: - (data) = self.repo_signing_key_with_http_info(owner, repo, **kwargs) # noqa: E501 + (data) = self.repo_submit_pull_review_with_http_info(owner, repo, index, id, body, **kwargs) # noqa: E501 return data - def repo_signing_key_with_http_info(self, owner, repo, **kwargs): # noqa: E501 - """Get signing-key.gpg for given repository # noqa: E501 + def repo_submit_pull_review_with_http_info(self, owner, repo, index, id, body, **kwargs): # noqa: E501 + """Submit a pending review to an pull request # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.repo_signing_key_with_http_info(owner, repo, async_req=True) + >>> thread = api.repo_submit_pull_review_with_http_info(owner, repo, index, id, body, async_req=True) >>> result = thread.get() :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) - :return: str + :param int index: index of the pull request (required) + :param int id: id of the review (required) + :param SubmitPullReviewOptions body: (required) + :return: PullReview If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo'] # noqa: E501 + all_params = ['owner', 'repo', 'index', 'id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -7731,18 +9318,30 @@ def repo_signing_key_with_http_info(self, owner, repo, **kwargs): # noqa: E501 if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method repo_signing_key" % key + " to method repo_submit_pull_review" % key ) params[key] = val del params['kwargs'] # verify the required parameter 'owner' is set if ('owner' not in params or params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `repo_signing_key`") # noqa: E501 + raise ValueError("Missing the required parameter `owner` when calling `repo_submit_pull_review`") # noqa: E501 # verify the required parameter 'repo' is set if ('repo' not in params or params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `repo_signing_key`") # noqa: E501 + raise ValueError("Missing the required parameter `repo` when calling `repo_submit_pull_review`") # noqa: E501 + # verify the required parameter 'index' is set + if ('index' not in params or + params['index'] is None): + raise ValueError("Missing the required parameter `index` when calling `repo_submit_pull_review`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `repo_submit_pull_review`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `repo_submit_pull_review`") # noqa: E501 collection_formats = {} @@ -7751,6 +9350,10 @@ def repo_signing_key_with_http_info(self, owner, repo, **kwargs): # noqa: E501 path_params['owner'] = params['owner'] # noqa: E501 if 'repo' in params: path_params['repo'] = params['repo'] # noqa: E501 + if 'index' in params: + path_params['index'] = params['index'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] @@ -7760,9 +9363,11 @@ def repo_signing_key_with_http_info(self, owner, repo, **kwargs): # noqa: E501 local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( - ['text/plain']) # noqa: E501 + ['application/json']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 @@ -7772,14 +9377,14 @@ def repo_signing_key_with_http_info(self, owner, repo, **kwargs): # noqa: E501 auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/signing-key.gpg', 'GET', + '/repos/{owner}/{repo}/pulls/{index}/reviews/{id}', 'POST', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='str', # noqa: E501 + response_type='PullReview', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), @@ -7911,6 +9516,11 @@ def repo_tracked_times(self, owner, repo, **kwargs): # noqa: E501 :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param str user: optional filter by user + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[TrackedTime] If the method is called asynchronously, returns the request thread. @@ -7933,12 +9543,17 @@ def repo_tracked_times_with_http_info(self, owner, repo, **kwargs): # noqa: E50 :param async_req bool :param str owner: owner of the repo (required) :param str repo: name of the repo (required) + :param str user: optional filter by user + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[TrackedTime] If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo'] # noqa: E501 + all_params = ['owner', 'repo', 'user', 'since', 'before', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -7971,6 +9586,16 @@ def repo_tracked_times_with_http_info(self, owner, repo, **kwargs): # noqa: E50 path_params['repo'] = params['repo'] # noqa: E501 query_params = [] + if 'user' in params: + query_params.append(('user', params['user'])) # noqa: E501 + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -8005,6 +9630,119 @@ def repo_tracked_times_with_http_info(self, owner, repo, **kwargs): # noqa: E50 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def repo_transfer(self, owner, repo, body, **kwargs): # noqa: E501 + """Transfer a repo ownership # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_transfer(owner, repo, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to transfer (required) + :param str repo: name of the repo to transfer (required) + :param TransferRepoOption body: Transfer Options (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.repo_transfer_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + else: + (data) = self.repo_transfer_with_http_info(owner, repo, body, **kwargs) # noqa: E501 + return data + + def repo_transfer_with_http_info(self, owner, repo, body, **kwargs): # noqa: E501 + """Transfer a repo ownership # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.repo_transfer_with_http_info(owner, repo, body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo to transfer (required) + :param str repo: name of the repo to transfer (required) + :param TransferRepoOption body: Transfer Options (required) + :return: Repository + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method repo_transfer" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `repo_transfer`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `repo_transfer`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `repo_transfer`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/transfer', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='Repository', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def repo_update_file(self, owner, repo, filepath, body, **kwargs): # noqa: E501 """Update a file in a repository # noqa: E501 @@ -8245,6 +9983,8 @@ def topic_search(self, q, **kwargs): # noqa: E501 :param async_req bool :param str q: keywords to search (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[TopicResponse] If the method is called asynchronously, returns the request thread. @@ -8266,12 +10006,14 @@ def topic_search_with_http_info(self, q, **kwargs): # noqa: E501 :param async_req bool :param str q: keywords to search (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[TopicResponse] If the method is called asynchronously, returns the request thread. """ - all_params = ['q'] # noqa: E501 + all_params = ['q', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -8298,6 +10040,10 @@ def topic_search_with_http_info(self, q, **kwargs): # noqa: E501 query_params = [] if 'q' in params: query_params.append(('q', params['q'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -8646,3 +10392,116 @@ def user_current_put_subscription_with_http_info(self, owner, repo, **kwargs): _preload_content=params.get('_preload_content', True), _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + + def user_tracked_times(self, owner, repo, user, **kwargs): # noqa: E501 + """List a user's tracked times in a repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_tracked_times(owner, repo, user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str user: username of user (required) + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_tracked_times_with_http_info(owner, repo, user, **kwargs) # noqa: E501 + else: + (data) = self.user_tracked_times_with_http_info(owner, repo, user, **kwargs) # noqa: E501 + return data + + def user_tracked_times_with_http_info(self, owner, repo, user, **kwargs): # noqa: E501 + """List a user's tracked times in a repo # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_tracked_times_with_http_info(owner, repo, user, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repo (required) + :param str repo: name of the repo (required) + :param str user: username of user (required) + :return: list[TrackedTime] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'user'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_tracked_times" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `user_tracked_times`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `user_tracked_times`") # noqa: E501 + # verify the required parameter 'user' is set + if ('user' not in params or + params['user'] is None): + raise ValueError("Missing the required parameter `user` when calling `user_tracked_times`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'user' in params: + path_params['user'] = params['user'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/times/{user}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[TrackedTime]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/giteapy/api/user_api.py b/giteapy/api/user_api.py old mode 100755 new mode 100644 index 4d24e77..3ee4536 --- a/giteapy/api/user_api.py +++ b/giteapy/api/user_api.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -324,6 +324,103 @@ def user_check_following_with_http_info(self, follower, followee, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def user_create_o_auth2_application(self, body, **kwargs): # noqa: E501 + """creates a new OAuth2 application # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_create_o_auth2_application(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateOAuth2ApplicationOptions body: (required) + :return: OAuth2Application + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_create_o_auth2_application_with_http_info(body, **kwargs) # noqa: E501 + else: + (data) = self.user_create_o_auth2_application_with_http_info(body, **kwargs) # noqa: E501 + return data + + def user_create_o_auth2_application_with_http_info(self, body, **kwargs): # noqa: E501 + """creates a new OAuth2 application # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_create_o_auth2_application_with_http_info(body, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateOAuth2ApplicationOptions body: (required) + :return: OAuth2Application + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_create_o_auth2_application" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `user_create_o_auth2_application`") # noqa: E501 + + collection_formats = {} + + path_params = {} + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/applications/oauth2', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OAuth2Application', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def user_create_token(self, username, **kwargs): # noqa: E501 """Create an access token # noqa: E501 @@ -1226,6 +1323,8 @@ def user_current_list_followers(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. @@ -1246,12 +1345,14 @@ def user_current_list_followers_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1272,6 +1373,10 @@ def user_current_list_followers_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -1315,6 +1420,8 @@ def user_current_list_following(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. @@ -1335,12 +1442,14 @@ def user_current_list_following_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1361,6 +1470,10 @@ def user_current_list_following_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -1404,6 +1517,8 @@ def user_current_list_gpg_keys(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[GPGKey] If the method is called asynchronously, returns the request thread. @@ -1424,12 +1539,14 @@ def user_current_list_gpg_keys_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[GPGKey] If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1450,6 +1567,10 @@ def user_current_list_gpg_keys_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -1494,6 +1615,8 @@ def user_current_list_keys(self, **kwargs): # noqa: E501 :param async_req bool :param str fingerprint: fingerprint of the key + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[PublicKey] If the method is called asynchronously, returns the request thread. @@ -1515,12 +1638,14 @@ def user_current_list_keys_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param str fingerprint: fingerprint of the key + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[PublicKey] If the method is called asynchronously, returns the request thread. """ - all_params = ['fingerprint'] # noqa: E501 + all_params = ['fingerprint', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1543,6 +1668,10 @@ def user_current_list_keys_with_http_info(self, **kwargs): # noqa: E501 query_params = [] if 'fingerprint' in params: query_params.append(('fingerprint', params['fingerprint'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -1586,6 +1715,8 @@ def user_current_list_repos(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. @@ -1606,12 +1737,14 @@ def user_current_list_repos_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1632,6 +1765,10 @@ def user_current_list_repos_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -1675,6 +1812,8 @@ def user_current_list_starred(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. @@ -1695,12 +1834,14 @@ def user_current_list_starred_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1721,6 +1862,10 @@ def user_current_list_starred_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -1764,6 +1909,8 @@ def user_current_list_subscriptions(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. @@ -1784,12 +1931,14 @@ def user_current_list_subscriptions_with_http_info(self, **kwargs): # noqa: E50 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -1810,6 +1959,10 @@ def user_current_list_subscriptions_with_http_info(self, **kwargs): # noqa: E50 path_params = {} query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2241,6 +2394,8 @@ def user_current_tracked_times(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format :return: list[TrackedTime] If the method is called asynchronously, returns the request thread. @@ -2261,12 +2416,14 @@ def user_current_tracked_times_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param datetime since: Only show times updated after the given time. This is a timestamp in RFC 3339 format + :param datetime before: Only show times updated before the given time. This is a timestamp in RFC 3339 format :return: list[TrackedTime] If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['since', 'before'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2287,6 +2444,10 @@ def user_current_tracked_times_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] + if 'since' in params: + query_params.append(('since', params['since'])) # noqa: E501 + if 'before' in params: + query_params.append(('before', params['before'])) # noqa: E501 header_params = {} @@ -2519,6 +2680,103 @@ def user_delete_email_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def user_delete_o_auth2_application(self, id, **kwargs): # noqa: E501 + """delete an OAuth2 Application # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_delete_o_auth2_application(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: token to be deleted (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_delete_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_delete_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_delete_o_auth2_application_with_http_info(self, id, **kwargs): # noqa: E501 + """delete an OAuth2 Application # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_delete_o_auth2_application_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: token to be deleted (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_delete_o_auth2_application" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `user_delete_o_auth2_application`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/applications/oauth2/{id}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def user_get(self, username, **kwargs): # noqa: E501 """Get a user # noqa: E501 @@ -2802,6 +3060,297 @@ def user_get_heatmap_data_with_http_info(self, username, **kwargs): # noqa: E50 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def user_get_o_auth2_application(self, id, **kwargs): # noqa: E501 + """get an OAuth2 Application # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get_o_auth2_application(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: Application ID to be found (required) + :return: OAuth2Application + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 + else: + (data) = self.user_get_o_auth2_application_with_http_info(id, **kwargs) # noqa: E501 + return data + + def user_get_o_auth2_application_with_http_info(self, id, **kwargs): # noqa: E501 + """get an OAuth2 Application # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get_o_auth2_application_with_http_info(id, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int id: Application ID to be found (required) + :return: OAuth2Application + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_get_o_auth2_application" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `user_get_o_auth2_application`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/applications/oauth2/{id}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='OAuth2Application', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_get_oauth2_application(self, **kwargs): # noqa: E501 + """List the authenticated user's oauth2 applications # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get_oauth2_application(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[OAuth2Application] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_oauth2_application_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_get_oauth2_application_with_http_info(**kwargs) # noqa: E501 + return data + + def user_get_oauth2_application_with_http_info(self, **kwargs): # noqa: E501 + """List the authenticated user's oauth2 applications # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get_oauth2_application_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[OAuth2Application] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_get_oauth2_application" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json', 'text/plain']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/applications/oauth2', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[OAuth2Application]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def user_get_stop_watches(self, **kwargs): # noqa: E501 + """Get list of all existing stopwatches # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get_stop_watches(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[StopWatch] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.user_get_stop_watches_with_http_info(**kwargs) # noqa: E501 + else: + (data) = self.user_get_stop_watches_with_http_info(**kwargs) # noqa: E501 + return data + + def user_get_stop_watches_with_http_info(self, **kwargs): # noqa: E501 + """Get list of all existing stopwatches # noqa: E501 + + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.user_get_stop_watches_with_http_info(async_req=True) + >>> result = thread.get() + + :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 + :return: list[StopWatch] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['page', 'limit'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method user_get_stop_watches" % key + ) + params[key] = val + del params['kwargs'] + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 + + return self.api_client.call_api( + '/user/stopwatches', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[StopWatch]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + def user_get_tokens(self, username, **kwargs): # noqa: E501 """List the authenticated user's access tokens # noqa: E501 @@ -2812,6 +3361,8 @@ def user_get_tokens(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[AccessToken] If the method is called asynchronously, returns the request thread. @@ -2833,12 +3384,14 @@ def user_get_tokens_with_http_info(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[AccessToken] If the method is called asynchronously, returns the request thread. """ - all_params = ['username'] # noqa: E501 + all_params = ['username', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -2865,6 +3418,10 @@ def user_get_tokens_with_http_info(self, username, **kwargs): # noqa: E501 path_params['username'] = params['username'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -2998,6 +3555,8 @@ def user_list_followers(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. @@ -3019,12 +3578,14 @@ def user_list_followers_with_http_info(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. """ - all_params = ['username'] # noqa: E501 + all_params = ['username', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3051,6 +3612,10 @@ def user_list_followers_with_http_info(self, username, **kwargs): # noqa: E501 path_params['username'] = params['username'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -3095,6 +3660,8 @@ def user_list_following(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. @@ -3116,12 +3683,14 @@ def user_list_following_with_http_info(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[User] If the method is called asynchronously, returns the request thread. """ - all_params = ['username'] # noqa: E501 + all_params = ['username', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3148,6 +3717,10 @@ def user_list_following_with_http_info(self, username, **kwargs): # noqa: E501 path_params['username'] = params['username'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -3192,6 +3765,8 @@ def user_list_gpg_keys(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[GPGKey] If the method is called asynchronously, returns the request thread. @@ -3213,12 +3788,14 @@ def user_list_gpg_keys_with_http_info(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[GPGKey] If the method is called asynchronously, returns the request thread. """ - all_params = ['username'] # noqa: E501 + all_params = ['username', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3245,6 +3822,10 @@ def user_list_gpg_keys_with_http_info(self, username, **kwargs): # noqa: E501 path_params['username'] = params['username'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -3290,6 +3871,8 @@ def user_list_keys(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) :param str fingerprint: fingerprint of the key + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[PublicKey] If the method is called asynchronously, returns the request thread. @@ -3312,12 +3895,14 @@ def user_list_keys_with_http_info(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) :param str fingerprint: fingerprint of the key + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[PublicKey] If the method is called asynchronously, returns the request thread. """ - all_params = ['username', 'fingerprint'] # noqa: E501 + all_params = ['username', 'fingerprint', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3346,6 +3931,10 @@ def user_list_keys_with_http_info(self, username, **kwargs): # noqa: E501 query_params = [] if 'fingerprint' in params: query_params.append(('fingerprint', params['fingerprint'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -3390,6 +3979,8 @@ def user_list_repos(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. @@ -3411,12 +4002,14 @@ def user_list_repos_with_http_info(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. """ - all_params = ['username'] # noqa: E501 + all_params = ['username', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3443,6 +4036,10 @@ def user_list_repos_with_http_info(self, username, **kwargs): # noqa: E501 path_params['username'] = params['username'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -3487,6 +4084,8 @@ def user_list_starred(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. @@ -3508,12 +4107,14 @@ def user_list_starred_with_http_info(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. """ - all_params = ['username'] # noqa: E501 + all_params = ['username', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3540,6 +4141,10 @@ def user_list_starred_with_http_info(self, username, **kwargs): # noqa: E501 path_params['username'] = params['username'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -3584,6 +4189,8 @@ def user_list_subscriptions(self, username, **kwargs): # noqa: E501 :param async_req bool :param str username: username of the user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. @@ -3605,12 +4212,14 @@ def user_list_subscriptions_with_http_info(self, username, **kwargs): # noqa: E :param async_req bool :param str username: username of the user (required) + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Repository] If the method is called asynchronously, returns the request thread. """ - all_params = ['username'] # noqa: E501 + all_params = ['username', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3637,6 +4246,10 @@ def user_list_subscriptions_with_http_info(self, username, **kwargs): # noqa: E path_params['username'] = params['username'] # noqa: E501 query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -3680,6 +4293,8 @@ def user_list_teams(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Team] If the method is called asynchronously, returns the request thread. @@ -3700,12 +4315,14 @@ def user_list_teams_with_http_info(self, **kwargs): # noqa: E501 >>> result = thread.get() :param async_req bool + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: list[Team] If the method is called asynchronously, returns the request thread. """ - all_params = [] # noqa: E501 + all_params = ['page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3726,6 +4343,10 @@ def user_list_teams_with_http_info(self, **kwargs): # noqa: E501 path_params = {} query_params = [] + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 + if 'limit' in params: + query_params.append(('limit', params['limit'])) # noqa: E501 header_params = {} @@ -3771,7 +4392,8 @@ def user_search(self, **kwargs): # noqa: E501 :param async_req bool :param str q: keyword :param int uid: ID of the user to search for - :param int limit: maximum number of users to return + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: InlineResponse2001 If the method is called asynchronously, returns the request thread. @@ -3794,13 +4416,14 @@ def user_search_with_http_info(self, **kwargs): # noqa: E501 :param async_req bool :param str q: keyword :param int uid: ID of the user to search for - :param int limit: maximum number of users to return + :param int page: page number of results to return (1-based) + :param int limit: page size of results, maximum page size is 50 :return: InlineResponse2001 If the method is called asynchronously, returns the request thread. """ - all_params = ['q', 'uid', 'limit'] # noqa: E501 + all_params = ['q', 'uid', 'page', 'limit'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3825,6 +4448,8 @@ def user_search_with_http_info(self, **kwargs): # noqa: E501 query_params.append(('q', params['q'])) # noqa: E501 if 'uid' in params: query_params.append(('uid', params['uid'])) # noqa: E501 + if 'page' in params: + query_params.append(('page', params['page'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 @@ -3861,47 +4486,45 @@ def user_search_with_http_info(self, **kwargs): # noqa: E501 _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def user_tracked_times(self, owner, repo, user, **kwargs): # noqa: E501 - """List a user's tracked times in a repo # noqa: E501 + def user_update_o_auth2_application(self, id, body, **kwargs): # noqa: E501 + """update an OAuth2 Application, this includes regenerating the client secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.user_tracked_times(owner, repo, user, async_req=True) + >>> thread = api.user_update_o_auth2_application(id, body, async_req=True) >>> result = thread.get() :param async_req bool - :param str owner: owner of the repo (required) - :param str repo: name of the repo (required) - :param str user: username of user (required) - :return: list[TrackedTime] + :param int id: application to be updated (required) + :param CreateOAuth2ApplicationOptions body: (required) + :return: OAuth2Application If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): - return self.user_tracked_times_with_http_info(owner, repo, user, **kwargs) # noqa: E501 + return self.user_update_o_auth2_application_with_http_info(id, body, **kwargs) # noqa: E501 else: - (data) = self.user_tracked_times_with_http_info(owner, repo, user, **kwargs) # noqa: E501 + (data) = self.user_update_o_auth2_application_with_http_info(id, body, **kwargs) # noqa: E501 return data - def user_tracked_times_with_http_info(self, owner, repo, user, **kwargs): # noqa: E501 - """List a user's tracked times in a repo # noqa: E501 + def user_update_o_auth2_application_with_http_info(self, id, body, **kwargs): # noqa: E501 + """update an OAuth2 Application, this includes regenerating the client secret # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.user_tracked_times_with_http_info(owner, repo, user, async_req=True) + >>> thread = api.user_update_o_auth2_application_with_http_info(id, body, async_req=True) >>> result = thread.get() :param async_req bool - :param str owner: owner of the repo (required) - :param str repo: name of the repo (required) - :param str user: username of user (required) - :return: list[TrackedTime] + :param int id: application to be updated (required) + :param CreateOAuth2ApplicationOptions body: (required) + :return: OAuth2Application If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'user'] # noqa: E501 + all_params = ['id', 'body'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -3912,32 +4535,24 @@ def user_tracked_times_with_http_info(self, owner, repo, user, **kwargs): # noq if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method user_tracked_times" % key + " to method user_update_o_auth2_application" % key ) params[key] = val del params['kwargs'] - # verify the required parameter 'owner' is set - if ('owner' not in params or - params['owner'] is None): - raise ValueError("Missing the required parameter `owner` when calling `user_tracked_times`") # noqa: E501 - # verify the required parameter 'repo' is set - if ('repo' not in params or - params['repo'] is None): - raise ValueError("Missing the required parameter `repo` when calling `user_tracked_times`") # noqa: E501 - # verify the required parameter 'user' is set - if ('user' not in params or - params['user'] is None): - raise ValueError("Missing the required parameter `user` when calling `user_tracked_times`") # noqa: E501 + # verify the required parameter 'id' is set + if ('id' not in params or + params['id'] is None): + raise ValueError("Missing the required parameter `id` when calling `user_update_o_auth2_application`") # noqa: E501 + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `user_update_o_auth2_application`") # noqa: E501 collection_formats = {} path_params = {} - if 'owner' in params: - path_params['owner'] = params['owner'] # noqa: E501 - if 'repo' in params: - path_params['repo'] = params['repo'] # noqa: E501 - if 'user' in params: - path_params['user'] = params['user'] # noqa: E501 + if 'id' in params: + path_params['id'] = params['id'] # noqa: E501 query_params = [] @@ -3947,6 +4562,8 @@ def user_tracked_times_with_http_info(self, owner, repo, user, **kwargs): # noq local_var_files = {} body_params = None + if 'body' in params: + body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json']) # noqa: E501 @@ -3959,14 +4576,14 @@ def user_tracked_times_with_http_info(self, owner, repo, user, **kwargs): # noq auth_settings = ['AccessToken', 'AuthorizationHeaderToken', 'BasicAuth', 'SudoHeader', 'SudoParam', 'Token'] # noqa: E501 return self.api_client.call_api( - '/repos/{owner}/{repo}/times/{user}', 'GET', + '/user/applications/oauth2/{id}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='list[TrackedTime]', # noqa: E501 + response_type='OAuth2Application', # noqa: E501 auth_settings=auth_settings, async_req=params.get('async_req'), _return_http_data_only=params.get('_return_http_data_only'), diff --git a/giteapy/api_client.py b/giteapy/api_client.py old mode 100755 new mode 100644 index aebeb75..b464a26 --- a/giteapy/api_client.py +++ b/giteapy/api_client.py @@ -507,10 +507,8 @@ def update_params_for_auth(self, headers, querys, auth_settings): continue elif auth_setting['in'] == 'header': headers[auth_setting['key']] = auth_setting['value'] - break elif auth_setting['in'] == 'query': querys.append((auth_setting['key'], auth_setting['value'])) - break else: raise ValueError( 'Authentication token must be in `query` or `header`' diff --git a/giteapy/configuration.py b/giteapy/configuration.py old mode 100755 new mode 100644 index 07a81f9..9579336 --- a/giteapy/configuration.py +++ b/giteapy/configuration.py @@ -49,6 +49,8 @@ def __init__(self): self.api_key = {} # dict to store API prefix (e.g. Bearer) self.api_key_prefix = {} + # function to refresh API key if expired + self.refresh_api_key_hook = None # Username for HTTP basic authentication self.username = "" # Password for HTTP basic authentication @@ -200,20 +202,23 @@ def get_api_key_with_prefix(self, identifier): :param identifier: The identifier of apiKey. :return: The token for api key authentication. """ - if (self.api_key.get(identifier) and - self.api_key_prefix.get(identifier)): - return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501 - elif self.api_key.get(identifier): - return self.api_key[identifier] + + if self.refresh_api_key_hook: + self.refresh_api_key_hook(self) + + key = self.api_key.get(identifier) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key def get_basic_auth_token(self): """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. """ - if not self.username or not self.password: - return None - return urllib3.util.make_headers( basic_auth=self.username + ':' + self.password ).get('authorization') diff --git a/giteapy/models/__init__.py b/giteapy/models/__init__.py old mode 100755 new mode 100644 index 2357958..d71c846 --- a/giteapy/models/__init__.py +++ b/giteapy/models/__init__.py @@ -7,7 +7,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -23,23 +23,30 @@ from giteapy.models.annotated_tag_object import AnnotatedTagObject from giteapy.models.attachment import Attachment from giteapy.models.branch import Branch +from giteapy.models.branch_protection import BranchProtection from giteapy.models.comment import Comment from giteapy.models.commit import Commit +from giteapy.models.commit_date_options import CommitDateOptions from giteapy.models.commit_meta import CommitMeta from giteapy.models.commit_user import CommitUser from giteapy.models.contents_response import ContentsResponse +from giteapy.models.create_branch_protection_option import CreateBranchProtectionOption from giteapy.models.create_email_option import CreateEmailOption from giteapy.models.create_file_options import CreateFileOptions from giteapy.models.create_fork_option import CreateForkOption from giteapy.models.create_gpg_key_option import CreateGPGKeyOption from giteapy.models.create_hook_option import CreateHookOption +from giteapy.models.create_hook_option_config import CreateHookOptionConfig from giteapy.models.create_issue_comment_option import CreateIssueCommentOption from giteapy.models.create_issue_option import CreateIssueOption from giteapy.models.create_key_option import CreateKeyOption from giteapy.models.create_label_option import CreateLabelOption from giteapy.models.create_milestone_option import CreateMilestoneOption +from giteapy.models.create_o_auth2_application_options import CreateOAuth2ApplicationOptions from giteapy.models.create_org_option import CreateOrgOption from giteapy.models.create_pull_request_option import CreatePullRequestOption +from giteapy.models.create_pull_review_comment import CreatePullReviewComment +from giteapy.models.create_pull_review_options import CreatePullReviewOptions from giteapy.models.create_release_option import CreateReleaseOption from giteapy.models.create_repo_option import CreateRepoOption from giteapy.models.create_status_option import CreateStatusOption @@ -49,6 +56,7 @@ from giteapy.models.delete_file_options import DeleteFileOptions from giteapy.models.deploy_key import DeployKey from giteapy.models.edit_attachment_options import EditAttachmentOptions +from giteapy.models.edit_branch_protection_option import EditBranchProtectionOption from giteapy.models.edit_deadline_option import EditDeadlineOption from giteapy.models.edit_git_hook_option import EditGitHookOption from giteapy.models.edit_hook_option import EditHookOption @@ -58,6 +66,7 @@ from giteapy.models.edit_milestone_option import EditMilestoneOption from giteapy.models.edit_org_option import EditOrgOption from giteapy.models.edit_pull_request_option import EditPullRequestOption +from giteapy.models.edit_reaction_option import EditReactionOption from giteapy.models.edit_release_option import EditReleaseOption from giteapy.models.edit_repo_option import EditRepoOption from giteapy.models.edit_team_option import EditTeamOption @@ -89,6 +98,10 @@ from giteapy.models.merge_pull_request_option import MergePullRequestOption from giteapy.models.migrate_repo_form import MigrateRepoForm from giteapy.models.milestone import Milestone +from giteapy.models.notification_count import NotificationCount +from giteapy.models.notification_subject import NotificationSubject +from giteapy.models.notification_thread import NotificationThread +from giteapy.models.o_auth2_application import OAuth2Application from giteapy.models.organization import Organization from giteapy.models.pr_branch_info import PRBranchInfo from giteapy.models.payload_commit import PayloadCommit @@ -98,22 +111,30 @@ from giteapy.models.public_key import PublicKey from giteapy.models.pull_request import PullRequest from giteapy.models.pull_request_meta import PullRequestMeta +from giteapy.models.pull_review import PullReview +from giteapy.models.pull_review_comment import PullReviewComment +from giteapy.models.reaction import Reaction from giteapy.models.reference import Reference from giteapy.models.release import Release from giteapy.models.repo_commit import RepoCommit from giteapy.models.repo_topic_options import RepoTopicOptions from giteapy.models.repository import Repository +from giteapy.models.repository_meta import RepositoryMeta +from giteapy.models.review_state_type import ReviewStateType from giteapy.models.search_results import SearchResults from giteapy.models.server_version import ServerVersion from giteapy.models.state_type import StateType from giteapy.models.status import Status from giteapy.models.status_state import StatusState +from giteapy.models.stop_watch import StopWatch +from giteapy.models.submit_pull_review_options import SubmitPullReviewOptions from giteapy.models.tag import Tag from giteapy.models.team import Team from giteapy.models.time_stamp import TimeStamp from giteapy.models.topic_name import TopicName from giteapy.models.topic_response import TopicResponse from giteapy.models.tracked_time import TrackedTime +from giteapy.models.transfer_repo_option import TransferRepoOption from giteapy.models.update_file_options import UpdateFileOptions from giteapy.models.user import User from giteapy.models.user_heatmap_data import UserHeatmapData diff --git a/giteapy/models/access_token.py b/giteapy/models/access_token.py old mode 100755 new mode 100644 index 069727d..2d3ca74 --- a/giteapy/models/access_token.py +++ b/giteapy/models/access_token.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/add_collaborator_option.py b/giteapy/models/add_collaborator_option.py old mode 100755 new mode 100644 index 32f942e..d87f211 --- a/giteapy/models/add_collaborator_option.py +++ b/giteapy/models/add_collaborator_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/add_time_option.py b/giteapy/models/add_time_option.py old mode 100755 new mode 100644 index 03bf039..e94ce0c --- a/giteapy/models/add_time_option.py +++ b/giteapy/models/add_time_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -31,20 +31,51 @@ class AddTimeOption(object): and the value is json key in definition. """ swagger_types = { - 'time': 'int' + 'created': 'datetime', + 'time': 'int', + 'user_name': 'str' } attribute_map = { - 'time': 'time' + 'created': 'created', + 'time': 'time', + 'user_name': 'user_name' } - def __init__(self, time=None): # noqa: E501 + def __init__(self, created=None, time=None, user_name=None): # noqa: E501 """AddTimeOption - a model defined in Swagger""" # noqa: E501 + self._created = None self._time = None + self._user_name = None self.discriminator = None + if created is not None: + self.created = created self.time = time + if user_name is not None: + self.user_name = user_name + + @property + def created(self): + """Gets the created of this AddTimeOption. # noqa: E501 + + + :return: The created of this AddTimeOption. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this AddTimeOption. + + + :param created: The created of this AddTimeOption. # noqa: E501 + :type: datetime + """ + + self._created = created @property def time(self): @@ -71,6 +102,29 @@ def time(self, time): self._time = time + @property + def user_name(self): + """Gets the user_name of this AddTimeOption. # noqa: E501 + + User who spent the time (optional) # noqa: E501 + + :return: The user_name of this AddTimeOption. # noqa: E501 + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """Sets the user_name of this AddTimeOption. + + User who spent the time (optional) # noqa: E501 + + :param user_name: The user_name of this AddTimeOption. # noqa: E501 + :type: str + """ + + self._user_name = user_name + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/giteapy/models/annotated_tag.py b/giteapy/models/annotated_tag.py old mode 100755 new mode 100644 index 3fc10b8..2565fca --- a/giteapy/models/annotated_tag.py +++ b/giteapy/models/annotated_tag.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,10 +16,6 @@ import six -from giteapy.models.annotated_tag_object import AnnotatedTagObject # noqa: F401,E501 -from giteapy.models.commit_user import CommitUser # noqa: F401,E501 -from giteapy.models.payload_commit_verification import PayloadCommitVerification # noqa: F401,E501 - class AnnotatedTag(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/annotated_tag_object.py b/giteapy/models/annotated_tag_object.py old mode 100755 new mode 100644 index 714b254..b8fa3d5 --- a/giteapy/models/annotated_tag_object.py +++ b/giteapy/models/annotated_tag_object.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/api_error.py b/giteapy/models/api_error.py old mode 100755 new mode 100644 index d328f52..aa3c3fe --- a/giteapy/models/api_error.py +++ b/giteapy/models/api_error.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/attachment.py b/giteapy/models/attachment.py old mode 100755 new mode 100644 index 23493a5..8ffa2f8 --- a/giteapy/models/attachment.py +++ b/giteapy/models/attachment.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/branch.py b/giteapy/models/branch.py old mode 100755 new mode 100644 index 3ee2f0c..a24d339 --- a/giteapy/models/branch.py +++ b/giteapy/models/branch.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.payload_commit import PayloadCommit # noqa: F401,E501 - class Branch(object): """NOTE: This class is auto generated by the swagger code generator program. @@ -34,25 +32,60 @@ class Branch(object): """ swagger_types = { 'commit': 'PayloadCommit', - 'name': 'str' + 'effective_branch_protection_name': 'str', + 'enable_status_check': 'bool', + 'name': 'str', + 'protected': 'bool', + 'required_approvals': 'int', + 'status_check_contexts': 'list[str]', + 'user_can_merge': 'bool', + 'user_can_push': 'bool' } attribute_map = { 'commit': 'commit', - 'name': 'name' + 'effective_branch_protection_name': 'effective_branch_protection_name', + 'enable_status_check': 'enable_status_check', + 'name': 'name', + 'protected': 'protected', + 'required_approvals': 'required_approvals', + 'status_check_contexts': 'status_check_contexts', + 'user_can_merge': 'user_can_merge', + 'user_can_push': 'user_can_push' } - def __init__(self, commit=None, name=None): # noqa: E501 + def __init__(self, commit=None, effective_branch_protection_name=None, enable_status_check=None, name=None, protected=None, required_approvals=None, status_check_contexts=None, user_can_merge=None, user_can_push=None): # noqa: E501 """Branch - a model defined in Swagger""" # noqa: E501 self._commit = None + self._effective_branch_protection_name = None + self._enable_status_check = None self._name = None + self._protected = None + self._required_approvals = None + self._status_check_contexts = None + self._user_can_merge = None + self._user_can_push = None self.discriminator = None if commit is not None: self.commit = commit + if effective_branch_protection_name is not None: + self.effective_branch_protection_name = effective_branch_protection_name + if enable_status_check is not None: + self.enable_status_check = enable_status_check if name is not None: self.name = name + if protected is not None: + self.protected = protected + if required_approvals is not None: + self.required_approvals = required_approvals + if status_check_contexts is not None: + self.status_check_contexts = status_check_contexts + if user_can_merge is not None: + self.user_can_merge = user_can_merge + if user_can_push is not None: + self.user_can_push = user_can_push @property def commit(self): @@ -75,6 +108,48 @@ def commit(self, commit): self._commit = commit + @property + def effective_branch_protection_name(self): + """Gets the effective_branch_protection_name of this Branch. # noqa: E501 + + + :return: The effective_branch_protection_name of this Branch. # noqa: E501 + :rtype: str + """ + return self._effective_branch_protection_name + + @effective_branch_protection_name.setter + def effective_branch_protection_name(self, effective_branch_protection_name): + """Sets the effective_branch_protection_name of this Branch. + + + :param effective_branch_protection_name: The effective_branch_protection_name of this Branch. # noqa: E501 + :type: str + """ + + self._effective_branch_protection_name = effective_branch_protection_name + + @property + def enable_status_check(self): + """Gets the enable_status_check of this Branch. # noqa: E501 + + + :return: The enable_status_check of this Branch. # noqa: E501 + :rtype: bool + """ + return self._enable_status_check + + @enable_status_check.setter + def enable_status_check(self, enable_status_check): + """Sets the enable_status_check of this Branch. + + + :param enable_status_check: The enable_status_check of this Branch. # noqa: E501 + :type: bool + """ + + self._enable_status_check = enable_status_check + @property def name(self): """Gets the name of this Branch. # noqa: E501 @@ -96,6 +171,111 @@ def name(self, name): self._name = name + @property + def protected(self): + """Gets the protected of this Branch. # noqa: E501 + + + :return: The protected of this Branch. # noqa: E501 + :rtype: bool + """ + return self._protected + + @protected.setter + def protected(self, protected): + """Sets the protected of this Branch. + + + :param protected: The protected of this Branch. # noqa: E501 + :type: bool + """ + + self._protected = protected + + @property + def required_approvals(self): + """Gets the required_approvals of this Branch. # noqa: E501 + + + :return: The required_approvals of this Branch. # noqa: E501 + :rtype: int + """ + return self._required_approvals + + @required_approvals.setter + def required_approvals(self, required_approvals): + """Sets the required_approvals of this Branch. + + + :param required_approvals: The required_approvals of this Branch. # noqa: E501 + :type: int + """ + + self._required_approvals = required_approvals + + @property + def status_check_contexts(self): + """Gets the status_check_contexts of this Branch. # noqa: E501 + + + :return: The status_check_contexts of this Branch. # noqa: E501 + :rtype: list[str] + """ + return self._status_check_contexts + + @status_check_contexts.setter + def status_check_contexts(self, status_check_contexts): + """Sets the status_check_contexts of this Branch. + + + :param status_check_contexts: The status_check_contexts of this Branch. # noqa: E501 + :type: list[str] + """ + + self._status_check_contexts = status_check_contexts + + @property + def user_can_merge(self): + """Gets the user_can_merge of this Branch. # noqa: E501 + + + :return: The user_can_merge of this Branch. # noqa: E501 + :rtype: bool + """ + return self._user_can_merge + + @user_can_merge.setter + def user_can_merge(self, user_can_merge): + """Sets the user_can_merge of this Branch. + + + :param user_can_merge: The user_can_merge of this Branch. # noqa: E501 + :type: bool + """ + + self._user_can_merge = user_can_merge + + @property + def user_can_push(self): + """Gets the user_can_push of this Branch. # noqa: E501 + + + :return: The user_can_push of this Branch. # noqa: E501 + :rtype: bool + """ + return self._user_can_push + + @user_can_push.setter + def user_can_push(self, user_can_push): + """Sets the user_can_push of this Branch. + + + :param user_can_push: The user_can_push of this Branch. # noqa: E501 + :type: bool + """ + + self._user_can_push = user_can_push + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/giteapy/models/branch_protection.py b/giteapy/models/branch_protection.py new file mode 100644 index 0000000..c6ec47f --- /dev/null +++ b/giteapy/models/branch_protection.py @@ -0,0 +1,661 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class BranchProtection(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'approvals_whitelist_teams': 'list[str]', + 'approvals_whitelist_username': 'list[str]', + 'block_on_outdated_branch': 'bool', + 'block_on_rejected_reviews': 'bool', + 'branch_name': 'str', + 'created_at': 'datetime', + 'dismiss_stale_approvals': 'bool', + 'enable_approvals_whitelist': 'bool', + 'enable_merge_whitelist': 'bool', + 'enable_push': 'bool', + 'enable_push_whitelist': 'bool', + 'enable_status_check': 'bool', + 'merge_whitelist_teams': 'list[str]', + 'merge_whitelist_usernames': 'list[str]', + 'protected_file_patterns': 'str', + 'push_whitelist_deploy_keys': 'bool', + 'push_whitelist_teams': 'list[str]', + 'push_whitelist_usernames': 'list[str]', + 'require_signed_commits': 'bool', + 'required_approvals': 'int', + 'status_check_contexts': 'list[str]', + 'updated_at': 'datetime' + } + + attribute_map = { + 'approvals_whitelist_teams': 'approvals_whitelist_teams', + 'approvals_whitelist_username': 'approvals_whitelist_username', + 'block_on_outdated_branch': 'block_on_outdated_branch', + 'block_on_rejected_reviews': 'block_on_rejected_reviews', + 'branch_name': 'branch_name', + 'created_at': 'created_at', + 'dismiss_stale_approvals': 'dismiss_stale_approvals', + 'enable_approvals_whitelist': 'enable_approvals_whitelist', + 'enable_merge_whitelist': 'enable_merge_whitelist', + 'enable_push': 'enable_push', + 'enable_push_whitelist': 'enable_push_whitelist', + 'enable_status_check': 'enable_status_check', + 'merge_whitelist_teams': 'merge_whitelist_teams', + 'merge_whitelist_usernames': 'merge_whitelist_usernames', + 'protected_file_patterns': 'protected_file_patterns', + 'push_whitelist_deploy_keys': 'push_whitelist_deploy_keys', + 'push_whitelist_teams': 'push_whitelist_teams', + 'push_whitelist_usernames': 'push_whitelist_usernames', + 'require_signed_commits': 'require_signed_commits', + 'required_approvals': 'required_approvals', + 'status_check_contexts': 'status_check_contexts', + 'updated_at': 'updated_at' + } + + def __init__(self, approvals_whitelist_teams=None, approvals_whitelist_username=None, block_on_outdated_branch=None, block_on_rejected_reviews=None, branch_name=None, created_at=None, dismiss_stale_approvals=None, enable_approvals_whitelist=None, enable_merge_whitelist=None, enable_push=None, enable_push_whitelist=None, enable_status_check=None, merge_whitelist_teams=None, merge_whitelist_usernames=None, protected_file_patterns=None, push_whitelist_deploy_keys=None, push_whitelist_teams=None, push_whitelist_usernames=None, require_signed_commits=None, required_approvals=None, status_check_contexts=None, updated_at=None): # noqa: E501 + """BranchProtection - a model defined in Swagger""" # noqa: E501 + + self._approvals_whitelist_teams = None + self._approvals_whitelist_username = None + self._block_on_outdated_branch = None + self._block_on_rejected_reviews = None + self._branch_name = None + self._created_at = None + self._dismiss_stale_approvals = None + self._enable_approvals_whitelist = None + self._enable_merge_whitelist = None + self._enable_push = None + self._enable_push_whitelist = None + self._enable_status_check = None + self._merge_whitelist_teams = None + self._merge_whitelist_usernames = None + self._protected_file_patterns = None + self._push_whitelist_deploy_keys = None + self._push_whitelist_teams = None + self._push_whitelist_usernames = None + self._require_signed_commits = None + self._required_approvals = None + self._status_check_contexts = None + self._updated_at = None + self.discriminator = None + + if approvals_whitelist_teams is not None: + self.approvals_whitelist_teams = approvals_whitelist_teams + if approvals_whitelist_username is not None: + self.approvals_whitelist_username = approvals_whitelist_username + if block_on_outdated_branch is not None: + self.block_on_outdated_branch = block_on_outdated_branch + if block_on_rejected_reviews is not None: + self.block_on_rejected_reviews = block_on_rejected_reviews + if branch_name is not None: + self.branch_name = branch_name + if created_at is not None: + self.created_at = created_at + if dismiss_stale_approvals is not None: + self.dismiss_stale_approvals = dismiss_stale_approvals + if enable_approvals_whitelist is not None: + self.enable_approvals_whitelist = enable_approvals_whitelist + if enable_merge_whitelist is not None: + self.enable_merge_whitelist = enable_merge_whitelist + if enable_push is not None: + self.enable_push = enable_push + if enable_push_whitelist is not None: + self.enable_push_whitelist = enable_push_whitelist + if enable_status_check is not None: + self.enable_status_check = enable_status_check + if merge_whitelist_teams is not None: + self.merge_whitelist_teams = merge_whitelist_teams + if merge_whitelist_usernames is not None: + self.merge_whitelist_usernames = merge_whitelist_usernames + if protected_file_patterns is not None: + self.protected_file_patterns = protected_file_patterns + if push_whitelist_deploy_keys is not None: + self.push_whitelist_deploy_keys = push_whitelist_deploy_keys + if push_whitelist_teams is not None: + self.push_whitelist_teams = push_whitelist_teams + if push_whitelist_usernames is not None: + self.push_whitelist_usernames = push_whitelist_usernames + if require_signed_commits is not None: + self.require_signed_commits = require_signed_commits + if required_approvals is not None: + self.required_approvals = required_approvals + if status_check_contexts is not None: + self.status_check_contexts = status_check_contexts + if updated_at is not None: + self.updated_at = updated_at + + @property + def approvals_whitelist_teams(self): + """Gets the approvals_whitelist_teams of this BranchProtection. # noqa: E501 + + + :return: The approvals_whitelist_teams of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_teams + + @approvals_whitelist_teams.setter + def approvals_whitelist_teams(self, approvals_whitelist_teams): + """Sets the approvals_whitelist_teams of this BranchProtection. + + + :param approvals_whitelist_teams: The approvals_whitelist_teams of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_teams = approvals_whitelist_teams + + @property + def approvals_whitelist_username(self): + """Gets the approvals_whitelist_username of this BranchProtection. # noqa: E501 + + + :return: The approvals_whitelist_username of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_username + + @approvals_whitelist_username.setter + def approvals_whitelist_username(self, approvals_whitelist_username): + """Sets the approvals_whitelist_username of this BranchProtection. + + + :param approvals_whitelist_username: The approvals_whitelist_username of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_username = approvals_whitelist_username + + @property + def block_on_outdated_branch(self): + """Gets the block_on_outdated_branch of this BranchProtection. # noqa: E501 + + + :return: The block_on_outdated_branch of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._block_on_outdated_branch + + @block_on_outdated_branch.setter + def block_on_outdated_branch(self, block_on_outdated_branch): + """Sets the block_on_outdated_branch of this BranchProtection. + + + :param block_on_outdated_branch: The block_on_outdated_branch of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._block_on_outdated_branch = block_on_outdated_branch + + @property + def block_on_rejected_reviews(self): + """Gets the block_on_rejected_reviews of this BranchProtection. # noqa: E501 + + + :return: The block_on_rejected_reviews of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._block_on_rejected_reviews + + @block_on_rejected_reviews.setter + def block_on_rejected_reviews(self, block_on_rejected_reviews): + """Sets the block_on_rejected_reviews of this BranchProtection. + + + :param block_on_rejected_reviews: The block_on_rejected_reviews of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._block_on_rejected_reviews = block_on_rejected_reviews + + @property + def branch_name(self): + """Gets the branch_name of this BranchProtection. # noqa: E501 + + + :return: The branch_name of this BranchProtection. # noqa: E501 + :rtype: str + """ + return self._branch_name + + @branch_name.setter + def branch_name(self, branch_name): + """Sets the branch_name of this BranchProtection. + + + :param branch_name: The branch_name of this BranchProtection. # noqa: E501 + :type: str + """ + + self._branch_name = branch_name + + @property + def created_at(self): + """Gets the created_at of this BranchProtection. # noqa: E501 + + + :return: The created_at of this BranchProtection. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this BranchProtection. + + + :param created_at: The created_at of this BranchProtection. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def dismiss_stale_approvals(self): + """Gets the dismiss_stale_approvals of this BranchProtection. # noqa: E501 + + + :return: The dismiss_stale_approvals of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._dismiss_stale_approvals + + @dismiss_stale_approvals.setter + def dismiss_stale_approvals(self, dismiss_stale_approvals): + """Sets the dismiss_stale_approvals of this BranchProtection. + + + :param dismiss_stale_approvals: The dismiss_stale_approvals of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._dismiss_stale_approvals = dismiss_stale_approvals + + @property + def enable_approvals_whitelist(self): + """Gets the enable_approvals_whitelist of this BranchProtection. # noqa: E501 + + + :return: The enable_approvals_whitelist of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_approvals_whitelist + + @enable_approvals_whitelist.setter + def enable_approvals_whitelist(self, enable_approvals_whitelist): + """Sets the enable_approvals_whitelist of this BranchProtection. + + + :param enable_approvals_whitelist: The enable_approvals_whitelist of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_approvals_whitelist = enable_approvals_whitelist + + @property + def enable_merge_whitelist(self): + """Gets the enable_merge_whitelist of this BranchProtection. # noqa: E501 + + + :return: The enable_merge_whitelist of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_merge_whitelist + + @enable_merge_whitelist.setter + def enable_merge_whitelist(self, enable_merge_whitelist): + """Sets the enable_merge_whitelist of this BranchProtection. + + + :param enable_merge_whitelist: The enable_merge_whitelist of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_merge_whitelist = enable_merge_whitelist + + @property + def enable_push(self): + """Gets the enable_push of this BranchProtection. # noqa: E501 + + + :return: The enable_push of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_push + + @enable_push.setter + def enable_push(self, enable_push): + """Sets the enable_push of this BranchProtection. + + + :param enable_push: The enable_push of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_push = enable_push + + @property + def enable_push_whitelist(self): + """Gets the enable_push_whitelist of this BranchProtection. # noqa: E501 + + + :return: The enable_push_whitelist of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_push_whitelist + + @enable_push_whitelist.setter + def enable_push_whitelist(self, enable_push_whitelist): + """Sets the enable_push_whitelist of this BranchProtection. + + + :param enable_push_whitelist: The enable_push_whitelist of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_push_whitelist = enable_push_whitelist + + @property + def enable_status_check(self): + """Gets the enable_status_check of this BranchProtection. # noqa: E501 + + + :return: The enable_status_check of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._enable_status_check + + @enable_status_check.setter + def enable_status_check(self, enable_status_check): + """Sets the enable_status_check of this BranchProtection. + + + :param enable_status_check: The enable_status_check of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._enable_status_check = enable_status_check + + @property + def merge_whitelist_teams(self): + """Gets the merge_whitelist_teams of this BranchProtection. # noqa: E501 + + + :return: The merge_whitelist_teams of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_teams + + @merge_whitelist_teams.setter + def merge_whitelist_teams(self, merge_whitelist_teams): + """Sets the merge_whitelist_teams of this BranchProtection. + + + :param merge_whitelist_teams: The merge_whitelist_teams of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_teams = merge_whitelist_teams + + @property + def merge_whitelist_usernames(self): + """Gets the merge_whitelist_usernames of this BranchProtection. # noqa: E501 + + + :return: The merge_whitelist_usernames of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_usernames + + @merge_whitelist_usernames.setter + def merge_whitelist_usernames(self, merge_whitelist_usernames): + """Sets the merge_whitelist_usernames of this BranchProtection. + + + :param merge_whitelist_usernames: The merge_whitelist_usernames of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_usernames = merge_whitelist_usernames + + @property + def protected_file_patterns(self): + """Gets the protected_file_patterns of this BranchProtection. # noqa: E501 + + + :return: The protected_file_patterns of this BranchProtection. # noqa: E501 + :rtype: str + """ + return self._protected_file_patterns + + @protected_file_patterns.setter + def protected_file_patterns(self, protected_file_patterns): + """Sets the protected_file_patterns of this BranchProtection. + + + :param protected_file_patterns: The protected_file_patterns of this BranchProtection. # noqa: E501 + :type: str + """ + + self._protected_file_patterns = protected_file_patterns + + @property + def push_whitelist_deploy_keys(self): + """Gets the push_whitelist_deploy_keys of this BranchProtection. # noqa: E501 + + + :return: The push_whitelist_deploy_keys of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._push_whitelist_deploy_keys + + @push_whitelist_deploy_keys.setter + def push_whitelist_deploy_keys(self, push_whitelist_deploy_keys): + """Sets the push_whitelist_deploy_keys of this BranchProtection. + + + :param push_whitelist_deploy_keys: The push_whitelist_deploy_keys of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._push_whitelist_deploy_keys = push_whitelist_deploy_keys + + @property + def push_whitelist_teams(self): + """Gets the push_whitelist_teams of this BranchProtection. # noqa: E501 + + + :return: The push_whitelist_teams of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_teams + + @push_whitelist_teams.setter + def push_whitelist_teams(self, push_whitelist_teams): + """Sets the push_whitelist_teams of this BranchProtection. + + + :param push_whitelist_teams: The push_whitelist_teams of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_teams = push_whitelist_teams + + @property + def push_whitelist_usernames(self): + """Gets the push_whitelist_usernames of this BranchProtection. # noqa: E501 + + + :return: The push_whitelist_usernames of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_usernames + + @push_whitelist_usernames.setter + def push_whitelist_usernames(self, push_whitelist_usernames): + """Sets the push_whitelist_usernames of this BranchProtection. + + + :param push_whitelist_usernames: The push_whitelist_usernames of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_usernames = push_whitelist_usernames + + @property + def require_signed_commits(self): + """Gets the require_signed_commits of this BranchProtection. # noqa: E501 + + + :return: The require_signed_commits of this BranchProtection. # noqa: E501 + :rtype: bool + """ + return self._require_signed_commits + + @require_signed_commits.setter + def require_signed_commits(self, require_signed_commits): + """Sets the require_signed_commits of this BranchProtection. + + + :param require_signed_commits: The require_signed_commits of this BranchProtection. # noqa: E501 + :type: bool + """ + + self._require_signed_commits = require_signed_commits + + @property + def required_approvals(self): + """Gets the required_approvals of this BranchProtection. # noqa: E501 + + + :return: The required_approvals of this BranchProtection. # noqa: E501 + :rtype: int + """ + return self._required_approvals + + @required_approvals.setter + def required_approvals(self, required_approvals): + """Sets the required_approvals of this BranchProtection. + + + :param required_approvals: The required_approvals of this BranchProtection. # noqa: E501 + :type: int + """ + + self._required_approvals = required_approvals + + @property + def status_check_contexts(self): + """Gets the status_check_contexts of this BranchProtection. # noqa: E501 + + + :return: The status_check_contexts of this BranchProtection. # noqa: E501 + :rtype: list[str] + """ + return self._status_check_contexts + + @status_check_contexts.setter + def status_check_contexts(self, status_check_contexts): + """Sets the status_check_contexts of this BranchProtection. + + + :param status_check_contexts: The status_check_contexts of this BranchProtection. # noqa: E501 + :type: list[str] + """ + + self._status_check_contexts = status_check_contexts + + @property + def updated_at(self): + """Gets the updated_at of this BranchProtection. # noqa: E501 + + + :return: The updated_at of this BranchProtection. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this BranchProtection. + + + :param updated_at: The updated_at of this BranchProtection. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BranchProtection, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BranchProtection): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/comment.py b/giteapy/models/comment.py old mode 100755 new mode 100644 index 776e2d3..ea67095 --- a/giteapy/models/comment.py +++ b/giteapy/models/comment.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.user import User # noqa: F401,E501 - class Comment(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/commit.py b/giteapy/models/commit.py old mode 100755 new mode 100644 index 094549f..dfe881b --- a/giteapy/models/commit.py +++ b/giteapy/models/commit.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,10 +16,6 @@ import six -from giteapy.models.commit_meta import CommitMeta # noqa: F401,E501 -from giteapy.models.repo_commit import RepoCommit # noqa: F401,E501 -from giteapy.models.user import User # noqa: F401,E501 - class Commit(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/commit_date_options.py b/giteapy/models/commit_date_options.py new file mode 100644 index 0000000..7364e19 --- /dev/null +++ b/giteapy/models/commit_date_options.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CommitDateOptions(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'author': 'datetime', + 'committer': 'datetime' + } + + attribute_map = { + 'author': 'author', + 'committer': 'committer' + } + + def __init__(self, author=None, committer=None): # noqa: E501 + """CommitDateOptions - a model defined in Swagger""" # noqa: E501 + + self._author = None + self._committer = None + self.discriminator = None + + if author is not None: + self.author = author + if committer is not None: + self.committer = committer + + @property + def author(self): + """Gets the author of this CommitDateOptions. # noqa: E501 + + + :return: The author of this CommitDateOptions. # noqa: E501 + :rtype: datetime + """ + return self._author + + @author.setter + def author(self, author): + """Sets the author of this CommitDateOptions. + + + :param author: The author of this CommitDateOptions. # noqa: E501 + :type: datetime + """ + + self._author = author + + @property + def committer(self): + """Gets the committer of this CommitDateOptions. # noqa: E501 + + + :return: The committer of this CommitDateOptions. # noqa: E501 + :rtype: datetime + """ + return self._committer + + @committer.setter + def committer(self, committer): + """Sets the committer of this CommitDateOptions. + + + :param committer: The committer of this CommitDateOptions. # noqa: E501 + :type: datetime + """ + + self._committer = committer + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CommitDateOptions, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CommitDateOptions): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/commit_meta.py b/giteapy/models/commit_meta.py old mode 100755 new mode 100644 index 3cf0a0b..451487a --- a/giteapy/models/commit_meta.py +++ b/giteapy/models/commit_meta.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/commit_user.py b/giteapy/models/commit_user.py old mode 100755 new mode 100644 index b688578..a5331a5 --- a/giteapy/models/commit_user.py +++ b/giteapy/models/commit_user.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/contents_response.py b/giteapy/models/contents_response.py old mode 100755 new mode 100644 index ec29aa0..e937bb1 --- a/giteapy/models/contents_response.py +++ b/giteapy/models/contents_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.file_links_response import FileLinksResponse # noqa: F401,E501 - class ContentsResponse(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/create_branch_protection_option.py b/giteapy/models/create_branch_protection_option.py new file mode 100644 index 0000000..7c9eff9 --- /dev/null +++ b/giteapy/models/create_branch_protection_option.py @@ -0,0 +1,609 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateBranchProtectionOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'approvals_whitelist_teams': 'list[str]', + 'approvals_whitelist_username': 'list[str]', + 'block_on_outdated_branch': 'bool', + 'block_on_rejected_reviews': 'bool', + 'branch_name': 'str', + 'dismiss_stale_approvals': 'bool', + 'enable_approvals_whitelist': 'bool', + 'enable_merge_whitelist': 'bool', + 'enable_push': 'bool', + 'enable_push_whitelist': 'bool', + 'enable_status_check': 'bool', + 'merge_whitelist_teams': 'list[str]', + 'merge_whitelist_usernames': 'list[str]', + 'protected_file_patterns': 'str', + 'push_whitelist_deploy_keys': 'bool', + 'push_whitelist_teams': 'list[str]', + 'push_whitelist_usernames': 'list[str]', + 'require_signed_commits': 'bool', + 'required_approvals': 'int', + 'status_check_contexts': 'list[str]' + } + + attribute_map = { + 'approvals_whitelist_teams': 'approvals_whitelist_teams', + 'approvals_whitelist_username': 'approvals_whitelist_username', + 'block_on_outdated_branch': 'block_on_outdated_branch', + 'block_on_rejected_reviews': 'block_on_rejected_reviews', + 'branch_name': 'branch_name', + 'dismiss_stale_approvals': 'dismiss_stale_approvals', + 'enable_approvals_whitelist': 'enable_approvals_whitelist', + 'enable_merge_whitelist': 'enable_merge_whitelist', + 'enable_push': 'enable_push', + 'enable_push_whitelist': 'enable_push_whitelist', + 'enable_status_check': 'enable_status_check', + 'merge_whitelist_teams': 'merge_whitelist_teams', + 'merge_whitelist_usernames': 'merge_whitelist_usernames', + 'protected_file_patterns': 'protected_file_patterns', + 'push_whitelist_deploy_keys': 'push_whitelist_deploy_keys', + 'push_whitelist_teams': 'push_whitelist_teams', + 'push_whitelist_usernames': 'push_whitelist_usernames', + 'require_signed_commits': 'require_signed_commits', + 'required_approvals': 'required_approvals', + 'status_check_contexts': 'status_check_contexts' + } + + def __init__(self, approvals_whitelist_teams=None, approvals_whitelist_username=None, block_on_outdated_branch=None, block_on_rejected_reviews=None, branch_name=None, dismiss_stale_approvals=None, enable_approvals_whitelist=None, enable_merge_whitelist=None, enable_push=None, enable_push_whitelist=None, enable_status_check=None, merge_whitelist_teams=None, merge_whitelist_usernames=None, protected_file_patterns=None, push_whitelist_deploy_keys=None, push_whitelist_teams=None, push_whitelist_usernames=None, require_signed_commits=None, required_approvals=None, status_check_contexts=None): # noqa: E501 + """CreateBranchProtectionOption - a model defined in Swagger""" # noqa: E501 + + self._approvals_whitelist_teams = None + self._approvals_whitelist_username = None + self._block_on_outdated_branch = None + self._block_on_rejected_reviews = None + self._branch_name = None + self._dismiss_stale_approvals = None + self._enable_approvals_whitelist = None + self._enable_merge_whitelist = None + self._enable_push = None + self._enable_push_whitelist = None + self._enable_status_check = None + self._merge_whitelist_teams = None + self._merge_whitelist_usernames = None + self._protected_file_patterns = None + self._push_whitelist_deploy_keys = None + self._push_whitelist_teams = None + self._push_whitelist_usernames = None + self._require_signed_commits = None + self._required_approvals = None + self._status_check_contexts = None + self.discriminator = None + + if approvals_whitelist_teams is not None: + self.approvals_whitelist_teams = approvals_whitelist_teams + if approvals_whitelist_username is not None: + self.approvals_whitelist_username = approvals_whitelist_username + if block_on_outdated_branch is not None: + self.block_on_outdated_branch = block_on_outdated_branch + if block_on_rejected_reviews is not None: + self.block_on_rejected_reviews = block_on_rejected_reviews + if branch_name is not None: + self.branch_name = branch_name + if dismiss_stale_approvals is not None: + self.dismiss_stale_approvals = dismiss_stale_approvals + if enable_approvals_whitelist is not None: + self.enable_approvals_whitelist = enable_approvals_whitelist + if enable_merge_whitelist is not None: + self.enable_merge_whitelist = enable_merge_whitelist + if enable_push is not None: + self.enable_push = enable_push + if enable_push_whitelist is not None: + self.enable_push_whitelist = enable_push_whitelist + if enable_status_check is not None: + self.enable_status_check = enable_status_check + if merge_whitelist_teams is not None: + self.merge_whitelist_teams = merge_whitelist_teams + if merge_whitelist_usernames is not None: + self.merge_whitelist_usernames = merge_whitelist_usernames + if protected_file_patterns is not None: + self.protected_file_patterns = protected_file_patterns + if push_whitelist_deploy_keys is not None: + self.push_whitelist_deploy_keys = push_whitelist_deploy_keys + if push_whitelist_teams is not None: + self.push_whitelist_teams = push_whitelist_teams + if push_whitelist_usernames is not None: + self.push_whitelist_usernames = push_whitelist_usernames + if require_signed_commits is not None: + self.require_signed_commits = require_signed_commits + if required_approvals is not None: + self.required_approvals = required_approvals + if status_check_contexts is not None: + self.status_check_contexts = status_check_contexts + + @property + def approvals_whitelist_teams(self): + """Gets the approvals_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The approvals_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_teams + + @approvals_whitelist_teams.setter + def approvals_whitelist_teams(self, approvals_whitelist_teams): + """Sets the approvals_whitelist_teams of this CreateBranchProtectionOption. + + + :param approvals_whitelist_teams: The approvals_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_teams = approvals_whitelist_teams + + @property + def approvals_whitelist_username(self): + """Gets the approvals_whitelist_username of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The approvals_whitelist_username of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_username + + @approvals_whitelist_username.setter + def approvals_whitelist_username(self, approvals_whitelist_username): + """Sets the approvals_whitelist_username of this CreateBranchProtectionOption. + + + :param approvals_whitelist_username: The approvals_whitelist_username of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_username = approvals_whitelist_username + + @property + def block_on_outdated_branch(self): + """Gets the block_on_outdated_branch of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The block_on_outdated_branch of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_outdated_branch + + @block_on_outdated_branch.setter + def block_on_outdated_branch(self, block_on_outdated_branch): + """Sets the block_on_outdated_branch of this CreateBranchProtectionOption. + + + :param block_on_outdated_branch: The block_on_outdated_branch of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_outdated_branch = block_on_outdated_branch + + @property + def block_on_rejected_reviews(self): + """Gets the block_on_rejected_reviews of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The block_on_rejected_reviews of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_rejected_reviews + + @block_on_rejected_reviews.setter + def block_on_rejected_reviews(self, block_on_rejected_reviews): + """Sets the block_on_rejected_reviews of this CreateBranchProtectionOption. + + + :param block_on_rejected_reviews: The block_on_rejected_reviews of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_rejected_reviews = block_on_rejected_reviews + + @property + def branch_name(self): + """Gets the branch_name of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The branch_name of this CreateBranchProtectionOption. # noqa: E501 + :rtype: str + """ + return self._branch_name + + @branch_name.setter + def branch_name(self, branch_name): + """Sets the branch_name of this CreateBranchProtectionOption. + + + :param branch_name: The branch_name of this CreateBranchProtectionOption. # noqa: E501 + :type: str + """ + + self._branch_name = branch_name + + @property + def dismiss_stale_approvals(self): + """Gets the dismiss_stale_approvals of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The dismiss_stale_approvals of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._dismiss_stale_approvals + + @dismiss_stale_approvals.setter + def dismiss_stale_approvals(self, dismiss_stale_approvals): + """Sets the dismiss_stale_approvals of this CreateBranchProtectionOption. + + + :param dismiss_stale_approvals: The dismiss_stale_approvals of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._dismiss_stale_approvals = dismiss_stale_approvals + + @property + def enable_approvals_whitelist(self): + """Gets the enable_approvals_whitelist of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_approvals_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_approvals_whitelist + + @enable_approvals_whitelist.setter + def enable_approvals_whitelist(self, enable_approvals_whitelist): + """Sets the enable_approvals_whitelist of this CreateBranchProtectionOption. + + + :param enable_approvals_whitelist: The enable_approvals_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_approvals_whitelist = enable_approvals_whitelist + + @property + def enable_merge_whitelist(self): + """Gets the enable_merge_whitelist of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_merge_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_merge_whitelist + + @enable_merge_whitelist.setter + def enable_merge_whitelist(self, enable_merge_whitelist): + """Sets the enable_merge_whitelist of this CreateBranchProtectionOption. + + + :param enable_merge_whitelist: The enable_merge_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_merge_whitelist = enable_merge_whitelist + + @property + def enable_push(self): + """Gets the enable_push of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_push of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_push + + @enable_push.setter + def enable_push(self, enable_push): + """Sets the enable_push of this CreateBranchProtectionOption. + + + :param enable_push: The enable_push of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_push = enable_push + + @property + def enable_push_whitelist(self): + """Gets the enable_push_whitelist of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_push_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_push_whitelist + + @enable_push_whitelist.setter + def enable_push_whitelist(self, enable_push_whitelist): + """Sets the enable_push_whitelist of this CreateBranchProtectionOption. + + + :param enable_push_whitelist: The enable_push_whitelist of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_push_whitelist = enable_push_whitelist + + @property + def enable_status_check(self): + """Gets the enable_status_check of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The enable_status_check of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_status_check + + @enable_status_check.setter + def enable_status_check(self, enable_status_check): + """Sets the enable_status_check of this CreateBranchProtectionOption. + + + :param enable_status_check: The enable_status_check of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_status_check = enable_status_check + + @property + def merge_whitelist_teams(self): + """Gets the merge_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The merge_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_teams + + @merge_whitelist_teams.setter + def merge_whitelist_teams(self, merge_whitelist_teams): + """Sets the merge_whitelist_teams of this CreateBranchProtectionOption. + + + :param merge_whitelist_teams: The merge_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_teams = merge_whitelist_teams + + @property + def merge_whitelist_usernames(self): + """Gets the merge_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The merge_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_usernames + + @merge_whitelist_usernames.setter + def merge_whitelist_usernames(self, merge_whitelist_usernames): + """Sets the merge_whitelist_usernames of this CreateBranchProtectionOption. + + + :param merge_whitelist_usernames: The merge_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_usernames = merge_whitelist_usernames + + @property + def protected_file_patterns(self): + """Gets the protected_file_patterns of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The protected_file_patterns of this CreateBranchProtectionOption. # noqa: E501 + :rtype: str + """ + return self._protected_file_patterns + + @protected_file_patterns.setter + def protected_file_patterns(self, protected_file_patterns): + """Sets the protected_file_patterns of this CreateBranchProtectionOption. + + + :param protected_file_patterns: The protected_file_patterns of this CreateBranchProtectionOption. # noqa: E501 + :type: str + """ + + self._protected_file_patterns = protected_file_patterns + + @property + def push_whitelist_deploy_keys(self): + """Gets the push_whitelist_deploy_keys of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_deploy_keys of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._push_whitelist_deploy_keys + + @push_whitelist_deploy_keys.setter + def push_whitelist_deploy_keys(self, push_whitelist_deploy_keys): + """Sets the push_whitelist_deploy_keys of this CreateBranchProtectionOption. + + + :param push_whitelist_deploy_keys: The push_whitelist_deploy_keys of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._push_whitelist_deploy_keys = push_whitelist_deploy_keys + + @property + def push_whitelist_teams(self): + """Gets the push_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_teams + + @push_whitelist_teams.setter + def push_whitelist_teams(self, push_whitelist_teams): + """Sets the push_whitelist_teams of this CreateBranchProtectionOption. + + + :param push_whitelist_teams: The push_whitelist_teams of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_teams = push_whitelist_teams + + @property + def push_whitelist_usernames(self): + """Gets the push_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_usernames + + @push_whitelist_usernames.setter + def push_whitelist_usernames(self, push_whitelist_usernames): + """Sets the push_whitelist_usernames of this CreateBranchProtectionOption. + + + :param push_whitelist_usernames: The push_whitelist_usernames of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_usernames = push_whitelist_usernames + + @property + def require_signed_commits(self): + """Gets the require_signed_commits of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The require_signed_commits of this CreateBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._require_signed_commits + + @require_signed_commits.setter + def require_signed_commits(self, require_signed_commits): + """Sets the require_signed_commits of this CreateBranchProtectionOption. + + + :param require_signed_commits: The require_signed_commits of this CreateBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._require_signed_commits = require_signed_commits + + @property + def required_approvals(self): + """Gets the required_approvals of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The required_approvals of this CreateBranchProtectionOption. # noqa: E501 + :rtype: int + """ + return self._required_approvals + + @required_approvals.setter + def required_approvals(self, required_approvals): + """Sets the required_approvals of this CreateBranchProtectionOption. + + + :param required_approvals: The required_approvals of this CreateBranchProtectionOption. # noqa: E501 + :type: int + """ + + self._required_approvals = required_approvals + + @property + def status_check_contexts(self): + """Gets the status_check_contexts of this CreateBranchProtectionOption. # noqa: E501 + + + :return: The status_check_contexts of this CreateBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._status_check_contexts + + @status_check_contexts.setter + def status_check_contexts(self, status_check_contexts): + """Sets the status_check_contexts of this CreateBranchProtectionOption. + + + :param status_check_contexts: The status_check_contexts of this CreateBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._status_check_contexts = status_check_contexts + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateBranchProtectionOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateBranchProtectionOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/create_email_option.py b/giteapy/models/create_email_option.py old mode 100755 new mode 100644 index 3693156..8bc5abf --- a/giteapy/models/create_email_option.py +++ b/giteapy/models/create_email_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/create_file_options.py b/giteapy/models/create_file_options.py old mode 100755 new mode 100644 index 29f2b5d..146cff3 --- a/giteapy/models/create_file_options.py +++ b/giteapy/models/create_file_options.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.identity import Identity # noqa: F401,E501 - class CreateFileOptions(object): """NOTE: This class is auto generated by the swagger code generator program. @@ -37,6 +35,7 @@ class CreateFileOptions(object): 'branch': 'str', 'committer': 'Identity', 'content': 'str', + 'dates': 'CommitDateOptions', 'message': 'str', 'new_branch': 'str' } @@ -46,17 +45,19 @@ class CreateFileOptions(object): 'branch': 'branch', 'committer': 'committer', 'content': 'content', + 'dates': 'dates', 'message': 'message', 'new_branch': 'new_branch' } - def __init__(self, author=None, branch=None, committer=None, content=None, message=None, new_branch=None): # noqa: E501 + def __init__(self, author=None, branch=None, committer=None, content=None, dates=None, message=None, new_branch=None): # noqa: E501 """CreateFileOptions - a model defined in Swagger""" # noqa: E501 self._author = None self._branch = None self._committer = None self._content = None + self._dates = None self._message = None self._new_branch = None self.discriminator = None @@ -68,6 +69,8 @@ def __init__(self, author=None, branch=None, committer=None, content=None, messa if committer is not None: self.committer = committer self.content = content + if dates is not None: + self.dates = dates if message is not None: self.message = message if new_branch is not None: @@ -163,6 +166,27 @@ def content(self, content): self._content = content + @property + def dates(self): + """Gets the dates of this CreateFileOptions. # noqa: E501 + + + :return: The dates of this CreateFileOptions. # noqa: E501 + :rtype: CommitDateOptions + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this CreateFileOptions. + + + :param dates: The dates of this CreateFileOptions. # noqa: E501 + :type: CommitDateOptions + """ + + self._dates = dates + @property def message(self): """Gets the message of this CreateFileOptions. # noqa: E501 diff --git a/giteapy/models/create_fork_option.py b/giteapy/models/create_fork_option.py old mode 100755 new mode 100644 index 252921c..cf9e71f --- a/giteapy/models/create_fork_option.py +++ b/giteapy/models/create_fork_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/create_gpg_key_option.py b/giteapy/models/create_gpg_key_option.py old mode 100755 new mode 100644 index a8094e2..5cbbacf --- a/giteapy/models/create_gpg_key_option.py +++ b/giteapy/models/create_gpg_key_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/create_hook_option.py b/giteapy/models/create_hook_option.py old mode 100755 new mode 100644 index 1cd48f5..000918a --- a/giteapy/models/create_hook_option.py +++ b/giteapy/models/create_hook_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -33,7 +33,7 @@ class CreateHookOption(object): swagger_types = { 'active': 'bool', 'branch_filter': 'str', - 'config': 'dict(str, str)', + 'config': 'CreateHookOptionConfig', 'events': 'list[str]', 'type': 'str' } @@ -113,7 +113,7 @@ def config(self): :return: The config of this CreateHookOption. # noqa: E501 - :rtype: dict(str, str) + :rtype: CreateHookOptionConfig """ return self._config @@ -123,7 +123,7 @@ def config(self, config): :param config: The config of this CreateHookOption. # noqa: E501 - :type: dict(str, str) + :type: CreateHookOptionConfig """ if config is None: raise ValueError("Invalid value for `config`, must not be `None`") # noqa: E501 @@ -171,7 +171,7 @@ def type(self, type): """ if type is None: raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 - allowed_values = ["gitea", "gogs", "slack", "discord"] # noqa: E501 + allowed_values = ["dingtalk", "discord", "gitea", "gogs", "msteams", "slack", "telegram", "feishu"] # noqa: E501 if type not in allowed_values: raise ValueError( "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501 diff --git a/giteapy/models/create_hook_option_config.py b/giteapy/models/create_hook_option_config.py new file mode 100644 index 0000000..8da5fe8 --- /dev/null +++ b/giteapy/models/create_hook_option_config.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateHookOptionConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """CreateHookOptionConfig - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateHookOptionConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateHookOptionConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/create_issue_comment_option.py b/giteapy/models/create_issue_comment_option.py old mode 100755 new mode 100644 index 8377c3b..34cf7b7 --- a/giteapy/models/create_issue_comment_option.py +++ b/giteapy/models/create_issue_comment_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/create_issue_option.py b/giteapy/models/create_issue_option.py old mode 100755 new mode 100644 index 147d13e..b2a61f8 --- a/giteapy/models/create_issue_option.py +++ b/giteapy/models/create_issue_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/create_key_option.py b/giteapy/models/create_key_option.py old mode 100755 new mode 100644 index 5d1d9a5..bba4d9b --- a/giteapy/models/create_key_option.py +++ b/giteapy/models/create_key_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/create_label_option.py b/giteapy/models/create_label_option.py old mode 100755 new mode 100644 index 9c04687..194df1b --- a/giteapy/models/create_label_option.py +++ b/giteapy/models/create_label_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/create_milestone_option.py b/giteapy/models/create_milestone_option.py old mode 100755 new mode 100644 index 3f3d34c..6c98bca --- a/giteapy/models/create_milestone_option.py +++ b/giteapy/models/create_milestone_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/create_o_auth2_application_options.py b/giteapy/models/create_o_auth2_application_options.py new file mode 100644 index 0000000..0b30281 --- /dev/null +++ b/giteapy/models/create_o_auth2_application_options.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreateOAuth2ApplicationOptions(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'redirect_uris': 'list[str]' + } + + attribute_map = { + 'name': 'name', + 'redirect_uris': 'redirect_uris' + } + + def __init__(self, name=None, redirect_uris=None): # noqa: E501 + """CreateOAuth2ApplicationOptions - a model defined in Swagger""" # noqa: E501 + + self._name = None + self._redirect_uris = None + self.discriminator = None + + if name is not None: + self.name = name + if redirect_uris is not None: + self.redirect_uris = redirect_uris + + @property + def name(self): + """Gets the name of this CreateOAuth2ApplicationOptions. # noqa: E501 + + + :return: The name of this CreateOAuth2ApplicationOptions. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateOAuth2ApplicationOptions. + + + :param name: The name of this CreateOAuth2ApplicationOptions. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def redirect_uris(self): + """Gets the redirect_uris of this CreateOAuth2ApplicationOptions. # noqa: E501 + + + :return: The redirect_uris of this CreateOAuth2ApplicationOptions. # noqa: E501 + :rtype: list[str] + """ + return self._redirect_uris + + @redirect_uris.setter + def redirect_uris(self, redirect_uris): + """Sets the redirect_uris of this CreateOAuth2ApplicationOptions. + + + :param redirect_uris: The redirect_uris of this CreateOAuth2ApplicationOptions. # noqa: E501 + :type: list[str] + """ + + self._redirect_uris = redirect_uris + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateOAuth2ApplicationOptions, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateOAuth2ApplicationOptions): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/create_org_option.py b/giteapy/models/create_org_option.py old mode 100755 new mode 100644 index c2241e5..7cb139a --- a/giteapy/models/create_org_option.py +++ b/giteapy/models/create_org_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/create_pull_request_option.py b/giteapy/models/create_pull_request_option.py old mode 100755 new mode 100644 index e682c89..0c09812 --- a/giteapy/models/create_pull_request_option.py +++ b/giteapy/models/create_pull_request_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/create_pull_review_comment.py b/giteapy/models/create_pull_review_comment.py new file mode 100644 index 0000000..7c82d9c --- /dev/null +++ b/giteapy/models/create_pull_review_comment.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreatePullReviewComment(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'new_position': 'int', + 'old_position': 'int', + 'path': 'str' + } + + attribute_map = { + 'body': 'body', + 'new_position': 'new_position', + 'old_position': 'old_position', + 'path': 'path' + } + + def __init__(self, body=None, new_position=None, old_position=None, path=None): # noqa: E501 + """CreatePullReviewComment - a model defined in Swagger""" # noqa: E501 + + self._body = None + self._new_position = None + self._old_position = None + self._path = None + self.discriminator = None + + if body is not None: + self.body = body + if new_position is not None: + self.new_position = new_position + if old_position is not None: + self.old_position = old_position + if path is not None: + self.path = path + + @property + def body(self): + """Gets the body of this CreatePullReviewComment. # noqa: E501 + + + :return: The body of this CreatePullReviewComment. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreatePullReviewComment. + + + :param body: The body of this CreatePullReviewComment. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def new_position(self): + """Gets the new_position of this CreatePullReviewComment. # noqa: E501 + + if comment to new file line or 0 # noqa: E501 + + :return: The new_position of this CreatePullReviewComment. # noqa: E501 + :rtype: int + """ + return self._new_position + + @new_position.setter + def new_position(self, new_position): + """Sets the new_position of this CreatePullReviewComment. + + if comment to new file line or 0 # noqa: E501 + + :param new_position: The new_position of this CreatePullReviewComment. # noqa: E501 + :type: int + """ + + self._new_position = new_position + + @property + def old_position(self): + """Gets the old_position of this CreatePullReviewComment. # noqa: E501 + + if comment to old file line or 0 # noqa: E501 + + :return: The old_position of this CreatePullReviewComment. # noqa: E501 + :rtype: int + """ + return self._old_position + + @old_position.setter + def old_position(self, old_position): + """Sets the old_position of this CreatePullReviewComment. + + if comment to old file line or 0 # noqa: E501 + + :param old_position: The old_position of this CreatePullReviewComment. # noqa: E501 + :type: int + """ + + self._old_position = old_position + + @property + def path(self): + """Gets the path of this CreatePullReviewComment. # noqa: E501 + + the tree path # noqa: E501 + + :return: The path of this CreatePullReviewComment. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this CreatePullReviewComment. + + the tree path # noqa: E501 + + :param path: The path of this CreatePullReviewComment. # noqa: E501 + :type: str + """ + + self._path = path + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreatePullReviewComment, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreatePullReviewComment): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/create_pull_review_options.py b/giteapy/models/create_pull_review_options.py new file mode 100644 index 0000000..a069aa9 --- /dev/null +++ b/giteapy/models/create_pull_review_options.py @@ -0,0 +1,193 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class CreatePullReviewOptions(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'comments': 'list[CreatePullReviewComment]', + 'commit_id': 'str', + 'event': 'ReviewStateType' + } + + attribute_map = { + 'body': 'body', + 'comments': 'comments', + 'commit_id': 'commit_id', + 'event': 'event' + } + + def __init__(self, body=None, comments=None, commit_id=None, event=None): # noqa: E501 + """CreatePullReviewOptions - a model defined in Swagger""" # noqa: E501 + + self._body = None + self._comments = None + self._commit_id = None + self._event = None + self.discriminator = None + + if body is not None: + self.body = body + if comments is not None: + self.comments = comments + if commit_id is not None: + self.commit_id = commit_id + if event is not None: + self.event = event + + @property + def body(self): + """Gets the body of this CreatePullReviewOptions. # noqa: E501 + + + :return: The body of this CreatePullReviewOptions. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this CreatePullReviewOptions. + + + :param body: The body of this CreatePullReviewOptions. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def comments(self): + """Gets the comments of this CreatePullReviewOptions. # noqa: E501 + + + :return: The comments of this CreatePullReviewOptions. # noqa: E501 + :rtype: list[CreatePullReviewComment] + """ + return self._comments + + @comments.setter + def comments(self, comments): + """Sets the comments of this CreatePullReviewOptions. + + + :param comments: The comments of this CreatePullReviewOptions. # noqa: E501 + :type: list[CreatePullReviewComment] + """ + + self._comments = comments + + @property + def commit_id(self): + """Gets the commit_id of this CreatePullReviewOptions. # noqa: E501 + + + :return: The commit_id of this CreatePullReviewOptions. # noqa: E501 + :rtype: str + """ + return self._commit_id + + @commit_id.setter + def commit_id(self, commit_id): + """Sets the commit_id of this CreatePullReviewOptions. + + + :param commit_id: The commit_id of this CreatePullReviewOptions. # noqa: E501 + :type: str + """ + + self._commit_id = commit_id + + @property + def event(self): + """Gets the event of this CreatePullReviewOptions. # noqa: E501 + + + :return: The event of this CreatePullReviewOptions. # noqa: E501 + :rtype: ReviewStateType + """ + return self._event + + @event.setter + def event(self, event): + """Sets the event of this CreatePullReviewOptions. + + + :param event: The event of this CreatePullReviewOptions. # noqa: E501 + :type: ReviewStateType + """ + + self._event = event + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreatePullReviewOptions, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreatePullReviewOptions): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/create_release_option.py b/giteapy/models/create_release_option.py old mode 100755 new mode 100644 index dbae5fd..da87511 --- a/giteapy/models/create_release_option.py +++ b/giteapy/models/create_release_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/create_repo_option.py b/giteapy/models/create_repo_option.py old mode 100755 new mode 100644 index aa70363..2c27844 --- a/giteapy/models/create_repo_option.py +++ b/giteapy/models/create_repo_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -32,6 +32,7 @@ class CreateRepoOption(object): """ swagger_types = { 'auto_init': 'bool', + 'default_branch': 'str', 'description': 'str', 'gitignores': 'str', 'issue_labels': 'str', @@ -43,6 +44,7 @@ class CreateRepoOption(object): attribute_map = { 'auto_init': 'auto_init', + 'default_branch': 'default_branch', 'description': 'description', 'gitignores': 'gitignores', 'issue_labels': 'issue_labels', @@ -52,10 +54,11 @@ class CreateRepoOption(object): 'readme': 'readme' } - def __init__(self, auto_init=None, description=None, gitignores=None, issue_labels=None, license=None, name=None, private=None, readme=None): # noqa: E501 + def __init__(self, auto_init=None, default_branch=None, description=None, gitignores=None, issue_labels=None, license=None, name=None, private=None, readme=None): # noqa: E501 """CreateRepoOption - a model defined in Swagger""" # noqa: E501 self._auto_init = None + self._default_branch = None self._description = None self._gitignores = None self._issue_labels = None @@ -67,6 +70,8 @@ def __init__(self, auto_init=None, description=None, gitignores=None, issue_labe if auto_init is not None: self.auto_init = auto_init + if default_branch is not None: + self.default_branch = default_branch if description is not None: self.description = description if gitignores is not None: @@ -104,6 +109,29 @@ def auto_init(self, auto_init): self._auto_init = auto_init + @property + def default_branch(self): + """Gets the default_branch of this CreateRepoOption. # noqa: E501 + + DefaultBranch of the repository (used when initializes and in template) # noqa: E501 + + :return: The default_branch of this CreateRepoOption. # noqa: E501 + :rtype: str + """ + return self._default_branch + + @default_branch.setter + def default_branch(self, default_branch): + """Sets the default_branch of this CreateRepoOption. + + DefaultBranch of the repository (used when initializes and in template) # noqa: E501 + + :param default_branch: The default_branch of this CreateRepoOption. # noqa: E501 + :type: str + """ + + self._default_branch = default_branch + @property def description(self): """Gets the description of this CreateRepoOption. # noqa: E501 diff --git a/giteapy/models/create_status_option.py b/giteapy/models/create_status_option.py old mode 100755 new mode 100644 index fbdd2fc..c333ea8 --- a/giteapy/models/create_status_option.py +++ b/giteapy/models/create_status_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.status_state import StatusState # noqa: F401,E501 - class CreateStatusOption(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/create_team_option.py b/giteapy/models/create_team_option.py old mode 100755 new mode 100644 index 37f211a..568a8c9 --- a/giteapy/models/create_team_option.py +++ b/giteapy/models/create_team_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -31,36 +31,67 @@ class CreateTeamOption(object): and the value is json key in definition. """ swagger_types = { + 'can_create_org_repo': 'bool', 'description': 'str', + 'includes_all_repositories': 'bool', 'name': 'str', 'permission': 'str', 'units': 'list[str]' } attribute_map = { + 'can_create_org_repo': 'can_create_org_repo', 'description': 'description', + 'includes_all_repositories': 'includes_all_repositories', 'name': 'name', 'permission': 'permission', 'units': 'units' } - def __init__(self, description=None, name=None, permission=None, units=None): # noqa: E501 + def __init__(self, can_create_org_repo=None, description=None, includes_all_repositories=None, name=None, permission=None, units=None): # noqa: E501 """CreateTeamOption - a model defined in Swagger""" # noqa: E501 + self._can_create_org_repo = None self._description = None + self._includes_all_repositories = None self._name = None self._permission = None self._units = None self.discriminator = None + if can_create_org_repo is not None: + self.can_create_org_repo = can_create_org_repo if description is not None: self.description = description + if includes_all_repositories is not None: + self.includes_all_repositories = includes_all_repositories self.name = name if permission is not None: self.permission = permission if units is not None: self.units = units + @property + def can_create_org_repo(self): + """Gets the can_create_org_repo of this CreateTeamOption. # noqa: E501 + + + :return: The can_create_org_repo of this CreateTeamOption. # noqa: E501 + :rtype: bool + """ + return self._can_create_org_repo + + @can_create_org_repo.setter + def can_create_org_repo(self, can_create_org_repo): + """Sets the can_create_org_repo of this CreateTeamOption. + + + :param can_create_org_repo: The can_create_org_repo of this CreateTeamOption. # noqa: E501 + :type: bool + """ + + self._can_create_org_repo = can_create_org_repo + @property def description(self): """Gets the description of this CreateTeamOption. # noqa: E501 @@ -82,6 +113,27 @@ def description(self, description): self._description = description + @property + def includes_all_repositories(self): + """Gets the includes_all_repositories of this CreateTeamOption. # noqa: E501 + + + :return: The includes_all_repositories of this CreateTeamOption. # noqa: E501 + :rtype: bool + """ + return self._includes_all_repositories + + @includes_all_repositories.setter + def includes_all_repositories(self, includes_all_repositories): + """Sets the includes_all_repositories of this CreateTeamOption. + + + :param includes_all_repositories: The includes_all_repositories of this CreateTeamOption. # noqa: E501 + :type: bool + """ + + self._includes_all_repositories = includes_all_repositories + @property def name(self): """Gets the name of this CreateTeamOption. # noqa: E501 diff --git a/giteapy/models/create_user_option.py b/giteapy/models/create_user_option.py old mode 100755 new mode 100644 index 3e091dd..7d015ed --- a/giteapy/models/create_user_option.py +++ b/giteapy/models/create_user_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/delete_email_option.py b/giteapy/models/delete_email_option.py old mode 100755 new mode 100644 index ab1cb1c..7a51377 --- a/giteapy/models/delete_email_option.py +++ b/giteapy/models/delete_email_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/delete_file_options.py b/giteapy/models/delete_file_options.py old mode 100755 new mode 100644 index c06558e..ae8e582 --- a/giteapy/models/delete_file_options.py +++ b/giteapy/models/delete_file_options.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.identity import Identity # noqa: F401,E501 - class DeleteFileOptions(object): """NOTE: This class is auto generated by the swagger code generator program. @@ -36,6 +34,7 @@ class DeleteFileOptions(object): 'author': 'Identity', 'branch': 'str', 'committer': 'Identity', + 'dates': 'CommitDateOptions', 'message': 'str', 'new_branch': 'str', 'sha': 'str' @@ -45,17 +44,19 @@ class DeleteFileOptions(object): 'author': 'author', 'branch': 'branch', 'committer': 'committer', + 'dates': 'dates', 'message': 'message', 'new_branch': 'new_branch', 'sha': 'sha' } - def __init__(self, author=None, branch=None, committer=None, message=None, new_branch=None, sha=None): # noqa: E501 + def __init__(self, author=None, branch=None, committer=None, dates=None, message=None, new_branch=None, sha=None): # noqa: E501 """DeleteFileOptions - a model defined in Swagger""" # noqa: E501 self._author = None self._branch = None self._committer = None + self._dates = None self._message = None self._new_branch = None self._sha = None @@ -67,6 +68,8 @@ def __init__(self, author=None, branch=None, committer=None, message=None, new_b self.branch = branch if committer is not None: self.committer = committer + if dates is not None: + self.dates = dates if message is not None: self.message = message if new_branch is not None: @@ -138,6 +141,27 @@ def committer(self, committer): self._committer = committer + @property + def dates(self): + """Gets the dates of this DeleteFileOptions. # noqa: E501 + + + :return: The dates of this DeleteFileOptions. # noqa: E501 + :rtype: CommitDateOptions + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this DeleteFileOptions. + + + :param dates: The dates of this DeleteFileOptions. # noqa: E501 + :type: CommitDateOptions + """ + + self._dates = dates + @property def message(self): """Gets the message of this DeleteFileOptions. # noqa: E501 diff --git a/giteapy/models/deploy_key.py b/giteapy/models/deploy_key.py old mode 100755 new mode 100644 index beeda75..298a113 --- a/giteapy/models/deploy_key.py +++ b/giteapy/models/deploy_key.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.repository import Repository # noqa: F401,E501 - class DeployKey(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/edit_attachment_options.py b/giteapy/models/edit_attachment_options.py old mode 100755 new mode 100644 index 8a19c9c..54420b7 --- a/giteapy/models/edit_attachment_options.py +++ b/giteapy/models/edit_attachment_options.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/edit_branch_protection_option.py b/giteapy/models/edit_branch_protection_option.py new file mode 100644 index 0000000..7b2d8d4 --- /dev/null +++ b/giteapy/models/edit_branch_protection_option.py @@ -0,0 +1,583 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EditBranchProtectionOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'approvals_whitelist_teams': 'list[str]', + 'approvals_whitelist_username': 'list[str]', + 'block_on_outdated_branch': 'bool', + 'block_on_rejected_reviews': 'bool', + 'dismiss_stale_approvals': 'bool', + 'enable_approvals_whitelist': 'bool', + 'enable_merge_whitelist': 'bool', + 'enable_push': 'bool', + 'enable_push_whitelist': 'bool', + 'enable_status_check': 'bool', + 'merge_whitelist_teams': 'list[str]', + 'merge_whitelist_usernames': 'list[str]', + 'protected_file_patterns': 'str', + 'push_whitelist_deploy_keys': 'bool', + 'push_whitelist_teams': 'list[str]', + 'push_whitelist_usernames': 'list[str]', + 'require_signed_commits': 'bool', + 'required_approvals': 'int', + 'status_check_contexts': 'list[str]' + } + + attribute_map = { + 'approvals_whitelist_teams': 'approvals_whitelist_teams', + 'approvals_whitelist_username': 'approvals_whitelist_username', + 'block_on_outdated_branch': 'block_on_outdated_branch', + 'block_on_rejected_reviews': 'block_on_rejected_reviews', + 'dismiss_stale_approvals': 'dismiss_stale_approvals', + 'enable_approvals_whitelist': 'enable_approvals_whitelist', + 'enable_merge_whitelist': 'enable_merge_whitelist', + 'enable_push': 'enable_push', + 'enable_push_whitelist': 'enable_push_whitelist', + 'enable_status_check': 'enable_status_check', + 'merge_whitelist_teams': 'merge_whitelist_teams', + 'merge_whitelist_usernames': 'merge_whitelist_usernames', + 'protected_file_patterns': 'protected_file_patterns', + 'push_whitelist_deploy_keys': 'push_whitelist_deploy_keys', + 'push_whitelist_teams': 'push_whitelist_teams', + 'push_whitelist_usernames': 'push_whitelist_usernames', + 'require_signed_commits': 'require_signed_commits', + 'required_approvals': 'required_approvals', + 'status_check_contexts': 'status_check_contexts' + } + + def __init__(self, approvals_whitelist_teams=None, approvals_whitelist_username=None, block_on_outdated_branch=None, block_on_rejected_reviews=None, dismiss_stale_approvals=None, enable_approvals_whitelist=None, enable_merge_whitelist=None, enable_push=None, enable_push_whitelist=None, enable_status_check=None, merge_whitelist_teams=None, merge_whitelist_usernames=None, protected_file_patterns=None, push_whitelist_deploy_keys=None, push_whitelist_teams=None, push_whitelist_usernames=None, require_signed_commits=None, required_approvals=None, status_check_contexts=None): # noqa: E501 + """EditBranchProtectionOption - a model defined in Swagger""" # noqa: E501 + + self._approvals_whitelist_teams = None + self._approvals_whitelist_username = None + self._block_on_outdated_branch = None + self._block_on_rejected_reviews = None + self._dismiss_stale_approvals = None + self._enable_approvals_whitelist = None + self._enable_merge_whitelist = None + self._enable_push = None + self._enable_push_whitelist = None + self._enable_status_check = None + self._merge_whitelist_teams = None + self._merge_whitelist_usernames = None + self._protected_file_patterns = None + self._push_whitelist_deploy_keys = None + self._push_whitelist_teams = None + self._push_whitelist_usernames = None + self._require_signed_commits = None + self._required_approvals = None + self._status_check_contexts = None + self.discriminator = None + + if approvals_whitelist_teams is not None: + self.approvals_whitelist_teams = approvals_whitelist_teams + if approvals_whitelist_username is not None: + self.approvals_whitelist_username = approvals_whitelist_username + if block_on_outdated_branch is not None: + self.block_on_outdated_branch = block_on_outdated_branch + if block_on_rejected_reviews is not None: + self.block_on_rejected_reviews = block_on_rejected_reviews + if dismiss_stale_approvals is not None: + self.dismiss_stale_approvals = dismiss_stale_approvals + if enable_approvals_whitelist is not None: + self.enable_approvals_whitelist = enable_approvals_whitelist + if enable_merge_whitelist is not None: + self.enable_merge_whitelist = enable_merge_whitelist + if enable_push is not None: + self.enable_push = enable_push + if enable_push_whitelist is not None: + self.enable_push_whitelist = enable_push_whitelist + if enable_status_check is not None: + self.enable_status_check = enable_status_check + if merge_whitelist_teams is not None: + self.merge_whitelist_teams = merge_whitelist_teams + if merge_whitelist_usernames is not None: + self.merge_whitelist_usernames = merge_whitelist_usernames + if protected_file_patterns is not None: + self.protected_file_patterns = protected_file_patterns + if push_whitelist_deploy_keys is not None: + self.push_whitelist_deploy_keys = push_whitelist_deploy_keys + if push_whitelist_teams is not None: + self.push_whitelist_teams = push_whitelist_teams + if push_whitelist_usernames is not None: + self.push_whitelist_usernames = push_whitelist_usernames + if require_signed_commits is not None: + self.require_signed_commits = require_signed_commits + if required_approvals is not None: + self.required_approvals = required_approvals + if status_check_contexts is not None: + self.status_check_contexts = status_check_contexts + + @property + def approvals_whitelist_teams(self): + """Gets the approvals_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + + + :return: The approvals_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_teams + + @approvals_whitelist_teams.setter + def approvals_whitelist_teams(self, approvals_whitelist_teams): + """Sets the approvals_whitelist_teams of this EditBranchProtectionOption. + + + :param approvals_whitelist_teams: The approvals_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_teams = approvals_whitelist_teams + + @property + def approvals_whitelist_username(self): + """Gets the approvals_whitelist_username of this EditBranchProtectionOption. # noqa: E501 + + + :return: The approvals_whitelist_username of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._approvals_whitelist_username + + @approvals_whitelist_username.setter + def approvals_whitelist_username(self, approvals_whitelist_username): + """Sets the approvals_whitelist_username of this EditBranchProtectionOption. + + + :param approvals_whitelist_username: The approvals_whitelist_username of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._approvals_whitelist_username = approvals_whitelist_username + + @property + def block_on_outdated_branch(self): + """Gets the block_on_outdated_branch of this EditBranchProtectionOption. # noqa: E501 + + + :return: The block_on_outdated_branch of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_outdated_branch + + @block_on_outdated_branch.setter + def block_on_outdated_branch(self, block_on_outdated_branch): + """Sets the block_on_outdated_branch of this EditBranchProtectionOption. + + + :param block_on_outdated_branch: The block_on_outdated_branch of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_outdated_branch = block_on_outdated_branch + + @property + def block_on_rejected_reviews(self): + """Gets the block_on_rejected_reviews of this EditBranchProtectionOption. # noqa: E501 + + + :return: The block_on_rejected_reviews of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._block_on_rejected_reviews + + @block_on_rejected_reviews.setter + def block_on_rejected_reviews(self, block_on_rejected_reviews): + """Sets the block_on_rejected_reviews of this EditBranchProtectionOption. + + + :param block_on_rejected_reviews: The block_on_rejected_reviews of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._block_on_rejected_reviews = block_on_rejected_reviews + + @property + def dismiss_stale_approvals(self): + """Gets the dismiss_stale_approvals of this EditBranchProtectionOption. # noqa: E501 + + + :return: The dismiss_stale_approvals of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._dismiss_stale_approvals + + @dismiss_stale_approvals.setter + def dismiss_stale_approvals(self, dismiss_stale_approvals): + """Sets the dismiss_stale_approvals of this EditBranchProtectionOption. + + + :param dismiss_stale_approvals: The dismiss_stale_approvals of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._dismiss_stale_approvals = dismiss_stale_approvals + + @property + def enable_approvals_whitelist(self): + """Gets the enable_approvals_whitelist of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_approvals_whitelist of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_approvals_whitelist + + @enable_approvals_whitelist.setter + def enable_approvals_whitelist(self, enable_approvals_whitelist): + """Sets the enable_approvals_whitelist of this EditBranchProtectionOption. + + + :param enable_approvals_whitelist: The enable_approvals_whitelist of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_approvals_whitelist = enable_approvals_whitelist + + @property + def enable_merge_whitelist(self): + """Gets the enable_merge_whitelist of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_merge_whitelist of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_merge_whitelist + + @enable_merge_whitelist.setter + def enable_merge_whitelist(self, enable_merge_whitelist): + """Sets the enable_merge_whitelist of this EditBranchProtectionOption. + + + :param enable_merge_whitelist: The enable_merge_whitelist of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_merge_whitelist = enable_merge_whitelist + + @property + def enable_push(self): + """Gets the enable_push of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_push of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_push + + @enable_push.setter + def enable_push(self, enable_push): + """Sets the enable_push of this EditBranchProtectionOption. + + + :param enable_push: The enable_push of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_push = enable_push + + @property + def enable_push_whitelist(self): + """Gets the enable_push_whitelist of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_push_whitelist of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_push_whitelist + + @enable_push_whitelist.setter + def enable_push_whitelist(self, enable_push_whitelist): + """Sets the enable_push_whitelist of this EditBranchProtectionOption. + + + :param enable_push_whitelist: The enable_push_whitelist of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_push_whitelist = enable_push_whitelist + + @property + def enable_status_check(self): + """Gets the enable_status_check of this EditBranchProtectionOption. # noqa: E501 + + + :return: The enable_status_check of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._enable_status_check + + @enable_status_check.setter + def enable_status_check(self, enable_status_check): + """Sets the enable_status_check of this EditBranchProtectionOption. + + + :param enable_status_check: The enable_status_check of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._enable_status_check = enable_status_check + + @property + def merge_whitelist_teams(self): + """Gets the merge_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + + + :return: The merge_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_teams + + @merge_whitelist_teams.setter + def merge_whitelist_teams(self, merge_whitelist_teams): + """Sets the merge_whitelist_teams of this EditBranchProtectionOption. + + + :param merge_whitelist_teams: The merge_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_teams = merge_whitelist_teams + + @property + def merge_whitelist_usernames(self): + """Gets the merge_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + + + :return: The merge_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._merge_whitelist_usernames + + @merge_whitelist_usernames.setter + def merge_whitelist_usernames(self, merge_whitelist_usernames): + """Sets the merge_whitelist_usernames of this EditBranchProtectionOption. + + + :param merge_whitelist_usernames: The merge_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._merge_whitelist_usernames = merge_whitelist_usernames + + @property + def protected_file_patterns(self): + """Gets the protected_file_patterns of this EditBranchProtectionOption. # noqa: E501 + + + :return: The protected_file_patterns of this EditBranchProtectionOption. # noqa: E501 + :rtype: str + """ + return self._protected_file_patterns + + @protected_file_patterns.setter + def protected_file_patterns(self, protected_file_patterns): + """Sets the protected_file_patterns of this EditBranchProtectionOption. + + + :param protected_file_patterns: The protected_file_patterns of this EditBranchProtectionOption. # noqa: E501 + :type: str + """ + + self._protected_file_patterns = protected_file_patterns + + @property + def push_whitelist_deploy_keys(self): + """Gets the push_whitelist_deploy_keys of this EditBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_deploy_keys of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._push_whitelist_deploy_keys + + @push_whitelist_deploy_keys.setter + def push_whitelist_deploy_keys(self, push_whitelist_deploy_keys): + """Sets the push_whitelist_deploy_keys of this EditBranchProtectionOption. + + + :param push_whitelist_deploy_keys: The push_whitelist_deploy_keys of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._push_whitelist_deploy_keys = push_whitelist_deploy_keys + + @property + def push_whitelist_teams(self): + """Gets the push_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_teams + + @push_whitelist_teams.setter + def push_whitelist_teams(self, push_whitelist_teams): + """Sets the push_whitelist_teams of this EditBranchProtectionOption. + + + :param push_whitelist_teams: The push_whitelist_teams of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_teams = push_whitelist_teams + + @property + def push_whitelist_usernames(self): + """Gets the push_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + + + :return: The push_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._push_whitelist_usernames + + @push_whitelist_usernames.setter + def push_whitelist_usernames(self, push_whitelist_usernames): + """Sets the push_whitelist_usernames of this EditBranchProtectionOption. + + + :param push_whitelist_usernames: The push_whitelist_usernames of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._push_whitelist_usernames = push_whitelist_usernames + + @property + def require_signed_commits(self): + """Gets the require_signed_commits of this EditBranchProtectionOption. # noqa: E501 + + + :return: The require_signed_commits of this EditBranchProtectionOption. # noqa: E501 + :rtype: bool + """ + return self._require_signed_commits + + @require_signed_commits.setter + def require_signed_commits(self, require_signed_commits): + """Sets the require_signed_commits of this EditBranchProtectionOption. + + + :param require_signed_commits: The require_signed_commits of this EditBranchProtectionOption. # noqa: E501 + :type: bool + """ + + self._require_signed_commits = require_signed_commits + + @property + def required_approvals(self): + """Gets the required_approvals of this EditBranchProtectionOption. # noqa: E501 + + + :return: The required_approvals of this EditBranchProtectionOption. # noqa: E501 + :rtype: int + """ + return self._required_approvals + + @required_approvals.setter + def required_approvals(self, required_approvals): + """Sets the required_approvals of this EditBranchProtectionOption. + + + :param required_approvals: The required_approvals of this EditBranchProtectionOption. # noqa: E501 + :type: int + """ + + self._required_approvals = required_approvals + + @property + def status_check_contexts(self): + """Gets the status_check_contexts of this EditBranchProtectionOption. # noqa: E501 + + + :return: The status_check_contexts of this EditBranchProtectionOption. # noqa: E501 + :rtype: list[str] + """ + return self._status_check_contexts + + @status_check_contexts.setter + def status_check_contexts(self, status_check_contexts): + """Sets the status_check_contexts of this EditBranchProtectionOption. + + + :param status_check_contexts: The status_check_contexts of this EditBranchProtectionOption. # noqa: E501 + :type: list[str] + """ + + self._status_check_contexts = status_check_contexts + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EditBranchProtectionOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EditBranchProtectionOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/edit_deadline_option.py b/giteapy/models/edit_deadline_option.py old mode 100755 new mode 100644 index 1c4d389..2399882 --- a/giteapy/models/edit_deadline_option.py +++ b/giteapy/models/edit_deadline_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/edit_git_hook_option.py b/giteapy/models/edit_git_hook_option.py old mode 100755 new mode 100644 index 53b6695..c14e812 --- a/giteapy/models/edit_git_hook_option.py +++ b/giteapy/models/edit_git_hook_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/edit_hook_option.py b/giteapy/models/edit_hook_option.py old mode 100755 new mode 100644 index 9cffd23..a310584 --- a/giteapy/models/edit_hook_option.py +++ b/giteapy/models/edit_hook_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/edit_issue_comment_option.py b/giteapy/models/edit_issue_comment_option.py old mode 100755 new mode 100644 index 328cd0d..ed352a7 --- a/giteapy/models/edit_issue_comment_option.py +++ b/giteapy/models/edit_issue_comment_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/edit_issue_option.py b/giteapy/models/edit_issue_option.py old mode 100755 new mode 100644 index 8e992db..1b1e9f7 --- a/giteapy/models/edit_issue_option.py +++ b/giteapy/models/edit_issue_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -37,7 +37,8 @@ class EditIssueOption(object): 'due_date': 'datetime', 'milestone': 'int', 'state': 'str', - 'title': 'str' + 'title': 'str', + 'unset_due_date': 'bool' } attribute_map = { @@ -47,10 +48,11 @@ class EditIssueOption(object): 'due_date': 'due_date', 'milestone': 'milestone', 'state': 'state', - 'title': 'title' + 'title': 'title', + 'unset_due_date': 'unset_due_date' } - def __init__(self, assignee=None, assignees=None, body=None, due_date=None, milestone=None, state=None, title=None): # noqa: E501 + def __init__(self, assignee=None, assignees=None, body=None, due_date=None, milestone=None, state=None, title=None, unset_due_date=None): # noqa: E501 """EditIssueOption - a model defined in Swagger""" # noqa: E501 self._assignee = None @@ -60,6 +62,7 @@ def __init__(self, assignee=None, assignees=None, body=None, due_date=None, mile self._milestone = None self._state = None self._title = None + self._unset_due_date = None self.discriminator = None if assignee is not None: @@ -76,6 +79,8 @@ def __init__(self, assignee=None, assignees=None, body=None, due_date=None, mile self.state = state if title is not None: self.title = title + if unset_due_date is not None: + self.unset_due_date = unset_due_date @property def assignee(self): @@ -224,6 +229,27 @@ def title(self, title): self._title = title + @property + def unset_due_date(self): + """Gets the unset_due_date of this EditIssueOption. # noqa: E501 + + + :return: The unset_due_date of this EditIssueOption. # noqa: E501 + :rtype: bool + """ + return self._unset_due_date + + @unset_due_date.setter + def unset_due_date(self, unset_due_date): + """Sets the unset_due_date of this EditIssueOption. + + + :param unset_due_date: The unset_due_date of this EditIssueOption. # noqa: E501 + :type: bool + """ + + self._unset_due_date = unset_due_date + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/giteapy/models/edit_label_option.py b/giteapy/models/edit_label_option.py old mode 100755 new mode 100644 index 98eb6b8..3b25aba --- a/giteapy/models/edit_label_option.py +++ b/giteapy/models/edit_label_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/edit_milestone_option.py b/giteapy/models/edit_milestone_option.py old mode 100755 new mode 100644 index e72dff5..f5de71a --- a/giteapy/models/edit_milestone_option.py +++ b/giteapy/models/edit_milestone_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/edit_org_option.py b/giteapy/models/edit_org_option.py old mode 100755 new mode 100644 index dd73c44..bbe8ce2 --- a/giteapy/models/edit_org_option.py +++ b/giteapy/models/edit_org_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/edit_pull_request_option.py b/giteapy/models/edit_pull_request_option.py old mode 100755 new mode 100644 index 4e8f478..4dabac5 --- a/giteapy/models/edit_pull_request_option.py +++ b/giteapy/models/edit_pull_request_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -38,7 +38,8 @@ class EditPullRequestOption(object): 'labels': 'list[int]', 'milestone': 'int', 'state': 'str', - 'title': 'str' + 'title': 'str', + 'unset_due_date': 'bool' } attribute_map = { @@ -49,10 +50,11 @@ class EditPullRequestOption(object): 'labels': 'labels', 'milestone': 'milestone', 'state': 'state', - 'title': 'title' + 'title': 'title', + 'unset_due_date': 'unset_due_date' } - def __init__(self, assignee=None, assignees=None, body=None, due_date=None, labels=None, milestone=None, state=None, title=None): # noqa: E501 + def __init__(self, assignee=None, assignees=None, body=None, due_date=None, labels=None, milestone=None, state=None, title=None, unset_due_date=None): # noqa: E501 """EditPullRequestOption - a model defined in Swagger""" # noqa: E501 self._assignee = None @@ -63,6 +65,7 @@ def __init__(self, assignee=None, assignees=None, body=None, due_date=None, labe self._milestone = None self._state = None self._title = None + self._unset_due_date = None self.discriminator = None if assignee is not None: @@ -81,6 +84,8 @@ def __init__(self, assignee=None, assignees=None, body=None, due_date=None, labe self.state = state if title is not None: self.title = title + if unset_due_date is not None: + self.unset_due_date = unset_due_date @property def assignee(self): @@ -250,6 +255,27 @@ def title(self, title): self._title = title + @property + def unset_due_date(self): + """Gets the unset_due_date of this EditPullRequestOption. # noqa: E501 + + + :return: The unset_due_date of this EditPullRequestOption. # noqa: E501 + :rtype: bool + """ + return self._unset_due_date + + @unset_due_date.setter + def unset_due_date(self, unset_due_date): + """Sets the unset_due_date of this EditPullRequestOption. + + + :param unset_due_date: The unset_due_date of this EditPullRequestOption. # noqa: E501 + :type: bool + """ + + self._unset_due_date = unset_due_date + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/giteapy/models/edit_reaction_option.py b/giteapy/models/edit_reaction_option.py new file mode 100644 index 0000000..bfff205 --- /dev/null +++ b/giteapy/models/edit_reaction_option.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class EditReactionOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'content': 'str' + } + + attribute_map = { + 'content': 'content' + } + + def __init__(self, content=None): # noqa: E501 + """EditReactionOption - a model defined in Swagger""" # noqa: E501 + + self._content = None + self.discriminator = None + + if content is not None: + self.content = content + + @property + def content(self): + """Gets the content of this EditReactionOption. # noqa: E501 + + + :return: The content of this EditReactionOption. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this EditReactionOption. + + + :param content: The content of this EditReactionOption. # noqa: E501 + :type: str + """ + + self._content = content + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(EditReactionOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, EditReactionOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/edit_release_option.py b/giteapy/models/edit_release_option.py old mode 100755 new mode 100644 index 891a2cc..f0c286c --- a/giteapy/models/edit_release_option.py +++ b/giteapy/models/edit_release_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/edit_repo_option.py b/giteapy/models/edit_repo_option.py old mode 100755 new mode 100644 index cc6a676..5932c3e --- a/giteapy/models/edit_repo_option.py +++ b/giteapy/models/edit_repo_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,10 +16,6 @@ import six -from giteapy.models.external_tracker import ExternalTracker # noqa: F401,E501 -from giteapy.models.external_wiki import ExternalWiki # noqa: F401,E501 -from giteapy.models.internal_tracker import InternalTracker # noqa: F401,E501 - class EditRepoOption(object): """NOTE: This class is auto generated by the swagger code generator program. @@ -51,6 +47,7 @@ class EditRepoOption(object): 'internal_tracker': 'InternalTracker', 'name': 'str', 'private': 'bool', + 'template': 'bool', 'website': 'str' } @@ -71,10 +68,11 @@ class EditRepoOption(object): 'internal_tracker': 'internal_tracker', 'name': 'name', 'private': 'private', + 'template': 'template', 'website': 'website' } - def __init__(self, allow_merge_commits=None, allow_rebase=None, allow_rebase_explicit=None, allow_squash_merge=None, archived=None, default_branch=None, description=None, external_tracker=None, external_wiki=None, has_issues=None, has_pull_requests=None, has_wiki=None, ignore_whitespace_conflicts=None, internal_tracker=None, name=None, private=None, website=None): # noqa: E501 + def __init__(self, allow_merge_commits=None, allow_rebase=None, allow_rebase_explicit=None, allow_squash_merge=None, archived=None, default_branch=None, description=None, external_tracker=None, external_wiki=None, has_issues=None, has_pull_requests=None, has_wiki=None, ignore_whitespace_conflicts=None, internal_tracker=None, name=None, private=None, template=None, website=None): # noqa: E501 """EditRepoOption - a model defined in Swagger""" # noqa: E501 self._allow_merge_commits = None @@ -93,6 +91,7 @@ def __init__(self, allow_merge_commits=None, allow_rebase=None, allow_rebase_exp self._internal_tracker = None self._name = None self._private = None + self._template = None self._website = None self.discriminator = None @@ -128,6 +127,8 @@ def __init__(self, allow_merge_commits=None, allow_rebase=None, allow_rebase_exp self.name = name if private is not None: self.private = private + if template is not None: + self.template = template if website is not None: self.website = website @@ -493,6 +494,29 @@ def private(self, private): self._private = private + @property + def template(self): + """Gets the template of this EditRepoOption. # noqa: E501 + + either `true` to make this repository a template or `false` to make it a normal repository # noqa: E501 + + :return: The template of this EditRepoOption. # noqa: E501 + :rtype: bool + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this EditRepoOption. + + either `true` to make this repository a template or `false` to make it a normal repository # noqa: E501 + + :param template: The template of this EditRepoOption. # noqa: E501 + :type: bool + """ + + self._template = template + @property def website(self): """Gets the website of this EditRepoOption. # noqa: E501 diff --git a/giteapy/models/edit_team_option.py b/giteapy/models/edit_team_option.py old mode 100755 new mode 100644 index 556cc12..d39eb43 --- a/giteapy/models/edit_team_option.py +++ b/giteapy/models/edit_team_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -31,36 +31,67 @@ class EditTeamOption(object): and the value is json key in definition. """ swagger_types = { + 'can_create_org_repo': 'bool', 'description': 'str', + 'includes_all_repositories': 'bool', 'name': 'str', 'permission': 'str', 'units': 'list[str]' } attribute_map = { + 'can_create_org_repo': 'can_create_org_repo', 'description': 'description', + 'includes_all_repositories': 'includes_all_repositories', 'name': 'name', 'permission': 'permission', 'units': 'units' } - def __init__(self, description=None, name=None, permission=None, units=None): # noqa: E501 + def __init__(self, can_create_org_repo=None, description=None, includes_all_repositories=None, name=None, permission=None, units=None): # noqa: E501 """EditTeamOption - a model defined in Swagger""" # noqa: E501 + self._can_create_org_repo = None self._description = None + self._includes_all_repositories = None self._name = None self._permission = None self._units = None self.discriminator = None + if can_create_org_repo is not None: + self.can_create_org_repo = can_create_org_repo if description is not None: self.description = description + if includes_all_repositories is not None: + self.includes_all_repositories = includes_all_repositories self.name = name if permission is not None: self.permission = permission if units is not None: self.units = units + @property + def can_create_org_repo(self): + """Gets the can_create_org_repo of this EditTeamOption. # noqa: E501 + + + :return: The can_create_org_repo of this EditTeamOption. # noqa: E501 + :rtype: bool + """ + return self._can_create_org_repo + + @can_create_org_repo.setter + def can_create_org_repo(self, can_create_org_repo): + """Sets the can_create_org_repo of this EditTeamOption. + + + :param can_create_org_repo: The can_create_org_repo of this EditTeamOption. # noqa: E501 + :type: bool + """ + + self._can_create_org_repo = can_create_org_repo + @property def description(self): """Gets the description of this EditTeamOption. # noqa: E501 @@ -82,6 +113,27 @@ def description(self, description): self._description = description + @property + def includes_all_repositories(self): + """Gets the includes_all_repositories of this EditTeamOption. # noqa: E501 + + + :return: The includes_all_repositories of this EditTeamOption. # noqa: E501 + :rtype: bool + """ + return self._includes_all_repositories + + @includes_all_repositories.setter + def includes_all_repositories(self, includes_all_repositories): + """Sets the includes_all_repositories of this EditTeamOption. + + + :param includes_all_repositories: The includes_all_repositories of this EditTeamOption. # noqa: E501 + :type: bool + """ + + self._includes_all_repositories = includes_all_repositories + @property def name(self): """Gets the name of this EditTeamOption. # noqa: E501 diff --git a/giteapy/models/edit_user_option.py b/giteapy/models/edit_user_option.py old mode 100755 new mode 100644 index 078d32c..3c7210c --- a/giteapy/models/edit_user_option.py +++ b/giteapy/models/edit_user_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/email.py b/giteapy/models/email.py old mode 100755 new mode 100644 index edfb8ac..892f688 --- a/giteapy/models/email.py +++ b/giteapy/models/email.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/external_tracker.py b/giteapy/models/external_tracker.py old mode 100755 new mode 100644 index de632dc..dd54e63 --- a/giteapy/models/external_tracker.py +++ b/giteapy/models/external_tracker.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/external_wiki.py b/giteapy/models/external_wiki.py old mode 100755 new mode 100644 index 3f09ad8..ea79a23 --- a/giteapy/models/external_wiki.py +++ b/giteapy/models/external_wiki.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/file_commit_response.py b/giteapy/models/file_commit_response.py old mode 100755 new mode 100644 index 953de42..8966c50 --- a/giteapy/models/file_commit_response.py +++ b/giteapy/models/file_commit_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,9 +16,6 @@ import six -from giteapy.models.commit_meta import CommitMeta # noqa: F401,E501 -from giteapy.models.commit_user import CommitUser # noqa: F401,E501 - class FileCommitResponse(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/file_delete_response.py b/giteapy/models/file_delete_response.py old mode 100755 new mode 100644 index a89cee9..d0cb5bf --- a/giteapy/models/file_delete_response.py +++ b/giteapy/models/file_delete_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,9 +16,6 @@ import six -from giteapy.models.file_commit_response import FileCommitResponse # noqa: F401,E501 -from giteapy.models.payload_commit_verification import PayloadCommitVerification # noqa: F401,E501 - class FileDeleteResponse(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/file_links_response.py b/giteapy/models/file_links_response.py old mode 100755 new mode 100644 index 281bc68..8070f09 --- a/giteapy/models/file_links_response.py +++ b/giteapy/models/file_links_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/file_response.py b/giteapy/models/file_response.py old mode 100755 new mode 100644 index eb3e1b7..1eda1a2 --- a/giteapy/models/file_response.py +++ b/giteapy/models/file_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,10 +16,6 @@ import six -from giteapy.models.contents_response import ContentsResponse # noqa: F401,E501 -from giteapy.models.file_commit_response import FileCommitResponse # noqa: F401,E501 -from giteapy.models.payload_commit_verification import PayloadCommitVerification # noqa: F401,E501 - class FileResponse(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/git_blob_response.py b/giteapy/models/git_blob_response.py old mode 100755 new mode 100644 index fa084f4..38a3f58 --- a/giteapy/models/git_blob_response.py +++ b/giteapy/models/git_blob_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/git_entry.py b/giteapy/models/git_entry.py old mode 100755 new mode 100644 index 7c83d79..f8d8754 --- a/giteapy/models/git_entry.py +++ b/giteapy/models/git_entry.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -36,8 +36,7 @@ class GitEntry(object): 'sha': 'str', 'size': 'int', 'type': 'str', - 'url': 'str', - 'modified_at': 'str' + 'url': 'str' } attribute_map = { @@ -46,11 +45,10 @@ class GitEntry(object): 'sha': 'sha', 'size': 'size', 'type': 'type', - 'url': 'url', - 'modified_at': 'modified_at' + 'url': 'url' } - def __init__(self, mode=None, path=None, sha=None, size=None, type=None, url=None, modified_at=None): # noqa: E501 + def __init__(self, mode=None, path=None, sha=None, size=None, type=None, url=None): # noqa: E501 """GitEntry - a model defined in Swagger""" # noqa: E501 self._mode = None @@ -59,7 +57,6 @@ def __init__(self, mode=None, path=None, sha=None, size=None, type=None, url=Non self._size = None self._type = None self._url = None - self._modified_at = None self.discriminator = None if mode is not None: @@ -74,8 +71,6 @@ def __init__(self, mode=None, path=None, sha=None, size=None, type=None, url=Non self.type = type if url is not None: self.url = url - if modified_at is not None: - self.modified_at = modified_at @property def mode(self): @@ -203,27 +198,6 @@ def url(self, url): self._url = url - @property - def modified_at(self): - """Gets the modified_at of this GitEntry. # noqa: E501 - - - :return: The modified_at of this GitEntry. # noqa: E501 - :rtype: str - """ - return self._modified_at - - @modified_at.setter - def modified_at(self, modified_at): - """Sets the modified_at of this GitEntry. - - - :param modified_at: The modified_at of this GitEntry. # noqa: E501 - :type: str - """ - - self._modified_at = modified_at - def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/giteapy/models/git_hook.py b/giteapy/models/git_hook.py old mode 100755 new mode 100644 index 26bccbf..1ec920a --- a/giteapy/models/git_hook.py +++ b/giteapy/models/git_hook.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/git_object.py b/giteapy/models/git_object.py old mode 100755 new mode 100644 index 58d3db3..bc38072 --- a/giteapy/models/git_object.py +++ b/giteapy/models/git_object.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/git_tree_response.py b/giteapy/models/git_tree_response.py old mode 100755 new mode 100644 index 4b539b9..99198d3 --- a/giteapy/models/git_tree_response.py +++ b/giteapy/models/git_tree_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.git_entry import GitEntry # noqa: F401,E501 - class GitTreeResponse(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/gpg_key.py b/giteapy/models/gpg_key.py old mode 100755 new mode 100644 index af089db..31979ad --- a/giteapy/models/gpg_key.py +++ b/giteapy/models/gpg_key.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.gpg_key_email import GPGKeyEmail # noqa: F401,E501 - class GPGKey(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/gpg_key_email.py b/giteapy/models/gpg_key_email.py old mode 100755 new mode 100644 index 5aadfc7..810e4b2 --- a/giteapy/models/gpg_key_email.py +++ b/giteapy/models/gpg_key_email.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/hook.py b/giteapy/models/hook.py old mode 100755 new mode 100644 index b3fd949..e847cfc --- a/giteapy/models/hook.py +++ b/giteapy/models/hook.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/identity.py b/giteapy/models/identity.py old mode 100755 new mode 100644 index e7ca29c..309a2a5 --- a/giteapy/models/identity.py +++ b/giteapy/models/identity.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/inline_response200.py b/giteapy/models/inline_response200.py old mode 100755 new mode 100644 index 60d6726..1e9664c --- a/giteapy/models/inline_response200.py +++ b/giteapy/models/inline_response200.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.team import Team # noqa: F401,E501 - class InlineResponse200(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/inline_response2001.py b/giteapy/models/inline_response2001.py old mode 100755 new mode 100644 index d31e901..b900d61 --- a/giteapy/models/inline_response2001.py +++ b/giteapy/models/inline_response2001.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.user import User # noqa: F401,E501 - class InlineResponse2001(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/internal_tracker.py b/giteapy/models/internal_tracker.py old mode 100755 new mode 100644 index bac07ea..a83dcd7 --- a/giteapy/models/internal_tracker.py +++ b/giteapy/models/internal_tracker.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/issue.py b/giteapy/models/issue.py old mode 100755 new mode 100644 index 189f510..e3299ed --- a/giteapy/models/issue.py +++ b/giteapy/models/issue.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,12 +16,6 @@ import six -from giteapy.models.label import Label # noqa: F401,E501 -from giteapy.models.milestone import Milestone # noqa: F401,E501 -from giteapy.models.pull_request_meta import PullRequestMeta # noqa: F401,E501 -from giteapy.models.state_type import StateType # noqa: F401,E501 -from giteapy.models.user import User # noqa: F401,E501 - class Issue(object): """NOTE: This class is auto generated by the swagger code generator program. @@ -44,6 +38,7 @@ class Issue(object): 'comments': 'int', 'created_at': 'datetime', 'due_date': 'datetime', + 'html_url': 'str', 'id': 'int', 'labels': 'list[Label]', 'milestone': 'Milestone', @@ -51,6 +46,7 @@ class Issue(object): 'original_author': 'str', 'original_author_id': 'int', 'pull_request': 'PullRequestMeta', + 'repository': 'RepositoryMeta', 'state': 'StateType', 'title': 'str', 'updated_at': 'datetime', @@ -66,6 +62,7 @@ class Issue(object): 'comments': 'comments', 'created_at': 'created_at', 'due_date': 'due_date', + 'html_url': 'html_url', 'id': 'id', 'labels': 'labels', 'milestone': 'milestone', @@ -73,6 +70,7 @@ class Issue(object): 'original_author': 'original_author', 'original_author_id': 'original_author_id', 'pull_request': 'pull_request', + 'repository': 'repository', 'state': 'state', 'title': 'title', 'updated_at': 'updated_at', @@ -80,7 +78,7 @@ class Issue(object): 'user': 'user' } - def __init__(self, assignee=None, assignees=None, body=None, closed_at=None, comments=None, created_at=None, due_date=None, id=None, labels=None, milestone=None, number=None, original_author=None, original_author_id=None, pull_request=None, state=None, title=None, updated_at=None, url=None, user=None): # noqa: E501 + def __init__(self, assignee=None, assignees=None, body=None, closed_at=None, comments=None, created_at=None, due_date=None, html_url=None, id=None, labels=None, milestone=None, number=None, original_author=None, original_author_id=None, pull_request=None, repository=None, state=None, title=None, updated_at=None, url=None, user=None): # noqa: E501 """Issue - a model defined in Swagger""" # noqa: E501 self._assignee = None @@ -90,6 +88,7 @@ def __init__(self, assignee=None, assignees=None, body=None, closed_at=None, com self._comments = None self._created_at = None self._due_date = None + self._html_url = None self._id = None self._labels = None self._milestone = None @@ -97,6 +96,7 @@ def __init__(self, assignee=None, assignees=None, body=None, closed_at=None, com self._original_author = None self._original_author_id = None self._pull_request = None + self._repository = None self._state = None self._title = None self._updated_at = None @@ -118,6 +118,8 @@ def __init__(self, assignee=None, assignees=None, body=None, closed_at=None, com self.created_at = created_at if due_date is not None: self.due_date = due_date + if html_url is not None: + self.html_url = html_url if id is not None: self.id = id if labels is not None: @@ -132,6 +134,8 @@ def __init__(self, assignee=None, assignees=None, body=None, closed_at=None, com self.original_author_id = original_author_id if pull_request is not None: self.pull_request = pull_request + if repository is not None: + self.repository = repository if state is not None: self.state = state if title is not None: @@ -290,6 +294,27 @@ def due_date(self, due_date): self._due_date = due_date + @property + def html_url(self): + """Gets the html_url of this Issue. # noqa: E501 + + + :return: The html_url of this Issue. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Issue. + + + :param html_url: The html_url of this Issue. # noqa: E501 + :type: str + """ + + self._html_url = html_url + @property def id(self): """Gets the id of this Issue. # noqa: E501 @@ -437,6 +462,27 @@ def pull_request(self, pull_request): self._pull_request = pull_request + @property + def repository(self): + """Gets the repository of this Issue. # noqa: E501 + + + :return: The repository of this Issue. # noqa: E501 + :rtype: RepositoryMeta + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this Issue. + + + :param repository: The repository of this Issue. # noqa: E501 + :type: RepositoryMeta + """ + + self._repository = repository + @property def state(self): """Gets the state of this Issue. # noqa: E501 diff --git a/giteapy/models/issue_deadline.py b/giteapy/models/issue_deadline.py old mode 100755 new mode 100644 index ea50ebc..300d394 --- a/giteapy/models/issue_deadline.py +++ b/giteapy/models/issue_deadline.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/issue_labels_option.py b/giteapy/models/issue_labels_option.py old mode 100755 new mode 100644 index 51c648d..db89a4e --- a/giteapy/models/issue_labels_option.py +++ b/giteapy/models/issue_labels_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/label.py b/giteapy/models/label.py old mode 100755 new mode 100644 index 08a08e8..3f7db60 --- a/giteapy/models/label.py +++ b/giteapy/models/label.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/markdown_option.py b/giteapy/models/markdown_option.py old mode 100755 new mode 100644 index 1c2a57d..abb7317 --- a/giteapy/models/markdown_option.py +++ b/giteapy/models/markdown_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/merge_pull_request_option.py b/giteapy/models/merge_pull_request_option.py old mode 100755 new mode 100644 index bee713a..f902e92 --- a/giteapy/models/merge_pull_request_option.py +++ b/giteapy/models/merge_pull_request_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -33,21 +33,24 @@ class MergePullRequestOption(object): swagger_types = { 'do': 'str', 'merge_message_field': 'str', - 'merge_title_field': 'str' + 'merge_title_field': 'str', + 'force_merge': 'bool' } attribute_map = { 'do': 'Do', 'merge_message_field': 'MergeMessageField', - 'merge_title_field': 'MergeTitleField' + 'merge_title_field': 'MergeTitleField', + 'force_merge': 'force_merge' } - def __init__(self, do=None, merge_message_field=None, merge_title_field=None): # noqa: E501 + def __init__(self, do=None, merge_message_field=None, merge_title_field=None, force_merge=None): # noqa: E501 """MergePullRequestOption - a model defined in Swagger""" # noqa: E501 self._do = None self._merge_message_field = None self._merge_title_field = None + self._force_merge = None self.discriminator = None self.do = do @@ -55,6 +58,8 @@ def __init__(self, do=None, merge_message_field=None, merge_title_field=None): self.merge_message_field = merge_message_field if merge_title_field is not None: self.merge_title_field = merge_title_field + if force_merge is not None: + self.force_merge = force_merge @property def do(self): @@ -127,6 +132,27 @@ def merge_title_field(self, merge_title_field): self._merge_title_field = merge_title_field + @property + def force_merge(self): + """Gets the force_merge of this MergePullRequestOption. # noqa: E501 + + + :return: The force_merge of this MergePullRequestOption. # noqa: E501 + :rtype: bool + """ + return self._force_merge + + @force_merge.setter + def force_merge(self, force_merge): + """Sets the force_merge of this MergePullRequestOption. + + + :param force_merge: The force_merge of this MergePullRequestOption. # noqa: E501 + :type: bool + """ + + self._force_merge = force_merge + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/giteapy/models/migrate_repo_form.py b/giteapy/models/migrate_repo_form.py old mode 100755 new mode 100644 index 59c71ca..371b813 --- a/giteapy/models/migrate_repo_form.py +++ b/giteapy/models/migrate_repo_form.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/milestone.py b/giteapy/models/milestone.py old mode 100755 new mode 100644 index a880e72..a0c001a --- a/giteapy/models/milestone.py +++ b/giteapy/models/milestone.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.state_type import StateType # noqa: F401,E501 - class Milestone(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/notification_count.py b/giteapy/models/notification_count.py new file mode 100644 index 0000000..a8c174e --- /dev/null +++ b/giteapy/models/notification_count.py @@ -0,0 +1,115 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class NotificationCount(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'new': 'int' + } + + attribute_map = { + 'new': 'new' + } + + def __init__(self, new=None): # noqa: E501 + """NotificationCount - a model defined in Swagger""" # noqa: E501 + + self._new = None + self.discriminator = None + + if new is not None: + self.new = new + + @property + def new(self): + """Gets the new of this NotificationCount. # noqa: E501 + + + :return: The new of this NotificationCount. # noqa: E501 + :rtype: int + """ + return self._new + + @new.setter + def new(self, new): + """Sets the new of this NotificationCount. + + + :param new: The new of this NotificationCount. # noqa: E501 + :type: int + """ + + self._new = new + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationCount, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationCount): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/notification_subject.py b/giteapy/models/notification_subject.py new file mode 100644 index 0000000..daeab2b --- /dev/null +++ b/giteapy/models/notification_subject.py @@ -0,0 +1,193 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class NotificationSubject(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'latest_comment_url': 'str', + 'title': 'str', + 'type': 'str', + 'url': 'str' + } + + attribute_map = { + 'latest_comment_url': 'latest_comment_url', + 'title': 'title', + 'type': 'type', + 'url': 'url' + } + + def __init__(self, latest_comment_url=None, title=None, type=None, url=None): # noqa: E501 + """NotificationSubject - a model defined in Swagger""" # noqa: E501 + + self._latest_comment_url = None + self._title = None + self._type = None + self._url = None + self.discriminator = None + + if latest_comment_url is not None: + self.latest_comment_url = latest_comment_url + if title is not None: + self.title = title + if type is not None: + self.type = type + if url is not None: + self.url = url + + @property + def latest_comment_url(self): + """Gets the latest_comment_url of this NotificationSubject. # noqa: E501 + + + :return: The latest_comment_url of this NotificationSubject. # noqa: E501 + :rtype: str + """ + return self._latest_comment_url + + @latest_comment_url.setter + def latest_comment_url(self, latest_comment_url): + """Sets the latest_comment_url of this NotificationSubject. + + + :param latest_comment_url: The latest_comment_url of this NotificationSubject. # noqa: E501 + :type: str + """ + + self._latest_comment_url = latest_comment_url + + @property + def title(self): + """Gets the title of this NotificationSubject. # noqa: E501 + + + :return: The title of this NotificationSubject. # noqa: E501 + :rtype: str + """ + return self._title + + @title.setter + def title(self, title): + """Sets the title of this NotificationSubject. + + + :param title: The title of this NotificationSubject. # noqa: E501 + :type: str + """ + + self._title = title + + @property + def type(self): + """Gets the type of this NotificationSubject. # noqa: E501 + + + :return: The type of this NotificationSubject. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this NotificationSubject. + + + :param type: The type of this NotificationSubject. # noqa: E501 + :type: str + """ + + self._type = type + + @property + def url(self): + """Gets the url of this NotificationSubject. # noqa: E501 + + + :return: The url of this NotificationSubject. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this NotificationSubject. + + + :param url: The url of this NotificationSubject. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationSubject, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationSubject): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/notification_thread.py b/giteapy/models/notification_thread.py new file mode 100644 index 0000000..eb4a19a --- /dev/null +++ b/giteapy/models/notification_thread.py @@ -0,0 +1,271 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class NotificationThread(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'pinned': 'bool', + 'repository': 'Repository', + 'subject': 'NotificationSubject', + 'unread': 'bool', + 'updated_at': 'datetime', + 'url': 'str' + } + + attribute_map = { + 'id': 'id', + 'pinned': 'pinned', + 'repository': 'repository', + 'subject': 'subject', + 'unread': 'unread', + 'updated_at': 'updated_at', + 'url': 'url' + } + + def __init__(self, id=None, pinned=None, repository=None, subject=None, unread=None, updated_at=None, url=None): # noqa: E501 + """NotificationThread - a model defined in Swagger""" # noqa: E501 + + self._id = None + self._pinned = None + self._repository = None + self._subject = None + self._unread = None + self._updated_at = None + self._url = None + self.discriminator = None + + if id is not None: + self.id = id + if pinned is not None: + self.pinned = pinned + if repository is not None: + self.repository = repository + if subject is not None: + self.subject = subject + if unread is not None: + self.unread = unread + if updated_at is not None: + self.updated_at = updated_at + if url is not None: + self.url = url + + @property + def id(self): + """Gets the id of this NotificationThread. # noqa: E501 + + + :return: The id of this NotificationThread. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this NotificationThread. + + + :param id: The id of this NotificationThread. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def pinned(self): + """Gets the pinned of this NotificationThread. # noqa: E501 + + + :return: The pinned of this NotificationThread. # noqa: E501 + :rtype: bool + """ + return self._pinned + + @pinned.setter + def pinned(self, pinned): + """Sets the pinned of this NotificationThread. + + + :param pinned: The pinned of this NotificationThread. # noqa: E501 + :type: bool + """ + + self._pinned = pinned + + @property + def repository(self): + """Gets the repository of this NotificationThread. # noqa: E501 + + + :return: The repository of this NotificationThread. # noqa: E501 + :rtype: Repository + """ + return self._repository + + @repository.setter + def repository(self, repository): + """Sets the repository of this NotificationThread. + + + :param repository: The repository of this NotificationThread. # noqa: E501 + :type: Repository + """ + + self._repository = repository + + @property + def subject(self): + """Gets the subject of this NotificationThread. # noqa: E501 + + + :return: The subject of this NotificationThread. # noqa: E501 + :rtype: NotificationSubject + """ + return self._subject + + @subject.setter + def subject(self, subject): + """Sets the subject of this NotificationThread. + + + :param subject: The subject of this NotificationThread. # noqa: E501 + :type: NotificationSubject + """ + + self._subject = subject + + @property + def unread(self): + """Gets the unread of this NotificationThread. # noqa: E501 + + + :return: The unread of this NotificationThread. # noqa: E501 + :rtype: bool + """ + return self._unread + + @unread.setter + def unread(self, unread): + """Sets the unread of this NotificationThread. + + + :param unread: The unread of this NotificationThread. # noqa: E501 + :type: bool + """ + + self._unread = unread + + @property + def updated_at(self): + """Gets the updated_at of this NotificationThread. # noqa: E501 + + + :return: The updated_at of this NotificationThread. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this NotificationThread. + + + :param updated_at: The updated_at of this NotificationThread. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def url(self): + """Gets the url of this NotificationThread. # noqa: E501 + + + :return: The url of this NotificationThread. # noqa: E501 + :rtype: str + """ + return self._url + + @url.setter + def url(self, url): + """Sets the url of this NotificationThread. + + + :param url: The url of this NotificationThread. # noqa: E501 + :type: str + """ + + self._url = url + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(NotificationThread, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, NotificationThread): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/o_auth2_application.py b/giteapy/models/o_auth2_application.py new file mode 100644 index 0000000..3dd9897 --- /dev/null +++ b/giteapy/models/o_auth2_application.py @@ -0,0 +1,245 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class OAuth2Application(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'client_id': 'str', + 'client_secret': 'str', + 'created': 'datetime', + 'id': 'int', + 'name': 'str', + 'redirect_uris': 'list[str]' + } + + attribute_map = { + 'client_id': 'client_id', + 'client_secret': 'client_secret', + 'created': 'created', + 'id': 'id', + 'name': 'name', + 'redirect_uris': 'redirect_uris' + } + + def __init__(self, client_id=None, client_secret=None, created=None, id=None, name=None, redirect_uris=None): # noqa: E501 + """OAuth2Application - a model defined in Swagger""" # noqa: E501 + + self._client_id = None + self._client_secret = None + self._created = None + self._id = None + self._name = None + self._redirect_uris = None + self.discriminator = None + + if client_id is not None: + self.client_id = client_id + if client_secret is not None: + self.client_secret = client_secret + if created is not None: + self.created = created + if id is not None: + self.id = id + if name is not None: + self.name = name + if redirect_uris is not None: + self.redirect_uris = redirect_uris + + @property + def client_id(self): + """Gets the client_id of this OAuth2Application. # noqa: E501 + + + :return: The client_id of this OAuth2Application. # noqa: E501 + :rtype: str + """ + return self._client_id + + @client_id.setter + def client_id(self, client_id): + """Sets the client_id of this OAuth2Application. + + + :param client_id: The client_id of this OAuth2Application. # noqa: E501 + :type: str + """ + + self._client_id = client_id + + @property + def client_secret(self): + """Gets the client_secret of this OAuth2Application. # noqa: E501 + + + :return: The client_secret of this OAuth2Application. # noqa: E501 + :rtype: str + """ + return self._client_secret + + @client_secret.setter + def client_secret(self, client_secret): + """Sets the client_secret of this OAuth2Application. + + + :param client_secret: The client_secret of this OAuth2Application. # noqa: E501 + :type: str + """ + + self._client_secret = client_secret + + @property + def created(self): + """Gets the created of this OAuth2Application. # noqa: E501 + + + :return: The created of this OAuth2Application. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this OAuth2Application. + + + :param created: The created of this OAuth2Application. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def id(self): + """Gets the id of this OAuth2Application. # noqa: E501 + + + :return: The id of this OAuth2Application. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this OAuth2Application. + + + :param id: The id of this OAuth2Application. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this OAuth2Application. # noqa: E501 + + + :return: The name of this OAuth2Application. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this OAuth2Application. + + + :param name: The name of this OAuth2Application. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def redirect_uris(self): + """Gets the redirect_uris of this OAuth2Application. # noqa: E501 + + + :return: The redirect_uris of this OAuth2Application. # noqa: E501 + :rtype: list[str] + """ + return self._redirect_uris + + @redirect_uris.setter + def redirect_uris(self, redirect_uris): + """Sets the redirect_uris of this OAuth2Application. + + + :param redirect_uris: The redirect_uris of this OAuth2Application. # noqa: E501 + :type: list[str] + """ + + self._redirect_uris = redirect_uris + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OAuth2Application, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OAuth2Application): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/organization.py b/giteapy/models/organization.py old mode 100755 new mode 100644 index 9bd7ff2..cdfc7d4 --- a/giteapy/models/organization.py +++ b/giteapy/models/organization.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/payload_commit.py b/giteapy/models/payload_commit.py old mode 100755 new mode 100644 index c6f14eb..d9698a4 --- a/giteapy/models/payload_commit.py +++ b/giteapy/models/payload_commit.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,9 +16,6 @@ import six -from giteapy.models.payload_commit_verification import PayloadCommitVerification # noqa: F401,E501 -from giteapy.models.payload_user import PayloadUser # noqa: F401,E501 - class PayloadCommit(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/payload_commit_verification.py b/giteapy/models/payload_commit_verification.py old mode 100755 new mode 100644 index 7fbfa17..ec0b638 --- a/giteapy/models/payload_commit_verification.py +++ b/giteapy/models/payload_commit_verification.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.payload_user import PayloadUser # noqa: F401,E501 - class PayloadCommitVerification(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/payload_user.py b/giteapy/models/payload_user.py old mode 100755 new mode 100644 index ca12f00..3fac6e3 --- a/giteapy/models/payload_user.py +++ b/giteapy/models/payload_user.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/permission.py b/giteapy/models/permission.py old mode 100755 new mode 100644 index f18e560..8e90329 --- a/giteapy/models/permission.py +++ b/giteapy/models/permission.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/pr_branch_info.py b/giteapy/models/pr_branch_info.py old mode 100755 new mode 100644 index 6ed54f7..69270ae --- a/giteapy/models/pr_branch_info.py +++ b/giteapy/models/pr_branch_info.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.repository import Repository # noqa: F401,E501 - class PRBranchInfo(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/public_key.py b/giteapy/models/public_key.py old mode 100755 new mode 100644 index adc9c56..d475a36 --- a/giteapy/models/public_key.py +++ b/giteapy/models/public_key.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.user import User # noqa: F401,E501 - class PublicKey(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/pull_request.py b/giteapy/models/pull_request.py old mode 100755 new mode 100644 index 1a74bad..f118977 --- a/giteapy/models/pull_request.py +++ b/giteapy/models/pull_request.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,12 +16,6 @@ import six -from giteapy.models.label import Label # noqa: F401,E501 -from giteapy.models.milestone import Milestone # noqa: F401,E501 -from giteapy.models.pr_branch_info import PRBranchInfo # noqa: F401,E501 -from giteapy.models.state_type import StateType # noqa: F401,E501 -from giteapy.models.user import User # noqa: F401,E501 - class PullRequest(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/pull_request_meta.py b/giteapy/models/pull_request_meta.py old mode 100755 new mode 100644 index a96ef6d..6f5478d --- a/giteapy/models/pull_request_meta.py +++ b/giteapy/models/pull_request_meta.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/pull_review.py b/giteapy/models/pull_review.py new file mode 100644 index 0000000..a113267 --- /dev/null +++ b/giteapy/models/pull_review.py @@ -0,0 +1,375 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PullReview(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'comments_count': 'int', + 'commit_id': 'str', + 'html_url': 'str', + 'id': 'int', + 'official': 'bool', + 'pull_request_url': 'str', + 'stale': 'bool', + 'state': 'ReviewStateType', + 'submitted_at': 'datetime', + 'user': 'User' + } + + attribute_map = { + 'body': 'body', + 'comments_count': 'comments_count', + 'commit_id': 'commit_id', + 'html_url': 'html_url', + 'id': 'id', + 'official': 'official', + 'pull_request_url': 'pull_request_url', + 'stale': 'stale', + 'state': 'state', + 'submitted_at': 'submitted_at', + 'user': 'user' + } + + def __init__(self, body=None, comments_count=None, commit_id=None, html_url=None, id=None, official=None, pull_request_url=None, stale=None, state=None, submitted_at=None, user=None): # noqa: E501 + """PullReview - a model defined in Swagger""" # noqa: E501 + + self._body = None + self._comments_count = None + self._commit_id = None + self._html_url = None + self._id = None + self._official = None + self._pull_request_url = None + self._stale = None + self._state = None + self._submitted_at = None + self._user = None + self.discriminator = None + + if body is not None: + self.body = body + if comments_count is not None: + self.comments_count = comments_count + if commit_id is not None: + self.commit_id = commit_id + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if official is not None: + self.official = official + if pull_request_url is not None: + self.pull_request_url = pull_request_url + if stale is not None: + self.stale = stale + if state is not None: + self.state = state + if submitted_at is not None: + self.submitted_at = submitted_at + if user is not None: + self.user = user + + @property + def body(self): + """Gets the body of this PullReview. # noqa: E501 + + + :return: The body of this PullReview. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this PullReview. + + + :param body: The body of this PullReview. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def comments_count(self): + """Gets the comments_count of this PullReview. # noqa: E501 + + + :return: The comments_count of this PullReview. # noqa: E501 + :rtype: int + """ + return self._comments_count + + @comments_count.setter + def comments_count(self, comments_count): + """Sets the comments_count of this PullReview. + + + :param comments_count: The comments_count of this PullReview. # noqa: E501 + :type: int + """ + + self._comments_count = comments_count + + @property + def commit_id(self): + """Gets the commit_id of this PullReview. # noqa: E501 + + + :return: The commit_id of this PullReview. # noqa: E501 + :rtype: str + """ + return self._commit_id + + @commit_id.setter + def commit_id(self, commit_id): + """Sets the commit_id of this PullReview. + + + :param commit_id: The commit_id of this PullReview. # noqa: E501 + :type: str + """ + + self._commit_id = commit_id + + @property + def html_url(self): + """Gets the html_url of this PullReview. # noqa: E501 + + + :return: The html_url of this PullReview. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this PullReview. + + + :param html_url: The html_url of this PullReview. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this PullReview. # noqa: E501 + + + :return: The id of this PullReview. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PullReview. + + + :param id: The id of this PullReview. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def official(self): + """Gets the official of this PullReview. # noqa: E501 + + + :return: The official of this PullReview. # noqa: E501 + :rtype: bool + """ + return self._official + + @official.setter + def official(self, official): + """Sets the official of this PullReview. + + + :param official: The official of this PullReview. # noqa: E501 + :type: bool + """ + + self._official = official + + @property + def pull_request_url(self): + """Gets the pull_request_url of this PullReview. # noqa: E501 + + + :return: The pull_request_url of this PullReview. # noqa: E501 + :rtype: str + """ + return self._pull_request_url + + @pull_request_url.setter + def pull_request_url(self, pull_request_url): + """Sets the pull_request_url of this PullReview. + + + :param pull_request_url: The pull_request_url of this PullReview. # noqa: E501 + :type: str + """ + + self._pull_request_url = pull_request_url + + @property + def stale(self): + """Gets the stale of this PullReview. # noqa: E501 + + + :return: The stale of this PullReview. # noqa: E501 + :rtype: bool + """ + return self._stale + + @stale.setter + def stale(self, stale): + """Sets the stale of this PullReview. + + + :param stale: The stale of this PullReview. # noqa: E501 + :type: bool + """ + + self._stale = stale + + @property + def state(self): + """Gets the state of this PullReview. # noqa: E501 + + + :return: The state of this PullReview. # noqa: E501 + :rtype: ReviewStateType + """ + return self._state + + @state.setter + def state(self, state): + """Sets the state of this PullReview. + + + :param state: The state of this PullReview. # noqa: E501 + :type: ReviewStateType + """ + + self._state = state + + @property + def submitted_at(self): + """Gets the submitted_at of this PullReview. # noqa: E501 + + + :return: The submitted_at of this PullReview. # noqa: E501 + :rtype: datetime + """ + return self._submitted_at + + @submitted_at.setter + def submitted_at(self, submitted_at): + """Sets the submitted_at of this PullReview. + + + :param submitted_at: The submitted_at of this PullReview. # noqa: E501 + :type: datetime + """ + + self._submitted_at = submitted_at + + @property + def user(self): + """Gets the user of this PullReview. # noqa: E501 + + + :return: The user of this PullReview. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this PullReview. + + + :param user: The user of this PullReview. # noqa: E501 + :type: User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PullReview, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PullReview): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/pull_review_comment.py b/giteapy/models/pull_review_comment.py new file mode 100644 index 0000000..8367915 --- /dev/null +++ b/giteapy/models/pull_review_comment.py @@ -0,0 +1,453 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class PullReviewComment(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'commit_id': 'str', + 'created_at': 'datetime', + 'diff_hunk': 'str', + 'html_url': 'str', + 'id': 'int', + 'original_commit_id': 'str', + 'original_position': 'int', + 'path': 'str', + 'position': 'int', + 'pull_request_review_id': 'int', + 'pull_request_url': 'str', + 'updated_at': 'datetime', + 'user': 'User' + } + + attribute_map = { + 'body': 'body', + 'commit_id': 'commit_id', + 'created_at': 'created_at', + 'diff_hunk': 'diff_hunk', + 'html_url': 'html_url', + 'id': 'id', + 'original_commit_id': 'original_commit_id', + 'original_position': 'original_position', + 'path': 'path', + 'position': 'position', + 'pull_request_review_id': 'pull_request_review_id', + 'pull_request_url': 'pull_request_url', + 'updated_at': 'updated_at', + 'user': 'user' + } + + def __init__(self, body=None, commit_id=None, created_at=None, diff_hunk=None, html_url=None, id=None, original_commit_id=None, original_position=None, path=None, position=None, pull_request_review_id=None, pull_request_url=None, updated_at=None, user=None): # noqa: E501 + """PullReviewComment - a model defined in Swagger""" # noqa: E501 + + self._body = None + self._commit_id = None + self._created_at = None + self._diff_hunk = None + self._html_url = None + self._id = None + self._original_commit_id = None + self._original_position = None + self._path = None + self._position = None + self._pull_request_review_id = None + self._pull_request_url = None + self._updated_at = None + self._user = None + self.discriminator = None + + if body is not None: + self.body = body + if commit_id is not None: + self.commit_id = commit_id + if created_at is not None: + self.created_at = created_at + if diff_hunk is not None: + self.diff_hunk = diff_hunk + if html_url is not None: + self.html_url = html_url + if id is not None: + self.id = id + if original_commit_id is not None: + self.original_commit_id = original_commit_id + if original_position is not None: + self.original_position = original_position + if path is not None: + self.path = path + if position is not None: + self.position = position + if pull_request_review_id is not None: + self.pull_request_review_id = pull_request_review_id + if pull_request_url is not None: + self.pull_request_url = pull_request_url + if updated_at is not None: + self.updated_at = updated_at + if user is not None: + self.user = user + + @property + def body(self): + """Gets the body of this PullReviewComment. # noqa: E501 + + + :return: The body of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this PullReviewComment. + + + :param body: The body of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def commit_id(self): + """Gets the commit_id of this PullReviewComment. # noqa: E501 + + + :return: The commit_id of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._commit_id + + @commit_id.setter + def commit_id(self, commit_id): + """Sets the commit_id of this PullReviewComment. + + + :param commit_id: The commit_id of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._commit_id = commit_id + + @property + def created_at(self): + """Gets the created_at of this PullReviewComment. # noqa: E501 + + + :return: The created_at of this PullReviewComment. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this PullReviewComment. + + + :param created_at: The created_at of this PullReviewComment. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def diff_hunk(self): + """Gets the diff_hunk of this PullReviewComment. # noqa: E501 + + + :return: The diff_hunk of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._diff_hunk + + @diff_hunk.setter + def diff_hunk(self, diff_hunk): + """Sets the diff_hunk of this PullReviewComment. + + + :param diff_hunk: The diff_hunk of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._diff_hunk = diff_hunk + + @property + def html_url(self): + """Gets the html_url of this PullReviewComment. # noqa: E501 + + + :return: The html_url of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this PullReviewComment. + + + :param html_url: The html_url of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._html_url = html_url + + @property + def id(self): + """Gets the id of this PullReviewComment. # noqa: E501 + + + :return: The id of this PullReviewComment. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this PullReviewComment. + + + :param id: The id of this PullReviewComment. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def original_commit_id(self): + """Gets the original_commit_id of this PullReviewComment. # noqa: E501 + + + :return: The original_commit_id of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._original_commit_id + + @original_commit_id.setter + def original_commit_id(self, original_commit_id): + """Sets the original_commit_id of this PullReviewComment. + + + :param original_commit_id: The original_commit_id of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._original_commit_id = original_commit_id + + @property + def original_position(self): + """Gets the original_position of this PullReviewComment. # noqa: E501 + + + :return: The original_position of this PullReviewComment. # noqa: E501 + :rtype: int + """ + return self._original_position + + @original_position.setter + def original_position(self, original_position): + """Sets the original_position of this PullReviewComment. + + + :param original_position: The original_position of this PullReviewComment. # noqa: E501 + :type: int + """ + + self._original_position = original_position + + @property + def path(self): + """Gets the path of this PullReviewComment. # noqa: E501 + + + :return: The path of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this PullReviewComment. + + + :param path: The path of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._path = path + + @property + def position(self): + """Gets the position of this PullReviewComment. # noqa: E501 + + + :return: The position of this PullReviewComment. # noqa: E501 + :rtype: int + """ + return self._position + + @position.setter + def position(self, position): + """Sets the position of this PullReviewComment. + + + :param position: The position of this PullReviewComment. # noqa: E501 + :type: int + """ + + self._position = position + + @property + def pull_request_review_id(self): + """Gets the pull_request_review_id of this PullReviewComment. # noqa: E501 + + + :return: The pull_request_review_id of this PullReviewComment. # noqa: E501 + :rtype: int + """ + return self._pull_request_review_id + + @pull_request_review_id.setter + def pull_request_review_id(self, pull_request_review_id): + """Sets the pull_request_review_id of this PullReviewComment. + + + :param pull_request_review_id: The pull_request_review_id of this PullReviewComment. # noqa: E501 + :type: int + """ + + self._pull_request_review_id = pull_request_review_id + + @property + def pull_request_url(self): + """Gets the pull_request_url of this PullReviewComment. # noqa: E501 + + + :return: The pull_request_url of this PullReviewComment. # noqa: E501 + :rtype: str + """ + return self._pull_request_url + + @pull_request_url.setter + def pull_request_url(self, pull_request_url): + """Sets the pull_request_url of this PullReviewComment. + + + :param pull_request_url: The pull_request_url of this PullReviewComment. # noqa: E501 + :type: str + """ + + self._pull_request_url = pull_request_url + + @property + def updated_at(self): + """Gets the updated_at of this PullReviewComment. # noqa: E501 + + + :return: The updated_at of this PullReviewComment. # noqa: E501 + :rtype: datetime + """ + return self._updated_at + + @updated_at.setter + def updated_at(self, updated_at): + """Sets the updated_at of this PullReviewComment. + + + :param updated_at: The updated_at of this PullReviewComment. # noqa: E501 + :type: datetime + """ + + self._updated_at = updated_at + + @property + def user(self): + """Gets the user of this PullReviewComment. # noqa: E501 + + + :return: The user of this PullReviewComment. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this PullReviewComment. + + + :param user: The user of this PullReviewComment. # noqa: E501 + :type: User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(PullReviewComment, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, PullReviewComment): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/reaction.py b/giteapy/models/reaction.py new file mode 100644 index 0000000..c9be094 --- /dev/null +++ b/giteapy/models/reaction.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class Reaction(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'content': 'str', + 'created_at': 'datetime', + 'user': 'User' + } + + attribute_map = { + 'content': 'content', + 'created_at': 'created_at', + 'user': 'user' + } + + def __init__(self, content=None, created_at=None, user=None): # noqa: E501 + """Reaction - a model defined in Swagger""" # noqa: E501 + + self._content = None + self._created_at = None + self._user = None + self.discriminator = None + + if content is not None: + self.content = content + if created_at is not None: + self.created_at = created_at + if user is not None: + self.user = user + + @property + def content(self): + """Gets the content of this Reaction. # noqa: E501 + + + :return: The content of this Reaction. # noqa: E501 + :rtype: str + """ + return self._content + + @content.setter + def content(self, content): + """Sets the content of this Reaction. + + + :param content: The content of this Reaction. # noqa: E501 + :type: str + """ + + self._content = content + + @property + def created_at(self): + """Gets the created_at of this Reaction. # noqa: E501 + + + :return: The created_at of this Reaction. # noqa: E501 + :rtype: datetime + """ + return self._created_at + + @created_at.setter + def created_at(self, created_at): + """Sets the created_at of this Reaction. + + + :param created_at: The created_at of this Reaction. # noqa: E501 + :type: datetime + """ + + self._created_at = created_at + + @property + def user(self): + """Gets the user of this Reaction. # noqa: E501 + + + :return: The user of this Reaction. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this Reaction. + + + :param user: The user of this Reaction. # noqa: E501 + :type: User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Reaction, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Reaction): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/reference.py b/giteapy/models/reference.py old mode 100755 new mode 100644 index bb80d8e..389753f --- a/giteapy/models/reference.py +++ b/giteapy/models/reference.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.git_object import GitObject # noqa: F401,E501 - class Reference(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/release.py b/giteapy/models/release.py old mode 100755 new mode 100644 index a185504..7d42f08 --- a/giteapy/models/release.py +++ b/giteapy/models/release.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,9 +16,6 @@ import six -from giteapy.models.attachment import Attachment # noqa: F401,E501 -from giteapy.models.user import User # noqa: F401,E501 - class Release(object): """NOTE: This class is auto generated by the swagger code generator program. @@ -39,6 +36,7 @@ class Release(object): 'body': 'str', 'created_at': 'datetime', 'draft': 'bool', + 'html_url': 'str', 'id': 'int', 'name': 'str', 'prerelease': 'bool', @@ -56,6 +54,7 @@ class Release(object): 'body': 'body', 'created_at': 'created_at', 'draft': 'draft', + 'html_url': 'html_url', 'id': 'id', 'name': 'name', 'prerelease': 'prerelease', @@ -67,7 +66,7 @@ class Release(object): 'zipball_url': 'zipball_url' } - def __init__(self, assets=None, author=None, body=None, created_at=None, draft=None, id=None, name=None, prerelease=None, published_at=None, tag_name=None, tarball_url=None, target_commitish=None, url=None, zipball_url=None): # noqa: E501 + def __init__(self, assets=None, author=None, body=None, created_at=None, draft=None, html_url=None, id=None, name=None, prerelease=None, published_at=None, tag_name=None, tarball_url=None, target_commitish=None, url=None, zipball_url=None): # noqa: E501 """Release - a model defined in Swagger""" # noqa: E501 self._assets = None @@ -75,6 +74,7 @@ def __init__(self, assets=None, author=None, body=None, created_at=None, draft=N self._body = None self._created_at = None self._draft = None + self._html_url = None self._id = None self._name = None self._prerelease = None @@ -96,6 +96,8 @@ def __init__(self, assets=None, author=None, body=None, created_at=None, draft=N self.created_at = created_at if draft is not None: self.draft = draft + if html_url is not None: + self.html_url = html_url if id is not None: self.id = id if name is not None: @@ -220,6 +222,27 @@ def draft(self, draft): self._draft = draft + @property + def html_url(self): + """Gets the html_url of this Release. # noqa: E501 + + + :return: The html_url of this Release. # noqa: E501 + :rtype: str + """ + return self._html_url + + @html_url.setter + def html_url(self, html_url): + """Sets the html_url of this Release. + + + :param html_url: The html_url of this Release. # noqa: E501 + :type: str + """ + + self._html_url = html_url + @property def id(self): """Gets the id of this Release. # noqa: E501 diff --git a/giteapy/models/repo_commit.py b/giteapy/models/repo_commit.py old mode 100755 new mode 100644 index e6eb699..2ac2851 --- a/giteapy/models/repo_commit.py +++ b/giteapy/models/repo_commit.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,9 +16,6 @@ import six -from giteapy.models.commit_meta import CommitMeta # noqa: F401,E501 -from giteapy.models.commit_user import CommitUser # noqa: F401,E501 - class RepoCommit(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/repo_topic_options.py b/giteapy/models/repo_topic_options.py old mode 100755 new mode 100644 index c308f5a..cf3dc81 --- a/giteapy/models/repo_topic_options.py +++ b/giteapy/models/repo_topic_options.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/repository.py b/giteapy/models/repository.py old mode 100755 new mode 100644 index 35ca8b7..7d2c959 --- a/giteapy/models/repository.py +++ b/giteapy/models/repository.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,12 +16,6 @@ import six -from giteapy.models.external_tracker import ExternalTracker # noqa: F401,E501 -from giteapy.models.external_wiki import ExternalWiki # noqa: F401,E501 -from giteapy.models.internal_tracker import InternalTracker # noqa: F401,E501 -from giteapy.models.permission import Permission # noqa: F401,E501 -from giteapy.models.user import User # noqa: F401,E501 - class Repository(object): """NOTE: This class is auto generated by the swagger code generator program. @@ -63,14 +57,17 @@ class Repository(object): 'mirror': 'bool', 'name': 'str', 'open_issues_count': 'int', + 'open_pr_counter': 'int', 'original_url': 'str', 'owner': 'User', 'parent': 'Repository', 'permissions': 'Permission', 'private': 'bool', + 'release_counter': 'int', 'size': 'int', 'ssh_url': 'str', 'stars_count': 'int', + 'template': 'bool', 'updated_at': 'datetime', 'watchers_count': 'int', 'website': 'str' @@ -103,20 +100,23 @@ class Repository(object): 'mirror': 'mirror', 'name': 'name', 'open_issues_count': 'open_issues_count', + 'open_pr_counter': 'open_pr_counter', 'original_url': 'original_url', 'owner': 'owner', 'parent': 'parent', 'permissions': 'permissions', 'private': 'private', + 'release_counter': 'release_counter', 'size': 'size', 'ssh_url': 'ssh_url', 'stars_count': 'stars_count', + 'template': 'template', 'updated_at': 'updated_at', 'watchers_count': 'watchers_count', 'website': 'website' } - def __init__(self, allow_merge_commits=None, allow_rebase=None, allow_rebase_explicit=None, allow_squash_merge=None, archived=None, avatar_url=None, clone_url=None, created_at=None, default_branch=None, description=None, empty=None, external_tracker=None, external_wiki=None, fork=None, forks_count=None, full_name=None, has_issues=None, has_pull_requests=None, has_wiki=None, html_url=None, id=None, ignore_whitespace_conflicts=None, internal_tracker=None, mirror=None, name=None, open_issues_count=None, original_url=None, owner=None, parent=None, permissions=None, private=None, size=None, ssh_url=None, stars_count=None, updated_at=None, watchers_count=None, website=None): # noqa: E501 + def __init__(self, allow_merge_commits=None, allow_rebase=None, allow_rebase_explicit=None, allow_squash_merge=None, archived=None, avatar_url=None, clone_url=None, created_at=None, default_branch=None, description=None, empty=None, external_tracker=None, external_wiki=None, fork=None, forks_count=None, full_name=None, has_issues=None, has_pull_requests=None, has_wiki=None, html_url=None, id=None, ignore_whitespace_conflicts=None, internal_tracker=None, mirror=None, name=None, open_issues_count=None, open_pr_counter=None, original_url=None, owner=None, parent=None, permissions=None, private=None, release_counter=None, size=None, ssh_url=None, stars_count=None, template=None, updated_at=None, watchers_count=None, website=None): # noqa: E501 """Repository - a model defined in Swagger""" # noqa: E501 self._allow_merge_commits = None @@ -145,14 +145,17 @@ def __init__(self, allow_merge_commits=None, allow_rebase=None, allow_rebase_exp self._mirror = None self._name = None self._open_issues_count = None + self._open_pr_counter = None self._original_url = None self._owner = None self._parent = None self._permissions = None self._private = None + self._release_counter = None self._size = None self._ssh_url = None self._stars_count = None + self._template = None self._updated_at = None self._watchers_count = None self._website = None @@ -210,6 +213,8 @@ def __init__(self, allow_merge_commits=None, allow_rebase=None, allow_rebase_exp self.name = name if open_issues_count is not None: self.open_issues_count = open_issues_count + if open_pr_counter is not None: + self.open_pr_counter = open_pr_counter if original_url is not None: self.original_url = original_url if owner is not None: @@ -220,12 +225,16 @@ def __init__(self, allow_merge_commits=None, allow_rebase=None, allow_rebase_exp self.permissions = permissions if private is not None: self.private = private + if release_counter is not None: + self.release_counter = release_counter if size is not None: self.size = size if ssh_url is not None: self.ssh_url = ssh_url if stars_count is not None: self.stars_count = stars_count + if template is not None: + self.template = template if updated_at is not None: self.updated_at = updated_at if watchers_count is not None: @@ -779,6 +788,27 @@ def open_issues_count(self, open_issues_count): self._open_issues_count = open_issues_count + @property + def open_pr_counter(self): + """Gets the open_pr_counter of this Repository. # noqa: E501 + + + :return: The open_pr_counter of this Repository. # noqa: E501 + :rtype: int + """ + return self._open_pr_counter + + @open_pr_counter.setter + def open_pr_counter(self, open_pr_counter): + """Sets the open_pr_counter of this Repository. + + + :param open_pr_counter: The open_pr_counter of this Repository. # noqa: E501 + :type: int + """ + + self._open_pr_counter = open_pr_counter + @property def original_url(self): """Gets the original_url of this Repository. # noqa: E501 @@ -884,6 +914,27 @@ def private(self, private): self._private = private + @property + def release_counter(self): + """Gets the release_counter of this Repository. # noqa: E501 + + + :return: The release_counter of this Repository. # noqa: E501 + :rtype: int + """ + return self._release_counter + + @release_counter.setter + def release_counter(self, release_counter): + """Sets the release_counter of this Repository. + + + :param release_counter: The release_counter of this Repository. # noqa: E501 + :type: int + """ + + self._release_counter = release_counter + @property def size(self): """Gets the size of this Repository. # noqa: E501 @@ -947,6 +998,27 @@ def stars_count(self, stars_count): self._stars_count = stars_count + @property + def template(self): + """Gets the template of this Repository. # noqa: E501 + + + :return: The template of this Repository. # noqa: E501 + :rtype: bool + """ + return self._template + + @template.setter + def template(self, template): + """Sets the template of this Repository. + + + :param template: The template of this Repository. # noqa: E501 + :type: bool + """ + + self._template = template + @property def updated_at(self): """Gets the updated_at of this Repository. # noqa: E501 diff --git a/giteapy/models/repository_meta.py b/giteapy/models/repository_meta.py new file mode 100644 index 0000000..1c4645e --- /dev/null +++ b/giteapy/models/repository_meta.py @@ -0,0 +1,193 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class RepositoryMeta(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'full_name': 'str', + 'id': 'int', + 'name': 'str', + 'owner': 'str' + } + + attribute_map = { + 'full_name': 'full_name', + 'id': 'id', + 'name': 'name', + 'owner': 'owner' + } + + def __init__(self, full_name=None, id=None, name=None, owner=None): # noqa: E501 + """RepositoryMeta - a model defined in Swagger""" # noqa: E501 + + self._full_name = None + self._id = None + self._name = None + self._owner = None + self.discriminator = None + + if full_name is not None: + self.full_name = full_name + if id is not None: + self.id = id + if name is not None: + self.name = name + if owner is not None: + self.owner = owner + + @property + def full_name(self): + """Gets the full_name of this RepositoryMeta. # noqa: E501 + + + :return: The full_name of this RepositoryMeta. # noqa: E501 + :rtype: str + """ + return self._full_name + + @full_name.setter + def full_name(self, full_name): + """Sets the full_name of this RepositoryMeta. + + + :param full_name: The full_name of this RepositoryMeta. # noqa: E501 + :type: str + """ + + self._full_name = full_name + + @property + def id(self): + """Gets the id of this RepositoryMeta. # noqa: E501 + + + :return: The id of this RepositoryMeta. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this RepositoryMeta. + + + :param id: The id of this RepositoryMeta. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def name(self): + """Gets the name of this RepositoryMeta. # noqa: E501 + + + :return: The name of this RepositoryMeta. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this RepositoryMeta. + + + :param name: The name of this RepositoryMeta. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def owner(self): + """Gets the owner of this RepositoryMeta. # noqa: E501 + + + :return: The owner of this RepositoryMeta. # noqa: E501 + :rtype: str + """ + return self._owner + + @owner.setter + def owner(self, owner): + """Sets the owner of this RepositoryMeta. + + + :param owner: The owner of this RepositoryMeta. # noqa: E501 + :type: str + """ + + self._owner = owner + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(RepositoryMeta, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, RepositoryMeta): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/review_state_type.py b/giteapy/models/review_state_type.py new file mode 100644 index 0000000..9aa0832 --- /dev/null +++ b/giteapy/models/review_state_type.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class ReviewStateType(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """ReviewStateType - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(ReviewStateType, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, ReviewStateType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/search_results.py b/giteapy/models/search_results.py old mode 100755 new mode 100644 index 955164e..d571976 --- a/giteapy/models/search_results.py +++ b/giteapy/models/search_results.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.repository import Repository # noqa: F401,E501 - class SearchResults(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/server_version.py b/giteapy/models/server_version.py old mode 100755 new mode 100644 index 65cb6b9..2e71a20 --- a/giteapy/models/server_version.py +++ b/giteapy/models/server_version.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/state_type.py b/giteapy/models/state_type.py old mode 100755 new mode 100644 index 27057f2..2b19890 --- a/giteapy/models/state_type.py +++ b/giteapy/models/state_type.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/status.py b/giteapy/models/status.py old mode 100755 new mode 100644 index 6cd2517..0fb3773 --- a/giteapy/models/status.py +++ b/giteapy/models/status.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,9 +16,6 @@ import six -from giteapy.models.status_state import StatusState # noqa: F401,E501 -from giteapy.models.user import User # noqa: F401,E501 - class Status(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/status_state.py b/giteapy/models/status_state.py old mode 100755 new mode 100644 index 1d4271f..04032d4 --- a/giteapy/models/status_state.py +++ b/giteapy/models/status_state.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/stop_watch.py b/giteapy/models/stop_watch.py new file mode 100644 index 0000000..4855725 --- /dev/null +++ b/giteapy/models/stop_watch.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class StopWatch(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'created': 'datetime', + 'issue_index': 'int' + } + + attribute_map = { + 'created': 'created', + 'issue_index': 'issue_index' + } + + def __init__(self, created=None, issue_index=None): # noqa: E501 + """StopWatch - a model defined in Swagger""" # noqa: E501 + + self._created = None + self._issue_index = None + self.discriminator = None + + if created is not None: + self.created = created + if issue_index is not None: + self.issue_index = issue_index + + @property + def created(self): + """Gets the created of this StopWatch. # noqa: E501 + + + :return: The created of this StopWatch. # noqa: E501 + :rtype: datetime + """ + return self._created + + @created.setter + def created(self, created): + """Sets the created of this StopWatch. + + + :param created: The created of this StopWatch. # noqa: E501 + :type: datetime + """ + + self._created = created + + @property + def issue_index(self): + """Gets the issue_index of this StopWatch. # noqa: E501 + + + :return: The issue_index of this StopWatch. # noqa: E501 + :rtype: int + """ + return self._issue_index + + @issue_index.setter + def issue_index(self, issue_index): + """Sets the issue_index of this StopWatch. + + + :param issue_index: The issue_index of this StopWatch. # noqa: E501 + :type: int + """ + + self._issue_index = issue_index + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(StopWatch, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, StopWatch): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/submit_pull_review_options.py b/giteapy/models/submit_pull_review_options.py new file mode 100644 index 0000000..8d302f3 --- /dev/null +++ b/giteapy/models/submit_pull_review_options.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class SubmitPullReviewOptions(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'body': 'str', + 'event': 'ReviewStateType' + } + + attribute_map = { + 'body': 'body', + 'event': 'event' + } + + def __init__(self, body=None, event=None): # noqa: E501 + """SubmitPullReviewOptions - a model defined in Swagger""" # noqa: E501 + + self._body = None + self._event = None + self.discriminator = None + + if body is not None: + self.body = body + if event is not None: + self.event = event + + @property + def body(self): + """Gets the body of this SubmitPullReviewOptions. # noqa: E501 + + + :return: The body of this SubmitPullReviewOptions. # noqa: E501 + :rtype: str + """ + return self._body + + @body.setter + def body(self, body): + """Sets the body of this SubmitPullReviewOptions. + + + :param body: The body of this SubmitPullReviewOptions. # noqa: E501 + :type: str + """ + + self._body = body + + @property + def event(self): + """Gets the event of this SubmitPullReviewOptions. # noqa: E501 + + + :return: The event of this SubmitPullReviewOptions. # noqa: E501 + :rtype: ReviewStateType + """ + return self._event + + @event.setter + def event(self, event): + """Sets the event of this SubmitPullReviewOptions. + + + :param event: The event of this SubmitPullReviewOptions. # noqa: E501 + :type: ReviewStateType + """ + + self._event = event + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SubmitPullReviewOptions, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SubmitPullReviewOptions): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/tag.py b/giteapy/models/tag.py old mode 100755 new mode 100644 index 35f8f95..bd6eca8 --- a/giteapy/models/tag.py +++ b/giteapy/models/tag.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.commit_meta import CommitMeta # noqa: F401,E501 - class Tag(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/team.py b/giteapy/models/team.py old mode 100755 new mode 100644 index 2993ff1..9b05e30 --- a/giteapy/models/team.py +++ b/giteapy/models/team.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.organization import Organization # noqa: F401,E501 - class Team(object): """NOTE: This class is auto generated by the swagger code generator program. @@ -33,8 +31,10 @@ class Team(object): and the value is json key in definition. """ swagger_types = { + 'can_create_org_repo': 'bool', 'description': 'str', 'id': 'int', + 'includes_all_repositories': 'bool', 'name': 'str', 'organization': 'Organization', 'permission': 'str', @@ -42,29 +42,37 @@ class Team(object): } attribute_map = { + 'can_create_org_repo': 'can_create_org_repo', 'description': 'description', 'id': 'id', + 'includes_all_repositories': 'includes_all_repositories', 'name': 'name', 'organization': 'organization', 'permission': 'permission', 'units': 'units' } - def __init__(self, description=None, id=None, name=None, organization=None, permission=None, units=None): # noqa: E501 + def __init__(self, can_create_org_repo=None, description=None, id=None, includes_all_repositories=None, name=None, organization=None, permission=None, units=None): # noqa: E501 """Team - a model defined in Swagger""" # noqa: E501 + self._can_create_org_repo = None self._description = None self._id = None + self._includes_all_repositories = None self._name = None self._organization = None self._permission = None self._units = None self.discriminator = None + if can_create_org_repo is not None: + self.can_create_org_repo = can_create_org_repo if description is not None: self.description = description if id is not None: self.id = id + if includes_all_repositories is not None: + self.includes_all_repositories = includes_all_repositories if name is not None: self.name = name if organization is not None: @@ -74,6 +82,27 @@ def __init__(self, description=None, id=None, name=None, organization=None, perm if units is not None: self.units = units + @property + def can_create_org_repo(self): + """Gets the can_create_org_repo of this Team. # noqa: E501 + + + :return: The can_create_org_repo of this Team. # noqa: E501 + :rtype: bool + """ + return self._can_create_org_repo + + @can_create_org_repo.setter + def can_create_org_repo(self, can_create_org_repo): + """Sets the can_create_org_repo of this Team. + + + :param can_create_org_repo: The can_create_org_repo of this Team. # noqa: E501 + :type: bool + """ + + self._can_create_org_repo = can_create_org_repo + @property def description(self): """Gets the description of this Team. # noqa: E501 @@ -116,6 +145,27 @@ def id(self, id): self._id = id + @property + def includes_all_repositories(self): + """Gets the includes_all_repositories of this Team. # noqa: E501 + + + :return: The includes_all_repositories of this Team. # noqa: E501 + :rtype: bool + """ + return self._includes_all_repositories + + @includes_all_repositories.setter + def includes_all_repositories(self, includes_all_repositories): + """Sets the includes_all_repositories of this Team. + + + :param includes_all_repositories: The includes_all_repositories of this Team. # noqa: E501 + :type: bool + """ + + self._includes_all_repositories = includes_all_repositories + @property def name(self): """Gets the name of this Team. # noqa: E501 diff --git a/giteapy/models/time_stamp.py b/giteapy/models/time_stamp.py old mode 100755 new mode 100644 index c9bf21c..efbb3fc --- a/giteapy/models/time_stamp.py +++ b/giteapy/models/time_stamp.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/topic_name.py b/giteapy/models/topic_name.py old mode 100755 new mode 100644 index f26cc13..42ccbee --- a/giteapy/models/topic_name.py +++ b/giteapy/models/topic_name.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/topic_response.py b/giteapy/models/topic_response.py old mode 100755 new mode 100644 index a2f9566..88502d8 --- a/giteapy/models/topic_response.py +++ b/giteapy/models/topic_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/tracked_time.py b/giteapy/models/tracked_time.py old mode 100755 new mode 100644 index de2a634..7371c28 --- a/giteapy/models/tracked_time.py +++ b/giteapy/models/tracked_time.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -33,39 +33,49 @@ class TrackedTime(object): swagger_types = { 'created': 'datetime', 'id': 'int', + 'issue': 'Issue', 'issue_id': 'int', 'time': 'int', - 'user_id': 'int' + 'user_id': 'int', + 'user_name': 'str' } attribute_map = { 'created': 'created', 'id': 'id', + 'issue': 'issue', 'issue_id': 'issue_id', 'time': 'time', - 'user_id': 'user_id' + 'user_id': 'user_id', + 'user_name': 'user_name' } - def __init__(self, created=None, id=None, issue_id=None, time=None, user_id=None): # noqa: E501 + def __init__(self, created=None, id=None, issue=None, issue_id=None, time=None, user_id=None, user_name=None): # noqa: E501 """TrackedTime - a model defined in Swagger""" # noqa: E501 self._created = None self._id = None + self._issue = None self._issue_id = None self._time = None self._user_id = None + self._user_name = None self.discriminator = None if created is not None: self.created = created if id is not None: self.id = id + if issue is not None: + self.issue = issue if issue_id is not None: self.issue_id = issue_id if time is not None: self.time = time if user_id is not None: self.user_id = user_id + if user_name is not None: + self.user_name = user_name @property def created(self): @@ -109,10 +119,32 @@ def id(self, id): self._id = id + @property + def issue(self): + """Gets the issue of this TrackedTime. # noqa: E501 + + + :return: The issue of this TrackedTime. # noqa: E501 + :rtype: Issue + """ + return self._issue + + @issue.setter + def issue(self, issue): + """Sets the issue of this TrackedTime. + + + :param issue: The issue of this TrackedTime. # noqa: E501 + :type: Issue + """ + + self._issue = issue + @property def issue_id(self): """Gets the issue_id of this TrackedTime. # noqa: E501 + deprecated (only for backwards compatibility) # noqa: E501 :return: The issue_id of this TrackedTime. # noqa: E501 :rtype: int @@ -123,6 +155,7 @@ def issue_id(self): def issue_id(self, issue_id): """Sets the issue_id of this TrackedTime. + deprecated (only for backwards compatibility) # noqa: E501 :param issue_id: The issue_id of this TrackedTime. # noqa: E501 :type: int @@ -157,6 +190,7 @@ def time(self, time): def user_id(self): """Gets the user_id of this TrackedTime. # noqa: E501 + deprecated (only for backwards compatibility) # noqa: E501 :return: The user_id of this TrackedTime. # noqa: E501 :rtype: int @@ -167,6 +201,7 @@ def user_id(self): def user_id(self, user_id): """Sets the user_id of this TrackedTime. + deprecated (only for backwards compatibility) # noqa: E501 :param user_id: The user_id of this TrackedTime. # noqa: E501 :type: int @@ -174,6 +209,27 @@ def user_id(self, user_id): self._user_id = user_id + @property + def user_name(self): + """Gets the user_name of this TrackedTime. # noqa: E501 + + + :return: The user_name of this TrackedTime. # noqa: E501 + :rtype: str + """ + return self._user_name + + @user_name.setter + def user_name(self, user_name): + """Sets the user_name of this TrackedTime. + + + :param user_name: The user_name of this TrackedTime. # noqa: E501 + :type: str + """ + + self._user_name = user_name + def to_dict(self): """Returns the model properties as a dict""" result = {} diff --git a/giteapy/models/transfer_repo_option.py b/giteapy/models/transfer_repo_option.py new file mode 100644 index 0000000..9090124 --- /dev/null +++ b/giteapy/models/transfer_repo_option.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class TransferRepoOption(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'new_owner': 'str', + 'team_ids': 'list[int]' + } + + attribute_map = { + 'new_owner': 'new_owner', + 'team_ids': 'team_ids' + } + + def __init__(self, new_owner=None, team_ids=None): # noqa: E501 + """TransferRepoOption - a model defined in Swagger""" # noqa: E501 + + self._new_owner = None + self._team_ids = None + self.discriminator = None + + self.new_owner = new_owner + if team_ids is not None: + self.team_ids = team_ids + + @property + def new_owner(self): + """Gets the new_owner of this TransferRepoOption. # noqa: E501 + + + :return: The new_owner of this TransferRepoOption. # noqa: E501 + :rtype: str + """ + return self._new_owner + + @new_owner.setter + def new_owner(self, new_owner): + """Sets the new_owner of this TransferRepoOption. + + + :param new_owner: The new_owner of this TransferRepoOption. # noqa: E501 + :type: str + """ + if new_owner is None: + raise ValueError("Invalid value for `new_owner`, must not be `None`") # noqa: E501 + + self._new_owner = new_owner + + @property + def team_ids(self): + """Gets the team_ids of this TransferRepoOption. # noqa: E501 + + ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. # noqa: E501 + + :return: The team_ids of this TransferRepoOption. # noqa: E501 + :rtype: list[int] + """ + return self._team_ids + + @team_ids.setter + def team_ids(self, team_ids): + """Sets the team_ids of this TransferRepoOption. + + ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. # noqa: E501 + + :param team_ids: The team_ids of this TransferRepoOption. # noqa: E501 + :type: list[int] + """ + + self._team_ids = team_ids + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(TransferRepoOption, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, TransferRepoOption): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/giteapy/models/update_file_options.py b/giteapy/models/update_file_options.py old mode 100755 new mode 100644 index 38b8e35..9140079 --- a/giteapy/models/update_file_options.py +++ b/giteapy/models/update_file_options.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.identity import Identity # noqa: F401,E501 - class UpdateFileOptions(object): """NOTE: This class is auto generated by the swagger code generator program. @@ -37,6 +35,7 @@ class UpdateFileOptions(object): 'branch': 'str', 'committer': 'Identity', 'content': 'str', + 'dates': 'CommitDateOptions', 'from_path': 'str', 'message': 'str', 'new_branch': 'str', @@ -48,19 +47,21 @@ class UpdateFileOptions(object): 'branch': 'branch', 'committer': 'committer', 'content': 'content', + 'dates': 'dates', 'from_path': 'from_path', 'message': 'message', 'new_branch': 'new_branch', 'sha': 'sha' } - def __init__(self, author=None, branch=None, committer=None, content=None, from_path=None, message=None, new_branch=None, sha=None): # noqa: E501 + def __init__(self, author=None, branch=None, committer=None, content=None, dates=None, from_path=None, message=None, new_branch=None, sha=None): # noqa: E501 """UpdateFileOptions - a model defined in Swagger""" # noqa: E501 self._author = None self._branch = None self._committer = None self._content = None + self._dates = None self._from_path = None self._message = None self._new_branch = None @@ -74,6 +75,8 @@ def __init__(self, author=None, branch=None, committer=None, content=None, from_ if committer is not None: self.committer = committer self.content = content + if dates is not None: + self.dates = dates if from_path is not None: self.from_path = from_path if message is not None: @@ -172,6 +175,27 @@ def content(self, content): self._content = content + @property + def dates(self): + """Gets the dates of this UpdateFileOptions. # noqa: E501 + + + :return: The dates of this UpdateFileOptions. # noqa: E501 + :rtype: CommitDateOptions + """ + return self._dates + + @dates.setter + def dates(self, dates): + """Sets the dates of this UpdateFileOptions. + + + :param dates: The dates of this UpdateFileOptions. # noqa: E501 + :type: CommitDateOptions + """ + + self._dates = dates + @property def from_path(self): """Gets the from_path of this UpdateFileOptions. # noqa: E501 diff --git a/giteapy/models/user.py b/giteapy/models/user.py old mode 100755 new mode 100644 index 06f5a4b..ba5ff2d --- a/giteapy/models/user.py +++ b/giteapy/models/user.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/models/user_heatmap_data.py b/giteapy/models/user_heatmap_data.py old mode 100755 new mode 100644 index 71d53bb..719a3fa --- a/giteapy/models/user_heatmap_data.py +++ b/giteapy/models/user_heatmap_data.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,8 +16,6 @@ import six -from giteapy.models.time_stamp import TimeStamp # noqa: F401,E501 - class UserHeatmapData(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/giteapy/models/watch_info.py b/giteapy/models/watch_info.py old mode 100755 new mode 100644 index e349b9d..992bb9f --- a/giteapy/models/watch_info.py +++ b/giteapy/models/watch_info.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/giteapy/rest.py b/giteapy/rest.py old mode 100755 new mode 100644 index 729c871..78f3b80 --- a/giteapy/rest.py +++ b/giteapy/rest.py @@ -219,10 +219,7 @@ def request(self, method, url, query_params=None, headers=None, # In the python 3, the response.data is bytes. # we need to decode it to string. if six.PY3: - try: - r.data = r.data.decode('utf8') - except UnicodeDecodeError: - logger.exception("Unable to parse the data") + r.data = r.data.decode('utf8') # log response body logger.debug("response body: %s", r.data) diff --git a/setup.py b/setup.py index 6b54229..b0279ca 100755 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ def read_readme(): return f.read() NAME = "giteapy" -VERSION = "1.0.8" +VERSION = "1.12.0" # To install the library, run the following # @@ -34,6 +34,7 @@ def read_readme(): "urllib3>=1.23" ] + setup( name=NAME, version=VERSION, diff --git a/test/test_access_token.py b/test/test_access_token.py index 0d698e5..bf7028b 100755 --- a/test/test_access_token.py +++ b/test/test_access_token.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_add_collaborator_option.py b/test/test_add_collaborator_option.py index 469084c..4b6bdcd 100755 --- a/test/test_add_collaborator_option.py +++ b/test/test_add_collaborator_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_add_time_option.py b/test/test_add_time_option.py index ded93c0..b504916 100755 --- a/test/test_add_time_option.py +++ b/test/test_add_time_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_admin_api.py b/test/test_admin_api.py index 07ab868..ec9a6cb 100755 --- a/test/test_admin_api.py +++ b/test/test_admin_api.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_annotated_tag.py b/test/test_annotated_tag.py index af721af..1f983db 100755 --- a/test/test_annotated_tag.py +++ b/test/test_annotated_tag.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_annotated_tag_object.py b/test/test_annotated_tag_object.py index 4caa009..7621558 100755 --- a/test/test_annotated_tag_object.py +++ b/test/test_annotated_tag_object.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_api_error.py b/test/test_api_error.py index bef0379..65e6dc0 100755 --- a/test/test_api_error.py +++ b/test/test_api_error.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_attachment.py b/test/test_attachment.py index de6185e..95ff80b 100755 --- a/test/test_attachment.py +++ b/test/test_attachment.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_branch.py b/test/test_branch.py index 4fbcb3b..1c9b62d 100755 --- a/test/test_branch.py +++ b/test/test_branch.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_branch_protection.py b/test/test_branch_protection.py new file mode 100644 index 0000000..cdf69a0 --- /dev/null +++ b/test/test_branch_protection.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.branch_protection import BranchProtection # noqa: E501 +from giteapy.rest import ApiException + + +class TestBranchProtection(unittest.TestCase): + """BranchProtection unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBranchProtection(self): + """Test BranchProtection""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.branch_protection.BranchProtection() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_comment.py b/test/test_comment.py index 2dcb5e5..468a958 100755 --- a/test/test_comment.py +++ b/test/test_comment.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_commit.py b/test/test_commit.py index 66563f5..b2269ce 100755 --- a/test/test_commit.py +++ b/test/test_commit.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_commit_date_options.py b/test/test_commit_date_options.py new file mode 100644 index 0000000..beb43ee --- /dev/null +++ b/test/test_commit_date_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.commit_date_options import CommitDateOptions # noqa: E501 +from giteapy.rest import ApiException + + +class TestCommitDateOptions(unittest.TestCase): + """CommitDateOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCommitDateOptions(self): + """Test CommitDateOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.commit_date_options.CommitDateOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_commit_meta.py b/test/test_commit_meta.py index 4279ab1..f5f5d53 100755 --- a/test/test_commit_meta.py +++ b/test/test_commit_meta.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_commit_user.py b/test/test_commit_user.py index 979f4cf..2df1924 100755 --- a/test/test_commit_user.py +++ b/test/test_commit_user.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_contents_response.py b/test/test_contents_response.py index 7473bf9..e49ab25 100755 --- a/test/test_contents_response.py +++ b/test/test_contents_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_branch_protection_option.py b/test/test_create_branch_protection_option.py new file mode 100644 index 0000000..a668a5d --- /dev/null +++ b/test/test_create_branch_protection_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.create_branch_protection_option import CreateBranchProtectionOption # noqa: E501 +from giteapy.rest import ApiException + + +class TestCreateBranchProtectionOption(unittest.TestCase): + """CreateBranchProtectionOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateBranchProtectionOption(self): + """Test CreateBranchProtectionOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.create_branch_protection_option.CreateBranchProtectionOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_email_option.py b/test/test_create_email_option.py index f937845..b47594c 100755 --- a/test/test_create_email_option.py +++ b/test/test_create_email_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_file_options.py b/test/test_create_file_options.py index c7a53a4..ad45d6b 100755 --- a/test/test_create_file_options.py +++ b/test/test_create_file_options.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_fork_option.py b/test/test_create_fork_option.py index 69b7eb2..60dc0b2 100755 --- a/test/test_create_fork_option.py +++ b/test/test_create_fork_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_gpg_key_option.py b/test/test_create_gpg_key_option.py index d021a03..003487c 100755 --- a/test/test_create_gpg_key_option.py +++ b/test/test_create_gpg_key_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_hook_option.py b/test/test_create_hook_option.py index b3c5bff..85a22b3 100755 --- a/test/test_create_hook_option.py +++ b/test/test_create_hook_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_hook_option_config.py b/test/test_create_hook_option_config.py new file mode 100644 index 0000000..a668f79 --- /dev/null +++ b/test/test_create_hook_option_config.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.create_hook_option_config import CreateHookOptionConfig # noqa: E501 +from giteapy.rest import ApiException + + +class TestCreateHookOptionConfig(unittest.TestCase): + """CreateHookOptionConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateHookOptionConfig(self): + """Test CreateHookOptionConfig""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.create_hook_option_config.CreateHookOptionConfig() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_issue_comment_option.py b/test/test_create_issue_comment_option.py index edb3dd9..6f1da10 100755 --- a/test/test_create_issue_comment_option.py +++ b/test/test_create_issue_comment_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_issue_option.py b/test/test_create_issue_option.py index 7c249b2..92fa44d 100755 --- a/test/test_create_issue_option.py +++ b/test/test_create_issue_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_key_option.py b/test/test_create_key_option.py index 6893048..8f295cf 100755 --- a/test/test_create_key_option.py +++ b/test/test_create_key_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_label_option.py b/test/test_create_label_option.py index 0a82191..3b976da 100755 --- a/test/test_create_label_option.py +++ b/test/test_create_label_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_milestone_option.py b/test/test_create_milestone_option.py index ef9a083..7faee23 100755 --- a/test/test_create_milestone_option.py +++ b/test/test_create_milestone_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_o_auth2_application_options.py b/test/test_create_o_auth2_application_options.py new file mode 100644 index 0000000..195a5f6 --- /dev/null +++ b/test/test_create_o_auth2_application_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.create_o_auth2_application_options import CreateOAuth2ApplicationOptions # noqa: E501 +from giteapy.rest import ApiException + + +class TestCreateOAuth2ApplicationOptions(unittest.TestCase): + """CreateOAuth2ApplicationOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateOAuth2ApplicationOptions(self): + """Test CreateOAuth2ApplicationOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.create_o_auth2_application_options.CreateOAuth2ApplicationOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_org_option.py b/test/test_create_org_option.py index f68df1f..6bf3dd5 100755 --- a/test/test_create_org_option.py +++ b/test/test_create_org_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_pull_request_option.py b/test/test_create_pull_request_option.py index 23ee4b2..b4c4018 100755 --- a/test/test_create_pull_request_option.py +++ b/test/test_create_pull_request_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_pull_review_comment.py b/test/test_create_pull_review_comment.py new file mode 100644 index 0000000..73a31d2 --- /dev/null +++ b/test/test_create_pull_review_comment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.create_pull_review_comment import CreatePullReviewComment # noqa: E501 +from giteapy.rest import ApiException + + +class TestCreatePullReviewComment(unittest.TestCase): + """CreatePullReviewComment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreatePullReviewComment(self): + """Test CreatePullReviewComment""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.create_pull_review_comment.CreatePullReviewComment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_pull_review_options.py b/test/test_create_pull_review_options.py new file mode 100644 index 0000000..ecbdd7b --- /dev/null +++ b/test/test_create_pull_review_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.create_pull_review_options import CreatePullReviewOptions # noqa: E501 +from giteapy.rest import ApiException + + +class TestCreatePullReviewOptions(unittest.TestCase): + """CreatePullReviewOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreatePullReviewOptions(self): + """Test CreatePullReviewOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.create_pull_review_options.CreatePullReviewOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_create_release_option.py b/test/test_create_release_option.py index 9dce56d..a806bb8 100755 --- a/test/test_create_release_option.py +++ b/test/test_create_release_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_repo_option.py b/test/test_create_repo_option.py index 6ab8dba..3226d98 100755 --- a/test/test_create_repo_option.py +++ b/test/test_create_repo_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_status_option.py b/test/test_create_status_option.py index b296a30..275e7ff 100755 --- a/test/test_create_status_option.py +++ b/test/test_create_status_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_team_option.py b/test/test_create_team_option.py index e59edb5..f636700 100755 --- a/test/test_create_team_option.py +++ b/test/test_create_team_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_create_user_option.py b/test/test_create_user_option.py index 1c74f73..48764e0 100755 --- a/test/test_create_user_option.py +++ b/test/test_create_user_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_delete_email_option.py b/test/test_delete_email_option.py index ae0aaf1..6f727aa 100755 --- a/test/test_delete_email_option.py +++ b/test/test_delete_email_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_delete_file_options.py b/test/test_delete_file_options.py index 8643526..41c48b2 100755 --- a/test/test_delete_file_options.py +++ b/test/test_delete_file_options.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_deploy_key.py b/test/test_deploy_key.py index 1716f0c..70ca2bc 100755 --- a/test/test_deploy_key.py +++ b/test/test_deploy_key.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_edit_attachment_options.py b/test/test_edit_attachment_options.py index 6ee476a..46e0c24 100755 --- a/test/test_edit_attachment_options.py +++ b/test/test_edit_attachment_options.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_edit_branch_protection_option.py b/test/test_edit_branch_protection_option.py new file mode 100644 index 0000000..b577c32 --- /dev/null +++ b/test/test_edit_branch_protection_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.edit_branch_protection_option import EditBranchProtectionOption # noqa: E501 +from giteapy.rest import ApiException + + +class TestEditBranchProtectionOption(unittest.TestCase): + """EditBranchProtectionOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditBranchProtectionOption(self): + """Test EditBranchProtectionOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.edit_branch_protection_option.EditBranchProtectionOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_deadline_option.py b/test/test_edit_deadline_option.py index 2d7dd41..db4df4c 100755 --- a/test/test_edit_deadline_option.py +++ b/test/test_edit_deadline_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_edit_git_hook_option.py b/test/test_edit_git_hook_option.py index fde5a29..d94848a 100755 --- a/test/test_edit_git_hook_option.py +++ b/test/test_edit_git_hook_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_edit_hook_option.py b/test/test_edit_hook_option.py index f80ae1c..325fc19 100755 --- a/test/test_edit_hook_option.py +++ b/test/test_edit_hook_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_edit_issue_comment_option.py b/test/test_edit_issue_comment_option.py index d0e237a..475750c 100755 --- a/test/test_edit_issue_comment_option.py +++ b/test/test_edit_issue_comment_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_edit_issue_option.py b/test/test_edit_issue_option.py index bdfa74f..0b1dab4 100755 --- a/test/test_edit_issue_option.py +++ b/test/test_edit_issue_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_edit_label_option.py b/test/test_edit_label_option.py index 4ec283d..3520310 100755 --- a/test/test_edit_label_option.py +++ b/test/test_edit_label_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_edit_milestone_option.py b/test/test_edit_milestone_option.py index 42028bf..efa3a3a 100755 --- a/test/test_edit_milestone_option.py +++ b/test/test_edit_milestone_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_edit_org_option.py b/test/test_edit_org_option.py index be8a481..0783cb8 100755 --- a/test/test_edit_org_option.py +++ b/test/test_edit_org_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_edit_pull_request_option.py b/test/test_edit_pull_request_option.py index 7528fe8..8114afa 100755 --- a/test/test_edit_pull_request_option.py +++ b/test/test_edit_pull_request_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_edit_reaction_option.py b/test/test_edit_reaction_option.py new file mode 100644 index 0000000..0ec2e60 --- /dev/null +++ b/test/test_edit_reaction_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.edit_reaction_option import EditReactionOption # noqa: E501 +from giteapy.rest import ApiException + + +class TestEditReactionOption(unittest.TestCase): + """EditReactionOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testEditReactionOption(self): + """Test EditReactionOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.edit_reaction_option.EditReactionOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_edit_release_option.py b/test/test_edit_release_option.py index 5e4acbf..d500185 100755 --- a/test/test_edit_release_option.py +++ b/test/test_edit_release_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_edit_repo_option.py b/test/test_edit_repo_option.py index b3c0b07..900491d 100755 --- a/test/test_edit_repo_option.py +++ b/test/test_edit_repo_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_edit_team_option.py b/test/test_edit_team_option.py index e918864..baa1d12 100755 --- a/test/test_edit_team_option.py +++ b/test/test_edit_team_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_edit_user_option.py b/test/test_edit_user_option.py index f31c536..24dc59c 100755 --- a/test/test_edit_user_option.py +++ b/test/test_edit_user_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_email.py b/test/test_email.py index a522656..784bcb4 100755 --- a/test/test_email.py +++ b/test/test_email.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_external_tracker.py b/test/test_external_tracker.py index 7d44d94..f7fd687 100755 --- a/test/test_external_tracker.py +++ b/test/test_external_tracker.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_external_wiki.py b/test/test_external_wiki.py index a771430..bc4637a 100755 --- a/test/test_external_wiki.py +++ b/test/test_external_wiki.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_file_commit_response.py b/test/test_file_commit_response.py index 9987faf..755357e 100755 --- a/test/test_file_commit_response.py +++ b/test/test_file_commit_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_file_delete_response.py b/test/test_file_delete_response.py index fbaaab5..d7455ca 100755 --- a/test/test_file_delete_response.py +++ b/test/test_file_delete_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_file_links_response.py b/test/test_file_links_response.py index d43f765..2ffaebd 100755 --- a/test/test_file_links_response.py +++ b/test/test_file_links_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_file_response.py b/test/test_file_response.py index 316b2ae..d868563 100755 --- a/test/test_file_response.py +++ b/test/test_file_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_git_blob_response.py b/test/test_git_blob_response.py index bb48f82..f7bc81d 100755 --- a/test/test_git_blob_response.py +++ b/test/test_git_blob_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_git_entry.py b/test/test_git_entry.py index 60b769b..99bce60 100755 --- a/test/test_git_entry.py +++ b/test/test_git_entry.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_git_hook.py b/test/test_git_hook.py index f0b8a87..63e2520 100755 --- a/test/test_git_hook.py +++ b/test/test_git_hook.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_git_object.py b/test/test_git_object.py index df26a95..fb844b5 100755 --- a/test/test_git_object.py +++ b/test/test_git_object.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_git_tree_response.py b/test/test_git_tree_response.py index 0f10418..f054982 100755 --- a/test/test_git_tree_response.py +++ b/test/test_git_tree_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_gpg_key.py b/test/test_gpg_key.py index 6e7902c..de8ce00 100755 --- a/test/test_gpg_key.py +++ b/test/test_gpg_key.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_gpg_key_email.py b/test/test_gpg_key_email.py index a12cb77..ecfe6e0 100755 --- a/test/test_gpg_key_email.py +++ b/test/test_gpg_key_email.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_hook.py b/test/test_hook.py index 0cebdb8..344f103 100755 --- a/test/test_hook.py +++ b/test/test_hook.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_identity.py b/test/test_identity.py index 6363647..135054a 100755 --- a/test/test_identity.py +++ b/test/test_identity.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_inline_response200.py b/test/test_inline_response200.py index 8e4bd30..d29c08e 100755 --- a/test/test_inline_response200.py +++ b/test/test_inline_response200.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_inline_response2001.py b/test/test_inline_response2001.py index 68f5fa6..df14ad3 100755 --- a/test/test_inline_response2001.py +++ b/test/test_inline_response2001.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_internal_tracker.py b/test/test_internal_tracker.py index 57ebfab..d0c2745 100755 --- a/test/test_internal_tracker.py +++ b/test/test_internal_tracker.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_issue.py b/test/test_issue.py index 00079e2..3e51a7d 100755 --- a/test/test_issue.py +++ b/test/test_issue.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_issue_api.py b/test/test_issue_api.py index b1c4ed7..df13842 100755 --- a/test/test_issue_api.py +++ b/test/test_issue_api.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_issue_deadline.py b/test/test_issue_deadline.py index 16d3d05..00192b2 100755 --- a/test/test_issue_deadline.py +++ b/test/test_issue_deadline.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_issue_labels_option.py b/test/test_issue_labels_option.py index fda8886..2587993 100755 --- a/test/test_issue_labels_option.py +++ b/test/test_issue_labels_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_label.py b/test/test_label.py index 253583e..8ef23f3 100755 --- a/test/test_label.py +++ b/test/test_label.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_markdown_option.py b/test/test_markdown_option.py index d74f18e..1357a7a 100755 --- a/test/test_markdown_option.py +++ b/test/test_markdown_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_merge_pull_request_option.py b/test/test_merge_pull_request_option.py index d8cc66d..f74b3cb 100755 --- a/test/test_merge_pull_request_option.py +++ b/test/test_merge_pull_request_option.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_migrate_repo_form.py b/test/test_migrate_repo_form.py index 773130d..6696916 100755 --- a/test/test_migrate_repo_form.py +++ b/test/test_migrate_repo_form.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_milestone.py b/test/test_milestone.py index 8fe8fa4..2d67e45 100755 --- a/test/test_milestone.py +++ b/test/test_milestone.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_miscellaneous_api.py b/test/test_miscellaneous_api.py index c91a771..b3716eb 100755 --- a/test/test_miscellaneous_api.py +++ b/test/test_miscellaneous_api.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_notification_api.py b/test/test_notification_api.py new file mode 100644 index 0000000..12ced39 --- /dev/null +++ b/test/test_notification_api.py @@ -0,0 +1,83 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.api.notification_api import NotificationApi # noqa: E501 +from giteapy.rest import ApiException + + +class TestNotificationApi(unittest.TestCase): + """NotificationApi unit test stubs""" + + def setUp(self): + self.api = giteapy.api.notification_api.NotificationApi() # noqa: E501 + + def tearDown(self): + pass + + def test_notify_get_list(self): + """Test case for notify_get_list + + List users's notification threads # noqa: E501 + """ + pass + + def test_notify_get_repo_list(self): + """Test case for notify_get_repo_list + + List users's notification threads on a specific repo # noqa: E501 + """ + pass + + def test_notify_get_thread(self): + """Test case for notify_get_thread + + Get notification thread by ID # noqa: E501 + """ + pass + + def test_notify_new_available(self): + """Test case for notify_new_available + + Check if unread notifications exist # noqa: E501 + """ + pass + + def test_notify_read_list(self): + """Test case for notify_read_list + + Mark notification threads as read # noqa: E501 + """ + pass + + def test_notify_read_repo_list(self): + """Test case for notify_read_repo_list + + Mark notification threads as read on a specific repo # noqa: E501 + """ + pass + + def test_notify_read_thread(self): + """Test case for notify_read_thread + + Mark notification thread as read by ID # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notification_count.py b/test/test_notification_count.py new file mode 100644 index 0000000..6216fe4 --- /dev/null +++ b/test/test_notification_count.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.notification_count import NotificationCount # noqa: E501 +from giteapy.rest import ApiException + + +class TestNotificationCount(unittest.TestCase): + """NotificationCount unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNotificationCount(self): + """Test NotificationCount""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.notification_count.NotificationCount() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notification_subject.py b/test/test_notification_subject.py new file mode 100644 index 0000000..d6f5b84 --- /dev/null +++ b/test/test_notification_subject.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.notification_subject import NotificationSubject # noqa: E501 +from giteapy.rest import ApiException + + +class TestNotificationSubject(unittest.TestCase): + """NotificationSubject unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNotificationSubject(self): + """Test NotificationSubject""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.notification_subject.NotificationSubject() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_notification_thread.py b/test/test_notification_thread.py new file mode 100644 index 0000000..c1047a3 --- /dev/null +++ b/test/test_notification_thread.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.notification_thread import NotificationThread # noqa: E501 +from giteapy.rest import ApiException + + +class TestNotificationThread(unittest.TestCase): + """NotificationThread unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testNotificationThread(self): + """Test NotificationThread""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.notification_thread.NotificationThread() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_o_auth2_application.py b/test/test_o_auth2_application.py new file mode 100644 index 0000000..5cc1cdc --- /dev/null +++ b/test/test_o_auth2_application.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.o_auth2_application import OAuth2Application # noqa: E501 +from giteapy.rest import ApiException + + +class TestOAuth2Application(unittest.TestCase): + """OAuth2Application unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testOAuth2Application(self): + """Test OAuth2Application""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.o_auth2_application.OAuth2Application() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_organization.py b/test/test_organization.py index c2eec55..196586b 100755 --- a/test/test_organization.py +++ b/test/test_organization.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_organization_api.py b/test/test_organization_api.py index 6757cdc..38df962 100755 --- a/test/test_organization_api.py +++ b/test/test_organization_api.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_payload_commit.py b/test/test_payload_commit.py index bbbf9ca..a52776c 100755 --- a/test/test_payload_commit.py +++ b/test/test_payload_commit.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_payload_commit_verification.py b/test/test_payload_commit_verification.py index a770960..01b2f32 100755 --- a/test/test_payload_commit_verification.py +++ b/test/test_payload_commit_verification.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_payload_user.py b/test/test_payload_user.py index 6d68af2..c451d24 100755 --- a/test/test_payload_user.py +++ b/test/test_payload_user.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_permission.py b/test/test_permission.py index 9c01da2..cec9609 100755 --- a/test/test_permission.py +++ b/test/test_permission.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_pr_branch_info.py b/test/test_pr_branch_info.py index ffb20fe..75f8c22 100755 --- a/test/test_pr_branch_info.py +++ b/test/test_pr_branch_info.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_public_key.py b/test/test_public_key.py index 2d653aa..8360c91 100755 --- a/test/test_public_key.py +++ b/test/test_public_key.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_pull_request.py b/test/test_pull_request.py index 57ebcea..dec3c7d 100755 --- a/test/test_pull_request.py +++ b/test/test_pull_request.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_pull_request_meta.py b/test/test_pull_request_meta.py index 48e7024..a408c55 100755 --- a/test/test_pull_request_meta.py +++ b/test/test_pull_request_meta.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_pull_review.py b/test/test_pull_review.py new file mode 100644 index 0000000..5b55ff2 --- /dev/null +++ b/test/test_pull_review.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.pull_review import PullReview # noqa: E501 +from giteapy.rest import ApiException + + +class TestPullReview(unittest.TestCase): + """PullReview unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPullReview(self): + """Test PullReview""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.pull_review.PullReview() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pull_review_comment.py b/test/test_pull_review_comment.py new file mode 100644 index 0000000..7c42258 --- /dev/null +++ b/test/test_pull_review_comment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.pull_review_comment import PullReviewComment # noqa: E501 +from giteapy.rest import ApiException + + +class TestPullReviewComment(unittest.TestCase): + """PullReviewComment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPullReviewComment(self): + """Test PullReviewComment""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.pull_review_comment.PullReviewComment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reaction.py b/test/test_reaction.py new file mode 100644 index 0000000..f7026d0 --- /dev/null +++ b/test/test_reaction.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.reaction import Reaction # noqa: E501 +from giteapy.rest import ApiException + + +class TestReaction(unittest.TestCase): + """Reaction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testReaction(self): + """Test Reaction""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.reaction.Reaction() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_reference.py b/test/test_reference.py index 16ea4b5..fec3bfe 100755 --- a/test/test_reference.py +++ b/test/test_reference.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_release.py b/test/test_release.py index 0a6db9b..5132aa9 100755 --- a/test/test_release.py +++ b/test/test_release.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_repo_commit.py b/test/test_repo_commit.py index b3d7b7b..4d0106d 100755 --- a/test/test_repo_commit.py +++ b/test/test_repo_commit.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_repo_topic_options.py b/test/test_repo_topic_options.py index 665b60c..175f023 100755 --- a/test/test_repo_topic_options.py +++ b/test/test_repo_topic_options.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_repository.py b/test/test_repository.py index f613922..9e7dafe 100755 --- a/test/test_repository.py +++ b/test/test_repository.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_repository_api.py b/test/test_repository_api.py index 1e46ad0..770dea2 100755 --- a/test/test_repository_api.py +++ b/test/test_repository_api.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_repository_meta.py b/test/test_repository_meta.py new file mode 100644 index 0000000..8f5e887 --- /dev/null +++ b/test/test_repository_meta.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.repository_meta import RepositoryMeta # noqa: E501 +from giteapy.rest import ApiException + + +class TestRepositoryMeta(unittest.TestCase): + """RepositoryMeta unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testRepositoryMeta(self): + """Test RepositoryMeta""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.repository_meta.RepositoryMeta() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_review_state_type.py b/test/test_review_state_type.py new file mode 100644 index 0000000..4534148 --- /dev/null +++ b/test/test_review_state_type.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.review_state_type import ReviewStateType # noqa: E501 +from giteapy.rest import ApiException + + +class TestReviewStateType(unittest.TestCase): + """ReviewStateType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testReviewStateType(self): + """Test ReviewStateType""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.review_state_type.ReviewStateType() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_search_results.py b/test/test_search_results.py index 8f4cf48..e93d509 100755 --- a/test/test_search_results.py +++ b/test/test_search_results.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_server_version.py b/test/test_server_version.py index 74e1ee3..65dd6b4 100755 --- a/test/test_server_version.py +++ b/test/test_server_version.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_state_type.py b/test/test_state_type.py index d8b106a..03fe6f7 100755 --- a/test/test_state_type.py +++ b/test/test_state_type.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_status.py b/test/test_status.py index df4766f..ebf5cb2 100755 --- a/test/test_status.py +++ b/test/test_status.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_status_state.py b/test/test_status_state.py index b566342..5531a18 100755 --- a/test/test_status_state.py +++ b/test/test_status_state.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_stop_watch.py b/test/test_stop_watch.py new file mode 100644 index 0000000..4e173a4 --- /dev/null +++ b/test/test_stop_watch.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.stop_watch import StopWatch # noqa: E501 +from giteapy.rest import ApiException + + +class TestStopWatch(unittest.TestCase): + """StopWatch unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStopWatch(self): + """Test StopWatch""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.stop_watch.StopWatch() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_submit_pull_review_options.py b/test/test_submit_pull_review_options.py new file mode 100644 index 0000000..fa54462 --- /dev/null +++ b/test/test_submit_pull_review_options.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.submit_pull_review_options import SubmitPullReviewOptions # noqa: E501 +from giteapy.rest import ApiException + + +class TestSubmitPullReviewOptions(unittest.TestCase): + """SubmitPullReviewOptions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSubmitPullReviewOptions(self): + """Test SubmitPullReviewOptions""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.submit_pull_review_options.SubmitPullReviewOptions() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tag.py b/test/test_tag.py index dbb0d1b..f3a83d5 100755 --- a/test/test_tag.py +++ b/test/test_tag.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_team.py b/test/test_team.py index dd1b52f..b22449b 100755 --- a/test/test_team.py +++ b/test/test_team.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_time_stamp.py b/test/test_time_stamp.py index fe7b16f..f3f81af 100755 --- a/test/test_time_stamp.py +++ b/test/test_time_stamp.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_topic_name.py b/test/test_topic_name.py index 1f1827f..2b9951d 100755 --- a/test/test_topic_name.py +++ b/test/test_topic_name.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_topic_response.py b/test/test_topic_response.py index 32679ac..c91b783 100755 --- a/test/test_topic_response.py +++ b/test/test_topic_response.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_tracked_time.py b/test/test_tracked_time.py index 8d0456c..2c261df 100755 --- a/test/test_tracked_time.py +++ b/test/test_tracked_time.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_transfer_repo_option.py b/test/test_transfer_repo_option.py new file mode 100644 index 0000000..182535f --- /dev/null +++ b/test/test_transfer_repo_option.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Gitea API. + + This documentation describes the Gitea API. # noqa: E501 + + OpenAPI spec version: 1.1.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import giteapy +from giteapy.models.transfer_repo_option import TransferRepoOption # noqa: E501 +from giteapy.rest import ApiException + + +class TestTransferRepoOption(unittest.TestCase): + """TransferRepoOption unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTransferRepoOption(self): + """Test TransferRepoOption""" + # FIXME: construct object with mandatory attributes with example values + # model = giteapy.models.transfer_repo_option.TransferRepoOption() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_update_file_options.py b/test/test_update_file_options.py index 6ca2b05..8cc3677 100755 --- a/test/test_update_file_options.py +++ b/test/test_update_file_options.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_user.py b/test/test_user.py index cd74bda..c70fa5b 100755 --- a/test/test_user.py +++ b/test/test_user.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_user_api.py b/test/test_user_api.py index 4a8dbdd..27e7e57 100755 --- a/test/test_user_api.py +++ b/test/test_user_api.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_user_heatmap_data.py b/test/test_user_heatmap_data.py index 0374368..6ccb0fa 100755 --- a/test/test_user_heatmap_data.py +++ b/test/test_user_heatmap_data.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/test/test_watch_info.py b/test/test_watch_info.py index 54da0de..5de9e75 100755 --- a/test/test_watch_info.py +++ b/test/test_watch_info.py @@ -6,7 +6,7 @@ This documentation describes the Gitea API. # noqa: E501 OpenAPI spec version: 1.1.1 - + Generated by: https://github.com/swagger-api/swagger-codegen.git """